fem.gmsh.gmsh_tet_mesh
fem.gmsh.gmsh_tet_mesh(
geometry,
scene=None,
*,
grid,
geometry_format='stl',
target_size=None,
order=2,
algorithm=HXT,
optimize=True,
blend_tolerance=None,
plugin=None,
fields=None,
snap=True,
expected_bounds=None,
verbose=False,
)
Mesh a geometry with Gmsh and give every node its owners.
Parameters
| geometry |
str |
The geometry text — the DC surface as STL (:func:dc_surface_stl) or an exact STEP solid. |
required |
| scene |
Any |
The scene the geometry came from: an SDF node (its public patch decomposition is the ownership table and its free parameters are recorded) or a plain callable (no table; every boundary node is scene-owned). None skips the snap and, unless fields is given, tags nothing. |
None |
| grid |
Any |
The sampling grid the geometry was extracted on; sets the default target size (its smallest spacing), the blend bar and the re-projection clamp, so a declared resolution means roughly what it means on the DC path. |
required |
| geometry_format |
str |
"stl" (default) or "step". |
'stl' |
| target_size |
float | None |
Uniform element size in model units. |
None |
| order |
int |
1 for TET4, 2 for TET10. |
2 |
| algorithm |
int |
Gmsh’s Mesh.Algorithm3D; :data:HXT by default. |
HXT |
| optimize |
bool |
Run Gmsh’s tet optimizer after generation. |
True |
| blend_tolerance |
float | None |
The residual bar; defaults to 1e-3 times the grid diagonal, the derived B-rep’s own export-grade bar. |
None |
| plugin |
str | None |
Run the mesher through this registered tet_mesher plugin ("default" for the kind’s default) instead of an in-process Gmsh. None imports Gmsh when it is installed and falls back to the default plugin otherwise. |
None |
| fields |
FieldTable | None |
A patch table to tag against instead of the scene’s own (the analytic-STEP route passes its graph’s). |
None |
| snap |
bool |
Snap boundary nodes toward their patches first (see the module docstring); off for an exact STEP, whose nodes are on the surface already. |
True |
| expected_bounds |
np.ndarray | None |
(2, 3) min/max the meshed solid must span to 5 %, the backstop against a silent unit conversion. |
None |
| verbose |
bool |
Let Gmsh write to the terminal. |
False |
Returns
| The |
GmshMesh |
class:GmshMesh; stats carries the timings, the counts per entity dimension and per arity, the blend counts, and how many boundary nodes the snap moved. |
Raises
|
ImportError |
Without Gmsh and without the tesseract extra. |
|
RuntimeError |
If Gmsh meshes a solid whose extent does not match expected_bounds — the signature of a silent unit conversion. |