Split Body and Combine Intersect keep their faces' sources, so sketches attach (#565) (#1732)

Thanks @SychPL.
This commit is contained in:
Mateusz Sych authored and GitHub committed 2026-10-16 11:26:17 -04:00
1 parent 6b9501f442
commit bf4551159e
4 files changed
+12 -6

No files matched your search

+4
View File
@@ -4436,7 +4436,11 @@ fn eval_feature(doc: &Document, vals: &BTreeMap<String, Value>, f: &Feature, st:
let tb = st.body(&t.body).ok_or_else(|| DocError::Unknown(format!("body `{}`", t.body)))?;
let face = crate::appearance::face_index_at(tb, t.point.0)
.ok_or_else(|| DocError::Invalid(format!("no face of `{}` at the tool point", t.body)))?;
// The pieces keep the planar roles of the faces they share with the body (#565).
kernel::split_body(&mb.body, &kernel::SplitTool::Face { body: &tb.body, face })?
.into_iter()
.map(|part| part.with_preserved_planar_sources(&mb.body))
.collect::<std::result::Result<Vec<_>, _>>()?
}
None => {
let pl = doc.resolve_plane_in(vals, plane, 0, Some(st))?;