-
Notifications
You must be signed in to change notification settings - Fork 291
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
Sweep along 3D curve??? #587
Comments
This is a copy paste from another issue. import cadquery as cq
r = 3 # Radius of the helix
p = 1.5 # Pitch of the helix
h = 4 # Height of the helix
# Helix
wire = 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)
) |
Thank you - worked perfectly. There aren't any examples using |
@daemacles If you are going to add a basic example on how to use If your example is more complex (i.e. a bolt/screw generator), it's probably best to add it to the contrib repo: https://github.com/CadQuery/cadquery-contrib |
PR added #594 added. |
Been reading through the examples and manual etc.
I can't figure out how to sweep a 2D profile along a 3D curve. Here's the goal: a parametric version of a screw, and the sweep is to generate the threads. So assuming there is a cylinder with a cone at its end, I'd like to have a spiral path go up the length of the cylinder and sweep a triangular profile along it to generate the threads. I'm stuck because, for example, polylines only have 2D coordinates.
Any advice is much appreciated!
The text was updated successfully, but these errors were encountered: