diff --git a/src/cq_warehouse/extensions.py b/src/cq_warehouse/extensions.py index 73f7e12..4a6705c 100644 --- a/src/cq_warehouse/extensions.py +++ b/src/cq_warehouse/extensions.py @@ -3546,13 +3546,18 @@ def shape_copy(self: "Shape") -> "Shape": def shape_clean(self: "Shape") -> "Shape": """clean - remove internal edges""" - - shape_copy: "Shape" = self.copy() - upgrader = ShapeUpgrade_UnifySameDomain(shape_copy.wrapped, True, True, True) + # Try BRepTools.RemoveInternals here + # shape_copy: "Shape" = self.copy() + # upgrader = ShapeUpgrade_UnifySameDomain(shape_copy.wrapped, True, True, True) + # upgrader.AllowInternalEdges(False) + # upgrader.Build() + # shape_copy.wrapped = downcast(upgrader.Shape()) + # return shape_copy + upgrader = ShapeUpgrade_UnifySameDomain(self.wrapped, True, True, True) upgrader.AllowInternalEdges(False) upgrader.Build() - shape_copy.wrapped = downcast(upgrader.Shape()) - return shape_copy + self.wrapped = downcast(upgrader.Shape()) + return self Shape.clean = shape_clean