feat(kernel): modifiers report exact face and edge history
Fillets (local, loop, rolling ball, corner, variable, chord), chamfers (cutters, local corners, loops, two sides), shell, draft, offset faces, split face/body, delete face, patch/copy/stitch/trim/extend and transforms record their history over [body] while they build: faces rebuilt from the body's, blends in place of edges (corner patches in place of the edges at the corner), shell walls as offsets, edges as pieces of the body's or where two faces meet. Multi-step operations compose each step. The push-face offset fallback now has history, and the bore union composes its narrowed tool. A reflection reorders a body's edges, so transforms now match edges by identity (mirrored copies reported the wrong edges). Refs #136 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
d5cb276965
commit
08d7037176
19 files changed
+1146
-231
No files matched your search
@@ -148,6 +148,20 @@ pub(crate) fn heal_body(body: &Body, solid: Solid, size: f64, keep: &[Vec<Vec3>]
|
||||
heal_build(solid, size, keep, faces, edges, counts)
|
||||
}
|
||||
|
||||
/// `body` healed as the local modifiers take it (coplanar neighbours as one face, as after a
|
||||
/// join; faces split on purpose kept apart), with its history over `[body]`.
|
||||
pub(crate) fn healed(body: &Body) -> Result<Body> {
|
||||
let counts = record::counts(&[body]);
|
||||
heal_body(&operand(body, 0, &counts), body.deep_copy(), body.size(), body.split_keep(), &counts)
|
||||
}
|
||||
|
||||
/// `body` copied as it is, unhealed (`Body::deep_copy`, which keeps its face and edge order),
|
||||
/// with its history over `[body]`: every face and edge kept.
|
||||
pub(crate) fn copied(body: &Body) -> Result<Body> {
|
||||
let copy = Body::new(body.deep_copy())?;
|
||||
Ok(operand(©, 0, &record::counts(&[body])))
|
||||
}
|
||||
|
||||
/// The faces and edges of `a`, then of the tool `b` turned inside out as a void (`inner`, a
|
||||
/// copy of `b`, with `inner_edges` its edges by identity before turning): the history of
|
||||
/// `a` with `b`'s inside taken out where `b` lies wholly within it.
|
||||
@@ -167,4 +181,4 @@ pub(crate) fn void(
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "boolean_history_tests.rs"]
|
||||
mod tests;
|
||||
pub(crate) mod tests;
|
||||
Reference in new issue
Block a user