axiolid-construct 0.3.1

Solid generation: profiles, lofts, sweeps, revolutions and half-space clipping
Documentation
#![forbid(unsafe_code)]

//! Geometry generation from exact inputs into explicit mesh or focused analytic results.
//!
//! # Why this is its own crate
//!
//! Everything here answers one question: given an exact profile and a path,
//! what solid does that denote? Extrusion, revolution, the sweep families,
//! lofting and half-space clipping are all the same problem with different
//! path kinds, and they share one stitching implementation so that winding,
//! hole orientation and cap pairing are decided once.
//!
//! None of that needs an operation graph. These functions take geometry and
//! return geometry; they do not walk a DAG, cache results, resolve node
//! references, or dispatch to a backend. That is why they live here and not
//! in `axiolid-mesh-compile`, which does all four.
//!
//! The split matters beyond tidiness. A caller that wants a swept solid --
//! a CAD front end, a test, a future exact B-rep generator -- should not have
//! to construct a `SolidOperation` graph and run a compiler to get one. Under
//! the old layout that was the only way to reach this code.
//!
//! # Exact generation coverage
//!
//! Broad sweep families still produce meshes by default, but exact generation
//! is no longer a narrow slice. Every `Profile` variant extrudes exactly:
//! rectangle (including through-holes), circle, ellipse, contour (with holes
//! and arcs), section, centre-line, derived and composite. Revolution covers
//! any profile that lowers to a contour, sweeping cylinders, cones, planar
//! annuli and tori.
//!
//! What still refuses is stated per call site and is about geometry the
//! kernel cannot represent exactly rather than work not yet done -- a partial
//! turn, a section straddling the revolution axis, an offset with no
//! same-kind result, a non-conformal transform. None of this implies general
//! exact booleans.
//!
//! Certified affine surface-pair arrangement remains the other focused
//! analytic constructor.

use axiolid_contracts::BackendId;

/// Identity these generators report in diagnostics.
///
/// Distinct from the compiler's: a failure raised while building a swept
/// solid comes from this crate, and attributing it to `axiolid-mesh-compile`
/// would send a reader to the wrong place. Sweeps already reported a
/// separate identity before the split; this makes every generator
/// consistent with that.
pub const BACKEND_ID: BackendId = BackendId::new("scalar-generate");

pub mod boolean_exact;
mod boolean_provenance;
pub mod boolean_stepped;
pub mod center_line;
pub mod center_line_exact;
pub mod contour_lower;
pub mod extrude;
mod extrude_arc;
mod extrude_exact;
pub mod feature;
pub mod fillet_variable;
pub mod half_space;
pub mod hull;
pub mod loft;
pub mod offset;
pub mod polyhedron;
pub mod profile;
pub mod profile_lower;
pub mod result;
pub mod revolve;
pub mod revolve_contour;
pub mod revolve_exact;
pub mod section_lower;
pub mod sweep;
pub mod trimmed_intersection;
mod trimmed_intersection_assembly;
mod trimmed_intersection_builder;
mod trimmed_intersection_classify;
mod trimmed_intersection_clone_surface;
mod trimmed_intersection_rectangle;
mod trimmed_intersection_types;

pub use axiolid_brep::{
    Curve2Id, Curve3Id, ExactBRep, ExactBRepBuilder, ExactBRepError, ExactTopology, SurfaceId,
};
pub use result::{GeneratedGeometry, GenerationOutput, GenerationRequest, TessellationRequest};
pub use trimmed_intersection::{
    split_surface_pair_certified, CertifiedDualTrimmedSurfacePair3, CertifiedSurfacePairSplit3,
    CertifiedSurfacePairSplitOptions, CertifiedTrimmedSurfacePair3, EmbeddedFaceCurve,
    SurfacePairMember, SurfacePairSplitUnresolvedReason,
};