Expand description
Exact arrangement of straight segments on rational points, with face tracing (ADR 0093, ADR 0094).
ExactPoints stores points in homogeneous coordinates over exact
numbers and decides orientation, order and containment exactly. arrange
cuts segments at every crossing, T-junction and collinear overlap into
pieces and joins equal points. trace closes labelled half-edges into
rings and nests holes in outer boundaries. No tolerance enters any
decision; a caller rounds the points it returns once each, which makes a
vertex shared by two rings bit-identical in both.
The crate knows no mesh, plane or face. The callers give segments and say which side of a piece carries which label.
Structs§
- Arrangement
- The pieces of a set of segments.
- Class
Boundary - The net boundary of a class after snapping.
- Crossing
- How the point of a vertex without input points came about.
- Exact
Points - A store of exact points and the exact predicates on them.
- FaceId
- A face of the complement of an
Arrangement. - Faces
- The face on each side of every piece.
- Half
Edge - A piece with a direction: from
ends[0]toends[1]whenforward. - Pair
Budget - A count of candidate pairs against a limit, shared by the steps of one request.
- Piece
- A stretch of segments no other segment crosses or touches inside.
- PieceId
- A piece of an
Arrangement. - PointId
- A point of an
ExactPointsstore. - RingBox
- The extent of a ring, for pruning candidate pairs. Never decides.
- Segment
- A segment between two points of the store. The caller keeps its own data per segment index.
- Snapped
- The edges of a snap-rounded set, as fragments of an exact arrangement.
- Traced
Region - An outer ring and its holes, as indices into the rings of
trace. - Traced
Ring - A closed boundary of a class.
- Vertex
- A point of the arrangement.
- Vertex
Id - A vertex of an
Arrangement.
Enums§
- Location
- Where a point lies relative to a ring.
- Nearest
- Where on a segment the point nearest to a given point lies.
Constants§
- CROSSING_
SCRATCH_ BYTES - Bytes charged for one crossing point: the Dyadic coordinates, the enclosures and the bookkeeping of a segment pair.
- FRAGMENT_
SCRATCH_ BYTES - Bytes charged for one routed fragment: the segment and its path entry.
- HOT_
POINT_ SCRATCH_ BYTES - Bytes charged for one hot cell: its exact bounds, the point and its index entries.
- SPLIT_
SCRATCH_ BYTES - Bytes charged for one end of a segment lying inside another one (a T-junction split): an entry in two cut lists and its share of the sort.
Functions§
- arrange
- Cut
segmentsinto pieces. - boxes_
overlap - Whether two
[min_x, min_y, max_x, max_y]boxes overlap, edges included. - canonical_
rotation - Rotate a ring to start at its lexicographically smallest point; of several equal smallest points the rotation that orders lowest wins.
- canonical_
start - Index at which a ring starts to be canonical: at its lexicographically smallest point; of several equal smallest points the rotation that orders lowest wins.
- check_
winding - Refuse a class that winds more than once at some point.
- faces
- Number the faces of the complement of
arrangement. - point_
order - Order of points by
x, theny(total order on binary64). - round_
ratio numerator / denominatorrounded once to the nearest binary64, ties to even, subnormals included.Nonefor a zero denominator or a result beyond the finite range.- sequence_
order - Lexicographic order of point sequences; a prefix sorts first.
- snap_
round - Snap-round
edges, straight segments between distinct points ofpoints. - trace
- Close
half_edges, which all carry one class on their left, into rings and nest them. - union_
box - The smallest box holding all
boxes.