create mesh with multiple meshes union
#1
Hi,

i need to create one mesh that is the union of multiple meshes (teeth and gum) and export it like STL.
I tried use  Ab3d.Utilities.MeshBooleanOperations.Union, creating a mesh with 1 and second then create a mesh with third an the result of the previous one and so on.
But It results a big mesh (about 100 mb instead of 8) and the mesh has a lot of holes (see attached png).

Is there another way to do it?

Thanks
#2
You can use Ab3d.Utilities.MeshUtils.CombineMeshes method and pass all the meshes to the method. This will just add the positions and triangles to the final mesh without any additional logic.

The MeshBooleanOperations.Union can also use the CombineMeshes method when the specified meshes do not intersect. But when they intersect, then a standard Boolean Union operation is performed - this can create many additional 3D positions because Constructive solid geometry is used for that operation.
Andrej Benedik
#3
Hi Andrej,
I tried with CombineMeshes and it works!
Opening the exported file stl with rhino it results only one mesh, but when i try to 3dprint it the printer says "can't print because unclosed contours are detected!".
Do you know why?
#4
No idea?
#5
I do not know what is expected and what kind of meshes you use. Maybe the problem is that the 3D printer do not like that there are parts of one mesh inside the other mesh (this happens because triangles are just merged and no regular Boolean operation was performed).

I would advise you to merge two simple boxes so that they will intersect and try if the 3D printer would complain. If this will work well, then try to find the problematic mesh by skipping different meshes when exporting.
Andrej Benedik
#6
I would assume the merge has left open vertices, 3d printers need 'watertight' meshes
#7
(06-28-2021, 09:14 PM)GraPhiX Wrote: I would assume the merge has left open vertices, 3d printers need 'watertight' meshes

You assumed well.
But how can I close 'watertight' the mesh?
#8
(06-28-2021, 04:31 PM)abenedik Wrote: I do not know what is expected and what kind of meshes you use. Maybe the problem is that the 3D printer do not like that there are parts of one mesh inside the other mesh (this happens because triangles are just merged and no regular Boolean operation was performed).

I would advise you to merge two simple boxes so that they will intersect and try if the 3D printer would complain. If this will work well, then try to find the problematic mesh by skipping different meshes when exporting.

I tried with 2 boxes and made 2 attempts
the first attempt with 2 boxes one inside the other and no boolean union and the printer worked well
the second with 2 boxes one inside the other and with boolean union ant the winter also worked well!

I think there is a 'hole' between a mesh ant another, but how can I fill the holes?
#9
I have used Simplify 3D & Ultimaker Cura 4.9.1 both have plugins (Mesh Tools) that can make an asset Watertight, some are paid for some are free.
There is also this mikedh/trimesh: Python library for loading and using triangular meshes. (github.com) but i have never used it myself.
As far as merging meshes is concerned i have never tried it with powertoys, i use Sketchup to make my files for 3d printing (as a plugin that will prepare and make sure mesh is watertight).
If you know python the GitHub repo maybe your best option, you could convert the code and make a DLL for your application (depending on the licence of course)
#10
(06-29-2021, 10:25 AM)GraPhiX Wrote: I have used Simplify 3D & Ultimaker Cura 4.9.1 both have plugins (Mesh Tools) that can make an asset Watertight, some are paid for some are free.
There is also this mikedh/trimesh: Python library for loading and using triangular meshes. (github.com) but i have never used it myself.
As far as merging meshes is concerned i have never tried it with powertoys, i use Sketchup to make my files for 3d printing (as a plugin that will prepare and make sure mesh is watertight).
If you know python the GitHub repo maybe your best option, you could convert the code and make a DLL for your application (depending on the licence of course)

Unfortunately I don't know Python.... but i need to do it runtime. Is there a way to do it with powertoys, or maybe is there a lib for visual studio ?
  


Forum Jump:


Users browsing this thread:
1 Guest(s)