-
Notifications
You must be signed in to change notification settings - Fork 300
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
moving a workplane origin #577
Comments
@billingsley-john Are you running on the latest master of cadquery? I can't replicate your problem with the latest binary development release of CQ-editor which may be a little bit behind master. You could also try moving the center of the workplane. You can try this, which also works for me in CQ-editor. solid = cq.Workplane("XZ").center(50, 0).workplane()
solid = solid.polyline([(-10, 10), (10, 10), (10, -10), (-10, -10)]).close() |
Hi @jmwright, Yes, I am using the latest cq master (installed today), and your suggestion of using center() worked great! Not too sure what's going on locally for me with moveTo() but at least there is a viable alternative. Thank you very much! |
The |
Great, thank you all for your responses! |
Hi, I have been using cadquery to produce swept solids. To position the 'end faces' of the solid at specified positions I have been using code similar to this:
solid = cq.Workplane("XZ").moveTo(50, 0).workplane()
solid = solid.polyline([(-10, 10), (10, 10), (10, -10), (-10, -10)]).close()
Previously, this would create a 20x20 square centered on (50, 0). However, this doesn't work anymore, the square now centers on (0, 0).
Could this be a bug, or maybe this is now the wrong approach to take?
My understanding was that
.moveTo(50, 0).workplane()
would essentially create a new origin at (50, 0) so that the polyline would be placed correctly.I also notice that if .circle() is used instead of .polyline(), a circle is correctly centered at (50, 0).
Any help with this problem would be greatly appreciated.
Thanks,
John
The text was updated successfully, but these errors were encountered: