Grasshopper

algorithmic modeling for Rhino

Dear community,


I'm looking for a solution for kind of an easy question. I need to know how many different pieces my model has and it would be nice to get the total length of all pieces. But I already struggle evaluating the geometries dimensions.

If you have any ideas, links or suggestions, please let know! Thank you!

Views: 1958

Attachments:

Replies to This Discussion

Hi.

Check Attached. Best.

Attachments:

It's a bit tricky because you've got breps rather than lines whose length can easily be measured. However I sorted all brep edges by length and picked the longest as a stand-in for element length. Once you have this list of data it's easy enough to process it in any way you see fit:

Attachments:

I had EXACTLY the same code up through 'CSet' but then struggled mightily to sum up the total at each length.  Got some really ugly, embarrassing code which I'll post anyway just for laughs.  The bit I learned this time is use of 'MIndex' to get those totals - NICE!

Attachments:

Really nice David. I'm trying to do some similar here, but my question is how can I select a given object that has the dimensions described in the second list?

You guys are awesome! Thank you very much!

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