1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! Analytic surface provenance — every triangle knows what it came from.
//!
//! Stage 1 of [`docs/brep-nurbs-plan.md`](../../docs/brep-nurbs-plan.md), behind
//! the `brep` feature (which implies `nurbs`).
//!
//! # The problem this solves
//!
//! `sphere(r)` becomes a 32-facet mesh before the first boolean runs, and the
//! sphere is gone. Everything downstream then works from triangles: normals are
//! averaged from the faces we just invented, UVs come from whatever the mesher
//! guessed, resolution is frozen at whatever `$fn` was set before the boolean,
//! and the CSG kernel recovers "one flat face" by *hashing a quantized plane*
//! out of the triangles (`exact_csg::plane_key`) — which works for planes and
//! nothing else.
//!
//! This module keeps the surface. A [`SurfaceTable`] rides alongside a
//! `BufferGeometry` mapping each triangle to the [`Surface`] it was sampled
//! from, and four things follow directly:
//!
//! * **Exact normals** — from `Sᵤ × Sᵥ`, not from area-weighted face averages.
//! * **Exact UVs** — from the surface's own parameterization, which is what
//! makes pole and seam behaviour predictable instead of per-primitive folklore.
//! * **Re-tessellation** — boolean at a coarse resolution, render at a fine one.
//! * **Real face identity** for Stage 2, so a coaxial-cylinder pair is decided
//! by comparing two structs instead of by numeric tri-tri intersection.
//!
//! # Provenance is optional, always
//!
//! `BufferGeometry::surfaces` is an `Option`, and every consumer treats `None`
//! as "fall back to the mesh". Nothing in this module is load-bearing: a
//! transform that cannot be represented drops the table, an edit to the
//! positions invalidates it, and the result is a build that behaves exactly as
//! it did before the feature existed. That is the plan's safety property, and it
//! is what makes it safe to attach provenance to primitives by default.
/// Subdividing a face's parameter region by the curves drawn on it — the
/// planar arrangement a face split by *open* curves needs.
pub use ;
pub use ;
pub use Curve3d;
pub use ;
pub use ;
pub use ;
pub use ;
pub use Surface;
pub use ;