Skip to content

Commit

Permalink
Merge pull request #684 from jdegenstein/BBox_optimal
Browse files Browse the repository at this point in the history
topology.py -> add `optimal: bool = True` keyword to `Shape.bounding_box`
  • Loading branch information
jdegenstein authored Sep 7, 2024
2 parents 55a6e8b + 38bf199 commit ba348d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/build123d/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -1988,7 +1988,7 @@ def is_valid(self) -> bool:
chk.SetParallel(True)
return chk.IsValid()

def bounding_box(self, tolerance: float = None) -> BoundBox:
def bounding_box(self, tolerance: float = None, optimal: bool = True) -> BoundBox:
"""Create a bounding box for this Shape.
Args:
Expand All @@ -1997,7 +1997,7 @@ def bounding_box(self, tolerance: float = None) -> BoundBox:
Returns:
BoundBox: A box sized to contain this Shape
"""
return BoundBox._from_topo_ds(self.wrapped, tolerance=tolerance)
return BoundBox._from_topo_ds(self.wrapped, tolerance=tolerance, optimal=optimal)

def mirror(self, mirror_plane: Plane = None) -> Self:
"""
Expand Down

0 comments on commit ba348d5

Please sign in to comment.