From 7e6c8d4b25ce2ad4706f5172ccb5576f0db3e51d Mon Sep 17 00:00:00 2001 From: Ethan Rooke Date: Sun, 17 Nov 2024 08:37:28 -0600 Subject: [PATCH] fix: SlotCenterPoint errors on width <= height --- src/build123d/objects_sketch.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/build123d/objects_sketch.py b/src/build123d/objects_sketch.py index 802cd537..62154358 100644 --- a/src/build123d/objects_sketch.py +++ b/src/build123d/objects_sketch.py @@ -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( [