Skip to content
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

Sketch().rect() height and width reversed #938

Closed
FelisCorax opened this issue Dec 27, 2021 · 1 comment · Fixed by #939
Closed

Sketch().rect() height and width reversed #938

FelisCorax opened this issue Dec 27, 2021 · 1 comment · Fixed by #939
Labels
bug Something isn't working sketching

Comments

@FelisCorax
Copy link

show_object(cq.Sketch().rect(20,10)) generates and displays a rectangle with a length of 10 along the X axis and 20 along the Y axis. This is contrary both to expectation and to the behavior of other functions.

For example:
show_object(cq.Workplane().rect(20,10)) results in a rectangle with a length of 20 along the X axis and 10 along the Y axis, as expected.
show_object(cq.Sketch().trapezoid(20,10,45)) results in an isosceles triangle with a length of 20 along the X axis and 10 along the Y axis. Once again, as expected.

For anyone suffering from the same problem, using cq.Sketch().trapezoid(20,10,90) as a means of generating an appropriately dimensioned rectangle appears to be a functional workaround that won't break when Sketch().rect() is fixed.

Note that I tested this in a fresh conda environment with cadquery and cq-editor installed immediately prior to posting this bug.

@adam-urbanczyk adam-urbanczyk added sketching bug Something isn't working labels Dec 27, 2021
@marcus7070
Copy link
Member

Thanks for reporting @FelisCorax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sketching
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants