]> www.fi.muni.cz Git - things.git/blobdiff - rocket.scad
switch holder.scad
[things.git] / rocket.scad
index b2f621bbaaf971c7e24504a4b4d67306e6841a9c..23594977fbc513f9738af15b5e91d9a98ca1fc3b 100644 (file)
@@ -2,15 +2,15 @@
 // The Estes A8-3 and C6-7 motors have diameter of 17.7 mm,
 // length 69.5 mm. The Estes Alpha launch pad has rod diameter 3.4 mm.
 
-motor_diam = 17.7 + 0.6; // add some tolerance
+motor_diam = 17.7 + 1.2; // add some tolerance
 motor_len  = 69.5 + 0.5;
 
 segment_overlap = 15;
 
-loose_fit_diam_diff = 0.5; // cylinder with outer diameter d1
+loose_fit_diam_diff = 1.1; // cylinder with outer diameter d1
        // will fit loosely into the hole with inner diameter
        // d1 + loose_fit_diam_diff
-tight_fit_diam_diff = 0.25; // cylinder with outer diameter d1
+tight_fit_diam_diff = 0.4; // cylinder with outer diameter d1
        // will fit tightly into the hole with inner diameter
        // d1 + tight_fit_diam_diff
 
@@ -33,6 +33,25 @@ fin_thickness = 1.5;
 eps = 0.01;
 infty = 250;
 
+// rod holder
+
+module rod_holder() {
+       // rod hole holder
+       hull() {
+               translate([motor_diam/2 + thick_wall + thin_wall + rod_diam/2, 0, 0])
+                       cylinder(r = rod_diam/2 + thin_wall, h = thick_wall);
+               translate([motor_diam/2 + thick_wall - thin_wall - rod_diam/2, 0, 0])
+                               
+                       cylinder(r = rod_diam/2 + thin_wall, h = 3*thick_wall);
+       }
+}
+
+module rod_hole() {
+       // rod hole
+       translate([motor_diam/2 + thick_wall + thin_wall + eps + rod_diam/2, 0, 0])
+               cylinder(r = rod_diam/2, h = infty);
+}
+
 //----------------- MOTOR MODULE -----------------------------
 
 module fin() {
@@ -98,21 +117,6 @@ module motor_module_solid()
                         fin2();
         };
 
-       // rod hole holder
-       hull() {
-               translate([motor_diam/2 + thick_wall - rod_diam/2 - thin_wall,
-                       0, segment_overlap])
-                       scale([1, 1.4, 1])
-                       cylinder(r = rod_diam/2 + thin_wall, h = eps);
-               translate([motor_diam/2 + thick_wall + thin_wall + rod_diam/2, 0, segment_overlap + rod_hole_side])
-                       scale([1, 1.1, 1])
-                       cylinder(r = rod_diam/2 + thin_wall, h = rod_hole_height);
-               translate([motor_diam/2 + thick_wall - rod_diam/2 - thin_wall,
-                       0, segment_overlap + 2*rod_hole_side + rod_hole_height])
-                       scale([1, 1.4, 1])
-                       cylinder(r = rod_diam/2 + thin_wall, h = eps);
-       };
-
        // motor clip
        for (angle = [120, -120]) rotate([0, 0, angle]) intersection() {
                translate([clip_inner_space, -infty/2,
@@ -123,6 +127,10 @@ module motor_module_solid()
                rotate([0, 0, -120])
                        translate([-infty/2, 0, 0]) cube(infty);
        };
+
+       translate([0, 0, motor_len + motor_wall])
+               scale([1, 1, -1])
+               rod_holder();
 };
        
 module motor_module() {
@@ -151,9 +159,7 @@ module motor_module() {
                                        cylinder(r = 3, h = infty);
                };
 
-               // rod hole
-               translate([motor_diam/2 + thick_wall + thin_wall + eps + rod_diam/2, 0, 0])
-                       cylinder(r = rod_diam/2, h = infty);
+               rod_hole();
        };
 };
 
@@ -168,6 +174,7 @@ central_clip_clearance = 2.5;
 
 module central_tube_solid() {
        cylinder(r = motor_diam/2 + thick_wall, h = central_tube_h);
+       rod_holder();
 };
 
 module central_tube() {
@@ -176,22 +183,7 @@ module central_tube() {
                translate([0, 0, -eps])
                        cylinder(r = motor_diam/2 + thick_wall - thin_wall,
                                h = infty);
-       };
-       // rubber band holder
-       intersection() {
-               cylinder(r = motor_diam/2 + thick_wall - eps, h = central_tube_h);
-/*
-               translate([motor_diam/2 - thick_wall, -infty/2,
-                       segment_overlap + thick_wall])
-                       cube([thin_wall, infty, rubber_beam_height]);
-*/
-               translate([-central_clip_w/2,
-                       central_clip_r + motor_diam/2 + thick_wall - 2*thin_wall - central_clip_clearance,
-                       central_tube_h/3]) rotate([0, 90, 0]) difference() {
-                       cylinder(r = central_clip_r, h = central_clip_w);
-                       translate([0, 0, -eps])
-                               cylinder(r = central_clip_r - central_clip_wall, h = central_clip_w + 2*eps);
-               }
+               rod_hole();
        };
 };
 
@@ -256,13 +248,6 @@ module front_cone() {
                translate([0, 0, -eps])
                        cylinder(r = motor_diam/2, h = segment_overlap + 2*eps);
        };
-       // rubber band holder
-       intersection() {
-               cylinder(r = motor_diam/2 + thin_wall/2, h = segment_overlap);
-               translate([motor_diam/3-thin_wall/2, -infty/2,
-                       segment_overlap - thick_wall - rubber_beam_height - eps])
-                       cube([rubber_beam_width, infty, rubber_beam_height]);
-       };
 };
 
 debug = 0;
@@ -271,8 +256,8 @@ if (debug == 1) {
 // debug
 difference($fn = 16) {
        front_cone();
-       // central_tube();
-       // motor_module();
+       central_tube();
+       motor_module();
 
        translate([0, 0, -infty/2]) cube(infty);
 };
@@ -280,7 +265,7 @@ difference($fn = 16) {
 } else {
 
 // production
-assign($fn = 128) {
+$fn = 128;
 
 translate([motor_diam + thick_wall, 0, 0])
        motor_module();
@@ -294,4 +279,3 @@ translate([motor_diam + thick_wall, 0, 0])
        front_cone();
 
 }
-}