Skip to main content

Crate axiolid_reference

Crate axiolid_reference 

Source
Expand description

Portable scalar reference implementation: the correctness oracle (ADR 0012).

No intrinsics, no threading, no feature gates. Every optimized backend is validated by differential test against this crate, so it must stay readable and obviously correct in preference to being fast.

This package is a convenience umbrella (ADR 0036). Certified predicates now live in the focused axiolid-predicates package and are re-exported here unchanged, so an existing axiolid_reference::orient2d caller is unaffected while a narrow consumer can depend on the substrate directly instead of acquiring this package’s whole dependency graph. Analytic and spline evaluation moved to axiolid-evaluate the same way. Do not re-inline either: adding a dependency here is cheap, adding one to an extracted package is an architectural decision.

Error bounds scale with operand magnitude; a constant epsilon is a bug. Tests here include a differential gate against an oracle that shares no code with the implementation, and assert that the exact path was actually reached: a suite that never escalates proves nothing about exactness.

Re-exports§

pub use assemble::exact_boolean;
pub use boolean::ScalarBoolean;
pub use convex_hull::minimum_area_rectangle;
pub use convex_hull::side_lengths;
pub use convex_hull::strict_convex_hull;
pub use convex_hull::OrientedRectangle2;
pub use intersection::assemble_polylines;
pub use intersection::intersection_segments;
pub use intersection::EdgeKey;
pub use intersection::IntersectionCurve;
pub use intersection::IntersectionSegment;
pub use intersection::NodeKey;
pub use intersection::Operand;
pub use intersection::Polyline;
pub use polygon::ring_orientation;
pub use polygon::signed_area2;
pub use polygon::triangulate_simple;
pub use retriangulate::retriangulate_face;
pub use retriangulate::FacePatch;
pub use section::ScalarSection;
pub use segment_triangle::segment_triangle_relation;
pub use segment_triangle::SegmentTriangleRelation;
pub use triangle_triangle::triangle_triangle_relation;
pub use triangle_triangle::TriangleTriangleRelation;

Modules§

arithmetic
Arbitrary-length expansion arithmetic.
assemble
Assembling an exact boolean result from retriangulated operands.
boolean
Scalar reference implementation of solid booleans (ADR 0012, ADR 0017 §5).
clash
Mesh interference: the narrow phase (#4).
convex_hull
Deterministic 2D convex hulls and oriented bounding rectangles.
coplanar
Overlap between two coplanar triangles.
curve
Analytic and spline evaluation moved to the focused axiolid-evaluate package (ADR 0036). Re-exported unchanged so existing axiolid_reference::curve::* and ::surface::* callers are unaffected. Scalar reference implementation of curve evaluation (ADR 0012).
expansion
Error-free transformations: the arithmetic exact predicates are built from.
intersection
Intersection segments between two triangle meshes, and the polylines they assemble into.
orient3
orient3d: which side of a plane a point lies on.
orientation
Certified orientation predicates.
polygon
Simple-polygon triangulation by ear clipping, with hole support.
primitive
Tessellation of CSG primitives into closed solids.
retriangulate
Retriangulating a face against the intersection curve crossing it.
scene
Degeneracy-controlled scene generation for benchmarking and testing.
section
Portable scalar plane section of a closed oriented triangle mesh.
segment_triangle
Certified segment/triangle topology classification.
sphere
incircle and insphere: is a point inside a circumscribed ball?
static_filter
Static filters: bounds computed once from a coordinate range.
surface
Analytic and spline evaluation moved to the focused axiolid-evaluate package (ADR 0036). Re-exported unchanged so existing axiolid_reference::curve::* and ::surface::* callers are unaffected. Scalar reference implementation of surface evaluation (ADR 0012).
tessellate
Scalar reference tessellation of surfaces (ADR 0012).
triangle_triangle
Certified triangle/triangle topology classification.

Structs§

Patch
A finite parameter rectangle for tessellation.
ScalarCurve
Portable scalar curve evaluator.
ScalarSurface
The axiolid_surface::SurfaceEvaluator implementation, so a caller can dispatch through the trait rather than the free functions.
StaticFilter
Precomputed error bounds for a declared coordinate range.

Functions§

derivative2
First derivative of a 2D curve.
derivative3
First derivative of a 3D curve.
elevated_point
Position on an elevated curve at plan distance d.
elevated_tangent
Unit tangent of an elevated curve at plan distance d.
evaluate2
Position on a 2D curve.
evaluate3
Position on a 3D curve.
flatten2
Flatten a 2D curve over domain so the chord never deviates from the true curve by more than chord_tolerance.
frenet_frame
Frame of a space curve at arc length s from its start.
frenet_point
Position on a space curve at arc length s from its start.
frenet_tangent
Unit tangent of a space curve at arc length s from its start.
incircle
Is d inside the circle through a, b, c?
incircle_filter
The fast filter alone, exposed so escalation can be measured.
insphere
Is e inside the sphere through a, b, c, d?
insphere_filter
The fast filter alone, exposed so escalation can be measured.
intrinsic_point
Position on an intrinsic curve at arc length s from its start.
intrinsic_tangent
Unit tangent of an intrinsic curve at arc length s.
join_intrinsic3
Join two space curves into one, when the second continues the first.
offset_intrinsic3
Offset a space curve by distance along its principal normal.
orient2d
Orientation of c relative to the directed line a -> b.
orient2d_filter
The fast filter alone, exposed so the escalation can be observed and tested.
orient3d
Orientation of d relative to the plane through a, b, c.
orient3d_filter
The fast filter alone, exposed so escalation can be measured.
partials
Analytic first partial derivatives (∂S/∂u, ∂S/∂v) at (u, v).
trim_intrinsic3
Restrict a space curve to [start, end] of its arc length.
two_diff
Difference of a and b, plus the exact rounding error.
two_product
Product of a and b, plus the exact rounding error.
two_sum
Sum of a and b, plus the exact rounding error.