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 parray inconsistent start angle and rotation convention #1001

Closed
lorenzncode opened this issue Feb 17, 2022 · 1 comment
Closed

Sketch parray inconsistent start angle and rotation convention #1001

lorenzncode opened this issue Feb 17, 2022 · 1 comment

Comments

@lorenzncode
Copy link
Member

s = cq.Sketch().parray(20, 20, -50, 8).circle(0.5)

Result (master):

image

Compare parray with arc start angle and rotation and face rotation.

r = 20
a1 = 20

s = (
    cq.Sketch()
    .parray(r, a1, -50, 8)
    .circle(0.5)
    .reset()
    .arc((0, 0), r, a1, -70)
    .rect(r * 2, 1, a1)
)

Result (master):

image

I had expected the following result.:

image

I think this might be a minor issue left from the initial Sketch implementation. Perhaps parray can be changed similar to #939 where rect was found to be 90 degrees off from expected?

@adam-urbanczyk
Copy link
Member

Absolutely, this needs to be fixed to be consistent with arc.

lorenzncode added a commit to lorenzncode/cadquery that referenced this issue Feb 19, 2022
* Start angle and rotation convention to be consistent with arc CadQuery#1001
* Fix parray bug when used with push
* Return n locations for 360 degree array
* Fix n=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants