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

TypeError: Sketch.moved() got an unexpected keyword argument 'z' #1740

Open
WayneRiesterer opened this issue Jan 2, 2025 · 4 comments
Open
Labels
question Further information is requested

Comments

@WayneRiesterer
Copy link

To Reproduce

Attempt to render the following example from the documentation section Lofting between two sketches in CQ Editor:

from cadquery import Workplane, Sketch, Vector, Location

s1 = Sketch().trapezoid(3, 1, 110).vertices().fillet(0.2)

s2 = Sketch().rect(2, 1).vertices().fillet(0.2)

result = Workplane().placeSketch(s1, s2.moved(z=3)).loft()
moved not accepting named z param

Backtrace

TypeError: Sketch.moved() got an unexpected keyword argument 'z'
File: <cq_editor-string>
Line: 7
Code: result = Workplane().placeSketch(s1, s2.moved(z=3)).loft()

This works

from cadquery import Workplane, Sketch, Vector, Location

s1 = Sketch().trapezoid(3, 1, 110).vertices().fillet(0.2)

s2 = Sketch().rect(2, 1).vertices().fillet(0.2)

# replace z=3 with Vector(0,0,3)
result = Workplane().placeSketch(s1, s2.moved(Vector(0,0,3))).loft()
moved working with Vector param

Environment

OS: Windows 11 Pro
Using: CQ-Editor Version 0.3.0dev

@WayneRiesterer WayneRiesterer added the bug Something isn't working label Jan 2, 2025
@adam-urbanczyk
Copy link
Member

I cannot reproduce this on master.

@WayneRiesterer
Copy link
Author

Does this suggest it won't be an issue if I get the code from Master?

@adam-urbanczyk adam-urbanczyk added question Further information is requested and removed bug Something isn't working labels Jan 2, 2025
@adam-urbanczyk
Copy link
Member

Yes

@WayneRiesterer
Copy link
Author

Thanks Adam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants