Revert "SlotOverall: remove width != height else branch to make circle. width <= height ValueError makes this branch inaccessible."

This reverts commit 1e1c81a093.
This commit is contained in:
Jonathan Wagenet 2025-06-04 15:50:11 -04:00
parent 811dd569d3
commit 62ebfb9262

View file

@ -521,14 +521,17 @@ class SlotOverall(BaseSketchObject):
self.width = width
self.slot_height = height
face = Face(
Wire(
[
Edge.make_line(Vector(-width / 2 + height / 2, 0, 0), Vector()),
Edge.make_line(Vector(), Vector(+width / 2 - height / 2, 0, 0)),
]
).offset_2d(height / 2)
)
if width != height:
face = Face(
Wire(
[
Edge.make_line(Vector(-width / 2 + height / 2, 0, 0), Vector()),
Edge.make_line(Vector(), Vector(+width / 2 - height / 2, 0, 0)),
]
).offset_2d(height / 2)
)
else:
face = cast(Face, Circle(width / 2, mode=mode).face())
super().__init__(face, rotation, align, mode)