Hello, I got several geometry files that are used for 3D printing.
For statistics I’d like to calculate an accurate volume of the parts, but my models consist of several closed meshes which due to intersections lead to a surplus volume.
The first picture shows a small section of such a file. For this one I can use the MeshUnion grasshopper component, but this doesn’t work with more complicated geometries.
One possibility is using Netfabb or Magics for the mesh union and the volume calculation.
Could this be done in grasshopper with more complex geometries too ?
Thanks! mesh_merge.stl (11.8 KB)
Mesh Boolean Union is the component that would do what you want. In cases where the mesh is very shattered, as you noticed, Rhino’s current algorithm might not give good results. Improving this type of operation is something incremental, as there are almost infinite possibilities of combinations of faces.
If you have cases that you feel should work and want to submit them, they can be added to future tests and can be checked while writing the algorithm. Please submit them if you can. You can simply attach a sample here.
Also, to get a more-easily working Boolean union (the principle is different, more robust but slightly less precise), a way is to use implicit surfaces/metaballs/marching cubes. These names are essentially pointing to the same concept. You could check out this Grasshopper discussion or JellyFish.
Thanks,
Giulio
–
Giulio Piacentino
for Robert McNeel & Associates giulio@mcneel.com
What type of tracking do you mean? Do you mean something visual/UI, like keeping the face colors? Or some sort of origin array for each face index? Neither is very complex to add, but I’d like to focus on minimal usability.
Just to show a few screenshots from Rhino.
I use mesh boolean to cut out timber joints. The first Mesh faces are colored in grey. And the rest meshes (i+1, i+2 … i+n ) I give arbitrary color. From CGAL I see that mesh face tracking comes directly from algorithm, so there is no need to do cp search. I know that this is just a display option I use for unwelded meshes, but it gives good info for me.
Internally I have a face list property that is indexed according to cutting volumes i.e [0, 0, 0, 1, 2, 0]
where 0 is the first mesh and 1 is the first cutter, 2 is the second cutter.
@martinborst1 can I use the STL above for mesh intersection testing? This means that the file will be transformed into a .3dm and various intersection operators be applied to it.
I’m curious to know you you do such testing. Is it automated/ unit testing? And which framework do you use? My approach when implementing my own libraries is often to make a big hardcoded list of ‘truths’ from rhino results, then test my algorithms against that with NUnit.
I attached a grasshopper file that shows another problem I am facing with Mesh booleans right now that could be valuable for testing:
What I am trying to do is performing a boolean difference with labels and letters. It sometimes works and sometimes does not, depending on some minor differences that are sometimes not even noticable.
For details check the attached grasshopper file.