Skip to content

Commit

Permalink
Shape.copy fix for build123d Select.LAST
Browse files Browse the repository at this point in the history
  • Loading branch information
gumyr committed Sep 23, 2022
1 parent 50f1659 commit bc300b9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/cq_warehouse/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bc300b9

Please sign in to comment.