]> www.fi.muni.cz Git - things.git/blobdiff - kaze-fuselage-holder.scad
switch holder.scad
[things.git] / kaze-fuselage-holder.scad
index c7bcd7f43a8944160c1d44797806adf06c79ff80..bf3cb9ab09c4c8f1b1ceade611e1797842c5d647 100644 (file)
@@ -2,21 +2,16 @@ eps = 0.01;
 infty = 200;
 
 tube_d = 8.0 + 0.5;
-tube_slot = 6;
+tube_slot = 6.5;
 wall = 1.2;
 
-fuse_w = 45;
-fuse_h = 40;
-
-body_h = 15;
-side_w = 8;
+side_w = 7;
 corner_d = 10;
 
 thin_wall = 0.6;
-supp_xoff = 0.75 * side_w;
-supp_zoff = 0.75 * body_h;
+supp_xoff = 0.85 * side_w;
 
-module body() {
+module body(fuse_w, fuse_h, body_h) {
        // base_plate
        translate([-fuse_w/2, -fuse_h/2, 0])
                cube([fuse_w, fuse_h, thin_wall]);
@@ -34,6 +29,7 @@ module body() {
                cube([fuse_w, thin_wall, body_h]);
 
        // side wall supports
+       supp_zoff = body_h-thin_wall;
        for (x = [-1, 1]) scale([x, 1, 1])
        hull() {
                translate([fuse_w/2-supp_xoff, -fuse_h/2, 0])
@@ -50,22 +46,27 @@ module body() {
        }
 }
 
-difference() {
-       body();
-       // hole in base plate
-       hull() {
-               for (x = [-1, 1])
-               for (y = [-1, 1])
-               scale([x, y, 1])
-               translate([-fuse_w/2+side_w+corner_d/2,
-                       -fuse_h/2+side_w+corner_d/2, -eps])
-                       cylinder(r = corner_d/2, h = thin_wall + 2*eps);
+module main(fuse_w, fuse_h, body_h) {
+       difference() {
+               body(fuse_w, fuse_h, body_h);
+               // hole in base plate
+               hull() {
+                       for (x = [-1, 1])
+                       for (y = [-1, 1])
+                       scale([x, y, 1])
+                       translate([-fuse_w/2+side_w+corner_d/2,
+                               -fuse_h/2+side_w+corner_d/2, -eps])
+                               cylinder(r = corner_d/2, h = thin_wall + 2*eps);
+               }
+               // fuse tube
+               translate([0, fuse_h/2-tube_d/2-wall, -eps])
+                       cylinder(r = tube_d/2, h = body_h + 2*eps);
+               // fuse tube slot
+               translate([-tube_slot/2, 0, -eps])
+                       cube([tube_slot, fuse_h/2-tube_d/2-wall, body_h +2*eps]);
        }
-       // fuse tube
-       translate([0, fuse_h/2-tube_d/2-wall, -eps])
-               cylinder(r = tube_d/2, h = body_h + 2*eps);
-       // fuse tube slot
-       translate([-tube_slot/2, 0, -eps])
-               cube([tube_slot, fuse_h/2-tube_d/2-wall, body_h +2*eps]);
 }
 
+main(42, 37, 12);
+
+translate([45, 0, 0]) main(30, 25, 8);