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

eachpoint(..., useLocalCoordinates=False) manipulates the point's location when it shouldn't #1099

Open
greyltc opened this issue Jun 8, 2022 · 1 comment · May be fixed by #1100
Open

Comments

@greyltc
Copy link
Contributor

greyltc commented Jun 8, 2022

Here's what the docs say eachpoint() should do:

cadquery/cadquery/cq.py

Lines 2440 to 2441 in a5fadeb

Same as each(), except each item on the stack is converted into a point before it
is passed into the callback function.

When each() is called with useLocalCoordinates=False, it does no manipulation of the object before passing it on to the callback function:

r = callback(obj)

but when eachpoint() is called with useLocalCoordinates=False, it manipulates/transforms (p * loc) the object's location before passing it on to the callback function:

res = [callback(p * loc) for p in pnts]

I guess it probably shouldn't do that.

greyltc added a commit to greyltc/cadquery that referenced this issue Jun 8, 2022
@greyltc
Copy link
Contributor Author

greyltc commented Jun 8, 2022

#1100 should bring the code in line with how I interpret the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant