Skip to main content

RecognitionOptions

Struct RecognitionOptions 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§distance_tolerance: f64

Maximum absolute positional residual accepted as an inlier.

§relative_tolerance: f64

Scale-relative positional tolerance added to the absolute tolerance.

§normal_tolerance: f64

Maximum accepted normal-angle residual, in radians.

§minimum_support: usize

Minimum number of supporting triangles required for a fit.

§minimum_support_area: f64

Minimum total supporting triangle area required for a fit.

§confidence: f64

Desired 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: usize

Maximum number of generic recognition hypotheses to generate.

§max_refinement_iterations: usize

Maximum number of numerical refinement iterations per candidate.

§feature_angle: f64

Dihedral-angle threshold, in radians, used to identify feature edges.

§respect_features: bool

Whether region traversal stops at detected feature edges.

§discover_regions: bool

Whether to split the input selection into recognized surface regions.

§allow_disconnected_same_surface: bool

Merge disconnected regions only when a joint fit validates that they lie on one carrier and have the same observed orientation.

§collect_phase_timings: bool

Collect wall-clock phase timings in fit diagnostics. Disabled by default so deterministic result comparisons do not contain clock data.

§sampling: SamplingMode

Geometric sampling strategy used by fitting and validation.

§threads: usize

Worker 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: bool

Lane 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: bool

A 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: usize

The 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.

Trait Implementations§

Source§

impl Clone for RecognitionOptions

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RecognitionOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RecognitionOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for RecognitionOptions

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for RecognitionOptions

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.