Skip to main content

AxialMap

Struct AxialMap 

Source
pub struct AxialMap { /* private fields */ }
Expand description

A taper, a twist or a bend about an axis (see the module’s doc): in the frame frame at origin — x, y and the axis, orthonormal and right-handed — the point (x, y, t) goes to x a(t) + y b(t) + c(t) over the zone start ≤ t ≤ end, columns being [a, b, c] by their components in the frame. Before and after the zone, the affine map the law is tangent to at its end.

Implementations§

Source§

impl AxialMap

Source

pub fn taper( origin: Vector3, axis: &Vector3, toward: Option<&Vector3>, zone: (Scalar, Scalar), factor: Scalar, ) -> GeopResult<Self>

Tapering about the axis through origin along axis: across the axis, scaled by one at start and by factor at end, linearly in between, and by factor past the end — or, pinching, only along toward (square to the axis), the other way across left as it is. Exact. Fails for a factor that is not definitely positive.

Source

pub fn shear( origin: Vector3, axis: &Vector3, toward: &Vector3, zone: (Scalar, Scalar), offset: Scalar, ) -> GeopResult<Self>

Shearing along the axis through origin along axis: each plane across the axis moved towards toward (square to the axis) by offset times its distance from start over the zone’s length. Affine, so the same map before, over and past the zone: the zone only sets the rate (AxialMap::as_motion).

Source

pub fn as_motion(&self) -> GeopResult<Option<Motion>>

The affine map it is, where it is one everywhere — a shear: its columns across the axis constant and its offset linear along it, so the law is the map it is tangent to at either end. None for a taper, a twist or a bend.

Source

pub fn twist( origin: Vector3, axis: &Vector3, zone: (Scalar, Scalar), angle: Scalar, ) -> GeopResult<Self>

Twisting about the axis through origin along axis: turned by nothing at start and by angle (radians, right-handed about the axis) at end, uniformly in between, rigidly by angle past the end. Either hand.

Source

pub fn bend( origin: Vector3, axis: &Vector3, toward: &Vector3, zone: (Scalar, Scalar), angle: Scalar, ) -> GeopResult<Self>

Bending about an axis square to the line through origin along axis: the stretch of that line from start to end is wound onto a circular arc of angle (radians), curving towards toward, its length kept — the radius is the zone’s length over the angle. The plane square to the line at each point stays a plane, turned with it; past the end everything is carried on rigidly. A negative angle curves away from toward, an angle of nothing leaves everything where it is. Fails for a turn of a whole circle or more, which would lay the zone over itself.

Source

pub fn zone(&self) -> (Scalar, Scalar)

Where the zone starts and ends along the axis.

Source

pub fn along(&self, p: &Vector3) -> Scalar

How far along the axis p lies: its coordinate t.

Source

pub fn plane_across( &self, t: Scalar, reach: Scalar, ) -> GeopResult<NurbSurface3D>

The square of the plane across the axis at t along it, reaching reach from the axis each way: what divides a body where it crosses from one piece of the map into the next.

Trait Implementations§

Source§

impl Clone for AxialMap

Source§

fn clone(&self) -> AxialMap

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 AxialMap

Source§

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

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

impl Deformation for AxialMap

Source§

fn point(&self, p: &Vector3) -> GeopResult<Vector3>

The image of every piece p could lie in, united: where p could be on a zone’s end, the law and the affine map there both enclose it.

Source§

fn mirrors(&self) -> bool

A positive taper, a twist and a bend all keep a frame right-handed.

Source§

fn curve( &self, curve: &NurbCurve3D, at: &dyn Fn() -> GeopResult<Vector3>, ) -> GeopResult<NurbCurve3D>

The curve curve moved.
Source§

fn surface( &self, surface: &NurbSurface3D, at: &dyn Fn() -> GeopResult<Vector3>, ) -> GeopResult<NurbSurface3D>

The surface surface moved.
Source§

fn affine(&self) -> bool

Whether it is affine, mapping control points to control points. One that is not costs by the size of what it maps, so a face’s surface is first cut down to what the face uses of it.
Source§

impl PartialEq for AxialMap

Source§

fn eq(&self, other: &AxialMap) -> 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 AxialMap

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.