refactor(kernel): number profile loops once and record face history as faces are built
One numbered loop type (crate::numbered) carries each segment's profile numbers through orientation, snapping, circle re-seaming, re-sampling and rotation; every builder orients its regions through it once. Builders that make their own side faces pair each face with its provenance as it is made (ruled walls by the wire edges each face holds, smooth lofts, coils and path sweeps by segment), and cap_and_close appends the caps itself. Column following is kept only for faces truck sweeps internally (rsweep, tsweep along paths, cones, where an apex vertex stays put). Extrude derives face sources and history in one topology pass. One attach entry point takes operands with their edges already indexed. Geometry, face order, face sources and recorded origins are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J53sR6gEaVt56soFDpTck8
This commit is contained in:
1 parent
8c81bc60d0
commit
d69ebbee1b
13 files changed
+705
-527
No files matched your search
@@ -433,7 +433,8 @@ pub fn thicken(body: &Body, thickness: f64, symmetric: bool) -> Result<Body> {
|
||||
let mut out = Vec::new();
|
||||
// History (one operand, the surface): a copy at no distance is the face itself, a copy
|
||||
// further out its offset, a wall is made along its free edge.
|
||||
let edge_index = crate::record::edge_index(body);
|
||||
let operand = crate::record::Operand::new(body);
|
||||
let edge_index = &operand.edges;
|
||||
let mut history = Vec::new();
|
||||
let copy = |i: usize, d: f64| {
|
||||
if d == 0.0 {
|
||||
@@ -499,7 +500,7 @@ pub fn thicken(body: &Body, thickness: f64, symmetric: bool) -> Result<Body> {
|
||||
}
|
||||
}
|
||||
}
|
||||
crate::record::attach_edges(Body::new(mt::Solid::new_unchecked(vec![shell]))?, &[body], history, copies)
|
||||
crate::record::attach(Body::new(mt::Solid::new_unchecked(vec![shell]))?, &[operand], Some(history), copies)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user