Meshing options

class Pymeshit.headless.MeshOptions(target_size=1.0, min_angle=20.0, gradient=2.0, uniform=True, interpolation='Thin Plate Spline (TPS)', smoothing=0.0, hull_method='delaunay', hull_alpha_factor=1.0, constraint_mode='intersections', preserve_boundary_hulls=True, tetgen_switches='pq1.414aAY', generate_volume=True, include_hull_fallback_faults_in_volume=False, intersection_tolerance=1e-05, keep_intermediate=True)[source]

Control surface processing, constraint selection, and volume meshing.

Parameters:
target_sizefloat, default=1.0

Global target edge length in the same units as the input coordinates. Must be positive. Per-surface and per-well values override it.

min_anglefloat, default=20.0

Requested minimum surface-triangle angle in degrees. Very large values can make constrained triangulation impossible.

gradientfloat, default=2.0

Mesh-size transition factor used during triangulation and intersection processing. Smaller values generally request a gentler transition.

uniformbool, default=True

Use approximately uniform spacing when refining hulls and intersection lines.

interpolationstr, default=”Thin Plate Spline (TPS)”

Surface elevation interpolation method. Strings containing "Thin Plate" select TPS; strings containing "IDW" or "Legacy" select inverse-distance weighting. Unknown strings fall back to IDW for initial triangulation.

smoothingfloat, default=0.0

Smoothing passed to thin-plate-spline interpolation. Zero interpolates the supplied samples as closely as the solver permits.

hull_method{“delaunay”, “alpha”}, default=”delaunay”

Method used to find the projected boundary of non-horizontal point clouds. Alpha-shape extraction falls back to Delaunay/convex-hull processing when it cannot form a usable boundary.

hull_alpha_factorfloat, default=1.0

Scale controlling alpha-shape boundary extraction. It is used only when hull_method="alpha".

constraint_mode{“all”, “intersections”, “hulls”}, default=”intersections”

Select constraints for conforming surface triangulation. "all" uses hulls and intersections, "intersections" uses intersections plus boundary hulls when requested, and "hulls" uses hulls only.

preserve_boundary_hullsbool, default=True

Retain hull constraints while using intersection mode so each surface still has an outer PLC boundary.

tetgen_switchesstr, default=”pq1.414aAY”

Switch string forwarded to TetGen. Invalid or overly restrictive switches can prevent volume generation.

generate_volumebool, default=True

Run TetGen after conforming surface generation. Set to False to inspect or export intermediate surface information only.

include_hull_fallback_faults_in_volumebool, default=False

Force fault surfaces that required hull fallback into the volume PLC. The safer default retains them as surface outputs but excludes them from TetGen constraints.

intersection_tolerancefloat, default=1e-5

Geometric tolerance in coordinate units for intersection and triple point matching.

keep_intermediatebool, default=True

Retain datasets and conforming_surface_data in MeshResult. Disable it to reduce retained Python-side data.

Parameters:
  • target_size (float)

  • min_angle (float)

  • gradient (float)

  • uniform (bool)

  • interpolation (str)

  • smoothing (float)

  • hull_method (Literal['delaunay', 'alpha'])

  • hull_alpha_factor (float)

  • constraint_mode (Literal['all', 'intersections', 'hulls'])

  • preserve_boundary_hulls (bool)

  • tetgen_switches (str)

  • generate_volume (bool)

  • include_hull_fallback_faults_in_volume (bool)

  • intersection_tolerance (float)

  • keep_intermediate (bool)

For explanations and recommended usage, see Meshing options.