Grasshopper

algorithmic modeling for Rhino

With multiple shapes, is there a way to calculate the total area moments, and centroid for the group?

 

Rhino3D can do this by selecting all the areas in question, analyze, area moments, however, there doesn't seem to be a way to do similar in GH. Even Brep join returns the individual element's centroids, not that of the group.

 

Tried union, group, etc.

 

Any slick way?

Views: 1257

Replies to This Discussion

VB or C# scripting. There is no component for computing these properties for disjoint shapes and moments/centroids cannot be simply added together. See the attached about how to leverage the Rhino SDK to achieve this.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Attachments:

Pretty cool. It works for 3D solids, which is great, but not for planar surfaces, however, to use this for 2D surfaces only, an equal extrusion to the 2D surface, giving it volume seems to allow it to work for that plan dimension. Great script, need to learn the syntax so I can take it to the next level, for now this will do the trick!

Thanks

Planar surfaces don't have volumes, they have areas.

Instead of VolumeMassProperties, you need to use AreaMassProperties in those cases.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

However, AreaMassProperties seems to lack the "Sum" method you're relying on in your volume example. Am I missing something?

Until something that can use multiple regions to calculate area properties comes along I have resorted to a work around where I connect all the surfaces with a hair-width surface and then Region Union them.

That Solution is something I did with a composite deck properties: added a small wedge so the areas "connected". It worked, but for something like a bolt group, or separated shapes, it becomes laborious, however, I suppose a "fit closed line", with thickness for area through the individual centroids would work. Nonetheless, that VB script seems as if it'll work, since it does need volume, but for areas with equal volumes, the same result in the planar view.

yeah, what makes the VB script work for volume, even with little thickness, and not for areas, exactly same principal, less dimensions.

Hi David,

Is there a version of this that will work for Area mass properties?

Thanks,

Eric

If I'm not mistaken, to calculate the area centroid without scripting, you can take the weighted average of the individual centroids, where the weight for each is the area of that region.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service