From 0e73fe56c5d2a328352d28678e0ba9d77ce8c4b5 Mon Sep 17 00:00:00 2001 From: Trammell Hudson Date: Sat, 3 Jan 2015 08:47:25 +0100 Subject: [PATCH] started on segment mobius strip --- mobius.scad | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 mobius.scad diff --git a/mobius.scad b/mobius.scad new file mode 100644 index 0000000..ba6022a --- /dev/null +++ b/mobius.scad @@ -0,0 +1,36 @@ +module triangle(s) +{ + scale(s) + polygon(points=[ + [-1/2, -sqrt(3)/4 + sqrt(3)/12], + [ 0, +sqrt(3)/4 + sqrt(3)/12], + [+1/2, -sqrt(3)/4 + sqrt(3)/12], + ]); +} + + +thick=10; +sides=16; +radius=50; + +module segment(n) +{ + translate([radius-thick/2,0,0]) + rotate([90,0,0]) + rotate([0,0,n*120/sides]) + linear_extrude( + height=radius*3.1415*2/sides, + twist=120/sides, + center=true, + slices=1 + ) + triangle(thick); +} + +for(i=[1:sides]) +{ + rotate([0,0,i*360/sides]) segment(i); +} + +%cylinder(r=radius,height=5); +