Skip to main content

ValidationParameters

Struct ValidationParameters 

Source
pub struct ValidationParameters<S: Scalar> {
    pub sample_count: usize,
    pub max_nodes: usize,
    pub min_subdivision_size: S,
    pub max_edge_edge_intersection_samples: usize,
    pub max_edge_face_intersection_samples: usize,
    pub face_face_sample_count: usize,
    pub face_face_newton_iterations: usize,
    pub manifold_ray_sample_count: usize,
    pub manifold_seed: u64,
}
Expand description

Shared tuning knobs for the whole-model validation checks — how many points to sample along a curve, and the budgets passed down to the underlying BFS/DFS geometric searches.

Fields§

§sample_count: usize

How many points to sample along a curve for sampling-based checks.

§max_nodes: usize

Node budget for the BFS containment searches (see contains::curve::curve_could_contain), and for the pairwise curve_curve_intersect/curve_surface_intersect searches in disjointness_check (which now error, rather than silently returning a truncated result, if they exhaust it — see curve_surface_intersect’s own doc comment).

§min_subdivision_size: S

Convergence tolerance for those same searches. Empirically, the pairwise curve_curve_intersect/curve_surface_intersect searches need a much looser tolerance than a single-curve curve_could_contain query to reliably converge within max_nodes: 1e-7 can fail to resolve a clean, unambiguous case at all; 1e-5 resolves most cases but not a near-tangential edge/face pair (e.g. two adjacent flat walls of an extruded_cylinder’s polygon approximation meeting at a shallow dihedral angle, or an edge ending exactly at a revolved cap’s own pole) — each halving of the tolerance costs roughly one extra subdivision level, and a near-tangential pair’s hull-overlap pruning barely discriminates at all (see curve_surface_intersect’s own doc comment), so that one extra level can mean an order of magnitude more nodes. 1e-4 is loose enough to resolve every case in this crate’s own basic-shape validations within max_nodes, while still being far tighter than any genuine geometric feature these checks care about.

§max_edge_edge_intersection_samples: usize

max_solutions passed to curve_curve_intersect for every edge x edge pair: how many points to return at most. Coincidence is reported directly (Intersections::Coincident), not inferred from reaching this count.

§max_edge_face_intersection_samples: usize

Same idea as max_edge_edge_intersection_samples, but for curve_surface_intersect on every edge x face pair.

§face_face_sample_count: usize

How many random (point-on-face-a, point-on-face-b) starting pairs face_face_numerical_intersection tries per face pair.

§face_face_newton_iterations: usize

How many alternating-projection Newton rounds each of those starting pairs gets to converge in.

§manifold_ray_sample_count: usize

How many random points, and how many random ray directions per point, validate_manifold’s ray-direction-consistency check tries per shell.

§manifold_seed: u64

Seeds every random draw in validate_manifold’s ray-direction-consistency check.

Trait Implementations§

Source§

impl<S: Clone + Scalar> Clone for ValidationParameters<S>

Source§

fn clone(&self) -> ValidationParameters<S>

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<S: Copy + Scalar> Copy for ValidationParameters<S>

Source§

impl<S: Debug + Scalar> Debug for ValidationParameters<S>

Source§

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

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

impl<S: Scalar> Default for ValidationParameters<S>

Source§

fn default() -> Self

Returns the “default value” for a type. 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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.