You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code worked one year ago, it can be found on issue #271. Running the same code today causes ValueError: Wire or Edge instance required from the _sweep method.
importcadqueryascqr=3# Radius of the helixp=1.5# Pitch of the helixh=4# Height of the helix# Helixwire=cq.Wire.makeHelix(pitch=p, height=h, radius=r)
shape=cq.Wire.combine([wire])
helix=cq.Workplane("XY").newObject([shape])
# Final result. A circle sweeped along a helix.result= (
cq.Workplane('XZ')
.center(r, 0)
.circle(0.1)
.sweep(helix, isFrenet=True)
)
Tested with the latest CQ version (build with conda from master)
The text was updated successfully, but these errors were encountered:
Wire.combine was fixed during the annotation process. So you need to change the code to:
importcadqueryascqr=3# Radius of the helixp=1.5# Pitch of the helixh=4# Height of the helix# Helixwire=cq.Wire.makeHelix(pitch=p, height=h, radius=r)
shape=cq.Wire.combine([wire])
helix=cq.Workplane("XY").newObject(shape)
# Final result. A circle sweeped along a helix.result= (
cq.Workplane('XZ')
.center(r, 0)
.circle(0.1)
.sweep(helix, isFrenet=True)
)
BTW: the combine call is not needed at all. You can also use:
importcadqueryascqr=3# Radius of the helixp=1.5# Pitch of the helixh=4# Height of the helix# Helixwire=cq.Wire.makeHelix(pitch=p, height=h, radius=r)
helix=cq.Workplane(obj=wire)
# Final result. A circle sweeped along a helix.result= (
cq.Workplane('XZ')
.center(r, 0)
.circle(0.1)
.sweep(helix, isFrenet=True)
)
This code worked one year ago, it can be found on issue #271. Running the same code today causes
ValueError: Wire or Edge instance required
from the_sweep
method.Tested with the latest CQ version (build with conda from master)
The text was updated successfully, but these errors were encountered: