Im trying to generate a tetrahedral mesh that has to have exactly the same vertices as those that are given in the input. I've had trouble with understanding why my mesh was still wrong, but apparently the parameters are just ignored?
In the case that the variables that i set cause tetgen to fail to tetrahedralise, it should break, instead of ignore the parameter.
According to the tetgen documentation the opt_scheme=0 should prevent the algo from optimizing:
The integer for choosing operations is ranged from 0 to 7. Here 0 means no operation is chosen (hence no mesh optimization will be done). Each operation is enabled/disabled by setting the corresponding bit in this integer.
The 1st bit (the least significant bit) enables/disables edge/face flips.
The 2nd bit enables/disables vertex smoothing.
The 3rd bit enables/disables vertex insertion/deletion.
And according to the pytetgen docs steinerleft=0 should result in no steinerpoints being added:
steinerleft (int, optional) –
Steiner points are points added to the original surface mesh to create a valid tetrahedral mesh. Settings this to -1 will allow tetgen to create an unlimited number of steiner points, but the program will likely hang if this is used in combination with narrow quality requirements. Default 100000.
The first type of Steiner points are used in creating an initial tetrahedralization of PLC. These Steiner points are mandatory in order to create a valid tetrahedralization
The second type of Steiner points are used in creating quality tetra- hedral meshes of PLCs. These Steiner points are optional, while they may be necessary in order to improve the mesh quality or to conform the size of mesh elements.
Reproduce:
import pyvista as pv
import tetgen
meshes = [pv.Sphere(radius=i).triangulate() for i in range(10)]
merged = pv.PolyData()
for mesh in meshes:
merged += mesh
tet = tetgen.TetGen(merged)
tet.tetrahedralize(order=1, opt_scheme=0, steinerleft=0, minratio=10, verbose=True)
Im trying to generate a tetrahedral mesh that has to have exactly the same vertices as those that are given in the input. I've had trouble with understanding why my mesh was still wrong, but apparently the parameters are just ignored?
In the case that the variables that i set cause tetgen to fail to tetrahedralise, it should break, instead of ignore the parameter.
According to the tetgen documentation the opt_scheme=0 should prevent the algo from optimizing:
And according to the pytetgen docs steinerleft=0 should result in no steinerpoints being added:
Reproduce:
shows the following logs in the console: