make note about separating openscad
[challenge-bot] / 3d-printables / motor-mount.scad
index aeb6160a9b6ad3952de8b160d7a5a6b7a92764d8..b15e5a7b7f9483a187f1cf65672b0936c68c68b6 100644 (file)
@@ -6,20 +6,7 @@
 
 $fn = 60;
 
-// from schematic http://goo.gl/96RKol
-collar_radius = 9.2 / 2;
-nubbin_radius = 4.48 / 2;
-screw_radius = 2.9 / 2 + 0.1; // a little bigger so screws fit through
-
-motor_height = 22.23;
-
-// http://freespace.virgin.net/matt.waite/resource/handy/screwsize.htm
-_6_radius = 3.5 / 2;
-
-// measurements we made up:
-mount_total_x = 38;
-mount_total_y = mount_total_x;
-mount_total_z = 3.175; // 3/16 in mm
+include <motor-mount-dimensions.scad>
 
 module motor_holes(){
   collar_x_offset = 10.8;
@@ -39,9 +26,9 @@ module motor_holes(){
       cylinder(r = screw_radius, h = mount_total_z + 0.1);}}}
 
 module bracket_holes(){
-  translate([6 + _6_radius, 0, 0])
+  translate([6.2, 0, 0])
     cylinder(r = _6_radius, h = mount_total_z + 0.1);
-  translate([mount_total_x - 6 - _6_radius, 0, 0])
+  translate([mount_total_x - 6.2, 0, 0])
     cylinder(r = _6_radius, h = mount_total_z + 0.1);}
 
 module motor_mount(){
@@ -49,7 +36,7 @@ module motor_mount(){
     cube([mount_total_x, mount_total_y, mount_total_z]);
     translate([0, 6.2, -0.05]){
       bracket_holes();}
-    translate([0, mount_total_y - motor_height / 2 - 3, -0.05]){
+    translate([1, mount_total_y - motor_height / 2 - 3, -0.05]){
       motor_holes();}}}
 
 motor_mount();