2020-03-17 14:29:27 +08:00
|
|
|
use <shape_circle.scad>;
|
2020-03-24 17:21:17 +08:00
|
|
|
use <ptf/ptf_rotate.scad>;
|
2020-05-23 16:15:02 +08:00
|
|
|
use <sweep.scad>;
|
2019-10-25 16:10:56 +08:00
|
|
|
|
2019-10-25 18:24:29 +08:00
|
|
|
r1 = 0.1;
|
2019-10-25 16:10:56 +08:00
|
|
|
r2 = 50;
|
|
|
|
|
|
|
|
a1 = 1;
|
|
|
|
a2 = 450;
|
|
|
|
|
|
|
|
steps = 40;
|
|
|
|
|
2019-10-25 18:24:29 +08:00
|
|
|
$fn = 48;
|
|
|
|
|
2019-10-25 16:10:56 +08:00
|
|
|
module simple_seashell(r1, r2, a1, a2, steps) {
|
|
|
|
rd = (r2 - r1) / steps;
|
|
|
|
ad = (a2 - a1) / steps;
|
|
|
|
|
|
|
|
sections = [
|
|
|
|
for (i = [0:steps])
|
|
|
|
let(
|
|
|
|
r = r1 + rd * i,
|
|
|
|
a = a1 + i * ad
|
|
|
|
)
|
2019-10-25 18:24:29 +08:00
|
|
|
[
|
2020-03-17 14:29:27 +08:00
|
|
|
for(p = concat(shape_circle(r), shape_circle(r * 0.9)))
|
2020-03-24 17:21:17 +08:00
|
|
|
ptf_rotate([p[0], p[1], 0] + [r, 0, 0], [0, a, 0])
|
2019-10-25 18:24:29 +08:00
|
|
|
]
|
2019-10-25 16:10:56 +08:00
|
|
|
|
|
|
|
];
|
|
|
|
|
2020-05-23 16:15:02 +08:00
|
|
|
rotate([90, 0, 0]) sweep(sections, "HOLLOW");
|
2019-10-25 16:10:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
simple_seashell(r1, r2, a1, a2, steps);
|