Grasshopper

algorithmic modeling for Rhino

Any idea how to select the largest element from a BREP split operation.

Added complexity: the split operation works on a tree of BREPs, resulting in a tree with two items on each leaf. From each leaf I want to select the largest item. The largest item is not always in the same position on the list of split results.

Simple example:

"tree path -> contents"

[0;0] -> two elements, the first is the largest

[1;0] -> two elements, the first is the largest

[0;1] -> two elements, the second is the largest

[1;1] -> two elements, the first is the largest

Views: 854

Replies to This Discussion

This is one way.

Attachments:

Great, thank you very much. I will try this tomorrow!

It works flawlessly - I have used the length of the elements' bounding box diagonal as sorting key, so I don't have to compute the area-mass properties for each element, improving the computation time for large data sets.

Thanks again!

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