Skip to content

SlotCenterPoint validates minimum width incorrectly #948

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jwagenet opened this issue Mar 25, 2025 · 1 comment
Open

SlotCenterPoint validates minimum width incorrectly #948

jwagenet opened this issue Mar 25, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@jwagenet
Copy link
Contributor

SlotCenterPoint raises ValueError: Slots must have width > height. Got: {height=} width={half_line.length * 2} (computed) when the slot width is too small, however the minimum width calculation is incorrect. Also, the fstring was broken by the formatter.

The minimum width should actually be half_line.length * 2 + height or validated as half_line.length > 0 or center != point.

Example

SlotCenterPoint((0, 0), (1.5, 0), 3) but this would actually produce a slot with overall length 6.

@jwagenet
Copy link
Contributor Author

Unrelated, but I think it's weird/inconsistent this object takes a center point at all and isn't centered on the origin like all other sketch objects (except Polygon) when unlocated.

@gumyr gumyr added the bug Something isn't working label Mar 27, 2025
@gumyr gumyr added this to the Not Gating Release 1.0.0 milestone Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants