x-end: place smooth rods consistently with carriage
[clinton/prusa3.git] / box_frame / x-end.scad
index d89a11b..3cf1e9d 100644 (file)
@@ -8,29 +8,22 @@
 // Also includes code from Wilson and Wilson2, (c) Marty Rice
 // https://github.com/mjrice/wilson
 
-// todo: make x-end height global and make anything relying implicitly
-// on the height of the x-end use that for positioning.
-
-// bearing height, strain relief (&& maybe make dependent upon the bearing diameter)
-
 // major issues with rev 3
 
 // - motor side screw hole conflicts with switch / other rear mount is
 //   inaccessible without removing the leadscrew from the nut
 
-// - New idler anti-pitching ribs are too big (new idler I wasn't
-//   using is larger so the existing ones worked fine for that one...)
-//   NOTE: new idler is meant for integrated toothed idler...
-
 use <bushing.scad>
 include <configuration.scad>
 
-pushfit_d = bushing_xy[0] * 2 + 0.25;
+pushfit_d = bushing_xy[0] * 2 + 0.2;
 thinwall = single_wall_width * 6; // 3 perimeters
 vertical_bushing_base_size = bushing_z[1]*2 + 2 * thinwall;
 
 x_box_length = 45; // TODO: auto-adjust based on bearing size?
 
+// todo: add ghost bearing model to make it easier to spot check if
+// everything is aligned
 module vertical_bushing_base(){
      translate(v=[-2-vertical_bushing_base_size/4,0,x_box_height/2]) cube(size = [4+vertical_bushing_base_size/2,vertical_bushing_base_size,x_box_height], center = true);
      cylinder(h = x_box_height, r=vertical_bushing_base_size/2, $fn = 90);
@@ -47,7 +40,6 @@ module vertical_bushing_holes(){
   translate([0,0,-1]) cylinder(h=9,r1=bushing_z[1]+thinwall/2+1,r2=4,$fn=60);
 }
 
-
 module nut_trap_base () {
      // TODO: cube doesn't line up with edge of base, cylinder is slightly asymmetrical
      // adapt newer nut trap from prusa i3 mk3 instead of wilson2
@@ -106,15 +98,17 @@ module x_end_holes(){
  }
 }
 
- // FIXME: z rod placement isn't consistent with carriage
- pushrod_extra_z = 2.5;
 
  // FIXME: confirm length of smooth rod doesn't change when x_box_length or bearing size changes
  // should also make sure this is long enough if x-ends somehow end up larger than 50mm
- //Bottom pushfit rod
- #translate(v=[-15,-41.5,bushing_xy[0]+pushrod_extra_z]) rotate(a=[-90,0,0]) pushfit_rod(pushfit_d,50);
- // Top pushfit rod
- translate(v=[-15,-41.5,xaxis_rod_distance+bushing_xy[0]+pushrod_extra_z]) rotate(a=[-90,0,0]) pushfit_rod(pushfit_d,50);
+ // TODO: needs to shift top rod as diameter increases, wall is very
+ // thing for 10mm, and fails entirely for 12mm
+ translate([-10 - bushing_xy[0], 0, 0]) {
+      // Top pushfit rod
+      translate([0, -7, 6]) rotate([-90, 0, 0]) pushfit_rod(pushfit_d, 50);
+      // Bottom pushfit rod
+      translate([0, -7, xaxis_rod_distance+6]) rotate([-90, 0, 0]) pushfit_rod(pushfit_d, 50);
+ }
 
 // Nut trap
  translate(v=[zmotor_delta_x,-17-zmotor_delta_y,3]) rotate ([0, 0, 45]) nut_trap ();