include <configuration.scad>
use <x-end.scad>
-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;
-motor_offs_z = 0;
-motor_y_offset = 7;
+// fixme: if we keep this, needs to adjust based on size of bushing_z
+// to clear the side of the plate
+offs_adjuster_y = x_base_outside() - adj_block_y/2;
+
+motor_offs_z = 0; // todo: broken, not sure if useful -- adjust based on bearing size to keep straight belt line?
+motor_y_offset = 0; // todo: use z_delta for y offset,
module adjustomatic() {
difference() {
module x_end_motor_sr() {
sr_box_height = 12;
- translate([x_base_back(),9,x_box_height - sr_box_height]) {
+ translate([x_base_back(), x_base_outside(),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() {
+ cube(size=[8,13+motor_y_offset,sr_box_height]);
+ translate([4,12.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]);
+ translate([9,11.6+motor_y_offset,sr_box_height]) rotate([0,45,90]) cube(size=[2,11,2]);
}
}
}
module x_end_motor_base(){
x_end_base();
// motor arm
- translate(v=[-15,31,26.5+motor_offs_z]) cube(size = [17,44+motor_y_offset*2,53], center = true);
+ translate(v=[x_base_back() + x_box_width/2,x_base_outside() + (44 + motor_y_offset)/2,26.5+motor_offs_z]) cube(size = [x_box_width,44+motor_y_offset*2,53], center = true);
// z stop adjuster
adjustomatic();
// x endstop holder
screw_head_r = 3.5;
module x_end_motor_holes(){
- x_end_holes();
- // Position to place
- translate(v=[-1,32,30.25+motor_offs_z]){
- // Belt hole
- translate(v=[-14,1,0]) cube(size = [10,46,22], center = true);
- translate ([0, motor_y_offset, 0]) {
- // Motor mounting holes
- translate(v=[20,-15.5,-15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=1.8, $fn=30);
- translate(v=[1,-15.5,-15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 12, r=screw_head_r, $fn=30);
-
+ x_end_holes();
+ // Position to place
+ translate(v=[-1,x_base_outside() + 44/2,30.25+motor_offs_z]){
+ // Belt hole
+ translate(v=[-14,1,0]) cube(size = [10,46,44/2], center = true);
+ // TODO: use built-in nema17 library to create holes
+ // FIXME: ensure these maintain bolt length as x_box_width
+ // increases (screw head holes need to be cut deeper)
- translate(v=[20,-15.5,15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=1.8, $fn=30);
- translate(v=[1,-15.5,15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 12, r=screw_head_r, $fn=30);
+ translate ([0, motor_y_offset, 0]) {
+ // Motor mounting holes
+ // based on wilson x-ends, the intention here is to
+ // leave a 11.5mm shaft for the screw
+ motor_screwhead_depth = -x_base_back() - 11.5;
+ #translate(v=[20,-15.5,-15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=1.8, $fn=30);
+ #translate(v=[1,-15.5,-15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = motor_screwhead_depth, r=screw_head_r, $fn=30);
- translate(v=[20,15.5,-15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=1.8, $fn=30);
- translate(v=[1,15.5,-15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 12, r=screw_head_r, $fn=30);
+ translate(v=[20,-15.5,15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=1.8, $fn=30);
+ translate(v=[1,-15.5,15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = motor_screwhead_depth, r=screw_head_r, $fn=30);
- translate(v=[20,15.5,15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=1.8, $fn=30);
- translate(v=[1,15.5,15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 12, r=screw_head_r, $fn=30);
+ translate(v=[20,15.5,-15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=1.8, $fn=30);
+ translate(v=[1,15.5,-15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = motor_screwhead_depth, r=screw_head_r, $fn=30);
- // Material saving cutout
- translate(v=[-10,12,10]) cube(size = [60,42,42], center = true);
- // Material saving cutout
- translate(v=[-10,40,-30]) rotate(a=[45,0,0]) cube(size = [60,42,42], center = true);
- // Motor shaft cutout
- translate(v=[0,0,0]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=17, $fn=6);
-}
- // zip tie retainer for securing end stop wiring
- #translate([-5,-63,14]) difference() { cylinder(r=4.5,h=4,$fn=16);
- translate([0,0,-1]) cylinder(r=2.5,h=7,$fn=16);
- }
- #translate([-5,-48,x_box_height-30.5]) rotate([90,0,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(v=[20,15.5,15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=1.8, $fn=30);
+ translate(v=[1,15.5,15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = motor_screwhead_depth, r=screw_head_r, $fn=30);
+
+ // Material saving cutout
+ translate(v=[-10,12+motor_y_offset/2,10]) cube(size = [60,42 + motor_y_offset,42], center = true);
+
+ // Material saving cutout
+ // todo (maybe...): if motor_y_offset is above 10 edge
+ // becomes very sharp, but this is a pretty unrealistic
+ // situation so might not be worth caring about.
+ translate(v=[-10,40,-30]) rotate(a=[45,0,0]) cube(size = [60,43,42], center = true);
+ // Motor shaft cutout
+ translate(v=[0,0,0]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=17, $fn=6);
+ }
+ }
+ // zip tie retainer for securing end stop wiring
+ #translate([x_base_back() + x_box_width,x_base_inside() + 4.5/2,x_box_height - 8 - bushing_xy[0]*2]) difference() { cylinder(r=4.5,h=4,$fn=16);
+ translate([0,0,-1]) cylinder(r=2.5,h=7,$fn=16);
+ }
+ #translate([x_base_back() + x_box_width,-bushing_z[2]/2 - 1,x_box_height]) rotate([90,0,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);
+ }
}
// Final part