Persistent naming, step 1 (plan/adr/0002): faces are named from their history (a face lying on an input face keeps its name; new faces by role: F<feature>:side:<sketch curve>, :start/:top/:bottom caps, :blend:<edge>, …; split pieces #k along their spread), edges by the faces they separate (pieces ~k); names worked out lazily per body and shared by its clones; fillets and chamfers store edge names and resolve by name first (a split edge takes the piece nearest the picked point with a warning, a vanished one falls back to the point with a warning); model.faces and model.edges report names; tests for resize, suppress, reorder, an upstream split and a removed sketch segment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
bherbruckandClaude Opus 5.5 committed 2026-10-08 11:37:33 +00:00
1 parent 3efe347809
commit 72297047d5
8 files changed
+628 -24

No files matched your search

+6 -6
View File
@@ -244,17 +244,17 @@ pub(super) fn add_feature(s: &mut Session, p: &Value, kind: FeatureKind) -> Resu
let mut kind = kind;
super::component::to_active_frame(s, &mut kind);
// Blends remember where their edges sat, to find them again after upstream edits.
let refs = match &kind {
let (refs, names) = match &kind {
FeatureKind::Fillet { edges, body, .. } | FeatureKind::Chamfer { edges, body, .. } => {
solvecraft_doc::edge_refs(&s.model.state(), body, edges)
let st = s.model.state();
(solvecraft_doc::edge_refs(&st, body, edges), solvecraft_doc::edge_names_for(&st, body, edges))
}
_ => Vec::new(),
_ => (Vec::new(), Vec::new()),
};
let id = s.doc_mut().add_feature(kind, name)?;
if !refs.is_empty()
&& let Some(f) = s.doc_mut().feature_mut(id)
{
if let Some(f) = s.doc_mut().feature_mut(id) {
f.edge_refs = refs;
f.edge_names = names;
}
s.doc_mut().name_feature_inputs(id);
let comp = s.active_component;