axiolid_exact_arrangement/lib.rs
1// SPDX-License-Identifier: MPL-2.0
2#![forbid(unsafe_code)]
3#![warn(missing_docs)]
4
5//! Exact arrangement of straight segments on rational points, with face
6//! tracing (ADR 0093, ADR 0094).
7//!
8//! [`ExactPoints`] stores points in homogeneous coordinates over exact
9//! numbers and decides orientation, order and containment exactly. [`arrange`]
10//! cuts segments at every crossing, T-junction and collinear overlap into
11//! pieces and joins equal points. [`trace`] closes labelled half-edges into
12//! rings and nests holes in outer boundaries. No tolerance enters any
13//! decision; a caller rounds the points it returns once each, which makes a
14//! vertex shared by two rings bit-identical in both.
15//!
16//! The crate knows no mesh, plane or face. The callers give segments and say
17//! which side of a piece carries which label.
18
19mod arrangement;
20mod distance;
21mod faces;
22mod points;
23mod ratio;
24mod ring;
25mod snap;
26mod trace;
27
28pub use arrangement::{
29 arrange, boxes_overlap, union_box, Arrangement, Crossing, PairBudget, Piece, PieceId, Segment,
30 Vertex, VertexId, CROSSING_SCRATCH_BYTES, SPLIT_SCRATCH_BYTES,
31};
32pub use distance::Nearest;
33pub use faces::{faces, FaceId, Faces};
34pub use points::{ExactPoints, Location, PointId, RingBox};
35pub use ratio::round_ratio;
36pub use ring::{canonical_rotation, canonical_start, point_order, sequence_order};
37pub use snap::{
38 snap_round, ClassBoundary, Snapped, FRAGMENT_SCRATCH_BYTES, HOT_POINT_SCRATCH_BYTES,
39};
40pub use trace::{check_winding, trace, HalfEdge, TracedRegion, TracedRing};