pub struct BoundaryLoop {
pub id: LoopId,
pub vertices: Vec<VertexId>,
pub perimeter: f64,
pub area: f64,
pub closed: bool,
pub clean: bool,
}Expand description
A chain of boundary edges, closed unless the walk could not close it.
Fields§
§id: LoopIdThe loop’s content fingerprint, which callers pass back to pick this loop (for example to fill it). It matches as long as the loop’s vertex sequence is unchanged, across edits and transactions.
vertices: Vec<VertexId>The vertices in loop order. The loop runs along each boundary edge in
the direction its one triangle uses it, so a hole in an outward-facing
surface runs clockwise seen from outside. A closed loop starts at
id.min_vertex and its polygon closes from the last vertex back to the
first. An open chain runs from one end to the other, unrotated.
perimeter: f64The length of the polygon closed from the last vertex back to the first, in local units (for an open chain, including that closing step).
area: f64The vector area |sum p_i x p_(i+1)| / 2 of the same closed polygon.
closed: booltrue when the walk came back to its first edge. false for an open
chain, which ends at a vertex where no boundary edge continues it (for
example at a non-manifold edge). An open chain is never clean, so it is
never filled.
clean: boolfalse when the edges at some vertex of the loop could not be ordered
by the fan walk: the vertex touches a non-manifold edge, or it is a
pinch whose fan pieces are wound against each other, so the walk fell
back to pairing by edge key. The loop may then be open or join openings
that are not one hole. Also false when the loop crosses an
orientation seam: it walks some boundary edge against its triangle’s
direction, or it passes a vertex where outgoing and incoming boundary
edges do not balance (a reversed triangle on the rim), so it may run
backwards around its hole. This fails safe: unclean loops are skipped
by fill_holes unless allowed, and orienting first makes a
wound-against pinch or a flipped rim triangle clean.
Trait Implementations§
Source§impl Clone for BoundaryLoop
impl Clone for BoundaryLoop
Source§fn clone(&self) -> BoundaryLoop
fn clone(&self) -> BoundaryLoop
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more