pyvista / tetgen

A Python interface to the C++ TetGen library to generate tetrahedral meshes of any 3D polyhedral domains
http://tetgen.pyvista.org
Other
223 stars 33 forks source link

Setting the `-D` switch to 1 in pytetgen.py prints unwanted lines to the console. #54

Open MbBrainz opened 1 year ago

MbBrainz commented 1 year ago

The output generated by TetGen.tetrahedralize() should only be printed when the debug flag is set. Currently it just always prints, which i had to workaround redirecting the stout.

python version:3.10.10 tetgen version: 0.6.2 Os: macos ventura 13.3.1

output looks like:

Delaunizing vertices...
Delaunay seconds:  0.003715

Writing nodes.
Writing elements.
Writing faces.

Output seconds:  0.000115
Total running seconds:  0.003925

Statistics:

  Input points: 1754

  Mesh points: 1754
  Mesh tetrahedra: 9812
  Mesh faces: 20281
  Mesh edges: 12222
  Convex hull faces: 1314

https://github.com/pyvista/tetgen/blob/d8615ff8cc8bd69d28e3f2fc03dc4e8a43a4e785/tetgen/pytetgen.py#L227