axiolid_construct/lib.rs
1#![forbid(unsafe_code)]
2
3//! Geometry generation from exact inputs into explicit mesh or focused analytic results.
4//!
5//! # Why this is its own crate
6//!
7//! Everything here answers one question: given an exact profile and a path,
8//! what solid does that denote? Extrusion, revolution, the sweep families,
9//! lofting and half-space clipping are all the same problem with different
10//! path kinds, and they share one stitching implementation so that winding,
11//! hole orientation and cap pairing are decided once.
12//!
13//! None of that needs an operation graph. These functions take geometry and
14//! return geometry; they do not walk a DAG, cache results, resolve node
15//! references, or dispatch to a backend. That is why they live here and not
16//! in `axiolid-mesh-compile`, which does all four.
17//!
18//! The split matters beyond tidiness. A caller that wants a swept solid --
19//! a CAD front end, a test, a future exact B-rep generator -- should not have
20//! to construct a `SolidOperation` graph and run a compiler to get one. Under
21//! the old layout that was the only way to reach this code.
22//!
23//! # What this crate does not do
24//!
25//! Broad sweep/profile families still produce meshes, not exact B-reps. The
26//! certified affine surface-pair arrangement is the first focused analytic
27//! constructor; it does not imply exact sweeps, booleans, or solids. Per ADR
28//! 0020, those broader exact results remain the intended end state.
29
30use axiolid_contracts::BackendId;
31
32/// Identity these generators report in diagnostics.
33///
34/// Distinct from the compiler's: a failure raised while building a swept
35/// solid comes from this crate, and attributing it to `axiolid-mesh-compile`
36/// would send a reader to the wrong place. Sweeps already reported a
37/// separate identity before the split; this makes every generator
38/// consistent with that.
39pub const BACKEND_ID: BackendId = BackendId::new("scalar-generate");
40
41pub mod center_line;
42pub mod extrude;
43pub mod half_space;
44pub mod loft;
45pub mod profile;
46pub mod result;
47pub mod revolve;
48pub mod sweep;
49pub mod trimmed_intersection;
50mod trimmed_intersection_assembly;
51mod trimmed_intersection_builder;
52mod trimmed_intersection_classify;
53mod trimmed_intersection_clone_surface;
54mod trimmed_intersection_rectangle;
55mod trimmed_intersection_types;
56
57pub use axiolid_brep::{
58 Curve2Id, Curve3Id, ExactBRep, ExactBRepBuilder, ExactBRepError, ExactTopology, SurfaceId,
59};
60pub use result::{GeneratedGeometry, GenerationOutput, GenerationRequest, TessellationRequest};
61pub use trimmed_intersection::{
62 split_surface_pair_certified, CertifiedSurfacePairSplit3, CertifiedSurfacePairSplitOptions,
63 CertifiedTrimmedSurfacePair3, EmbeddedFaceCurve, SurfacePairMember,
64 SurfacePairSplitUnresolvedReason,
65};