z-axis: add leadscrew delta and compute deltas
authorClinton Ebadi <clinton@unknownlamer.org>
Wed, 9 Mar 2016 02:53:51 +0000 (21:53 -0500)
committerClinton Ebadi <clinton@unknownlamer.org>
Wed, 9 Mar 2016 02:59:07 +0000 (21:59 -0500)
leadscrew and motor mount can be moved by zmotor_delta_{x,y} in order to
clear the bearing holder and x-axis smooth rods. This does not yet
affect the x-ends -- a new TR8 leadscrew x-end will use these.

Also compute the zaxis_delta and zmotor_delta automatically in
settings.scad. Only the aluminum extrusion frame adjusts these for now.

box_frame/configuration.scad.dist
box_frame/inc/settings.scad
box_frame/z-axis.scad

index 53c4888..54ed572 100644 (file)
@@ -137,7 +137,3 @@ bed_y_size=225;
 x_smooth_rod_length=380+board_thickness*2;
 y_smooth_rod_length=400;
 z_smooth_rod_length=320;
-
-// shift smooth rod and leadscrew
-zaxis_delta_x = 0;
-zaxis_delta_y = 0;
\ No newline at end of file
index af60400..c2944ec 100644 (file)
@@ -16,3 +16,11 @@ m3_nut_diameter_bigger = ((m3_nut_diameter / 2) / cos (180 / 6)) * 2;
 
 // deprecated
 i_am_box = (frame_type == frame_box);
+
+// shift smooth rod and leadscrew mounts together
+zaxis_delta_x = (frame_type == frame_alu) ? 5 : 0;
+zaxis_delta_y = (frame_type == frame_alu) ? 5 : 0;
+
+// shift motor/leadscrew mount to clear bearings and x-rods
+zmotor_delta_x = ((frame_type == frame_alu) && (bushing_z[1] > 9)) ? 5 : 0;
+zmotor_delta_y = ((frame_type == frame_alu) && (bushing_xy[0] >= 5)) ? -3 : 0;
index 2ab5f88..363ce04 100644 (file)
 include <configuration.scad>
 
 module zmotorholder(thickness=(frame_type == frame_single ? 38 : 23), bottom_thickness=5){
+    position_y = board_to_xz_distance + zaxis_delta_y - zmotor_delta_y;
+    position_x = board_to_xz_distance - zaxis_delta_x + zmotor_delta_x;
     difference(){
         union(){
             // Motor holding part
             difference(){
                 union(){
-                    zrodholder(thickness=thickness, xlen=45, ylen=44, zdelta=((i_want_to_use_single_plate_dxf_and_make_my_z_weaker == 0) ? 0 : 5), bottom_x = 14 + zaxis_delta_x, am_top=0);
-                    translate([board_to_xz_distance + zaxis_delta_y, board_to_xz_distance - zaxis_delta_x, 0]) {
+                    zrodholder(thickness=thickness, xlen=45 + zmotor_delta_x, ylen=44 - zmotor_delta_y, zdelta=((i_want_to_use_single_plate_dxf_and_make_my_z_weaker == 0) ? 0 : 5), bottom_x = 14 + zaxis_delta_x + zmotor_delta_x, am_top=0);
+                    translate([position_y, position_x, 0]) {
                         nema17(places=[0, 1, 1, 1], h=bottom_thickness + layer_height, $fn=23, shadow=layer_height + 2);
                     }
                 }
                // remove any interfering walls
-               translate([board_to_xz_distance + zaxis_delta_y, board_to_xz_distance - zaxis_delta_x, layer_height + 2 + 21 +3]) {
-                    #cube([43,43,42], center = true);
+               translate([position_y, position_x, layer_height + 2 + 21 +3]) {
+                    #cube([43 + zmotor_delta_x + zaxis_delta_x,43,42], center = true);
                }
 
                 // motor screw holes
@@ -44,7 +46,7 @@ module zmotorholder(thickness=(frame_type == frame_single ? 38 : 23), bottom_thi
                // would the motor mount be moved in both directions
                // instead of just away from the frame? X-axis does
                // not use this to offset the leadscrew hole either.
-               translate([board_to_xz_distance + zaxis_delta_y, board_to_xz_distance - zaxis_delta_x, thickness]) {
+               translate([position_y, position_x, thickness]) {
                     mirror([0, 0, 1]) translate([0, 0, thickness-8])
                         nema17(places=[0, 1, 1, 1], holes=true, h=bottom_thickness + 1, $fn=small_hole_segments);
                         //shadow=-6 + layer_height);
@@ -110,7 +112,7 @@ module zrodholder(thickness=(frame_type == frame_single ? 14 : 15), bottom_thick
                              cube_fillet([board_thickness, 5.0, thickness], vertical = [0, 0, 0, 0], top = [0, 0, 0, 0]);
                         }
 
-                        cube_fillet([board_to_xz_distance + zaxis_delta_y - smooth_rod_insert_radius , 5.0, thickness], vertical = [2, 0, 0, 0], top = [0, 0, 0, thickness]);
+                        cube_fillet([am_top ? board_to_xz_distance + zaxis_delta_y - smooth_rod_insert_radius : xlen + zaxis_delta_y , 5.0, thickness], vertical = [2, 0, 0, 0], top = [0, 0, 0, thickness]);
 
                         // extra support along edge of smooth rod hole
                         radius_diff = smooth_rod_insert_radius - bushing_z[0];