feat: stabilize face attachments and closed spline workflows
This commit is contained in:
1 parent
c1d819f235
commit
a6bb8fc924
83 files changed
+6271
-385
No files matched your search
@@ -346,6 +346,16 @@ pub(super) fn paste(
|
||||
{
|
||||
face.author_path = cloned_path(&source, &face.author_path, component, &clone_path, &occurrences)?;
|
||||
}
|
||||
if let (FeatureKind::Sketch { plane, .. }, FeatureKind::Sketch { plane: old_plane, .. }) = (&mut f.kind, &old.kind)
|
||||
&& let (Some(anchor), Some(original)) = (super::sketch::face::anchor_mut(plane), super::sketch::face::anchor(old_plane))
|
||||
{
|
||||
if bodies.contains_key(&original.target.body) {
|
||||
anchor.component =
|
||||
*components.get(&original.component).ok_or_else(|| bad(CMD, "anchored source component is outside copied graph"))?;
|
||||
anchor.path = cloned_path(&source, &original.path, component, &clone_path, &occurrences)?;
|
||||
}
|
||||
anchor.author_path = cloned_path(&source, &original.author_path, component, &clone_path, &occurrences)?;
|
||||
}
|
||||
if let Some(slot) = scratch.doc_mut().feature_mut(f.id) {
|
||||
*slot = f;
|
||||
}
|
||||
@@ -473,6 +483,15 @@ pub(super) fn paste(
|
||||
}
|
||||
}
|
||||
}
|
||||
if let FeatureKind::Sketch { plane, .. } = &feature.kind
|
||||
&& let Some(anchor) = super::sketch::face::anchor(plane)
|
||||
&& !bodies.contains_key(&anchor.target.body)
|
||||
{
|
||||
notices.push(format!(
|
||||
"{} retains external exact face attachment to {} (producer {})",
|
||||
feature.name, anchor.target.body, anchor.target.origin_feature
|
||||
));
|
||||
}
|
||||
for id in feature.kind.input_sketches() {
|
||||
if !features.contains_key(&id) {
|
||||
notices.push(format!("{} retains an external sketch reference to {id}", feature.name));
|
||||
|
||||
Reference in new issue
Block a user