Trying to create closed breps so I can find the volume

Hello

I have created a structural model using karamba in grasshopper. My aim is to find the total volume of all of my beams, columns and trusses, preferably using closed breps. I have tried baking the beam viewer component and this produced meshes and curves in rhino. I then tried converting these meshes into breps however these breps are open at each end, which means I cannot calculate the volume. I thought cap holes might work however I have not had any luck. Any help would be much appreciated.

example of open column end


close brep ends.gh (12.3 KB)
hexagon with duplicates removed.3dm (466.0 KB)

Each of the beams you are starting with consists of 3 disjoint meshes.

You need to:

  1. Separate the disjoint meshes.
  2. Convert meshes to breps (open at this point).
  3. Cap the open breps.
  4. Solid union the closed breps.

close brep ends_re.gh (11.0 KB)

The whole definition takes ~12 seconds to run on my old computer (solid Union operations tend to be slow).

References your .3dm file from above:

-Kevin

Hi Kevin

Thanks for your help! The changes you made were working perfectly, however I wanted to change my diagonal truss members into rectangular hollow sections (RHS). The current code does not like this change and return invalid breps. All other elements are working fine. I think it is because the RHS members have an interior and exterior rectangular prisms which is does not seem to handle. Do you have any ideas for how to get around this?


close brep ends_re.gh (15.2 KB)
updated hexagonal structure.3dm (337.1 KB)

Many thanks!

The “rectangular hollow sections” definitely require different handling. This file uses the MeshEdit plug-in.

close brep ends_re2.gh (20.9 KB)

References geometry from your .3dm file posted above:

Edit: Updated definition.
Re-organized and improved speed by eliminating the use of Solid Union component.

close brep ends_re3.gh (24.7 KB)

-Kevin

Hi Kevin

Thanks for your help, those solutions work great! I have another question for you, if you don’t mind. I am trying to cap the ends of acouple unique shapes for my ceiling system design. However, I cannot seem to turn these breps from open to closed. Something very funky is going on that is beyond my beginner level of skills. Any help would be much appreciated! Thanks



steel wall studs.3dm (128.4 KB)
close brep ends for ceiling elements.gh (16.1 KB)

You are scaling your cross sections by a factor of 0.001. This produces needle like extrusions that can’t be capped. A scale factor of 0.002 produces closed breps but they are very tiny.

-Kevin