]> www.fi.muni.cz Git - things.git/commitdiff
wing tube support (TODO: diag struts are too thick)
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 6 Mar 2019 15:17:22 +0000 (16:17 +0100)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 6 Mar 2019 15:17:22 +0000 (16:17 +0100)
wing-tube-support.scad [new file with mode: 0644]

diff --git a/wing-tube-support.scad b/wing-tube-support.scad
new file mode 100644 (file)
index 0000000..d07bd1e
--- /dev/null
@@ -0,0 +1,99 @@
+eps = 0.01;
+infty = 200;
+
+wall = 1.5;
+thin_wall = 0.6;
+
+tube_d = 10;
+tube_zoff = thin_wall + 3;
+
+base_w = 60;
+base_l = 45;
+
+/*
+module body() {
+       hull() {
+//             translate([-fuse_tube_d/2-wall, -fuse_tube_l/2, 0])
+//                     cube([fuse_tube_d + 2*wall, fuse_tube_l, fuse_tube_d + 2*wall]);
+               translate([0, fuse_tube_l/2, fuse_tube_d/2+wall])
+               rotate([90, 0, 0])
+                       cylinder(r = fuse_tube_d/2+wall, h = fuse_tube_l);
+               translate([-fuse_tube_d/2-wall, -base_l/2+wall/2, 0])
+                       cube([fuse_tube_d + 2*wall, base_l-wall, thin_wall]);
+       }
+}
+
+module holder() {
+       difference() {
+               body();
+               translate([0, infty/2, fuse_tube_d/2+wall])
+               rotate([90, 0, 0])
+                       cylinder(r = fuse_tube_d/2, h = infty + 2*eps);
+               translate([-slot_w/2, -infty/2, fuse_tube_d/2+wall])
+                       cube([slot_w, infty, fuse_tube_d/2+wall+eps]);
+       }
+}
+*/
+
+module body() {
+       // base
+       // scale([1, base_l/base_w, 1])
+       // cylinder(r = base_w/2, h = thin_wall);
+       translate([-base_w/2, -base_l/2, 0]) cube([base_w, base_l, thin_wall]);
+
+       // side supports
+       for (y = [-1,1]) 
+       for (x = [-1,1])
+       scale([x, y, 1])  hull() {
+               translate([base_w/2-thin_wall, -base_l/2, 0])
+                       cube([thin_wall, thin_wall, thin_wall]);
+               translate([-thin_wall/2, -base_l/2, 0])
+                       cube([thin_wall, thin_wall, tube_zoff + tube_d-thin_wall]);
+       }
+
+       // diagonal supports
+       for (y = [-1,1]) 
+       for (x = [-1,1])
+       scale([x, y, 1])  hull() {
+               translate([base_w/2-thin_wall, base_l/3, 0])
+                       cube([thin_wall, thin_wall, thin_wall]);
+               translate([-thin_wall/2, -base_l/2, 0])
+                       cube([thin_wall, thin_wall, tube_zoff + tube_d-thin_wall]);
+       }
+
+       // under the tube supports
+       for (y = [-1,1]) 
+       scale([1, y, 1])  hull() {
+               translate([thin_wall/2, -base_l/4, 0])
+                       cube([thin_wall, thin_wall, thin_wall]);
+               translate([-thin_wall/2, -base_l/2, 0])
+                       cube([thin_wall, thin_wall, tube_zoff + 2*tube_d/3]);
+       }
+
+       // side bottom tube supports
+       for (y = [-1,1]) 
+       for (x = [-1,1])
+       scale([x, y, 1])  hull() {
+               translate([tube_d/2, base_l/3, 0])
+                       cube([thin_wall, base_l/6, tube_zoff + tube_d/2]);
+       }
+
+       // upper cylinder clip
+       for (y = [-1,1])
+       scale([1, y, 1])
+       translate([0, base_l/3, tube_d/2 + tube_zoff])
+       intersection() {
+               rotate([-90, 0, 0])
+                       cylinder(r = tube_d/2 + thin_wall, h = base_l/6);
+               translate([-tube_d/2-thin_wall, 0, 0])
+                       cube([tube_d + 2*thin_wall, base_l/6, tube_d/3]);
+       }
+}
+
+difference() {
+       body();
+       // main tube
+       translate([0, -base_l/2-eps, tube_d/2+tube_zoff])
+       rotate([-90, 0, 0])
+               cylinder(r = tube_d/2, h = base_l + 2*eps);
+}