-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Docs: Add example of a spiral ramp #940
Comments
Yes, that's exactly it, thank you! Was having trouble getting the base of the ramp to be flat. Thanks a lot! |
I'm trying to fill in the part below the ramp to the XY plane. Any idea why this from build123d import *
import build123d as bd
import ocp_vscode
profile = make_face(
offset(Polyline((-0.5, 0.2), (-0.5, 0), (0.5, 0), (0.5, 0.2)), 0.1, side=Side.RIGHT)
)
ramp_path = Helix(3, 6, 10)
ramp = sweep(
ramp_path.location_at(0) * profile,
ramp_path,
is_frenet=True,
)
extrude_part_base = bd.Sketch(bd.Circle(9.8) - bd.Circle(9.2))
# Following part fails.
extrude_part = bd.extrude(
extrude_part_base,
until=ramp,
)
ocp_vscode.show_all() |
The API of extrude_part = bd.extrude(extrude_part_base, until=Until.NEXT, target=ramp) However, the implementation isn't robust enough to handle a helical object like that (spanning 720 degrees) , especially when the To create a support for the ramp, limit the ramp to 360 degrees (or create another object for this) and extrude the bottom face downward then intersect the result with a hollow cylinder. |
Oops, thanks a lot! This worked well: from build123d import *
import build123d as bd
import ocp_vscode
profile = make_face(
offset(Polyline((-0.5, 0.2), (-0.5, 0), (0.5, 0), (0.5, 0.2)), 0.1, side=Side.RIGHT)
)
ramp_path = Helix(3, 3 * 0.75, 10)
ramp = sweep(
ramp_path.location_at(0) * profile,
ramp_path,
is_frenet=True,
).translate((0, 0, 3))
extrude_part_base = bd.Sketch(
bd.Circle(10.4)
- bd.Circle(9.6)
- bd.Rectangle(100, 100, align=(bd.Align.MIN, bd.Align.MAX))
)
extrude_part = bd.extrude(
extrude_part_base,
until=bd.Until.NEXT,
target=ramp,
)
ocp_vscode.show_all() |
I can't figure out how to draw a spiral ramp. I've looked at building off the spring example in #759, but still can't figure it out.
Would appreciate it if someone could help draw an example, and then later add it to the docs
The text was updated successfully, but these errors were encountered: