pub struct Tolerances { /* private fields */ }Expand description
The threshold constants the kernel decides identity by, for a given model scale.
linear_scale is the length of one model unit in millimetres: 1.0 for a
model in millimetres, 1000.0 for metres, 25.4 for inches. Linear
tolerances scale with it; angular and parametric ones do not.
Implementations§
Source§impl Tolerances
impl Tolerances
Sourcepub const fn millimetres() -> Self
pub const fn millimetres() -> Self
Tolerances for a model whose unit is one millimetre.
Sourcepub fn with_scale(mm_per_unit: f64) -> OgeomResult<Self>
pub fn with_scale(mm_per_unit: f64) -> OgeomResult<Self>
Tolerances for a model whose unit is mm_per_unit millimetres.
§Errors
OgeomError::Construction if the scale is
not finite and positive.
Sourcepub const fn angular(self) -> f64
pub const fn angular(self) -> f64
Angle below which two directions are parallel. Independent of scale.
Sourcepub fn intersection(self) -> f64
pub fn intersection(self) -> f64
Convergence target for intersection algorithms.
Sourcepub fn approximation(self) -> f64
pub fn approximation(self) -> f64
Accuracy target when fitting curves and surfaces.
Sourcepub const fn parametric(self) -> f64
pub const fn parametric(self) -> f64
Confusion in parametric space. Independent of scale.
Sourcepub fn degenerate(self) -> f64
pub fn degenerate(self) -> f64
Length below which an entity is degenerate.
Sourcepub fn same_length(self, a: f64, b: f64) -> bool
pub fn same_length(self, a: f64, b: f64) -> bool
Whether two lengths are indistinguishable.
Sourcepub fn same_parameter(self, a: f64, b: f64) -> bool
pub fn same_parameter(self, a: f64, b: f64) -> bool
Whether two parameters are indistinguishable.
Trait Implementations§
Source§impl Clone for Tolerances
impl Clone for Tolerances
Source§fn clone(&self) -> Tolerances
fn clone(&self) -> Tolerances
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Tolerances
Source§impl Debug for Tolerances
impl Debug for Tolerances
Source§impl Default for Tolerances
impl Default for Tolerances
Source§impl PartialEq for Tolerances
impl PartialEq for Tolerances
Source§fn eq(&self, other: &Tolerances) -> bool
fn eq(&self, other: &Tolerances) -> bool
self and other values to be equal, and is used by ==.