Fix previous fix (left comments there)
[clinton/prusa3.git] / box_frame / z-axis.scad
CommitLineData
2159eed1
VAH
1// PRUSA iteration3
2// Z axis
3// GNU GPL v3
4// Josef Průša <josefprusa@me.com>
5// Václav 'ax' Hůla <axtheb@gmail.com>
6// http://www.reprap.org/wiki/Prusa_Mendel
7// http://github.com/prusajr/PrusaMendel
8
3506b70b
VAH
9include <configuration.scad>
10
fdc7f8d6 11module zmotorholder(thickness=23, bottom_thickness=5){
3506b70b
VAH
12 difference(){
13 union(){
14 // Motor holding part
15 difference(){
16 union(){
fdc7f8d6 17 zrodholder(thickness=thickness, xlen=45, ylen=45, zdelta=((i_want_to_use_single_plate_dxf_and_make_my_z_weaker == 0) ? 0 : 5));
3506b70b 18 translate([board_to_xz_distance, board_to_xz_distance, 0]) {
854f95f0 19 nema17(places=[0, 1, 1, 1], h=bottom_thickness + layer_height, $fn=23, shadow=layer_height + 2);
3506b70b
VAH
20 }
21 }
d3618a65 22
3506b70b
VAH
23 // motor screw holes
24 translate([board_to_xz_distance, board_to_xz_distance, thickness]) {
5e8013bd 25 mirror([0, 0, 1]) translate([0, 0, thickness-8])
854f95f0
VAH
26 nema17(places=[0, 1, 1, 1], holes=true, h=bottom_thickness + 1);
27 //shadow=-6 + layer_height);
3506b70b
VAH
28 }
29 }
30 }
31 }
d3618a65 32}
3506b70b
VAH
33
34
fdc7f8d6 35module zrodholder(thickness=15, bottom_thickness=5, ylen=42, xlen=34, zdelta=0){
5cae2970 36 holder_inner_r = 9;
3506b70b
VAH
37 difference(){
38 union(){
3506b70b
VAH
39 difference(){
40 union(){
41 //piece along the flat side of a board
5cae2970 42 cube_fillet([14, ylen, bottom_thickness], vertical=[8, 3, 0, 0]);
fdc7f8d6 43 cube_fillet([5, ylen, thickness], vertical=[3, 3, 0, 0], top = [thickness/2, 0, 0, 5]);
3506b70b 44 //hole for Z axis is thru this
5cae2970
VAH
45 cube_fillet([xlen, 14, bottom_thickness], vertical=[3, 0, 0, 3]);
46 translate([14,14,0]) {
47 //large fillet that makes it stiffer by lot. Thanks to Marcus Wolschon
48 difference(){
49 cube([holder_inner_r,holder_inner_r,bottom_thickness]);
50 translate([holder_inner_r, holder_inner_r, -0.5])
51 cylinder(r=holder_inner_r, h=bottom_thickness + 1);
52 }
53 }
3506b70b 54 //piece along cut side of the board
5e8013bd 55 if (i_am_box == 1) {
eb40b77a 56 translate([-board_thickness, 0, 0])
5cae2970 57 cube_fillet([board_thickness + board_to_xz_distance + bushing_z[0], 5, thickness], radius=2, top = [0, 0, 0, thickness]);
5e8013bd 58 } else {
eb40b77a 59 translate([-board_thickness/2, 0, 0])
5cae2970 60 cube_fillet([board_thickness/2 + board_to_xz_distance + bushing_z[0], 5, thickness], radius=2, top = [0, 0, 0, thickness]);
5e8013bd
VAH
61 }
62 //smooth rod insert
854f95f0
VAH
63 translate([board_to_xz_distance - z_delta, 9, 0])
64 cylinder(h=bottom_thickness / 2, r=(bushing_z[0] + 5 * single_wall_width));
3506b70b
VAH
65 }
66 //smooth rod hole
19859bf2 67 translate([board_to_xz_distance - z_delta, 9, -1]) cylinder_poly(h=board_thickness+20, r=bushing_z[0]);
3506b70b 68 //inside rouned corner
5e8013bd 69 translate([0, 5, -1]) cylinder(r=1.2, h=100, $fn=8);
3506b70b 70 //side screw
5e8013bd
VAH
71 //translate([-board_thickness/2, 0, thickness/2-1.5]) rotate([-90, 0, 0]) screw(h=30, r_head=4);
72 //front screws
73 if (i_am_box != 1) {
74 //single plate has both screws on front
eb40b77a 75 translate([16, 35, bottom_thickness + 4.5 + zdelta]) rotate([0, -90, 0]) {
fdc7f8d6 76 screw(head_drop=14, h=122, r_head=4.5);
5e8013bd 77 }
eb40b77a 78 translate([16, 15, bottom_thickness + 4.5 + zdelta]) rotate([0, -90, 0]) {
fdc7f8d6 79 screw(head_drop=14, h=122, r_head=4.5);
5e8013bd
VAH
80 }
81 } else {
5cae2970 82 translate([16, 30, bottom_thickness+4]) rotate([0, -90, 0]) {
5e8013bd
VAH
83 screw(head_drop=12, h=122, r_head=4);
84 }
85 //side screw
5cae2970 86 translate([-board_thickness/2, 0, thickness/2]) rotate([-90, 0, 0]) screw(h=30, r_head=4.5, head_drop=1);
b32bbd0f 87 }
3506b70b
VAH
88 }
89 }
90 }
d3618a65 91}
cb01aff1 92translate([0, -2, 0]) mirror([0, 1, 0]) zmotorholder();
5e8013bd 93translate([0, 2, 0]) zmotorholder();
5e8013bd 94translate([21, -62, 0]) zrodholder();
cb01aff1 95translate([20, 62, 0]) mirror([0, 1, 0]) zrodholder();