#[non_exhaustive]pub struct RecognitionOptions {Show 19 fields
pub distance_tolerance: f64,
pub relative_tolerance: f64,
pub normal_tolerance: f64,
pub minimum_support: usize,
pub minimum_support_area: f64,
pub confidence: f64,
pub deterministic_seed: Option<u64>,
pub max_hypotheses: usize,
pub max_refinement_iterations: usize,
pub feature_angle: f64,
pub respect_features: bool,
pub discover_regions: bool,
pub allow_disconnected_same_surface: bool,
pub collect_phase_timings: bool,
pub sampling: SamplingMode,
pub threads: usize,
pub torus_fast: bool,
pub probe_crease_gate: bool,
pub hypothesis_probe_triangles: usize,
/* private fields */
}Expand description
Controls surface recognition, refinement, and region discovery.
Non-exhaustive: start from RecognitionOptions::default and set the
fields you need, so a later field is not a breaking change.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.distance_tolerance: f64Maximum absolute positional residual accepted as an inlier.
relative_tolerance: f64Scale-relative positional tolerance added to the absolute tolerance.
normal_tolerance: f64Maximum accepted normal-angle residual, in radians.
minimum_support: usizeMinimum number of supporting triangles required for a fit.
minimum_support_area: f64Minimum total supporting triangle area required for a fit.
confidence: f64Desired probability that adaptive generic hypothesis generation has sampled a seed from the best support observed so far. This controls support visitation, not whether a boundary/degenerate seed yields a usable hypothesis and not the reported residual-evidence quality score.
deterministic_seed: Option<u64>Seed for deterministic hypothesis sampling, or None for entropy-based
sampling.
max_hypotheses: usizeMaximum number of generic recognition hypotheses to generate.
max_refinement_iterations: usizeMaximum number of numerical refinement iterations per candidate.
feature_angle: f64Dihedral-angle threshold, in radians, used to identify feature edges.
respect_features: boolWhether region traversal stops at detected feature edges.
discover_regions: boolWhether to split the input selection into recognized surface regions.
allow_disconnected_same_surface: boolMerge disconnected regions only when a joint fit validates that they lie on one carrier and have the same observed orientation.
collect_phase_timings: boolCollect wall-clock phase timings in fit diagnostics. Disabled by default so deterministic result comparisons do not contain clock data.
sampling: SamplingModeGeometric sampling strategy used by fitting and validation.
threads: usizeWorker threads for the work recognition splits without changing its
result: the connected components of a run without an attempt budget,
and the hypotheses of one classical extraction round, which are
evaluated in batches and applied in draw order. 0 uses one worker per
core the process may run on; 1 runs everything on the caller’s thread.
On wasm32 every value runs on the caller’s thread. The regions,
their diagnostics and the reported work are the same for every value.
torus_fast: boolLane U row 3: run a torus seed’s roundoff-recovery normal-offset refinement only when some seed already agrees with the observed normals within the multistart fidelity (1e-2 rad), the condition its normal-disambiguation twin already requires. The refinement keeps only candidates whose every normal agrees to 1.28e-5 rad, which a sample whose best seed is 780 times further off has not been seen to reach; on noisy meshes it ran on every torus fit and kept nothing. Off by default.
probe_crease_gate: boolA hypothesis’s diversity probe does not cross a mesh edge whose two
triangle normals differ by more than normal_tolerance, so a sample
is drawn from one smooth wall. On a coarse tessellation of two crossing
cylinders one region of ~800 long triangles held both walls, a
128-triangle probe spanned the crease, and every normal-diverse
cylinder sample mixed the walls (fitted radii 9-2 900 against 10).
Off by default.
hypothesis_probe_triangles: usizeThe triangles a hypothesis’s diversity probe first grows to (it doubles while a candidate explains no more than its probe). On a coarse tessellation whose walls hold about 100 long triangles each, a 128-triangle probe spans two walls whatever its seed. Defaults to 128.