Topological Offset

/ (object)

/

Description

Required

/application (string)

/application

Description

Application name must be topological_offset.

Options: ['topological_offset']

/input (string)

/input

Description

Input mesh, .msh: a triangle or a tetrahedral mesh. The two pipelines are the same algorithm one dimension apart and read every key below the same way.

Optional

/output (string)

/output

Description

Output file name (without extension).

Default: 'out'

/input_dir (string)

/input_dir

Description

Directory where the input files are located. This is injected by the application and should not be set by the user.

Default: ''

/offset_selection (string)

/offset_selection

Description

Boolean expression for input simplicial complex to offset. If a single tag (ie ‘tag_0’) is given, single body mode is used.

Default: '!_'

/offset_output_tags (list)

/offset_output_tags

Description

Tags to add to elements in the resulting offset region.

/offset_output_tags/* (string)

/offset_output_tags/*

Description

A tag.

/protected_tags (list)

/protected_tags

Description

Set of tags that will not be overwritten by the offset.

/protected_tags/* (string)

/protected_tags/*

Description

A tag.

/offset_in (bool)

/offset_in

Description

Only relevant for single body mode. Whether to create offset inside body

Default: False

/offset_out (bool)

/offset_out

Description

Only relevant for single body mode. Whether to create offset outside body

Default: True

/target_distance (float)

/target_distance

Description

Target distance for offset. If < 0, the relative target distance is used to compute this one.

Default: -1.0

/target_distance_rel (float)

/target_distance_rel

Description

Target offset distance relative to bounding box of mesh.

Default: 0.01

/throw_on_nonconvergence (bool)

/throw_on_nonconvergence

Description

If true, a run that finishes without meeting the convergence criteria raises an error instead of logging a warning. Default false: a non-converged offset is still a usable one, and the warnings already name which criterion failed. Integration tests set it true so a convergence regression fails the run rather than passing with a warning.

Default: False

/optimize_offset (bool)

/optimize_offset

Description

Run the optimization (optimize_offset: pre-loop setup, the single-phase turns, the final pass and the convergence verdict) after the offset is constructed. Default true. false: the run stops at the constructed offset – the pre-optimize pass, the simplicial embedding, the marching and the tag assignment still run – and writes it as the result. The constructed band lies on the background mesh’s own cell boundaries, so its distance to the input complex is set by the input mesh’s resolution, not by target_distance; the report then carries converged = false and no optimization metrics, and throw_on_nonconvergence is not consulted.

Default: True

/envelope_size (float)

/envelope_size

Description

Absolute half-width of the tag-region boundary envelope. If < 0, computed from envelope_size_rel.

Default: -1.0

/envelope_size_rel (float)

/envelope_size_rel

Description

Half-width, relative to the bounding box diagonal, of the envelope containing every tag-region boundary during optimization. Any operation that would push a region boundary outside it is rejected. Ignored if envelope_size >= 0.

Default: 0.001

/offset_field (string)

/offset_field

Description

Which field defines the offset, and so what the front is placed on, what the criterion measures and what the sizing field refines by. ‘smooth’ is the offset geometric contact potential Phi, with the front on the level set Phi = c: C^2, analytic derivatives, and a level set that bulges outward at reentrant features, so it is a smoothed offset rather than the exact one. ‘euclidean’ (the default) is the exact distance to the input complex, which makes the residual exact but introduces a gradient discontinuity across the medial axis and a crease at every reentrant feature that no refinement resolves; offset_dhat_factor and the outside-the-support guard stop meaning anything, since it has no compact support.

Default: 'euclidean'

Options: ['smooth', 'euclidean']

/offset_dhat_factor (float)

/offset_dhat_factor

Description

Support radius of the smooth offset potential, as a multiple of target_distance. Must be > 1. The offset level set lies strictly inside the support; a band vertex that leaves the support is a hard error.

Default: 2.0

/DEBUG_manual_dhat (float)

/DEBUG_manual_dhat

Description

[2D ONLY] Debugging override for the smooth potential’s support radius dhat, as an ABSOLUTE length. Negative (the default) leaves the automatic sizing alone: dhat = max(offset_dhat_factor x target_distance, 2 x the distance of the furthest constructed offset vertex). A value >= 0 replaces that outright, so the effective factor is DEBUG_manual_dhat / target_distance and must still exceed 1 for the level set to lie strictly inside the support. For asking what a run does under a support it would not have chosen: outside the support Phi is identically zero with a zero gradient, so a front vertex that leaves it gets no direction back and drifts on the quality term alone. Ignored by the euclidean field, which has no support. Read only by the 2D construction; 3D ignores it until the port.

Default: -1.0

/front_conv_rel (float)

/front_conv_rel

Description

The accuracy, as a fraction of target_distance, in both dimensions: it sets the vertex bar (a front vertex is placed when the remaining Newton step of its objective along its move direction is <= rel x target_distance, under the default criterion) and the chord resolution threshold (a front edge is refinable while its sag over the level set exceeds rel x target_distance), so tighter means more turns and a finer front. Startup requires offset_envelope_rel <= front_conv_rel; see there.

Default: 0.025

/front_conv_criterion (string)

/front_conv_criterion

Description

What ‘converged’ means for a front vertex, in the placement stop and in the loop’s vertex test, measured against front_conv_rel. F is the vertex’s front objective, g its gradient, H its Gauss-Newton Hessian; under front_normal_projection both are taken along the vertex’s move direction n. ‘step_size_rel’ (the default): the remaining 1-D Newton step, |n . g| / (n^T H n), against rel x target_distance. ‘decrement’: the Newton decrement, half of (n . g)^2 / (n^T H n), against rel x F(x). ‘gradient_norm_rel’: |n . g| against rel x a reference measured once on the band as constructed. Prefer the step or the decrement: the gradient is stiffness times remaining displacement, so the sliver between two meeting fronts reads far above the bar while sitting at its minimum. ‘residual_error’ is the odd one out and measures where the vertex IS rather than how far it still wants to move: the field’s own residual as a length (for ‘euclidean’ exactly |d - target_distance|), against rel x target_distance – the same bar the chord test uses, so both halves of the criterion then mean one thing. It builds no objective, so front_normal_projection does not enter, and a vertex wedged at a stationary point it cannot leave is reported by how wrong it is rather than by how still it is. Two costs: under ‘smooth’ the residual is a barrier residual, not a Euclidean distance, and it saturates outside the support, so a front that has left dhat reads a bounded error instead of a large one; and a vertex drifting across the level set at a stationary point of the objective can read placed on one turn and unplaced on the next.

Default: 'step_size_rel'

Options: ['gradient_norm_rel', 'step_size_rel', 'decrement', 'residual_error']

/offset_residual_samples (int)

/offset_residual_samples

Description

Sampling density used to measure the offset’s residual between its vertices, a reported diagnostic: the interior lattice points of each front simplex at denominator k+2 (k points per edge at i/(k+1); 1, 3, 6, 10 points per triangle for k = 1..4), so k = 1 is the midpoint / centroid. 0 measures only at vertices, which is blind to a surface whose vertices sit on the level set while the elements between them cut across it.

Default: 3

/sorted_marching (bool)

/sorted_marching

Description

Execute the marching in decreasing order of edge length. Increases run time, may increase output mesh quality.

Default: False

/sphere_trace_initialization (bool)

/sphere_trace_initialization

Description

How the marching places the vertex it inserts on each edge it splits (an edge with one endpoint in the input complex and the other in the background). false: the plain edge midpoint; target_distance does not enter construction, and the optimization carries the front to the level set. true (the default): sphere tracing along the edge from the complex endpoint for the point where d(x) = target_distance, d(x) the distance from the point to the input complex through its BVH: evaluate d at the current point, step forward along the edge by target_distance - d (the largest step that cannot cross the level set), repeat until |d - target_distance| <= sphere_trace_target_rel_tol x target_distance. If the current point reaches or passes the background endpoint the level set is not on the edge and the vertex goes to the midpoint. No snapping away from the endpoints. The simplicial embedding’s splits always use the midpoint.

Default: True

/sphere_trace_target_rel_tol (float)

/sphere_trace_target_rel_tol

Description

In (0, 1). The trace under sphere_trace_initialization stops at the first point where |d(x) - target_distance| <= this x target_distance; the placed vertex is that close to the target level set along the edge. Smaller is tighter and takes more steps (each step is longer than the tolerance, so at most edge length / (tol x target_distance) of them). Only read when sphere_trace_initialization is true.

Default: 0.01

/EXPERIMENTAL_consistent_construction_split (bool)

/EXPERIMENTAL_consistent_construction_split

Description

EXPERIMENTAL, and a no-op unless sphere_trace_initialization is true. Makes the marching construction all or nothing. Normally each marched edge is placed independently: the trace runs from the complex end and, on an edge the trace leaves (the level set is not on that edge), that ONE edge falls back to its midpoint – so a single construction can mix vertices sitting on the level set with vertices sitting at edge midpoints, which is the inconsistency this flag exists to remove. With it on, the whole march is probed before any edge is split: if every marched edge can be traced, every edge is traced as usual; if even one cannot, EVERY edge is split at its midpoint instead and the construction is uniformly a midpoint march. The probe repeats the trace the split would do – it reads only the endpoint positions and the input-complex BVH, neither of which a split changes – so a construction that does trace everywhere pays for two full trace passes. The construction log says which way it went and how many edges could not be traced.

Default: False

/check_manifoldness (bool)

/check_manifoldness

Description

After performing offset, check if offset region is manifold

Default: True

/save_vtu (bool)

/save_vtu

Description

Save .vtu of output mesh

Default: False

/phi_grid_resolution (int)

/phi_grid_resolution

Description

Samples per side of the grid the smooth offset potential is written on, as _phi.vtu, for the viewer. 0 disables it. The grid is the plane through the box centre normal to the box’s shortest extent (the whole domain when the domain is planar). Carries phi, phi_residual_length and euclidean_distance per vertex; warp by phi to see the field as a height surface.

Default: 0

/DEBUG_output (bool)

/DEBUG_output

Description

Write debug VTU frames of the evolving mesh, in both dimensions: one frame after every operation pass and every smoothing pass, as sequential _NNNNN.vtu files so ParaView loads them as one time series, plus frames.txt carrying one ‘NNNNNr’ line per frame, which the viewer scripts read for their labels. Expect hundreds of frames on a real model; observational only, the frames cannot change the run.

Default: False

/log_file (string)

/log_file

Description

Logs are not just printed on the terminal but also saved in this file.

Default: ''

/report (string)

/report

Description

A JSON file that stores information about the result and the method execution, e.g., runtime.

Default: ''

/preallocation_factor (float)

/preallocation_factor

Description

Mesh storage (connectivity and attributes) is preallocated to this factor times the live element count at init and at consolidation. Operations take fresh slots from that headroom and are retried once it is exhausted. Lower it for pure-decimation runs and raise it for aggressive refinement; the offset refines aggressively, so a run whose log carries [slots] warnings is dropping the very splits the criterion asked for.

Default: 6.0

Range: [1.0, inf]

/num_threads (int)

/num_threads

Description

Number of threads used for parallel execution (smoothing, edge collapse). 0 means single-threaded.

Default: 0

/num_smoothing_passes (int)

/num_smoothing_passes

Description

Smoothing passes after the ONE combined split+collapse+swap round of the shared optimization loop when interleaved_smoothing is OFF. Not read otherwise: with interleaving on (the default) the count is interleaved_smoothing_passes, everywhere. TriWild’s key and TriWild’s default.

Default: 2

/interleaved_smoothing (bool)

/interleaved_smoothing

Description

Run split, collapse and swap as three separate rounds with smoothing after each, instead of one combined round. TriWild’s default.

Default: True

/interleaved_smoothing_passes (int)

/interleaved_smoothing_passes

Description

Smoothing passes after each operation group (split, collapse, swap) when interleaved_smoothing is on – in the shared TriWild/TetWild loop (the pre-optimisation pass, the frozen-front finishing pass) and in the single-phase loop. Default 2, against the shared engine’s own 1: each smoothing pass is one placement sweep of the front, so at one pass per group the front contracts about half as fast for the same final result. In the single-phase loop this fixed count is only used when adaptive_smoothing is false.

Default: 2

/adaptive_smoothing (bool)

/adaptive_smoothing

Description

Single-phase loop only. Run the smoothing after each of the three operation groups (split, collapse, swap) pass by pass until it has converged or stalled, instead of a fixed interleaved_smoothing_passes. After every pass two things are measured against the positions before it. Front vertices (on the offset): the convergence ratio front_vertex_conv_ratio, the same Newton-step ratio the turn’s criterion tests – converged when its maximum is at or below 1, stalled when the maximum fell by less than adaptive_smoothing_stall_rel of its previous value, since a stalled front needs an operation and not another sweep. Background vertices: the step each vertex made divided by its target edge length s_v * l – settled when the maximum is at or below adaptive_smoothing_step_rel. The group’s smoothing stops when the front is converged or stalled AND the background has settled, or at adaptive_smoothing_max_passes. Front vertices whose ratio is not measurable (a non-positive curvature of the objective along the move direction) are counted and left out of the maximum. The offset tube is rebuilt after the group as before, not after each pass.

Default: False

/adaptive_smoothing_max_passes (int)

/adaptive_smoothing_max_passes

Description

Upper bound on the smoothing passes of one operation group under adaptive_smoothing; at least 1 pass always runs.

Default: 20

/adaptive_smoothing_stall_rel (float)

/adaptive_smoothing_stall_rel

Description

Under adaptive_smoothing the front counts as stalled when a pass lowered the maximum convergence ratio by less than this fraction of its value before the pass (0.1 = less than 10 percent). Never applied to the first pass of a group.

Default: 0.1

/adaptive_smoothing_step_rel (float)

/adaptive_smoothing_step_rel

Description

Under adaptive_smoothing the background counts as settled when no non-front vertex moved more than this fraction of its own target edge length s_v * l in the pass.

Default: 0.01

/sag_halve_refinement (bool)

/sag_halve_refinement

Description

Single-phase loop only. How the sizing field is lowered at the end of a turn for the refinable front simplices (every vertex on the level set, the sag at the midpoint / centroid over it beyond front_conv_rel x target_distance). false: refine_front_from_sag, the chord rule ¾ L (tube/sag)^(1/p) capped at L/2, with the exponent p read from the field’s turn across the chord – unbounded below except for the sizing floor, so a coarse front over a creased field can drop a scalar by 20x in one turn. true (the default): the vertices of every refinable simplex have their sizing scalar halved, once per turn no matter how many refinable simplices share the vertex, floored at max(min_sizing_scalar, min_edge_length / l); no other vertex is lowered directly. The lowered scalars are then graded outward by sizing_gradation_mode as with the chord rule, so with sizing_gradation 2 on an already graded field a neighbour also drops by at most a factor 2.

Default: True

/pre_smooth (bool)

/pre_smooth

Description

Single-phase loop only. true: before the first turn, run one smoothing block on the mesh as constructed – the same block each operation group is followed by: interleaved_smoothing_passes sweeps, or the adaptive smoothing when adaptive_smoothing is on – with the plastic rests stamped and the offset tube rebuilt after it, so the front is carried toward the level set once before the first split pass measures it. false (the default): the loop starts with turn 1’s split pass on the constructed mesh.

Default: False

/front_refuse_converged_collapse (bool)

/front_refuse_converged_collapse

Description

Single-phase loop only. true: the collapse and swap passes refuse an operation that would un-resolve a resolved patch of the front. A front simplex is resolved when its sag over the level set is within the tube (front_conv_rel x target_distance) and every corner’s Newton-step ratio is within the bar, both read from a snapshot of the front taken at the start of the group. A collapse of a front edge whose two endpoints have only resolved front faces around them is refused if any face it would leave around the survivor sags over the tube (predicted before the collapse: the survivor keeps its position and the removed vertex’s faces are re-attached to it), or if the survivor’s Newton-step ratio after the collapse is over the bar (measured after, the collapse is rolled back). A surface flip of the offset whose two old faces are resolved is refused if either new face sags over the tube (3D only: a 2D front is a curve, its edges are surface-tracked and never flipped, and no other flip moves a front vertex, so there is nothing for the swap half to guard). Where the neighbourhood is not already resolved nothing is refused, so the passes still coarsen and re-triangulate a moving front freely. Refusals are counted per turn. false (the default): the passes as they are.

Default: False

/max_iterations (int)

/max_iterations

Description

Cap on the shared TriWild/TetWild loop wherever that loop runs: the pre-optimisation pass over the input, and the finishing pass that runs with the front frozen. The loop exits as soon as max AMIPS is under stop_energy, so this is an upper bound.

Default: 80

/offset_envelope_rel (float)

/offset_envelope_rel

Description

Half-width of the corridor the operation passes must keep the front inside, as a fraction of target_distance, rebuilt after every smoothing pass. It is a leash, not an accuracy knob: front_conv_rel alone sets accuracy, and startup requires offset_envelope_rel <= front_conv_rel, because a wider leash lets the operations dent the front past the resolution threshold and mint new refinable edges every turn. Tighter over-constrains the passes and starts refusing operations that were not straddling the boundary at all.

Default: 0.025

/length_rel (float)

/length_rel

Description

Target edge length relative to the bounding box diagonal. Used to bound which edges edge collapse is allowed to touch (only edges shorter than ⅘ of this length are collapsed). Ignored if length >= 0.

Default: 0.05

/length (float)

/length

Description

Target edge length (absolute). If < 0, computed from length_rel.

Default: -1.0

/stop_energy (float)

/stop_energy

Description

Target AMIPS quality for the elements. Default 100, matching the tetwild component – the frozen-front finishing pass is TriWild/TetWild and stops where they stop. Do not lower it far: a target the operation set cannot deliver turns the split pass into an unbounded refiner. Edge collapse will not push an already-on-target region’s quality back above this.

Default: 100.0

/min_edge_length (float)

/min_edge_length

Description

l_min: the shortest edge the sizing field may ask for, in absolute units. If < 0, derived as min_edge_length_rel * target_distance – tied to the offset distance rather than the bounding box, because the offset is what has to be resolved. This is a floor on REFINEMENT, so raising it makes the offset coarser (paper Fig. 18).

Default: -1.0

/min_edge_length_rel (float)

/min_edge_length_rel

Description

l_min as a multiple of target_distance, used when min_edge_length is negative. Negative (the default) derives it from the Phase A offset envelope epsilon, which is just offset_envelope_rel: TetWild’s own floor (cap the sizing field below by the envelope eps, Sec 3.2) stated in the offset’s units, since the front is only held to within eps and edges shorter than eps cannot buy fidelity. A pure anti-runaway rail, far below the chord length any tolerance actually needs.

Default: -1.0

/min_sizing_scalar (float)

/min_sizing_scalar

Description

Lower bound for the per-vertex sizing field (see max_sizing_scalar). Refinement stops once a vertex’s sizing scalar reaches this fraction of the base target length.

Default: 0.01

/max_sizing_scalar (float)

/max_sizing_scalar

Description

Upper bound for the per-vertex sizing field, as a multiplier on the target edge length (splitting_l2/collapsing_l2). 1.0 means never coarser than the base target length.

Default: 1.0

/sizing_gradation (float)

/sizing_gradation

Description

Gradation cap for the sizing field: neighbouring vertices’ sizing scalars may differ by at most this factor. After each refinement pass the refined vertices’ lower sizing scalar is propagated outward – monotone, only ever lowering a neighbour’s scalar – so the mesh does not jump straight from fine to coarse. <= 1 disables gradation. Only read when sizing_gradation_mode is ‘ring’.

Default: 2.0

/sizing_gradation_mode (string)

/sizing_gradation_mode

Description

How a lowered sizing scalar spreads to the vertices around it, at every place the offset lowers the field (the sag rule, the stuck refine). ‘ring’ (the default): the base gradation_smooth_sizing – walk outward over mesh neighbours, capping each neighbour at sizing_gradation times the scalar it came from, so the field grades by mesh rings and a fine seed in a coarse mesh drags a shell of rings down with it. ‘distance’: TetWild’s adjust_sizing_field gradation – walk outward from the seeds and multiply every vertex within R = 1.8 l of its nearest seed by the linear ramp 0.5 + 0.5 dist / R (halved next to a seed, untouched at R), stopping at R; the seeds keep the value they were just given and nothing outside the ball changes. The refinement then reaches a seed geometrically through the split pass (each split child takes the mean of its parents’ scalars) instead of by rings, so a fine target stays local to the seed however coarse the mesh around it is.

Default: 'ring'

Options: ['ring', 'distance']

/split_high_valence_threshold (int)

/split_high_valence_threshold

Description

Incident-cell count above which a vertex in a split edge’s link accepts only one valence-increasing split per pass, or 0 to disable. Spreads refinement instead of letting it pile onto one vertex.

Default: 0

/coarsen_pass (bool)

/coarsen_pass

Description

Run the post-optimization coarsening pass, as TriWild and TetWild do. It trades elements for nothing but the guarantee that the result is still good, so topological_offset holds it to an absolute bar – both AMIPS and the offset residual inside tolerance after each collapse – rather than the non-degrading bar the main loop uses. Off by default: the pass can dominate total runtime, and being the last thing to run before Phase A checks convergence, anything it degrades is reported as a Phase A failure rather than a coarsening one.

Default: False

/coarsen_unbounded (bool)

/coarsen_unbounded

Description

Coarsen as far as the quality guarantee allows, instead of stopping at the target edge length. The pass then answers how few elements can hold this max energy, which is more aggressive than it sounds because the answer ignores how big the elements become; measured over the registered models it roughly doubles the cell reduction while raising max energy on none of them. On by default. Turned off, it leaves alone any edge already at or past the collapse threshold, since collapsing it only makes its neighbours longer. The sizing field is deliberately not applied either way: honouring it here would leave the pass unable to undo refinement that turned out to be unnecessary.

Default: True

/coarsen_max_rounds (int)

/coarsen_max_rounds

Description

Cap on the coarsen/smooth alternation; the pass also stops as soon as a round accepts no collapse. A round does not exist to finish what the previous one started: within a round the collapse pass already runs to a fixed point, so repeating the collapse alone finds nothing. What a round adds is the global smoothing in between, which moves that fixed point. Returns decay fast, and the default of two carries the large majority of the coarsening for a fraction of what the later rounds would cost.

Default: 2

/coarsen_global_smoothing_passes (int)

/coarsen_global_smoothing_passes

Description

Ordinary whole-mesh smoothing passes run between coarsening rounds. This is what makes a second round worth running at all – see coarsen_max_rounds – so setting it to 0 collapses the rounds to one.

Default: 1

/coarsen_smooth_ring (int)

/coarsen_smooth_ring

Description

How far the local smoothing after each coarsening collapse reaches, in rings; the pass locks one ring wider than this. Deliberately 1 rather than TriWild’s and TetWild’s 2: a smaller ball perturbs less per collapse, so more collapses clear the offset’s absolute coarsening bar.

Default: 1

/coarsen_local_smoothing_passes (int)

/coarsen_local_smoothing_passes

Description

Smoothing sweeps over the ring inside each candidate coarsening collapse, before its max energy is measured, so the collapse is judged on a relaxed neighbourhood rather than on the configuration it lands in. 0 by default: the ring is large enough that even two sweeps cost hundreds of nonlinear solves per candidate, and turning it off costs almost no cell reduction because the pass runs to a fixed point and finds another candidate instead. At 0 the only relaxation is the global smoothing between rounds, which has no per-operation accept test of its own – see the forced quality veto in TetOptimizerMesh::coarsen_mesh().

Default: 0

/stuck_refine_stall_eps (float)

/stuck_refine_stall_eps

Description

Fire the sizing refinement when an iteration’s improvement is small next to the distance the metric still has to cover: (prev - cur) <= stall_eps * (cur - target). 0 means only when it does not improve at all.

Default: 0.1

/stuck_refine_cooldown (int)

/stuck_refine_cooldown

Description

Iterations to skip after a sizing refinement before another may fire. Default 1, matching the tetwild component: the refined sizing needs one split/collapse round to act before the stall detector can fairly judge it. 0 allows one every iteration.

Default: 1

/stuck_refine_num_worst (int)

/stuck_refine_num_worst

Description

How many worst faces seed the refinement. 0 means every face above the filter threshold, which is TriWild’s default.

Default: 0

/stuck_refine_rings (int)

/stuck_refine_rings

Description

Vertex rings grown around each seeded face before the sizing scalar is lowered.

Default: 0

/stuck_refine_factor (float)

/stuck_refine_factor

Description

Multiplicative reduction of the per-vertex sizing scalar per refinement.

Default: 0.5

/stuck_refine_min_scalar (float)

/stuck_refine_min_scalar

Description

Floor on the per-vertex sizing scalar.

Default: 0.001

/stuck_refine_gradation (float)

/stuck_refine_gradation

Description

Neighbouring sizing scalars may differ by at most this factor. The smoothing only ever lowers a scalar, spreading refinement outward. <= 1 disables it.

Default: 2.0

/stuck_refine_force_split (bool)

/stuck_refine_force_split

Description

On a stall, also split each seeded face’s longest edge once, bypassing the length gate and without touching the sizing field.

Default: True

/front_normal_projection (bool)

/front_normal_projection

Description

The front is placed by a one-dimensional solve along its field normal n = grad Phi/|grad Phi|: the same objective restricted to the line x0 + s n, with the same solver, line search and accept test, and the vertex test reads the step along that same n. Where a vertex sits along the front carries no information about the offset, and in the free solve that tangential motion is driven by AMIPS alone, which made fronts slide and fold where two of them meet. Spacing along the front is left to the operation passes’ smoother. A front vertex an input envelope also holds moves along that boundary instead: the field normal projected into the boundary (or onto its crease).

Default: True

/front_alignment_energy (bool)

/front_alignment_energy

Description

Whether the front objective carries the alignment term: the sum over the vertex’s live front simplices of (1 - n_e . ghat(m_e))^2, with n_e the simplex normal and ghat the field’s unit gradient at its midpoint / centroid, weighted like the offset term. It is what acts on the front’s normals under front_normal_projection, and what lets a pressed seam settle in a few turns rather than tens. On by default, with a known cost: under normal-only placement it can act only along the normal, so it biases a vertex a few percent of target_distance off its level set on curved fronts. Each term is weighted by the gradient agreement at its corners, max(0, ghat_a . ghat_b) (the minimum over the corner pairs), frozen per visit, so a simplex spanning a concave corner’s bisector gets no direction target instead of an impossible one.

Default: True

/sizing_collapse_min (bool)

/sizing_collapse_min

Description

What the surviving vertex of a collapse keeps as its sizing scalar. false (the default): its own scalar, restored after the base collapse. true: the smaller of the two, which is the shared engine’s rule. The min rule carries substantially more vertices and lengthens the placement loop where the front travels, because the offset’s sizing follows a moving front and has to relax behind it, which a scalar that only ever falls cannot do.

Default: False

/max_rounds (int)

/max_rounds

Description

The outer loop’s budget, in turns, one turn being split, collapse and swap with smoothing after each, followed by the front test. An upper bound rather than a schedule – exhausting it is a warning and not an error, because a front that needs more turns is a legitimate outcome to inspect.

Default: 40

/pre_optimize_input (bool)

/pre_optimize_input

Description

Run TriWild/TetWild over the input mesh before the offset is constructed – before the simplicial embedding and the marching – with the same parameters and held only by the per-tag region envelopes, which exist by then. The pass runs against a sizing field of 1.0 at every vertex, i.e. the base target length l, and the main loop then starts from whatever field the pass leaves (1.0 everywhere when the pass is off). Worth a pass because the marching places the offset on the background mesh’s own cell boundaries: a coarse cell touching the complex inflates dhat, and a dhat several times target_distance merges the level sets of nearby features. On by default.

Default: True

/w_amips (float)

/w_amips

Description

Relative weight of the AMIPS quality term against the envelope term during smoothing of envelope-held vertices, and of the AMIPS term against the offset terms in the front objective. The envelope weight is derived as 1 - w_amips.

Default: 0.0001

/smoothing_mode (string)

/smoothing_mode

Description

How smoothing places a surface vertex. ‘projected’: smooth with AMIPS alone as if interior, then walk back toward the start projecting each candidate onto the input; accept the first projected candidate that does not invert and strictly lowers the worst incident element, else do not move. Lands exactly on the input; no weights. ‘exact’: minimize w_amips * AMIPS + (1-w_amips) * (d/eps)^2 with the true region-wise Hessian of the distance to the piecewise-linear input; sliding is free where the input is flat, held at corners, constrained along edges and curve segments. Rests a w_amips-proportional distance off the input.

Default: 'projected'

Options: ['projected', 'exact']

/project_line_search_steps (int)

/project_line_search_steps

Description

Bisections tried by the projected line search before it gives up on a vertex: the step along the Newton direction is halved this many times, each candidate projected onto the input, and the first that does not invert and lowers the worst incident element is taken.

Default: 12

/project_line_search_nested_steps (int)

/project_line_search_nested_steps

Description

After the projected line search gives up, revisit each candidate and bisect between the interpolated point and its projection this many times, taking the longest step toward the input that still does not invert and still lowers the worst element. Lets a vertex whose one-ring cannot tolerate a full projection still travel toward the input, instead of being refused every pass from the same place. 0 disables the pass.

Default: 0

/smooth_quality_veto (bool)

/smooth_quality_veto

Description

Whether smoothing refuses a move that raises the worst incident element’s quality. True is TriWild’s, SimWild’s and TetWild’s behaviour and the default here. The front is placed by its own solver, which never consults this flag, and every other vertex is smoothed by AMIPS alone inside its envelope, so the operation passes take the shared engines’ veto. The key stays settable for experiments.

Default: True

/perform_sanity_checks (bool)

/perform_sanity_checks

Description

Check after every operation pass that no element is inverted and no tracked-surface simplex left its envelope. Slow; for debugging.

Default: False

/deform_others (bool)

/deform_others

Description

Whether the other objects in the scene – tagged regions with no input-complex simplex and no domain-wall contact – deform when the optimization pushes them, instead of being held by their per-tag envelopes. true (the default): their envelopes are dropped at the top of optimize_offset(), every cell of theirs is stamped with its rest shape, and smoothing carries a rest-shape AMIPS term for those cells weighted like the smoother’s own. A cell keeps that rest shape until an operation touches it; an accepted split, collapse or swap re-stamps the cells it changed, which is what makes the scheme indifferent to remeshing. protected_tags opts a region out, and the offset’s own complex, the domain wall and the envelope curve / surface group are always held.

Default: True