x-end: use correct zmotor_delta_{x,y}
authorClinton Ebadi <clinton@unknownlamer.org>
Sat, 18 May 2019 02:48:22 +0000 (22:48 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Sat, 18 May 2019 02:48:22 +0000 (22:48 -0400)
zmotor_deltas are in the coordinate space used by the z-axis parts,
adapt here. Still unsure this is the right choice, reference being the
frame makes more intuitive sense.

box_frame/inc/settings.scad
box_frame/x-end.scad

index 5bc51a3..55763b9 100644 (file)
@@ -12,6 +12,7 @@ idler_width = max(belt_width, (idler_bearing[1] > 7 ? idler_bearing[1] : 7)) + 2
 xy_delta = ((bushing_xy[1] <= 7.7) ? 0 : bushing_xy[1] - 7.7) * 0.9;
 
 // fixme: this seems useless now but ... ?
+// fixme: might need something (this is it?) to compensate for x_box_width increasing with size of bearing
 z_delta = 0; //(bushing_z[1] <= 7.7) ? 0 : bushing_z[1] - 7.7;
 
 m3_nut_diameter_bigger = ((m3_nut_diameter / 2) / cos (180 / 6)) * 2;
@@ -24,8 +25,9 @@ zaxis_delta_x = (frame_type == frame_alu) ? 0 : 0;
 zaxis_delta_y = (frame_type == frame_alu) ? -5 : 0;
 
 // shift motor/leadscrew mount to clear bearings and x-rods
-// X/Y ARE SWITCHED FROM X-END CONFIGURATION BE WARNED
-// BONUS FUN: X (Y in x-end configuration) IS INVERTED!
-// fixed, but it was all a fucking tautology in the end whoops
+// this is the model local coordinate space for the Z axis, so:
+// Y controls the extra distance between the motor and smooth rod, and
+// X controls the extra distance between the motor and the frame
+// TODO: auto calculate based on bearing (and leadscrew nut?) sizes
 zmotor_delta_x = ((frame_type == frame_alu) && (bushing_z[1] > 9)) ? 3 : 0;
 zmotor_delta_y = ((frame_type == frame_alu) && (bushing_xy[0] >= 5)) ? 5 : 0;
index 5e621ce..3ad0cf1 100644 (file)
@@ -73,7 +73,7 @@ translate(v=[-15,-10,height/2]) cube(size = [17,45,height], center = true);
 // Bearing holder
  vertical_bushing_base(bushing_z);     
 //Nut trap
- translate(v=[-4-zmotor_delta_y,-17-zmotor_delta_x,4]) nut_trap_base ();
+ translate(v=[-4+zmotor_delta_x,-17-zmotor_delta_y,4]) nut_trap_base ();
  // Cube
 // #translate(v=[-2-2,-17,4]) cube(size = [8,16,8], center = true);
  // Hexagon
@@ -106,7 +106,7 @@ module x_end_holes(){
 // Top pushfit rod
 translate(v=[-15,-41.5,rod_distance+bushing_xy[0]+pushrod_extra_z]) rotate(a=[-90,0,0]) pushfit_rod(pushfit_d,50);
 // Nut trap
-translate(v=[-zmotor_delta_y,-17-zmotor_delta_x,3]) rotate ([0, 0, 45]) nut_trap ();
+translate(v=[zmotor_delta_x,-17-zmotor_delta_y,3]) rotate ([0, 0, 45]) nut_trap ();
 // #translate(v=[0,-17,-0.5]) cylinder(h = 4, r1=3.4, r2=2.9, $fn=25);
 // translate(v=[0,-17,3]) rotate([0,0,30]) cylinder(h = 10, r=hex_nut_r, $fn = 6);
 }