Skip to content

Commit

Permalink
geometry.py -> only triangulate if optimal=False and oriented=True
Browse files Browse the repository at this point in the history
should improve performance of optimal=False, oriented=False
  • Loading branch information
jdegenstein authored Oct 10, 2024
1 parent 8e798f2 commit bb810ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/build123d/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,10 +995,10 @@ def _from_topo_ds(
else:
BRepBndLib.AddOptimal_s(shape, bbox)
else:
mesh = BRepMesh_IncrementalMesh(shape, tolerance, True)
mesh.Perform()
# this is adds +margin but is faster
if oriented:
mesh = BRepMesh_IncrementalMesh(shape, tolerance, True)
mesh.Perform()
BRepBndLib.AddOBB_s(shape, bbox_obb)
else:
BRepBndLib.Add_s(shape, bbox, True)
Expand Down

0 comments on commit bb810ea

Please sign in to comment.