algorithmic modeling for Rhino
Hello,
I posted a very unclear question earlier - but I figured out where I am needing the most help. Basically how do I delete certain items from a list? I'm a complete newcomer. Here is a screenshot of what I am working with:
http://i.imgur.com/BQRMK.png
I only need item 0 (untrimmed surface) and 2 (untrimmed surface) from that list. This list will later include many more untrimmed surfaces. How do I delete all "odd" instances?
Thank you
Tags:
Hi Julia,
Take a simple Panel (that yellow Panel from the Params->Special tool box and drag it onto the canvas (the grasshopper working surface). Double left click onto it, and when the text box window appears, type: 1.
Then drag the component called "Cull index" from Sets->Sequence tool box onto the canvas. Now plug in the yellow Panel (the one we typed in "1" in it) into the "I" input of the "Cull index" component. And plug in the wire from the last component in your definition (the one from which you got this picture) to a "L" input of the "Cull index" component. That is it.
What this component does is that it deletes/removes data with particular index (in this case "1") in all lists.
Here is the preview:
So "trimmed surfaces" from all four lists have been deleted, and grasshopper on their place automatically "puts" "trimmed surfaces" with index: 2. So do not be confused because now you have trimmed surfaces with 0 and 1 indexes. All those 1 ones, are in fact previous 2 ones, just now they have lower index number because of the gap that was created between index number 0 and 2 after deletion of the ones with index:1.
It would be better if you could consult some beginner tutorials about Grasshopper. You can find them using Google or youtube.
Also the best beginner guide when it comes to books are these two:
http://www.liftarchitects.com/storage/research/Grasshopper%20Primer...
http://files.na.mcneel.com/misc/Generative%20Algorithms%20v2.zip
What if for every set {0}, {1}, etc. i have 3 items that are always sorted in a different way. F.ex. {0} i need 1, in {1} i need 2 and in {3} i need 0?
hope anyone can help
Have a look at your other post today for the answers
http://www.grasshopper3d.com/forum/topics/if-i-select-three-entitie...
Hi Danny, that is not really the same problem in the other topic, because there I have the equal lenghts, here i'm asking for 3 equal sets of coordinates that I want to clean up.
See below the picture.
Furthermore, simplifying the branches is not really working as the command simplify is ereasing the prefix (tree and branch 1) and not the suffix...
any suggestion?
to delete all odd or even instances use cull pattern. set pattern to
true
false
or
false
true
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by