Skip to content

Commit

Permalink
fix: SlotCenterPoint errors on width <= height
Browse files Browse the repository at this point in the history
  • Loading branch information
erooke committed Nov 17, 2024
1 parent 5510729 commit 7e6c8d4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/build123d/objects_sketch.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,13 @@ def __init__(
self.slot_height = height

half_line = point_v - center_v

if half_line.length * 2 <= height:
raise ValueError(
f"Slots must have width > height. "
"Got: {height=} width={half_line.length * 2} (computed)"
)

face = Face(
Wire.combine(
[
Expand Down

0 comments on commit 7e6c8d4

Please sign in to comment.