mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-15 15:20:37 -08:00
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:
parent
811dd569d3
commit
62ebfb9262
1 changed files with 11 additions and 8 deletions
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue