s in GH.8.0004 Even if use the old C# Legacy Script component. Though it seems Danny has got it to work in an Older GH
if (S == null)return;Vector3d vec01 = new Vector3d();Vector3d vec02 = new Vector3d();if(G == null){A = S.Transpose();B = true;}else{//ReparameterizeInterval I = new Interval(0, 1);S.SetDomain(0, I);S.SetDomain(1, I);G.SetDomain(0, I);G.SetDomain(1, I);int num1 = 0;vec01.Set((S.PointAt(0.5, 0.5).X - S.PointAt(0.0, 0.5).X), (S.PointAt(0.5, 0.5).Y - S.PointAt(0.0, 0.5).Y), (S.PointAt(0.5, 0.5).Z - S.PointAt(0.0, 0.5).Z));vec02.Set((G.PointAt(0.5, 0.5).X - G.PointAt(0.0, 0.5).X), (G.PointAt(0.5, 0.5).Y - G.PointAt(0.0, 0.5).Y), (G.PointAt(0.5, 0.5).Z - G.PointAt(0.0, 0.5).Z));num1 = vec01.IsParallelTo(vec02, (1.5707963267948966 / 2));if (num1 == 0){A = S.Transpose();B = true;}else{A = S;B = false;}}
Orginal Discussion here...
http://www.grasshopper3d.com/forum/topics/switch-uv-coordinates
I need to code to complete a panelling Script for Closed surfaces that bridges the seems but having little Luck. Even with writting workrounds to find only surfaces with different UV directions
Thanks In advance
Matt
P.s I am not trying to swap the UV or flip the Matrix of a point grid.…
Added by Matt Gaydon at 11:55am on January 12, 2011
ed options for the user, say 1,2 and 3. For the second, I want the choice list to be dependent on the input of the first.Here is an example of my code..How can I get the code to run ie access SolveInstance to get the value of the first input param, before running the full solution? I set the second parameter as option to force a dummy run, but still couldn't get it to work.
public class myclass{
//public declarations:
public int firstparamvalue = 0;public static List<string> secondparamList = new List<string>();public Grasshopper.Kernel.Parameters.Param_Integer secondParam;
//in Register Input params:
pManager.AddIntegerParameter("first", "first", "first", GH_ParamAccess.item); Grasshopper.Kernel.Parameters.Param_Integer firstParam = pManager[0] as Grasshopper.Kernel.Parameters.Param_Integer;firstParam.AddNamedValue("one", 1);firstParam.AddNamedValue("two", 2);firstParam.AddNamedValue("three", 3);
pManager.AddIntegerParameter("second", "second", "second", GH_ParamAccess.item);secondParam = pManager[1] as Grasshopper.Kernel.Parameters.Param_Integer;pManager[1].Optional = true;
for (int i = 0; i < secondparamList.Count; i++) { secondparam.AddNamedValue(secondparamList[i], i + 1); }
//in Solve instance:
secondparamList.clear();
if (!DA.GetData(0, ref firstparamvalue)) { return; }
//loop through some XML, get all the elements with tag = "firstparamvalue", and use them to populate the list "secondparamlist" int secondparamvalue = 0;if (!DA.GetData(1, ref secondparamvalue)) { return; }
}…
Added by Ahmed Hosny at 12:13am on December 18, 2013
j), runs simulation in Contam and re-imports results back into Grasshopper for visualization and data processing. Contam (developed by NIST) is a multizone indoor air quality and ventilation analysis computer program. It can be used to determine infiltration, exfiltration, and room-to-room airflows in building systems driven by mechanical means, wind pressures acting on the exterior of the building, and buoyancy effects induced by the indoor and outdoor air temperature difference. You can read more about Contam at NIST website: https://www.nist.gov/services-resources/software/contam
Installation
In order to run Pigeon and and correctly re-import the results back into Grasshopper, you need to have installed the following:
1. Contam 3.2 on your C drive. You can downlaod Contam at: http://www.bfrl.nist.gov/IAQanalysis/CONTAM/download.htm
2. SimRead3 in your Contam folder. SimRead3 is a utility provided to enable you to create text files from SIM files. You can downlaod it at: http://www.bfrl.nist.gov/IAQanalysis/docs/simread32.zip. Please extract the content of the SimRead3 zip file into your Contam folder.
We would like to improve the Pigeon plugin, so please let the us know if you notice any mistake in the .prj input file, or if you have any other suggestion about the plugin's usability.
Disclaimer
The authors reserve the right to not be responsible for the performance and results of the plugin. The entire risk as to the quality and performance of the program is with you. Should the program prove defective, you assume the cost of all necessary servicing, repair or correction.
Credits
Pigeon plugin was developed by Rusne Sileryte and Antonio D'Aquilio as spin-off from a research project at TU Delft supervised by Michela Turrin and Eric van den Ham.…
of pitch forwards and backwards2. What effect do the following have on the system... a) Angle of Attack (AOA) of the front wing b) AOA of the rear wing c) Position of the mast along the fuselage. d) Position of rider above the mast (distribution of weight between front and rear feet amd position of the mast between the feet).So, in essence I want to model a 2 dimensional system as follows...I would like to incorporate a coefficient of lift versus AOA for the front and rear wings.Data for this can be found in text file format for example here for the Eppler 817 airfoil that I want to use... EPPLER817 DATAI might need more info than this though???Assume constant velocity???Ultimately, the lift generated by the hydrofoil will equal the weight of the rider otherwise you would sink or jump forever upwards but the hydrofoil can generate more lift or less lift than the rider depending on its angle of attack. I could assume the wing can generate -1.0x to 1.5x the weight of the rider in lift?The rear wing is usually approx 1/3 the size of the front wing. So perhaps assume 1/3 of the lift of the front wing although I will probably use a different airfoil section which will have different lift characteristics.Assume the rider can shift weight forwards and backwards between front foot and rear foot to keep the foil level, but perhaps include a time lag or some means of indicating how stable the system is.Ignore the water surface and assume the wings remain submerged.I want to assess the difference between having an AOA on the front wing and no AOA on the rear wing versus no AOA on the front but a AOA that creates a downforce on the rear wing (Which is how they are normally configured I think). I believe the rear wing is alwasy trying to pitch the front wing upwards creating a greater AOA and hence more lift. The rider has to keep pressure on their front foot to stop the front wing stalling and control the lift to be equal to their weight.My aim is to understand what parameters to use for front wing AOA, rear wing AOA and mast position to create a hydrofoil that is stable but not so stable that it takes a lot of effort to pitch it forwards and backwards. So I'm not looking for the most stable configuration, I'm looking to avoid something that is really unstable or requires (for example) the rider to put 100% of weight on one foot!Is it possible to create a meaningful simulation of this with Kangaroo 1 or 2? I made a start... Not sure I've approached it in the right way and haven't attempted to add the coefficient of lift vs AOA feedback.A video of kite hydrofoiling...
More info for those still reading...Kite hydrofoils come in many shapes and sizes... there are high aspect ration wings for racing, low aspect wings for beginners / low speed. There seem to be many configurations of mast position, feet position over the mast, length of fuselage, size of front wing to rear wing etc etc. I'm planning on CNC machining the front wing, fuselage and rear wing in one piece made up from bamboo. Then applying glass fibre or carbon fibre. I already have an aluminium mast and will make a board.…
Added by martyn hogg at 1:52pm on November 14, 2016
cremental release is available for download. It fixes several bugs reported in the 0.9.0005 & 0.9.0006 versions. To wit:
Computer mice with smooth scrolling would not zoom well, this is fixed.
Previewable parameters with a lot of consecutive null items would crash, this is fixed.
Identical GHA files would collide during the loading process, this is handled.
GHA files with identical names would collide during the loading process, this is handled.
Solver Undo setting was not persistent, this is fixed.
Widget ZUI Zoom setting was not persistent, this is fixed.
Markov Widget Corner setting was not persistent, this is fixed.
Markov Widget Suggestion Count setting was not persistent, this is fixed.
Drag and Drop on Document and Template preview materials wasn't recorded, this is fixed.
AssignDataToParameter() COM-Access method was broken, this is fixed.
Geometry and Generic parameters with persistent data would not deserialize correctly, this is fixed.
Operator shortcuts via the Canvas popup instantiation menu no longer assigned data to the second parameter, this is fixed.
Cull Duplicates component did not always show the correct label upon deserialization, this is fixed.
Legacy VB/C# components would not correctly deserialize List access on input parameters, this is fixed.
Cloud Display component would still display old sprites on disconnect, this is fixed.
Minor changes to a document would trigger lengthy preview cache updates, slowing Grasshopper down. This is fixed.
Sphere 4Pt did not work correctly, this it fixed.
Failed data conversions in parameters would result in missing entries, this is fixed.
Text Tag components (2D & 3D) would not bake via the component menu, this is fixed.
There are also some new features:
Added Jump object for quickly navigating across a Canvas (Params.Util dropdown).
Added Relative Differences component which is basically the inverse of Mass Addition (Math.Operators dropdown).
Added tooltip wiggle controls to the Preferences window, Interface section.
'Draw Full Names' now also attempts to change the display of existing components, but only in the active document.
Drag+Dropping GHA, GHPY and GHUSER files onto the canvas now puts the original file into the bin.
Replaced Set Union component with a new one that has variable input parameters.
Replaced Set Intersection component with a new one that has variable input parameters.
Replaced And and Ternary And components with a single new one that has variable input parameters.
Replaced Or and Ternary Or components with a single new one that has variable input parameters.
Replaced Concatenate component with a new one that has variable input parameters.
Concatenate component now has a segment join option available via the component menu.
Added Digit options to the Transform Matrix Display object.
Integer parameters which represent options now have more informative context menus.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
…
Added by David Rutten at 11:06am on September 14, 2012
hat since we create a list of materials and we assign them to surfaces - volumes the next step could be to have an Life Cycle Analysis and Financial assessment produced.
The most common form to produce an LCA into a form that is commonly used and easily communicated is in the form of Environmental Product Declarations (EPDs) that follow ISO 14025:2006. As every form of LCA, EPDs raise a bunch of question regarding their boundaries and the accuracy of the results especially if we include the factor of location. In comparison with other LCA practices though, EPDs have to be followed by Product Category Rules (defining the boundaries of the study) that can be reviewed by external parties if the EPD is to go public. Part from that EPD results reflect each stage of the life cycle of a product including potential benefits from Reuse or Recycling. Finally if you have a system - for example a building - you can add the EPDs of the different subcomponents forming the building and get a final EPD for the building itself - the point where I think HB's functionality is fully aligned.
The financial assessment can easily be concluded if one has the price of the material he/she uses. Finally the environmental indicators of the EPDs (LCI, LCIA) can be translated into Shadow Costs (Shadow costs for Environmental Indicators here) and added to the final financial assessment as an option.
I have developed a similar plug-in (in C#) for Grasshopper for my master's thesis last year. The project focused on the comparison between constructing normally and constructing implementing Design for Deconstruction practices in steel buildings. The idea was to compare the two cases based on their environmental and financial performance. In the process I included also options for transportation of the material and for shadow cost, embodied energy and carbon assessment and more. The final outcome can be visualised in Rhino's viewports and exported to excel sheets. The plug-in is connected to local db with EPD data for steel profiles. The same scheme though can be followed for any type of material if we have the right database to connect it to!
Please have a look if interested at the report here! And let me know if you have any questions!
Please note that the report includes 3+ chapters dedicated to design for deconstruction practices e.t.c that are irrelevant with the topic but maybe interesting to read:)
Also if someone is interested in the report I can always send it to you.
(I will upload a video -runthrough of the plug-in later this week)
I would be very interested to have these capabilities in LB and HB and happy to help realising it!
Thanks
Tasos
…
oftware connections built from the initial seed of the project. As always you can download the new release from Food4Rhino. Make sure to remove the older version of Ladybug and Honeybee and update your scripts.
This release is also special since today it is just about 3 years (3 years and 2 weeks) from the first release of Ladybug. As with any release, there have been a number of bug fixes and improvements but we also have some major news this time. In no specific order and to ensure that the biggest developments do not get lost in the extensive list of updates, here are the major ones:
Mostapha is re-writing Ladybug!
Ladybug for DynamoBIM is finally available.
Chris made bakeIt really useful by incorporating an export pathway to PDFs and vector-based programs.
Honeybee is now connected to THERM and the LBNL suite thanks to Chris Mackey.
Sarith has addressed a much-desired wish for Honeybee (Hi Theodore!) by adding components to model electric lighting with Radiance.
Djordje is on his way to making renewable energy deeply integrated with Ladybug by releasing components for modeling solar hot water.
There is new bug. Check the bottom of the post for Dragonfly!
Last but definitely not least (in case you’re not still convinced that this release is a major one) Miguel has started a new project that brings some of Ladybug’s features directly to Rhino. We mean Rhino Rhino - A Rhino plugin! Say hi to Icarus! #surprise
Before we forget! Ladybug and Honeybee now have official stickers. Yes! We know about T-Shirts and mugs and they will be next. For now, you can deck-out your laptops and powerhouse simulation machines with the symbology of our collaborative software ecosystem.
Now go grab a cup of tea/coffee and read the details below:
Rewriting Ladybug!
Perhaps the most far-reaching development of the last 4 months is an effort on the part of Mostapha to initiate a well structured, well documented, flexible, and extendable version of the Ladybug libraries. While such code is something that few community members will interact with directly, a well-documented library is critical for maintaining the project, adding new features, and for porting Ladybug to other software platforms.
The new Ladybug libraries are still under development across a number of new repositories and they separate a ladybug-core, which includes epw parsing and all non-geometric functions, from interface-specific geometry libraries. This allows us to easily extend Ladybug to other platforms with a different geometry library for each platform (ie. ladybug-grasshopper, ladybug-dynamo, ladybug-web, etc) all of which are developed on top of the ladybug-core.
Without getting too technical, here is an example of a useful outcome of this development. If you want to know the number of hours that relative humidity is more than 90% for a given epw, all that you have to code (in any python interface) is the following:
import ladybug as lb
_epwFile = r"C:\EnergyPlusV7-2-0\WeatherData\USA_CO_Golden-NREL.724666_TMY3.epw"
epwfile = lb.epw.EPW(_epwFile)
filteredData = epwfile.relativeHumidity.filterByConditionalStatement('x>90')
print "Number of hours with Humidity more than 90 is %d "%len(filteredData.timeStamps)
Compare that to the 500 + lines that you would have had to write previously for this operation, which were usually tied to a single interface! Now let’s see what will happen if you want to use the geometry-specific libraries. Let’s draw a sunpath in Grasshopper:
import ladybuggrasshopper.epw as epw
import ladybuggrasshopper.sunpath as sunpath
# get location data form epw file
location = epw.EPW(_epwFile).location
# initiate sunpath based on location
sp = sunpath.Sunpath.fromLocation(location, northAngle = 0, daylightSavingPeriod = None, basePoint =cenPt, scale = scale, sunScale = sunScale)
# draw sunpath geometry
sp.drawAnnualSunpath()
# assign geometries to outputs
...
Finally we ask, how would this code will look if we wanted to make a sunpath for dynamo? Well, it will be exactly the same! Just change ladybuggrasshopper in the second line to ladybugdynamo! Here is the code which is creating the sunpath below.
With this ease of scripting, we hope to involve more of our community members in our development and make it easy for others to use ladybug in their various preferred applications. By the next release, we will produce an API documentation (documentation of all the ladybug classes, methods and properties that you can script with) and begin making tutorials for those interested in getting deeper into Ladybug development.
LADYBUG
1 - Initial Release of Ladybug for Dynamo:
As is evident from the post above, we are happy to announce the first release of Ladybug for Dynamo! You can download the ladybug package from Dynamo package manager. Make sure to download version 0.0.6 which is actually 0.0.1! It took a number of trial and errors to get it up there. Once you have the file downloaded you can watch these videos to get started:
The source code can be find under ladybug-dynamo repository and (as you can already guess) it is using the new code base. It includes a very small toolkit of essential Ladybug components/nodes but it has enough to get you started. You can import weather files, draw sunpaths and run sunlighthours or radiation analyses.
There are two known issues in this release but neither of them is critical. You need to have Dynamo 0.9.1 or higher installed which you can download from here (http://dynamobuilds.com/). It is recommended that you run the scripts with ‘Manual’ run (as opposed to ‘Automatic’) since the more intense calculations can make Dynamo crash in automatic mode.
To put things in perspective, here is how we would map Ladybug for Dynamo vs Ladybug and Honeybee for Grasshopper on the classic ‘Hype graph’. The good news is that what we learned a lot from the last three years, making development of the Dynamo version easier and getting us to the plateau of productivity faster.
We should also note that the current development of the Dynamo interface is behind that of the Ladybug-Core, which means there are a number of features that are developed in the code but haven’t made their way to the nodes yet. They will be added gradually over the next month or two.
If you’re interested to get involved in the development process or have ideas for the development, follow ladybug on Facebook, Twitter and Github. We will only post major release news here. Facebook, github and twitter will be the main channels for posting the development process. There will also be a release of a new ladybug for Grasshopper soon that will use the came Ladybug-Core libraries as the Dynamo interface [Trying hard not to name it as Ladybug 2].
2 - New Project “Icarus” Provides Ladybug Capabilities Directly in Rhino
Speaking of expanded cross-platform capabilities, the talented Miguel Rus has produced a standalone Rhino Plugin off of the original Ladybug code that has been included in this release. After writing his own core C# libraries, Miguel’s plugin enables users to produce sunpath and run sunlight hours analyses in the Rhino scene without need of opening Grasshopper or engaging the (sometimes daunting) act of visual scripting.
This release includes his initial RHP plugin file. It is hoped that Miguel’s efforts will extend some of the capabilities of environmental design to individuals who are unfamiliar with visual scripting, casting the network of our community into new territory. We need your help spreading the word about Icarus since the people who will benefit the most from it have probably not read this far into the release notes. Also, as the project is in the early stages, your feedback can make a great difference. You can download the current release from this link.
Once you download the zip file. Right click and unblock it. Then extract the files under C:\Program Files\Rhinoceros 5 (64-bit)\Plug-ins\ folder. Drag and drop the RHP file into Rhino and you should be ready to go. You can either type Icarus in the command line or open it via the panels. Here is a short video that shows how to run a sunlighhours analysis study in Rhino.
3 - BakeIt Input Now Supports a Pathway to PDF +Vector Programs
As promised in the previous release, the BakeIt_ option available on Ladybug’s visual components has been enhanced to provide a full pathway to vector-based programs (like Illustrator and Inkscape) and eases the export to vector formats like PDFs.
This means that the BakeIt_ operation now places all text in the Rhino scene as actual editable text (not meshes) and any colored meshes are output as groups of colored hatches (so that they appear as color-filled polygons in vector-based programs). There is still an option to bake the colored geometries as light meshes (which requires smaller amounts of memory and computation time) but the new hatched capability should make it easier to incorporate Ladybug graphics in architectural drawings and documents like this vector psychrometric chart.
4 - Physiological Equivalent Temperature (PET) Now Available
Thanks to the efforts of Djordje Spasic, it is now possible to compute the common outdoor comfort metric ‘Physiological Equivalent Temperature’ (PET) with Ladybug. The capability has been included with this release of “Thermal Comfort Indices” component and is supported by a “Body Characteristics” component in the Extra tab. PET is particularly helpful for evaluating outdoor comfort at a high spatial resolution and so the next Honeybee release will include an option for PET with the microclimate map workflow.
5 - Solar Hot Water Components Available in WIP
Chengchu Yan and Djordje Spasic have built a set of components that perform detailed estimates of solar hot water. The components are currently undergoing final stages of testing and are available in the WIP tab of this release. You can read the full release notes for the components here.
6 - New Ladybug Graphic Standards
With the parallel efforts or so many developers, we have made an effort in this release to standardize the means by which you interact with the components. This includes warnings for missing inputs and the ability to make either icons or text appear on the components as you wish (Hi Andres!). A full list of all graphic standards can be found here. If you have any thoughts or comments on the new standards, feel free to voice them here.
7 - Wet Bulb Temperature Now Available
Thanks to Antonello Di Nunzio - the newest member of the Ladybug development team, it is now possible to calculate wet bulb temperature with Ladybug. Antonello’s component can be found under the WIP tab and takes inputs of dry bulb temperature, relative humidity, and barometric pressure.
8 - New View Analysis Types
The view analysis component now allows for several different view studies in addition to the previous ‘view to test points.’ These include, skyview (which is helpful for studies of outdoor micro-climate), as well as spherical view and ‘cone of vision’ view, which are helpful for indoor studies evaluating the overall visual connection to the outdoors.
HONEYBEE
1 - Connection to THERM and LBNL Programs
With this release, many of you will notice that a new tab has been added to Honeybee. The tab “11 | THERM” includes 7 new components that enable you to export ready-to-simulate Lawrence Berkeley National Lab (LBNL) THERM files from Rhino/Grasshopper. THERM is a 2D finite element heat flow engine that is used to evaluate the performance of wall/window construction details by simulating thermal bridging behavior. The new Honeybee tab represents the first ever CAD plugin interface for THERM, which has been in demand since the first release of LBNL THERM several years ago. The export workflow involves the drawing of window/wall construction details in Rhino and the assigning of materials and boundary conditions in Grasshopper to produce ready-to-simulate THERM files that allow you to bypass the limited drawing interface of THERM completely. Additional components in the “11 | THERM” tab allow you to import the results of THERM simulations back into Grasshopper and assist with incorporating THERM results into Honeybee EnergyPlus simulations. Finally, two components assist with a connection to LBNL WINDOW for advanced modeling of Glazing constructions. Example files illustrating many of the capabilities of the new components can be found in there links.
THERM_Export_Workflow, THERM_Comparison_of_Stud_Wall_Constructions
Analyze_THERM_Results, Thermal_Bridging_with_THERM_and_EnergyPlus
Import_Glazing_System_from_LBNL_WINDOW, Import_LBNL_WINDOW_Glazing_Assembly_for_EnergyPlus
It is recommended that those who are using these THERM components for the first time begin by exploring this example file.
Tutorial videos on how to use the components will be posted soon. A great deal of thanks is due to the LBNL team that was responsive to questions at the start of the development and special thanks goes to Payette Architects, which allowed Chris Mackey (the author of the components) a significant amount of paid time to develop them.
2 - Electrical Lighting Components with Enhanced Capabilities for Importing and Manipulating IES Files
Thanks to the efforts of Sarith Subramaniam, it is now much easier and more flexible to include electric lighting in Honeybee Radiance simulations. A series of very exciting images and videos can be found in his release post.
You can find the components under WIP tab. Sarith is looking for feedback and wishes. Please give them a try and let him know your thoughts. Several example files showing how to use the components can be found here. 1, 2, 3.
3- Expanded Dynamic Shade Capabilities
After great demand, it is now possible to assign several different types of control strategies for interior blinds and shades for EnergyPlus simulations. Control thresholds range from zone temperature, to zone cooling load, to radiation on windows, to many combinations of these variables. The new component also features the ability to run EnergyPlus simulations with electrochromic glazing. An example file showing many of the new capabilities can be found here.
Dragonfly Beta
In order to link the capabilities of Ladybug + Honeybee to a wider range of climatic data sets and analytical tools, a new insect has been initiated under the name of Dragonfly. While the Dragonfly components are not included with the download of this release, the most recent version can be downloaded here. An example file showing how to use Dragonfly to warp EPW data to account for urban heat island effect can also be found here. By the next release, the capabilities of Dragonfly should be robust enough for it to fly on its own. Additional features that will be implemented in the next few months include importing thermal satellite image data to Rhino/GH as well as the ability to warp EPW files to account for climate change projections. Anyone interested in testing out the new insect should feel free to contact Chris Mackey.
And finally, it is with great pleasure that we welcome Sarith and Antonello to the team. As mentioned in the above release notes, Sarith has added a robust implementation for electric light modeling with Honeybee and Antonello has added a component to calculate wet bulb temperature while providing stellar support to a number of people here on the GH forum.
As always let us know your comments and suggestions.
Enjoy!
Ladybug+Honeybee development team
PS: Special thanks to Chris for writing most of the release notes!…
ue, cache this value. Iterate over all items in the collection and remove them if they equal the cache.
Iterate over all items in the collection. Iterate over all other items in the collection. If there is no equality, copy the item into a new list.
Iterate over all items in the collection (except the last one). Then iterate over all subsequent items. If the subsequent item matches the current item, remove the subsequent item and set a deletion boolean. When you're done iterating over all subsequent items, check the deletion bool and remove the current item if it's true.
(1) in VB:
For i As Int32 = 0 To list.Count - 2
If (i >= list.Count-1) Then Exit For
Dim cache As Int32 = list(i)
Dim delete As Boolean = False
For j As Int32 = i+1 To list.Count - 1
If (list(i) = list(j)) Then
delete = True
Exit For
End If
Next
If (delete) Then
For j As Int32 = list.Count - 1 To 0 Step -1
If (list(j) = cache) Then
list.RemoveAt(j)
Next
End If
Next
(3) in C#:
for (int i = 0; i < list.Count; i++)
{
bool deleteItem = false;
for (int j = list.Count-1; j > i; j--)
{
if (list[i] = list[j])
{
list.RemoveAt(j);
deleteItem = true;
}
}
if (deleteItem)
list.RemoveAt(i);
}
There are all kinds of clever tricks you can use with Linq and I'm sure that python has some clever list handling as well. But from a pure no-tricks and no-optimizations point of view the above would be my first approach.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
Added by David Rutten at 5:13am on February 14, 2013
ial command:create: Divide Curve, Voronoi, Area, Circle
If there are multiple instances of a single component, then you can assign them IDs (according to Ángel's suggestion) using square brackets:create: Divide Curve, Circle[1], Circle[2]You can use numbers or words, whatever you want to identify a component.
Parameters are written in parenthesis, in front if they are input parameters, trailing if they are outputs:Voronoi(C) --> (G)AreaThis will conflict somewhat with components which already use parenthesis in their name, but we can simply consider the first or last parenthesis pair to indicate the parameter. In other words, the ambiguity can be resolved because all alternative interpretations are invalid.
K didn't like my usage of an inverse arrow ( <-- ) to assign properties, I didn't like her suggestion of a different inverse arrow ( <== ). The equals symbol seems to be a halfway decent alternative, eventhough K still doesn't like it:Voronoi = Preview:Off
All sorts of properties can be assigned using this notation, including name, position, enabledness etc.
We haven't decided on a good way to assign initial properties quickly. Your first suggestion [Slider=60] may work in conjunction with the create statement, but it is somewhat awkward. I suppose the logical way for this to work is to simply type:slider = 0..10..50using the shorthand notation for creating a new object (by mentioning it out of the blue) and immediately assigning a property to it.
Does this approach violate some of the goals you had in mind originally?
--
David Rutten
david@mcneel.com…