Skip to main content

BendFrame

Struct BendFrame 

Source
pub struct BendFrame {
    pub tau: Vector3,
    pub m: Vector3,
    pub n: Vector3,
    pub sigma: Scalar,
    pub r_a: Scalar,
    pub r_b: Scalar,
    pub cos: Scalar,
    pub sin: Scalar,
    pub center: Vector3,
}
Expand description

How a bend turns, worked out from its parent flat: the frame of its first edge and its radii.

Fields§

§tau: Vector3

Along the parent’s edge, in the direction its loop runs it.

§m: Vector3

Out of the parent, across the edge, in its plane.

§n: Vector3

The parent’s normal.

§sigma: Scalar

1 turning towards the B side, -1 away from it.

§r_a: Scalar

The radius of its A side and of its B side.

§r_b: Scalar§cos: Scalar§sin: Scalar§center: Vector3

A point on the axis.

Implementations§

Source§

impl BendFrame

Source

pub fn new( place: &Placement, [a, b]: [Vector2; 2], angle: Scalar, radius: Scalar, thickness: Scalar, toward_b: bool, ) -> GeopResult<Self>

A bend from the straight parent edge a -> b of a flat placed at place, turning by angle with inner radius radius in a sheet thickness thick.

Source

pub fn rotate(&self, x: &Vector3) -> Vector3

The vector x turned by the bend: m towards the side it turns to, about its axis.

Source

pub fn child_placement(&self, parent: &Placement) -> Placement

Where the child flat lies: the parent’s placement turned about the bend’s axis. Its edge where the bend ends is the parent’s where it starts, in sheet coordinates.

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