use <bushing.scad>
include <configuration.scad>
-pushfit_d = bushing_xy[0] * 2 + 0.25; //smooth_rod_d + 0.25;
-rod_distance = 50;
-x_box_height = 5 + rod_distance + bushing_xy[0] * 2 + 0.25;
-hex_nut_r = 4.75;
-thinwall = 3;
-
-module vertical_bushing_base(bushing){
- bushing_size = bushing[1]*2 + 2 * thinwall;
- translate(v=[-2-bushing_size/4,0,x_box_height/2]) cube(size = [4+bushing_size/2,bushing_size,x_box_height], center = true);
- cylinder(h = x_box_height, r=bushing_size/2, $fn = 90);
+pushfit_d = bushing_xy[0] * 2 + 0.25;
+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?
+
+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);
}
-module vertical_bushing_holes(bushing){
- bushing_cut_extra = 0.2; // padding so it's not too tight
- translate(v=[0,0,-4]) cylinder(h = x_box_height + 3, r=bushing[1] + bushing_cut_extra, $fn = 60);
- translate(v=[0,0,x_box_height-4]) cylinder(h=x_box_height,r=bushing[1]-1,$fn=60);
- // TODO: make translate(z) use x_box_height to correctly position slit
- #rotate(a=[0,0,-50]) translate(v=[8,0,24/*was 31.5 mjr*/]) cube(size = [10,2 /*was 1 mjr*/ ,x_box_height+13], center = true);
- translate([0,0,-1]) cylinder(h=9,r1=bushing[1]+thinwall/2+1,r2=4,$fn=60);
- //#translate([0,0,49]) cylinder(h=9,r2=bushing[1]+thinwall/2,r1=4,$fn=60);
+module vertical_bushing_holes(){
+ // FIXME: is extra cut necessary? check conf_bushing
+ bushing_cut_extra = 0.2; // padding so it's not too tight
+ translate(v=[0,0,-4]) cylinder(h = x_box_height + 3, r=bushing_z[1] + bushing_cut_extra, $fn = 60);
+ translate(v=[0,0,x_box_height-4]) cylinder(h=x_box_height,r=bushing_z[1]-1,$fn=60);
+ // TODO: is slit too wide or too low? Wilson increased width from 1
+ // -> 2 mm, slit also might need to end 1-2mm before the base
+ #rotate(a=[0,0,-50]) translate(v=[thinwall*2 + 1,0,x_box_height/2 - 2]) cube(size = [bushing_z[2]/2, 2 ,x_box_height], center = true);
+ 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
cube(size=[16,21,8],center=true);
translate ([2,0,0]) cylinder(h=8,r=12.5,$fn=50,center=true);
}
module nut_trap () {
- union() {
+ union() {
// center post of brass nut
cylinder(h=12,r=5.45,$fn=50,center=true);
// holes for m3 screws in brass nut
module x_end_base(){
// Main block
-height = x_box_height;
-// TODO: calculate correct translate(y) + cube(y) using size of bearing
-translate(v=[-15,-10,height/2]) cube(size = [17,45,height], center = true);
+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);
// Bearing holder
- vertical_bushing_base(bushing_z);
+ vertical_bushing_base();
//Nut trap
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
-// #translate(v=[0,-17,0]) rotate([0,0,30]) cylinder(h = 8, r=8, $fn = 6);
}
+// TODO: x translation of belt and smooth rods needs to adapt to
+// x_end_width and motor/idler pulley position.
+
module x_end_holes(){
- vertical_bushing_holes(bushing_z);
+ vertical_bushing_holes();
// Belt hole
translate(v=[-1,0,0]){
// Stress relief
translate(v=[-5.5-10+1.5,-bushing_z[1]-4,30]) cube(size = [20,1,28], center = true);
// Cut out for belt (this is NOT centered because the motor isn't centered)
+ x_box_offset = -x_box_length/2 + vertical_bushing_base_size/2;
difference(){
- translate(v=[-5.5-10+1.5,-10,30]) cube(size = [10,46,28], center = true);
+ translate(v=[-5.5-10+1.5, x_box_offset ,30]) cube(size = [10, x_box_length + 1,28], center = true);
// Nice edges
- translate(v=[-5.5-10+1.5,-10,30+23]) rotate([0,45,0]) cube(size = [10,46,28], center = true);
- translate(v=[-5.5-10+1.5,-10,30+23]) rotate([0,-45,0]) cube(size = [10,46,28], center = true);
- translate(v=[-5.5-10+1.5,-10,30-23]) rotate([0,45,0]) cube(size = [10,46,28], center = true);
- translate(v=[-5.5-10+1.5,-10,30-23]) rotate([0,-45,0]) cube(size = [10,46,28], center = true);
+ translate(v=[-5.5-10+1.5,x_box_offset,30+23]) rotate([0,45,0]) cube(size = [10,x_box_length + 1,28], center = true);
+ translate(v=[-5.5-10+1.5,x_box_offset,30+23]) rotate([0,-45,0]) cube(size = [10,x_box_length + 1,28], center = true);
+ translate(v=[-5.5-10+1.5,x_box_offset,30-23]) rotate([0,45,0]) cube(size = [10,x_box_length + 1,28], center = true);
+ translate(v=[-5.5-10+1.5,x_box_offset,30-23]) rotate([0,-45,0]) cube(size = [10,x_box_length + 1,28], center = true);
-}
+ }
}
-
+ // FIXME: z rod placement isn't consistent with carriage
pushrod_extra_z = 2.5;
-// 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,rod_distance+bushing_xy[0]+pushrod_extra_z]) rotate(a=[-90,0,0]) pushfit_rod(pushfit_d,50);
+
+ // 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);
+
// 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);
+ translate(v=[zmotor_delta_x,-17-zmotor_delta_y,3]) rotate ([0, 0, 45]) nut_trap ();
}
module pushfit_rod(diameter,length){
translate([0,-0.3,0]) cylinder(h = length, r=diameter/2, $fn=30);
translate([0,0.3,0]) cylinder(h = length, r=diameter/2, $fn=30);
+ // TODO: reintroduce teardrop holes?
// difference(){
// translate(v=[0,-diameter/2.85,length/2]) rotate([0,0,45]) cube(size = [diameter/2,diameter/2,length], center = true);
// translate(v=[0,-diameter/4-diameter/2-0.4,length/2]) rotate([0,0,0]) cube(size = [diameter,diameter/2,length], center = true);
// }
-
-}
+}