Skip to main content

ToleranceAxisV1

Struct ToleranceAxisV1 

Source
pub struct ToleranceAxisV1 {
    pub axis: InputAxis,
    pub nominal: f64,
    pub nominal_inside_target: bool,
    pub near_bound: Option<f64>,
    pub far_bound: Option<f64>,
    pub near_limiting_boundary: Option<LimitingBoundaryV1>,
    pub far_limiting_boundary: Option<LimitingBoundaryV1>,
    pub unbounded_in_domain: bool,
    pub near_has_no_effect: bool,
    pub far_has_no_effect: bool,
    pub margin_linear_m: f64,
}
Expand description

One axis’s tolerance envelope: how far it may move from its own current value, in EACH direction independently, before the impact crosses target’s boundary.

§Reading these fields together

  • A real bound was found in a direction: that direction’s _bound field is Some (verified, in this module’s tests, by re-solving AT the bound via a path independent of with_axis/bisect_axis and confirming it sits on the boundary).
  • Confirmed to stay inside throughout the configured domain: nominal_inside_target is true and the corresponding _bound field(s) are None. unbounded_in_domain is true exactly when this holds in BOTH directions.
  • The nominal itself does not read as inside target: nominal_inside_target is false. Neither direction is even searched – both _bound fields are None and unbounded_in_domain is false, NOT true. This is the module’s central distinction; see the module doc’s “The central hazard” section.

Fields§

§axis: InputAxis§nominal: f64

This axis’s own current (unperturbed) value, in its own physical unit (crate::perturbation::axis_meta(axis).kind).

§nominal_inside_target: bool

Whether the impact, with this axis pinned AT nominal via the identical with_axis/evaluate reconstruction the bisection itself uses for the shared anchor point, reads as inside target. Correctness requirement 1: bounds are only searched for when this is true. Virtually always true in ordinary use – perturbing an axis back to its own current value must reproduce the request’s own nominal impact – false is reserved for a target with no positive area (a TargetGeometryV1 that cannot contain any point, not even its own centre); see this module’s tests for how that is exercised without relying on self-consistency.

§near_bound: Option<f64>

The bound found searching FROM nominal TOWARD this axis’s configured domain’s lower bound, or None – see the struct doc for what None means here.

§far_bound: Option<f64>

The bound found searching FROM nominal TOWARD this axis’s configured domain’s upper bound, or None – see the struct doc for what None means here.

§near_limiting_boundary: Option<LimitingBoundaryV1>

Which edge of target near_bound crosses, or None exactly when near_bound is None.

§far_limiting_boundary: Option<LimitingBoundaryV1>

Which edge of target far_bound crosses, or None exactly when far_bound is None.

§unbounded_in_domain: bool

true exactly when nominal_inside_target is true AND both near_bound and far_bound are None: the impact is confirmed to stay inside target across the WHOLE configured domain (subject to bisect_axis’s own one-crossing assumption – see the module doc). Deliberately NOT simply near_bound.is_none() && far_bound.is_none(): that would also be true when nominal_inside_target is false, which is the exact conflation this ticket exists to prevent.

§near_has_no_effect: bool

true exactly when near_bound is None AND the impact at the domain’s own lower edge is indistinguishable (within 1e-9 m on both drop and windage) from the nominal impact: this axis has NO MEASURABLE EFFECT on the observed impact in this direction at all, as distinct from an axis that DOES move the impact but never far enough to leave target. See “TargetDistance cannot answer…” in the module doc for the motivating example (TargetDistance’s requires_rezero: false means it never affects the impact at a fixed range_m at all, so unbounded_in_domain: true for it means “this axis is provably irrelevant here,” not “any error in it is safe”). Always false when near_bound is Some (a bound exists, so the axis clearly has SOME effect) or nominal_inside_target is false (the direction was never searched).

§far_has_no_effect: bool

As near_has_no_effect, for the far direction.

§margin_linear_m: f64

The smallest linear half-extent of target (min(height_m, width_m) / 2.0 for a TargetGeometryV1::Rect, radius_m for a TargetGeometryV1::Circle) – a convenience summary of how tight the target is, identical across every axis in a report since it depends only on target.

Trait Implementations§

Source§

impl Clone for ToleranceAxisV1

Source§

fn clone(&self) -> ToleranceAxisV1

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 ToleranceAxisV1

Source§

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

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

impl<'de> Deserialize<'de> for ToleranceAxisV1

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 PartialEq for ToleranceAxisV1

Source§

fn eq(&self, other: &ToleranceAxisV1) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ToleranceAxisV1

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
Source§

impl StructuralPartialEq for ToleranceAxisV1

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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.