4 // Josef Průša <iam@josefprusa.cz> and contributors
5 // http://www.reprap.org/wiki/Prusa_Mendel
6 // http://prusamendel.org
7 // Alterations for reprap Wilson by Martin Rice <mrice411@gmail.com>
9 include <configuration.scad>
16 // fixme: if we keep this, needs to adjust based on size of bushing_z
17 // to clear the side of the plate
18 offs_adjuster_y = x_base_outside() - adj_block_y/2;
20 motor_offs_z = 0; // todo: broken, not sure if useful -- adjust based on bearing size to keep straight belt line?
21 motor_y_offset = 0; // todo: use z_delta for y offset,
23 module adjustomatic() {
25 translate(v=[x_base_back() - adj_block_x/2,offs_adjuster_y,x_box_height - adj_block_z/2]) cube(size=[adj_block_x,adj_block_y,adj_block_z],center=true);
27 // these were translated -0.5 from block in wilson
28 translate ([0, 0, -0.5]) {
29 translate(v=[x_base_back() -adj_block_x/2 - 5,offs_adjuster_y,x_box_height-adj_block_z/2-8])
30 rotate([0,-30,0]) cube(size=[adj_block_x,adj_block_y+2,adj_block_z],center=true);
32 translate(v=[x_base_back() -adj_block_x/2 -1,offs_adjuster_y,x_box_height-adj_block_z/2-3])
33 cube(size=[adj_block_x,adj_block_y-2,adj_block_z-2],center=true);
35 translate(v=[x_base_back() -adj_block_x/2,offs_adjuster_y,x_box_height-adj_block_z/2+14]) {
36 rotate([0,0,30]) #cylinder(h = 4, r = 7.0/2 , $fn = 6);
37 translate([0,0,-20]) #cylinder(h=30,r=1.6,$fn=16);
43 // the endstop mount will be translated by this much (negative values
44 // mean it moves away from the motor and toward the X carriage, giving
45 // more room for leads and also extra space for the auto bedleveling
46 // servo housing which is on this side of the extruder):
47 endstop_sw_offs_adjust = -0;
49 module pocket_endstop() // endstop holder grafted onto the side toward the rods
53 // angled wall that attaches to the endstop holder
54 translate([-1,18,0]) rotate([0,0,-30]) cube(size=[8.5,2,22]);
55 // little bit of extra support at the bottom corner
56 translate([-1.5,15.,2]) rotate([0,90,0]) cube(size=[2,3,10]);
59 translate([-1.5,endstop_sw_offs_adjust,0]) cube(size=[9,20.5,22]);
61 translate([-2,endstop_sw_offs_adjust,1]) cube(size=[7,21,22]);
62 translate([0,15.5,8]) cube(size=[10,5,20]);
64 // screw holes for endstop switch
65 translate([-2,7+endstop_sw_offs_adjust,1.5+5.5]) rotate([0,90,0]) cylinder(r=1.5,h=15);
66 translate([-2,7+endstop_sw_offs_adjust,1.5+5.5+9.5]) rotate([0,90,0]) cylinder(r=1.5,h=15);
71 module x_end_motor_sr() {
73 translate([x_base_back(), x_base_outside(),x_box_height - sr_box_height]) {
75 cube(size=[8,13+motor_y_offset,sr_box_height]);
76 translate([4,12.5+motor_y_offset,sr_box_height-1]) rotate([0,90,0]) difference() {
77 cylinder(r=4.5,h=4,$fn=16,center=true);
78 translate([0,0,-1]) cylinder(r=2.5,h=7,$fn=16,center=true);
80 translate([9,11.6+motor_y_offset,sr_box_height]) rotate([0,45,90]) cube(size=[2,11,2]);
85 module x_end_motor_base(){
88 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);
97 module x_end_motor_holes(){
100 translate(v=[-1,x_base_outside() + 44/2,30.25+motor_offs_z]){
102 translate(v=[-14,1,0]) cube(size = [10,46,44/2], center = true);
103 // TODO: use built-in nema17 library to create holes
104 // FIXME: ensure these maintain bolt length as x_box_width
105 // increases (screw head holes need to be cut deeper)
107 translate ([0, motor_y_offset, 0]) {
108 // Motor mounting holes
109 // based on wilson x-ends, the intention here is to
110 // leave a 11.5mm shaft for the screw
111 motor_screwhead_depth = -x_base_back() - 11.5;
112 #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);
113 #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);
116 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);
117 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);
120 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);
121 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);
124 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);
125 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);
127 // Material saving cutout
128 translate(v=[-10,12+motor_y_offset/2,10]) cube(size = [60,42 + motor_y_offset,42], center = true);
130 // Material saving cutout
131 // todo (maybe...): if motor_y_offset is above 10 edge
132 // becomes very sharp, but this is a pretty unrealistic
133 // situation so might not be worth caring about.
134 translate(v=[-10,40,-30]) rotate(a=[45,0,0]) cube(size = [60,43,42], center = true);
135 // Motor shaft cutout
136 translate(v=[0,0,0]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=17, $fn=6);
139 // zip tie retainer for securing end stop wiring
140 #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);
141 translate([0,0,-1]) cylinder(r=2.5,h=7,$fn=16);
143 #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);
144 translate([0,0,-1]) cylinder(r=2.5,h=7,$fn=16,center=true);
149 module x_end_motor(){
154 // strain relief (zip tie point) below the motor