Grasshopper

algorithmic modeling for Rhino

Does anyone have any ideas for efficiently comparing data in paths contained in one tree? I have a data structure with 3 paths, each contains true/false statements relating to points. I need to compare these statements to one another with an AND gate, in order to cull the points from a list, however I do not want to have duplicate data. I can do this perfectly well for three paths using the explode tree component. This would not be a problem however I know that I will need to compare at least 40 paths. Its doable with the explode tree component just not elegant.

thoughts?

joel

Views: 231

Replies to This Discussion

To help clarify this issue I have uploaded two files, any help would be greatly appreciated.

best,

joel
Attachments:
Hey, I think this is what you're trying to do. Basically, you can use a path mapper to swap out 3600 and n, so you wind up with 3600 lists of n values each. You can then use a mass addition (true evaluates to 1, false to 0) so if all n are true, the sum of each of the 3600 lists should be equal to n. You can compare the results of the mass addition with the list length of each one, which should also be equal to n. If all n values are true, it will return true, else it will return false. Another path mapper converts the data back to the form you need to use it as a cull pattern.

Hope this is what you were after!
Attachments:
Andrew thank you!
This simplifies my life to no end, waiting around for incremental changes has been driving me up the wall. If I substitute the cull component with a dispatch I get both sets of points, those in the range and those out of the range.

joel

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service