Skip to main content

FrameLaw

Struct FrameLaw 

Source
pub struct FrameLaw<'b, 'c> { /* private fields */ }
Expand description

Certified bounds on the frame law along a station basis (#316): an atomic curve or a CompositeBasis, over spans that cross no seam.

A piece read in closed form is bounded by piece_frame_bounds. A piece read by quadrature – an ellipse, a B-spline, an offset beside a line, a circle, an ellipse or a B-spline – is bounded against its exact frame law, its own length measured once by chord panels to the tolerance (see the module documentation): the measure is how far a read’s true distance lies from the one asked for, and the read point’s and axes’ distances from the exact frame at that true distance are FrameLawBounds::point_error and FrameLawBounds::axis_error. On a composite, a piece after one measured by quadrature starts where the kernel sums the lengths before it, which CompositeBasis::joint_intervals certifies: its distance from the true joint is added to the measure.

A 2D intrinsic curve, a level planar intrinsic space curve and an elevated or banked curve over an intrinsic plan are bounded by their curvature law’s closed-form suprema, each frame read compared with the exact one (see the module documentation).

Not bounded (None): every family piece_frame_bounds leaves unbounded other than those above (a chain, an intrinsic space curve with torsion or tilted, a banked curve over a chain plan, an offset beside a curve parameterised by its plan length or beside a banked curve, a skewed circle, a steep tangent), a curve read by quadrature placed in a frame that tilts +Z, a placed offset piece, a curve placed at a station whose frame is not exact, and a piece after joints whose distances are not certified at the tolerance.

Implementations§

Source§

impl FrameLaw<'_, '_>

Source

pub fn has_bend(&self, a: Scalar, b: Scalar) -> bool

Whether the frame over the span [a, b] has a closed-form jet, so that Self::bend may bound it over narrower spans: None from bend can then be “not bounded at this width” (a span longer than twice a bend’s radius), which halving the span usually decides. It can stay None however narrow the span (a vertical tangent under the plan reading, joints after a piece read by quadrature that cannot be certified, a placement whose columns are not orthogonal). false for frames read by quadrature, every frame without a closed form and a piece placed at a station whose frame is not exact (unless the law reads placements as exact, FrameLaw::with_placements_read_as_exact).

Source

pub fn bend( &self, a: Scalar, b: Scalar, reading: FrameReading, ) -> Option<BendBounds>

Certified bounds of the coefficients of the signed bend over the distances [a, b] along the basis, a span that crosses no seam, read as reading; see the module documentation.

None for frames read by quadrature (an ellipse, a B-spline, an offset) and wherever Self::bounds is None.

Source§

impl<'c> FrameLaw<'_, 'c>

Source

pub fn error_at( &self, distance: Scalar, side: SeamSide, reading: FrameReading, ) -> Option<StationFrameError>

How far the frame the kernel reads at distance along the basis, from side of a seam or joint the station is on, lies from the exact frame law’s there, read as reading; None where it is not certified (see one station).

Source§

impl<'b, 'c> FrameLaw<'b, 'c>

Source

pub fn atomic( curve: StationCurve<'c>, placement: Option<Transform3>, tolerance: Scalar, ) -> GeomResult<Self>

The frame law along the atomic curve, placed by placement if any, its quadratures certified to tolerance.

§Errors

A tolerance that is not finite and positive, and a curve read by quadrature whose length a station cannot be measured against, by name.

Source

pub fn atomic_placed( curve: StationCurve<'c>, placement: Option<Transform3>, placement_exact: bool, tolerance: Scalar, ) -> GeomResult<Self>

As atomic, the placement placement_exact when the curve is placed at a station whose frame is exact. A law placed inexactly bounds nothing: the run is certified against the frame read there, not the exact one (#408).

placement_exact = false with placement = None is meaningless (no placement is inexact): pass true there.

§Errors

As atomic.

Source

pub fn composite( basis: &'b CompositeBasis<'c>, tolerance: Scalar, ) -> GeomResult<Self>

The frame law along basis, its quadratures certified to tolerance.

§Errors

A tolerance that is not finite and positive, by name.

Source

pub fn with_placements_read_as_exact(self) -> Self

This law bounding the frames of a piece placed inexactly as read, its placement taken as exact (#408). The bounds then hold for the frames the mesh is built from, not for the exact ones: a consumer may decide what depends on the read frames alone (a fold of the section planes), never certify a deviation from the exact surface. Self::error_at stays None for such a piece.

Source

pub fn bounds( &self, a: Scalar, b: Scalar, reading: FrameReading, ) -> Option<FrameLawBounds>

Certified bounds of the frame law over the distances [a, b] along the basis, a span that crosses no seam, read as reading; None where they are not certified (see the type documentation).

Trait Implementations§

Source§

impl Debug for FrameLaw<'_, '_>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'b, 'c> !Freeze for FrameLaw<'b, 'c>

§

impl<'b, 'c> !RefUnwindSafe for FrameLaw<'b, 'c>

§

impl<'b, 'c> !Sync for FrameLaw<'b, 'c>

§

impl<'b, 'c> Send for FrameLaw<'b, 'c>

§

impl<'b, 'c> Unpin for FrameLaw<'b, 'c>

§

impl<'b, 'c> UnsafeUnpin for FrameLaw<'b, 'c>

§

impl<'b, 'c> UnwindSafe for FrameLaw<'b, 'c>

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