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
impl Sheet
Sourcepub fn folded(&self) -> GeopResult<SheetSurface>
pub fn folded(&self) -> GeopResult<SheetSurface>
The A side of the sheet as it is bent, with its B side.
Sourcepub fn unfolded(&self) -> GeopResult<SheetSurface>
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
impl Sheet
Sourcepub fn layout(&self) -> GeopResult<Layout>
pub fn layout(&self) -> GeopResult<Layout>
The sheet laid out flat, its cuts subtracted (see the module docs).
Source§impl Sheet
impl Sheet
Sourcepub fn outer_edge(&self, key: &str) -> Option<(usize, usize)>
pub fn outer_edge(&self, key: &str) -> Option<(usize, usize)>
The flat and position in its outer loop of the edge key.
Sourcepub fn edge_named(&self, name: &str) -> Option<(usize, usize, bool)>
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.
Sourcepub fn bend_frame(&self, bend: &Bend) -> GeopResult<BendFrame>
pub fn bend_frame(&self, bend: &Bend) -> GeopResult<BendFrame>
How bend bend turns.
Sourcepub fn developed_length(&self, bend: &Bend) -> Scalar
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.
Sourcepub fn bend_lines(&self) -> GeopResult<Vec<[Vector2; 2]>>
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.
Sourcepub fn flat_shifts(&self) -> GeopResult<Vec<Vector2>>
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.