Skip to content

Commit

Permalink
temp upgrade of simplification precision
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Jun 11, 2024
1 parent 8274b48 commit 2d36aa3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/compas_occ/brep/brep.py
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ def heal(self):
self.sew()
self.fix()

def simplify(self, merge_edges=True, merge_faces=True):
def simplify(self, merge_edges=True, merge_faces=True, linear=0.001, angular=0.1):
"""Simplify the shape by merging colinear edges and coplanar faces.
Parameters
Expand All @@ -1279,6 +1279,8 @@ def simplify(self, merge_edges=True, merge_faces=True):
if not merge_edges and not merge_faces:
return
simplifier = ShapeUpgrade.ShapeUpgrade_UnifySameDomain()
simplifier.SetLinearTolerance(linear)
simplifier.SetAngularTolerance(angular)
simplifier.Initialize(self.native_brep, merge_edges, merge_faces)
simplifier.Build()
shape = simplifier.Shape()
Expand Down

0 comments on commit 2d36aa3

Please sign in to comment.