Skip to main content

Sheet

Struct Sheet 

Source
pub struct Sheet {
    pub rules: SheetMetalRules,
    pub flats: Vec<Flat>,
    pub bends: Vec<Bend>,
    pub cuts: Vec<Cut>,
}
Expand description

A sheet-metal body as it is built: flat faces, the first the one the rest hang off, and the bends joining them into a tree, each child built after its parent.

Fields§

§rules: SheetMetalRules§flats: Vec<Flat>§bends: Vec<Bend>§cuts: Vec<Cut>

The cuts through it, in the order they were made, each taken out of the sheet as it is laid out flat (see crate::layout).

Implementations§

Source§

impl Sheet

Source

pub fn folded(&self) -> GeopResult<SheetSurface>

The A side of the sheet as it is bent, with its B side.

Source

pub fn unfolded(&self) -> GeopResult<SheetSurface>

The A side of the sheet laid flat, with its B side: every face in the first flat’s plane where the layout has it (see crate::layout), every bend a flat strip as wide as its developed length.

Source§

impl Sheet

Source

pub fn layout(&self) -> GeopResult<Layout>

The sheet laid out flat, its cuts subtracted (see the module docs).

Source§

impl Sheet

Source

pub fn outer_edge(&self, key: &str) -> Option<(usize, usize)>

The flat and position in its outer loop of the edge key.

Source

pub fn is_bent(&self, key: &str) -> bool

Whether a bend starts or ends at the edge key.

Source

pub fn edge_named(&self, name: &str) -> Option<(usize, usize, bool)>

The flat edge — (flat, position in its outer loop) — whose A side (false) or B side (true) edge of the body is named name.

Source

pub fn bend_frame(&self, bend: &Bend) -> GeopResult<BendFrame>

How bend bend turns.

Source

pub fn developed_length(&self, bend: &Bend) -> Scalar

Bend bend’s developed length: its angle times the radius of the neutral surface, radius + k_factor * thickness.

Source

pub fn bend_lines(&self) -> GeopResult<Vec<[Vector2; 2]>>

Where each bend lies in the flat pattern, in the order the bends were made: the line down the middle of its strip, from where its parent edge starts to where it ends, in the first flat’s sheet coordinates.

Source

pub fn flat_shifts(&self) -> GeopResult<Vec<Vector2>>

Where every flat lies in the flat pattern, in sheet coordinates: the first where it is, each child moved away from its parent, out across the bend’s first edge, by the bend’s developed length.

Trait Implementations§

Source§

impl Clone for Sheet

Source§

fn clone(&self) -> Sheet

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 Sheet

Source§

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

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

impl PartialEq for Sheet

Source§

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

Auto Trait Implementations§

§

impl Freeze for Sheet

§

impl RefUnwindSafe for Sheet

§

impl Send for Sheet

§

impl Sync for Sheet

§

impl Unpin for Sheet

§

impl UnsafeUnpin for Sheet

§

impl UnwindSafe for Sheet

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.