forked from 1b-agent/opencadstudio-upstream
feat(model): SLICE cuts meshes
SLICE now takes MESH, polygon mesh and polyface mesh objects. A mesh that closes a volume is sliced as a solid, so each side is capped and becomes a 3D solid. An open mesh, such as a pipe run imported without end caps, is clipped face by face and each side stays a mesh, open along the cut. Keeping one side or both works as for solids, in one undo step. Refs #1398 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9e55bcd3bf
commit
5e6290ce30
4 files changed
+220
-23
No files matched your search
@@ -335,8 +335,15 @@ impl CadCommand for SliceCommand {
|
||||
self.selected = entities
|
||||
.into_iter()
|
||||
.filter_map(|item| {
|
||||
matches!(item.entity, EntityType::Solid3D(_) | EntityType::Surface(_))
|
||||
.then_some(item.handle)
|
||||
matches!(
|
||||
item.entity,
|
||||
EntityType::Solid3D(_)
|
||||
| EntityType::Surface(_)
|
||||
| EntityType::Mesh(_)
|
||||
| EntityType::PolygonMesh(_)
|
||||
| EntityType::PolyfaceMesh(_)
|
||||
)
|
||||
.then_some(item.handle)
|
||||
})
|
||||
.collect();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user