1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-01 12:30:33 +02:00

add twisted_donut

This commit is contained in:
Justin Lin
2021-07-14 14:52:54 +08:00
parent 71b6ab666d
commit 8d39873360

View File

@@ -0,0 +1,26 @@
use <ring_extrude.scad>;
$fn = 96;
arc_a = 120;
arc_r = 15;
inner_r = 12;
twisted_circles = 1;
twisted_donut(arc_a, arc_r, inner_r, twisted_circles) ;
module twisted_donut(arc_a, arc_r, inner_r, twisted_circles) {
arc_step = 360 / $fn;
for(init_a = [0, 180]) {
sh = [
for(a = [0:arc_step:arc_a])
[arc_r * cos(a + init_a) , arc_r * sin(a + init_a)]
];
ring_extrude(
sh,
radius = arc_r + inner_r,
twist = 180 + 360 * twisted_circles,
angle = 360
);
}
}