pub struct Layout {
pub vertices: Vec<LayoutVertex>,
pub edges: Vec<LayoutEdge>,
pub faces: Vec<LayoutFace>,
pub changed: BTreeSet<String>,
pub corners: Vec<[usize; 4]>,
}Expand description
A sheet laid out flat (see the module docs). Edges and vertices a cut took away stay in the lists, used by no face.
Fields§
§vertices: Vec<LayoutVertex>§edges: Vec<LayoutEdge>§faces: Vec<LayoutFace>§changed: BTreeSet<String>The keys of the sheet’s edges a cut split or took away.
corners: Vec<[usize; 4]>Per bend, the vertices at its corners as built — where its parent edge starts and ends, where its child edge ends and starts — which stay in the list when a cut takes them away.
Implementations§
Source§impl Layout
impl Layout
Sourcepub fn used_edges(&self) -> Vec<usize>
pub fn used_edges(&self) -> Vec<usize>
The edges some face uses, in order.
Sourcepub fn subtract(&mut self, cut: &[Vec<CutCurve>]) -> GeopResult<()>
pub fn subtract(&mut self, cut: &[Vec<CutCurve>]) -> GeopResult<()>
Takes the area inside cut — closed loops, counter-clockwise, apart
from each other — out of the faces: their edges inside it go, the
cut’s curves inside a face become its edges, every curve split where
they cross, or where a joint of the cut lies on one. Refuses, naming
the curves, a cut that crosses an edge at its end, touches one,
runs along one, or crosses one that is no line or arc; and one that
splits a face in two, takes one away entirely, or misses the sheet.