-
Notifications
You must be signed in to change notification settings - Fork 295
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
fix eachpoint() with useLocalCoordinates=False coordinate transformation #1097
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1097 +/- ##
=======================================
Coverage 96.34% 96.34%
=======================================
Files 40 40
Lines 9533 9533
Branches 1259 1259
=======================================
Hits 9185 9185
Misses 205 205
Partials 143 143
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
@greyltc Is there an example that shows how it was wrong? |
I kinda hoped you'd look at this and say "oh yeah" ;-) I do have an example (from when I ran into this the other day), but it's a long way from being minimal. I'll see if I can put something minimal together. Is there any case anywhere |
@jmwright, hopefully that ^^ issue report makes it clear! |
I tried a few things with this change and I think the fix makes sense. It seems odd that this bug would have gone undiscovered for so long, so that made me suspicious that the way it was working was just counter-intuitive and not broken. @gumyr Have you run into this bug before while working on cq_warehouse? Here's the accompanying issue: #1098 |
Interestingly, I only use eachpoint once in all of cq_warehouse - in my
sprocket generator (one of my oldest designs) - and I had to make a change
on May 11 to adapt to #1016 where
polarArray feed points into that eachpoint call. Either I don't directly
see the problem, or I thought that's how it should be and adapted.
…On Tue, Jun 7, 2022 at 6:56 AM Jeremy Wright ***@***.***> wrote:
I tried a few things with this change and I think the fix makes sense. It
seems odd that this bug would have gone undiscovered for so long, so that
made me suspicious that the way it was working was just counter-intuitive
and not broken.
@gumyr <https://github.com/gumyr> Have you run into this bug before while
working on cq_warehouse? Here's the accompanying issue: #1098
<#1098>
—
Reply to this email directly, view it on GitHub
<#1097 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUNL25QOJX4F4WSXEXPO7HLVN4THDANCNFSM5X47DMYQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I think nobody's ever seen this because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @greyltc
@adam-urbanczyk @lorenzncode Any objections to merging this? |
@jmwright I would suggest not to merge this. There doesn't seem to be agreement on a description of the issue. Here is a simpler example tested with master that looks correct to me.: # global coordinates
pts = [
(0, 20, 40),
(10, 20, 40),
(0, -20, 40),
]
cyl = cq.Solid.makeCylinder(2, 8, (0, 0, -4))
r = (
cq.Workplane("XZ")
.pushPoints(pts)
.eachpoint(
lambda loc: cyl.moved(loc),
#useLocalCoordinates=True,
useLocalCoordinates=False,
)
) With cq-editor console:
The normal direction is also as expected (IMO).
When I test with this PR and again
|
We did not reach a conclusion on this topic, so -1 on merging as-is. |
I think the coordinate transformation for the eachpoint() function with
useLocalCoordinates=False
was backwardsfixes #1098