Skip to content

Commit

Permalink
fix: mypy type checking in Solid.from_bounding_box
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegenstein committed Feb 7, 2025
1 parent b64807f commit 8b53e1a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/build123d/topology/three_d.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,8 +955,10 @@ def from_bounding_box(cls, bbox: BoundBox | OrientedBoundBox) -> Solid:
if isinstance(bbox, BoundBox):
return Solid.make_box(*bbox.size).locate(Location(bbox.min))
else:
moved_plane = Plane(Location(-bbox.size / 2)).move(bbox.location)
return Solid.make_box(*bbox.size, plane=moved_plane)
moved_plane: Plane = Plane(Location(-bbox.size / 2)).move(bbox.location)
return Solid.make_box(
bbox.size.X, bbox.size.Y, bbox.size.Z, plane=moved_plane
)

@classmethod
def make_box(
Expand Down

0 comments on commit 8b53e1a

Please sign in to comment.