Skip to main content

CoonsRefusal

Enum CoonsRefusal 

Source
pub enum CoonsRefusal {
    DegenerateBoundary {
        boundary: usize,
        extent: f64,
        band: f64,
    },
    CornerGap {
        corner: usize,
        gap: f64,
        band: f64,
    },
    CornerWeightClosure {
        ratio: f64,
        band: f64,
    },
    NonPositiveWeight {
        row: usize,
        column: usize,
        weight: f64,
    },
    Incompatible {
        direction: char,
        detail: String,
    },
    RationalRibbon {
        boundary: usize,
        weight_spread: f64,
    },
    RibbonCornerTangent {
        corner: usize,
        gap: f64,
        band: f64,
    },
    RibbonPairing {
        direction: char,
        prescribed: usize,
    },
    Geometry(String),
}
Expand description

A Coons constructor’s refusal, with the measurement that caused it.

Following the kernel’s fail-safe contract: where the construction cannot be certified it refuses, and the refusal carries the number a caller (or a test, or a user) needs in order to act — never a bare “failed”.

Variants§

§

DegenerateBoundary

Boundary boundary has no extent: it is a point, not a curve.

Fields

§boundary: usize
§extent: f64
§band: f64
§

CornerGap

Boundary corner’s end does not meet boundary (corner + 1) % 4’s start. gap is the measured distance between them.

Fields

§corner: usize
§gap: f64
§band: f64
§

CornerWeightClosure

The four boundaries are rational and their corner weights cannot all be matched by re-scaling: going once round the loop multiplies the weights by ratio instead of 1. A Moebius re-parameterisation of one boundary would fix it, at the cost of that boundary’s parameterisation — which this constructor will not change behind the caller’s back.

Fields

§ratio: f64
§band: f64
§

NonPositiveWeight

The blend put a control point at or beyond infinity: the rational net weight at (row, column) is not positive. Two opposite boundaries whose rational shoulder weights are small enough (arcs approaching a half turn) cancel the corner bilinear’s weight entirely.

Fields

§row: usize
§column: usize
§weight: f64
§

Incompatible

Degree/knot compatibility could not be reached exactly in the named direction.

Fields

§direction: char
§detail: String
§

RationalRibbon

The ribbon constructor was handed rational geometry. A prescribed 3D cross-derivative does not determine a homogeneous ribbon, so this is refused rather than approximated. weight_spread is the measured max |w - 1| over the offending curve’s control points.

Fields

§boundary: usize
§weight_spread: f64
§

RibbonCornerTangent

A ribbon disagrees with the boundary tangent it starts or ends on, so no patch can carry both. gap is the measured vector difference.

Fields

§corner: usize
§gap: f64
§band: f64
§

RibbonPairing

Ribbons were prescribed on one boundary of a direction but not its opposite. A direction is blended cubically or linearly as a whole, so half a pair has no meaning; give both or neither.

Fields

§direction: char
§prescribed: usize
§

Geometry(String)

An underlying kernel geometry error, verbatim.

Trait Implementations§

Source§

impl Clone for CoonsRefusal

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 CoonsRefusal

Source§

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

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

impl Display for CoonsRefusal

Source§

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

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

impl From<CoonsRefusal> for String

The lossy exit for stringly callers, exactly like crate::KernelRefusal’s.

Source§

fn from(refusal: CoonsRefusal) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for CoonsRefusal

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CoonsRefusal

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more