pub struct Snapped {
pub points: ExactPoints,
pub arrangement: Arrangement,
pub routes: Vec<Vec<(PieceId, bool)>>,
pub displacement: DisplacementBound,
pub rerouted: usize,
}Expand description
The edges of a snap-rounded set, as fragments of an exact arrangement.
Fields§
§points: ExactPointsThe hot centres, all flat, with the frame sign of the input points (the arrangement may add points only if it was refused).
arrangement: ArrangementThe arrangement of the fragments; no crossings.
routes: Vec<Vec<(PieceId, bool)>>Per input edge, its pieces from ends[0] to ends[1], each with
whether that direction runs from ends[0] to ends[1] of the piece.
Empty when both ends round to the same cell.
displacement: DisplacementBoundHow far a boundary point moved at most, in the maximum norm.
rerouted: usizeThe edges routed through a cell other than their ends’ cells.
Implementations§
Source§impl Snapped
impl Snapped
Sourcepub fn point(&self, vertex: VertexId) -> GeomResult<Point2>
pub fn point(&self, vertex: VertexId) -> GeomResult<Point2>
The binary64 position of a vertex of the arrangement.
Sourcepub fn class_boundary(
&self,
chain: &[(usize, bool)],
) -> GeomResult<ClassBoundary>
pub fn class_boundary( &self, chain: &[(usize, bool)], ) -> GeomResult<ClassBoundary>
The net boundary of a class whose boundary is chain: elements
(edge, forward) of the input edges, forward when the class runs
along the edge from ends[0] to ends[1] with the class on its
left. Opposite traversals of a piece cancel. A piece traversed twice
the same way is refused.