mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-06 02:30:55 -08:00
21 lines
609 B
Python
21 lines
609 B
Python
from build123d import *
|
|
import alg123d as ad
|
|
|
|
powerup = Spline(
|
|
(0, 0, 0),
|
|
(50, 0, 50),
|
|
(100, 0, 0),
|
|
tangents=((1, 0, 0), (1, 0, 0)),
|
|
tangent_scalars=(0.5, 2),
|
|
)
|
|
corner = ad.RadiusArc(powerup @ 1, (100, 60, 0), -30)
|
|
screw = Pos(75, 40, 15) * Helix(75, 150, 15, direction=(-1, 0, 0))
|
|
|
|
roller_coaster = powerup + corner + screw
|
|
roller_coaster += Spline(corner @ 1, screw @ 0, tangents=(corner % 1, screw % 0))
|
|
roller_coaster += Spline(
|
|
screw @ 1, (-100, 30, 10), powerup @ 0, tangents=(screw % 1, powerup % 0)
|
|
)
|
|
|
|
if "show_object" in locals():
|
|
show_object(roller_coaster, clear=True)
|