A feature that names its body finds its named face there first (#1637) (#1643)

Thanks @rlartot.
This commit is contained in:
rlartot authored and GitHub committed 2026-10-16 06:26:23 -04:00
1 parent 64b0b674d2
commit 3126962cd4
3 files changed
+127 -2

No files matched your search

+20
View File
@@ -53,6 +53,26 @@ impl FeatureKind {
v
}
/// The body a feature that works on one body's faces names (shell, draft, split, offset,
/// delete and replace face, surface offset, the placed plastic features, sheet metal
/// conversion, ruled surface): its face points pick faces of that body.
pub fn face_body(&self) -> Option<&str> {
match self {
FeatureKind::Shell { body, .. }
| FeatureKind::Draft { body, .. }
| FeatureKind::SplitFace { body, .. }
| FeatureKind::OffsetFace { body, .. }
| FeatureKind::DeleteFace { body, .. }
| FeatureKind::ReplaceFace { body, .. }
| FeatureKind::SurfaceOffset { body, .. }
| FeatureKind::Boss { body, .. }
| FeatureKind::SnapFit { body, .. }
| FeatureKind::Rest { body, .. } => body.as_deref(),
FeatureKind::SheetConvert { body, .. } | FeatureKind::SurfaceRuled { body, .. } => Some(body.as_ref()),
_ => None,
}
}
/// The feature's profile selections, each with its sketch.
pub fn profile_sels_mut(&mut self) -> Vec<(u64, &mut ProfileSel)> {
let mut v = Vec::new();