algorithmic modeling for Rhino
Hi Family,
I know the forum is filled with info on this subject (which I am still searching through) however I have not been able to figure this organizational issue out just yet.
Basically I would like to manipulate a part of a group of branches and then merge that back in place into the original Set/List. For example, say I have branches of control points of cells of a grid and I would like to do something with the ones that are inside a circle and then place those edited points back into the original list (replacing its previous values). As you can see in the example some branches aren't affected and thus should preserve its original values while ones that are manipulated vary in the number of items in the branch that are changed. Any help?
Tags:
The "Sift Pattern" and "Combine Data" are meant for exactly this type of action. Sift splits your list (or in your case, each list in your data tree) into multiple lists according to an index pattern (so in your def replace Dispatch with Sift Pattern). The trick is that it keeps the list order intact by putting null values as placeholders. Then, you perform your operations on the portion of the list you want (say, in your case, those points in the circle). Then just plug both streams back into Combine Data, and it eliminates the nulls and puts your data tree back in the same order it started.
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