Hello,
Is it possible to do the following using a python script. I am able to do it using GUI.
- load a binary STL file,
- create a volume mesh,
- merge similarly created multiple volume mesh.
Thanks for helping.
Saurabh
Hello,
Is it possible to do the following using a python script. I am able to do it using GUI.
Thanks for helping.
Saurabh
Hi Saurabh,
you can merge meshes with a little Python programming, here is a similar usecase:
Joachim
Hello Joachim,
Thanks a lot for the quick response. I followed the link you suggested, however, I am getting following error during the creation of volume mesh.:
netgen.libngpy._meshing.NgException: Stop meshing since boundary mesh is overlapping
Could you please suggest a way to resolve this issue?
Thanks,
Saurabh
Maybe something with the index conversion went wrong.
It’s best to draw the merged meshes (surface and or volume). For that you have to wrap the Netgen-mesh into an NGSolve mesh first:
import ngsolve as ngs
ngsmesh = ngs.Mesh(netgenmesh)
Draw (ngsmesh)
You can also post your py-codes and meshes.
Joachim
Hello Joachim,
Thanks again for your response. I am still getting the issue of overlapping elements. I have attached two STL files and the python script I am using to merge them. I can mesh and merge these STL files using the GUI, but not with python.
It would be great if you could take a look at the files and guide me in sorting the issue.
Regards,
Saurabh
Attachment: mesh3.py
Attachment: t1g.stl
Attachment: t2g.stl