1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
dotSCAD/examples/twisted_ring.scad

30 lines
720 B
OpenSCAD
Raw Normal View History

2021-07-15 11:26:33 +08:00
use <ring_extrude.scad>;
use <arc_path.scad>;
2021-07-15 11:31:53 +08:00
use <shape_liquid_splitting.scad>;
2021-07-15 11:26:33 +08:00
$fn = 96;
2021-07-15 13:52:57 +08:00
twisted_ring(
2021-07-15 12:01:54 +08:00
arc_path(radius = 20, angle = [0, 120]),
r = 25,
shape_turns = 5
2021-07-15 11:31:53 +08:00
);
2021-07-15 11:26:33 +08:00
2021-07-15 12:01:54 +08:00
translate([95, 0])
2021-07-15 13:52:57 +08:00
twisted_ring(
2021-07-15 12:21:06 +08:00
[for(p = shape_liquid_splitting(radius = 5, centre_dist = 25)) [p[0], p[1] + 10]],
2021-07-15 12:01:54 +08:00
r = 25,
2021-07-15 12:21:06 +08:00
shape_turns = 3
2021-07-15 11:31:53 +08:00
);
2021-07-15 11:26:33 +08:00
2021-07-15 12:21:06 +08:00
translate([-110, 0])
2021-07-15 13:52:57 +08:00
twisted_ring(
2021-07-15 12:21:06 +08:00
[[17.5, 10], [17.5, 20], [12.5, 20], [12.5, 15], [7.5, 15], [7.5, 20], [2.5, 20], [2.5, 15], [-2.5, 15], [-2.5, 20], [-7.5, 20], [-7.5, 15], [-12.5, 15], [-12.5, 20], [-17.5, 20], [-17.5, 10]],
r = 30,
2021-07-15 12:01:54 +08:00
shape_turns = 3
);
2021-07-15 13:52:57 +08:00
module twisted_ring(shape, r, shape_turns) {
2021-07-15 11:26:33 +08:00
t = 360 * shape_turns;
ring_extrude(shape, radius = r, twist = t, angle = 720);
}