x-end/motor: position z-adjuster and strain relief properly
authorClinton Ebadi <clinton@unknownlamer.org>
Sat, 18 May 2019 17:51:17 +0000 (13:51 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Sat, 18 May 2019 17:51:17 +0000 (13:51 -0400)
box_frame/x-end-motor.scad
box_frame/x-end.scad

index 601f307..645fd2b 100644 (file)
@@ -9,7 +9,9 @@
 include <configuration.scad>
 use <x-end.scad>
 
-offs_adjuster_y = 5.5;
+offs_adjuster_y = 5.5; // fixme: if we keep this, needs to adjust
+                      // based on size of bushing_z to clear the side
+                      // of the plate
 adj_block_x = 9;
 adj_block_y = 10;
 adj_block_z = 32;
@@ -18,25 +20,23 @@ motor_offs_z = 0;
 motor_y_offset = 7;
 
 module adjustomatic() {
-translate ([0, 0, 6.5])
-   difference() {     
-       translate(v=[-(15+17/2+adj_block_x/2),offs_adjuster_y,58.5-adj_block_z/2])
-          cube(size=[adj_block_x,adj_block_y,adj_block_z],center=true);
-       
-       translate(v=[-(15+17/2+adj_block_x/2)-5,offs_adjuster_y,58-adj_block_z/2-8]) 
-         rotate([0,-30,0]) cube(size=[adj_block_x,adj_block_y+2,adj_block_z],center=true);
-
-       translate(v=[-(15+17/2+adj_block_x/2-1),offs_adjuster_y,58-adj_block_z/2-3]) 
-          cube(size=[adj_block_x,adj_block_y-2,adj_block_z-2],center=true);
-
-       translate(v=[-(15+17/2+adj_block_x/2),offs_adjuster_y,58-adj_block_z/2+14]) 
-           {
-         rotate([0,0,30]) #cylinder(h = 4, r = 7.0/2 , $fn = 6);
-         translate([0,0,-20]) #cylinder(h=30,r=1.6,$fn=16);
-}
-
-   }
-
+     difference() {
+         translate(v=[x_base_back() - adj_block_x/2,offs_adjuster_y,x_box_height - adj_block_z/2]) cube(size=[adj_block_x,adj_block_y,adj_block_z],center=true);
+
+         // these were translated -0.5 from block in wilson
+         translate ([0, 0, -0.5]) {
+              translate(v=[x_base_back() -adj_block_x/2 - 5,offs_adjuster_y,x_box_height-adj_block_z/2-8])
+                   rotate([0,-30,0]) cube(size=[adj_block_x,adj_block_y+2,adj_block_z],center=true);
+
+              translate(v=[x_base_back() -adj_block_x/2 -1,offs_adjuster_y,x_box_height-adj_block_z/2-3])
+                   cube(size=[adj_block_x,adj_block_y-2,adj_block_z-2],center=true);
+
+              translate(v=[x_base_back() -adj_block_x/2,offs_adjuster_y,x_box_height-adj_block_z/2+14]) {
+                   rotate([0,0,30]) #cylinder(h = 4, r = 7.0/2 , $fn = 6);
+                   translate([0,0,-20]) #cylinder(h=30,r=1.6,$fn=16);
+              }
+         }
+     }
 }
 
 // the endstop mount will be translated by this much (negative values
@@ -68,15 +68,17 @@ module pocket_endstop() // endstop holder grafted onto the side toward the rods
 }
 
 module x_end_motor_sr() {
-     // TODO: use x_box_height
-    difference() { 
-       cube(size=[8,14+motor_y_offset,12]);
-       #translate([4,13.5+motor_y_offset,11]) rotate([0,90,0]) difference() {
-           cylinder(r=4.5,h=4,$fn=16,center=true);
-           translate([0,0,-1]) cylinder(r=2.5,h=7,$fn=16,center=true);
-       }
-       #translate([9,12.6+motor_y_offset,12]) rotate([0,45,90]) cube(size=[2,11,2]);
-    }
+     sr_box_height = 12;
+     translate([x_base_back(),9,x_box_height - sr_box_height]) {
+         difference() {
+              cube(size=[8,14+motor_y_offset,sr_box_height]);
+              translate([4,13.5+motor_y_offset,sr_box_height-1]) rotate([0,90,0]) difference() {
+                   cylinder(r=4.5,h=4,$fn=16,center=true);
+                   translate([0,0,-1]) cylinder(r=2.5,h=7,$fn=16,center=true);
+              }
+              translate([9,12.6+motor_y_offset,sr_box_height]) rotate([0,45,90]) cube(size=[2,11,2]);
+         }
+     }
 }
 
 module x_end_motor_base(){
@@ -139,7 +141,7 @@ module x_end_motor(){
   x_end_motor_holes();
  }
  // strain relief (zip tie point) below the motor
translate([-23.5,9,53]) x_end_motor_sr();
+ x_end_motor_sr();
 }
 
 rotate([0,0,180])
index 1eebc13..56e1561 100644 (file)
@@ -67,6 +67,9 @@ module nut_trap () {
      }
 }
 
+// x position of edge of main block, for attaching objects to it
+function x_base_back() = -10 - bushing_xy[0] - x_box_width/2;
+
 module x_end_base(){
 // Main block
 translate(v=[-10 - bushing_xy[0], -x_box_length/2 + vertical_bushing_base_size/2,x_box_height/2]) cube(size = [x_box_width,x_box_length,x_box_height], center = true);