Skip to main content

axiolid_linear_intersection/
lib.rs

1#![forbid(unsafe_code)]
2
3//! Certified intersections for linear geometry.
4//!
5//! This package exists so a line-query application can compile intersection
6//! logic with a three-package internal closure — `axiolid-core`,
7//! `axiolid-linear`, `axiolid-predicates` — and no curves, surfaces, NURBS,
8//! meshes, B-rep, topology, providers, or execution machinery (ADR 0036).
9//!
10//! # Classification, not `Option<Point2>`
11//!
12//! Collapsing the answer to an optional point destroys facts a topology or
13//! rule checker needs: crossing, endpoint contact, parallel-disjoint,
14//! coincident, collinear-disjoint, and overlap are distinct outcomes and are
15//! returned as distinct variants.
16//!
17//! # Certified topology
18//!
19//! Parallel-versus-coincident and on-segment decisions come from
20//! `axiolid-predicates`, which escalates to exact arithmetic. The caller's
21//! [`axiolid_core::Tolerance`] governs residual acceptance of the computed
22//! coordinate, never the topological branch.
23
24mod error;
25mod line_line;
26mod segment_segment;
27mod validate;
28
29/// Re-exported so a caller can name the required tolerance policy without a
30/// separate dependency on `axiolid-core`.
31pub use axiolid_core::Tolerance;
32pub use error::{InputSide, LinearIntersectionError};
33pub use line_line::{line_line2, LineLineIntersection2};
34pub use segment_segment::{segment_segment2, SegmentSegmentIntersection2};