Persistent naming: shell, draft, offset-face and replace-face faces and hole placements store their faces' names (Feature.face_names) and are moved onto the named face before evaluating (a split face: the nearest piece, with a warning; a vanished face: the picked point, with a warning)

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 99886594e7
commit e7aff4fef0
6 files changed
+114

No files matched your search

+5
View File
@@ -251,10 +251,15 @@ pub(super) fn add_feature(s: &mut Session, p: &Value, kind: FeatureKind) -> Resu
}
_ => (Vec::new(), Vec::new()),
};
let face_names = {
let pts = kind.face_points();
if pts.is_empty() { Vec::new() } else { solvecraft_doc::naming::face_names_at(&s.model.state(), &pts) }
};
let id = s.doc_mut().add_feature(kind, name)?;
if let Some(f) = s.doc_mut().feature_mut(id) {
f.edge_refs = refs;
f.edge_names = names;
f.face_names = face_names;
}
s.doc_mut().name_feature_inputs(id);
let comp = s.active_component;