axiolid-exact-arrangement
Exact arrangement of straight segments on rational points, with face tracing.
| Latest release | 0.1.2 (2026-11-14) |
| crates.io | axiolid-exact-arrangement |
| Layer | algorithms (algorithm.planar) |
| API documentation | rustdoc · docs.rs |
| Source | crates/algorithms/planar/exact-arrangement/ |
Overview
An exact arrangement of straight segments in the plane. Points are rational (homogeneous coordinates over exact dyadic numbers), so every orientation, order and containment decision is an exact sign: segments are cut at every crossing, T-junction and collinear overlap into pieces that no other piece crosses, equal points are joined, and rings of caller-labelled half-edges are traced and nested into outer boundaries with holes. No tolerance enters. Only the points a caller finally returns are rounded, once each, or, where an edge passes through the rounding cell of another vertex, snap-rounded to the binary64 grid (snap_round, ADR 0100): each edge is routed through the centre of every cell it meets, decided exactly, and the result carries a displacement bound.
It is the shared source of truth for those signs: the plane section of axiolid-reference (in-plane faces, ADR 0093) and the visible faces of axiolid-hidden-lines (ADR 0094) both decide on it. It knows no mesh, no plane and no face; callers label the pieces, except for faces, which numbers the faces of the complement (the face on each side of every piece, nested components included) for callers that need them, and the exact distance predicates on ExactPoints (nearest_on_segment, foot, compare_distance, compare_line_distance), which decide a distance against a width with no square root. axiolid-overlay's free_faces is built on both (ADR 0109). For an editable subdivision with persistent handles, use axiolid-arrangement; for polygon booleans with a tolerance, use axiolid-overlay.
Depends on
Changes
Latest release, 0.1.2 (2026-11-14):
Added
faces,FacesandFaceId(#490, ADR 0109): the face on each side of every piece of an arrangement, nested components included, numbered from the unbounded face 0; withVvertices,Epieces andCcomponents the count satisfiesV - E + F = 1 + C.Nearestand, onExactPoints,nearest_on_segment,foot,compare_distanceandcompare_line_distance: exact distance predicates with no square root, decided through the interval tier andDyadic.
Full history: crates/algorithms/planar/exact-arrangement/CHANGELOG.md