Hello everyone! I'm trying to automate a simple meshing procedure, that I follow using Netgen's GUI, into a Python script.
The GUI procedure is as follows:
1. "File -> Import Mesh" to import an STL file [a closed surface]
2. "Generate Mesh"
3. "Optimize Volume"
4. "Export Mesh"
Now, my current script looks like this:
Code:
import netgen.meshing as meshing
m = meshing.ImportMesh("surfaceMesh.stl")
m.GenerateVolumeMesh()
m.OptimizeVolumeMesh(meshing.MeshingParameters())
m.Export("volumeMesh.gmsh", "Gmsh Format")
The problem is that the mesh generated by the steps above is different from the mesh generated by this script, and in particular the one generated by my script has much worse quality [aspect ratio].
My understanding was that, by passing a new
Code:
meshing.MeshingParameters()
instance, Netgen would use the default parameters, which I assumed were also the ones used by the GUI, but it looks like this is not the case.
Can anyone point me in the right direction? I get a very good mesh using the GUI procedure, and I want to reproduce it exactly with my script.
Thanks for any help!
Massimiliano