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
//! The fold-parametric evaluator: a [`SheetTree`] → one exact-BREP solid.
//!
//! `evaluate(tree, fold)` walks the tree and unions an exact-BREP plate for every
//! flat with an exact-BREP annular wedge for every bend. The `fold` fraction
//! scales the bend angles:
//! * `fold = 1.0` → the folded 3D part (authored angles),
//! * `fold = 0.0` → the flat pattern (all bends opened) — the "unfold".
//!
//! Geometry comes only from existing kernel ops: [`extrude_profile_brep`] for
//! plates, [`revolve_profile_brep_named`] for bends, [`transform_brep`] for
//! placement, and [`boolean_operation`] union to merge. No triangle mesh.
//!
//! ## Bend construction (why the union is watertight)
//!
//! A bend is a `revolve` of the parent's through-thickness edge cross-section
//! (`[Rin, Rout] × [0, L]`, where `Rout - Rin = thickness`) about an axis parallel
//! to the fold edge and offset `-Rm·n̂` from it. Its angle-0 cap is that exact
//! `thickness × L` rectangle, coincident with the parent plate's fold-edge side
//! face; its angle-θ cap is coincident with the child plate's fold-edge face. So
//! every bend↔plate union interface is planar-coplanar (the easy boolean case),
//! never a tangent cylinder-plane graze.
//!
//! ## Hole-rim bends
//!
//! [`Flat::hole_bends`] fold walls off HOLE rims: a straight window segment
//! reuses [`build_bend`] verbatim (the flap folds INTO the opening), and a
//! circular loop grows a [`build_collar`] — one full-turn revolve whose
//! cross-section is the same annular bend wedge (torus-sector faces) glued to
//! the straight wall leg, meeting the plate through a thin buried overlap
//! ring (the transversal stand-in for the exactly-coincident bore cylinders,
//! which the boolean cannot classify).
use ;
// BREP private tests: 9e39edd0859b977c
use crate::;
// BREP private tests: b788aaf048652c3f
pub use ;
pub use circle_of_loop;