axiolid_reference/
lib.rs

1#![forbid(unsafe_code)]
2
3//! Portable scalar reference implementation: the correctness oracle (ADR 0012).
4//!
5//! No intrinsics, no threading, no feature gates. Every optimized backend is
6//! validated by differential test against this crate, so it must stay readable
7//! and obviously correct in preference to being fast.
8//!
9//! This package is a **convenience umbrella** (ADR 0036). Certified predicates
10//! now live in the focused `axiolid-predicates` package and are re-exported
11//! here unchanged, so an existing `axiolid_reference::orient2d` caller is
12//! unaffected while a narrow consumer can depend on the substrate directly
13//! instead of acquiring this package's whole dependency graph. Analytic and
14//! spline evaluation moved to `axiolid-evaluate` the same way. Do not
15//! re-inline either: adding a dependency here is cheap, adding one to an
16//! extracted package is an architectural decision.
17//!
18//! Error bounds scale with operand magnitude; a constant epsilon is a bug.
19//! Tests here include a differential gate against an oracle that shares no
20//! code with the implementation, and assert that the exact path was actually
21//! reached: a suite that never escalates proves nothing about exactness.
22
23pub mod assemble;
24pub mod boolean;
25pub mod clash;
26pub mod convex_hull;
27pub mod coplanar;
28pub mod intersection;
29pub mod polygon;
30pub mod primitive;
31pub mod retriangulate;
32pub mod section;
33pub mod segment_triangle;
34pub mod tessellate;
35pub mod triangle_triangle;
36
37/// Analytic and spline evaluation moved to the focused `axiolid-evaluate`
38/// package (ADR 0036). Re-exported unchanged so existing
39/// `axiolid_reference::curve::*` and `::surface::*` callers are unaffected.
40pub use axiolid_evaluate::{curve, surface};
41
42pub use axiolid_predicates::{
43    arithmetic, expansion, orient3, orientation, scene, sphere, static_filter,
44};
45
46pub use assemble::exact_boolean;
47pub use axiolid_evaluate::{
48    derivative2, derivative3, evaluate2, evaluate3, flatten2, partials, Patch, ScalarCurve,
49    ScalarSurface,
50};
51// Arc-length evaluation of natural-equation curves (ADR 0061, ADR 0062).
52// Re-exported on the same footing as the rest of `axiolid-evaluate`, so a
53// consumer of the umbrella reaches a torsion curve without taking the
54// parametric package as a direct dependency.
55pub use axiolid_evaluate::{
56    elevated_point, elevated_tangent, frenet_frame, frenet_point, frenet_tangent, intrinsic_point,
57    intrinsic_tangent, join_intrinsic3, offset_intrinsic3, trim_intrinsic3,
58};
59pub use axiolid_predicates::{
60    incircle, incircle_filter, insphere, insphere_filter, orient2d, orient2d_filter, orient3d,
61    orient3d_filter, two_diff, two_product, two_sum, StaticFilter,
62};
63pub use boolean::ScalarBoolean;
64pub use convex_hull::{
65    minimum_area_rectangle, side_lengths, strict_convex_hull, OrientedRectangle2,
66};
67pub use intersection::{
68    assemble_polylines, intersection_segments, EdgeKey, IntersectionCurve, IntersectionSegment,
69    NodeKey, Operand, Polyline,
70};
71pub use polygon::{ring_orientation, signed_area2, triangulate_simple};
72pub use retriangulate::{retriangulate_face, FacePatch};
73pub use section::ScalarSection;
74pub use segment_triangle::{segment_triangle_relation, SegmentTriangleRelation};
75pub use triangle_triangle::{triangle_triangle_relation, TriangleTriangleRelation};