Untrim: holes removed and a face restored to its natural bounds (#1150)

Adds surface.untrim (#761); the SurfaceUntrim feature is first saved in format 21.
This commit is contained in:
Irakli Kourtis authored and GitHub committed 2026-10-14 20:29:25 -04:00
1 parent 734f69ad72
commit 16c49c3e86
25 files changed
+961 -18

No files matched your search

+15
View File
@@ -1019,6 +1019,19 @@ pub enum FeatureKind {
#[serde(default, skip_serializing_if = "Vec::is_empty")]
faces: Vec<Vec3>,
},
/// The face at `face` restored towards its surface: the inner loops at the `holes` points
/// taken away (every one when `None`; none when empty), and with `outer` its outer boundary
/// back at the surface's natural bounds (an analytic surface's: the face's own span). A new
/// surface body; with `in_place`, a surface body's face is untrimmed where it is.
SurfaceUntrim {
face: FaceAt,
#[serde(default, skip_serializing_if = "Option::is_none")]
holes: Option<Vec<Vec3>>,
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
outer: bool,
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
in_place: bool,
},
/// A surface body turned about an axis from open curve chains and the boundaries of
/// profiles: walls only, no caps (a solid where a full turn closes them).
SurfaceRevolve {
@@ -1444,6 +1457,7 @@ impl FeatureKind {
FeatureKind::SurfaceExtend { .. } => "ExtendFeature",
FeatureKind::Unstitch { .. } => "UnstitchFeature",
FeatureKind::ReverseNormal { .. } => "ReverseNormalFeature",
FeatureKind::SurfaceUntrim { .. } => "UntrimFeature",
FeatureKind::Import { .. } => "BaseFeature",
FeatureKind::MeshImport { .. } => "MeshFeature",
FeatureKind::MeshConvert { .. } => "MeshConvertFeature",
@@ -1518,6 +1532,7 @@ impl FeatureKind {
FeatureKind::SurfaceExtend { .. } => "Extend",
FeatureKind::Unstitch { .. } => "Unstitch",
FeatureKind::ReverseNormal { .. } => "ReverseNormal",
FeatureKind::SurfaceUntrim { .. } => "Untrim",
FeatureKind::Import { .. } => "Import",
FeatureKind::MeshImport { .. } => "Mesh",
FeatureKind::MeshConvert { .. } => "ConvertMesh",