New bushing changes (unfinished)
[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
5e8013bd 11module zmotorholder(thickness=20, bottom_thickness=5){
3506b70b
VAH
12 difference(){
13 union(){
14 // Motor holding part
15 difference(){
16 union(){
f0c2a7f0 17 zrodholder(thickness=thickness, xlen=45, ylen=45);
3506b70b 18 translate([board_to_xz_distance, board_to_xz_distance, 0]) {
5e8013bd 19 nema17(places=[0, 1, 1, 1], h=bottom_thickness + layer_height);
3506b70b
VAH
20 }
21 }
d3618a65 22
3506b70b
VAH
23 // motor screw holes
24 translate([board_to_xz_distance, board_to_xz_distance, thickness]) {
5e8013bd
VAH
25 mirror([0, 0, 1]) translate([0, 0, thickness-8])
26 nema17(places=[0, 1, 1, 1], holes=true, h=bottom_thickness + 1, shadow=5);
3506b70b
VAH
27 }
28 }
29 }
30 }
d3618a65 31}
3506b70b
VAH
32
33
5e8013bd 34module zrodholder(thickness=14, bottom_thickness=5, ylen=42, xlen=34){
3506b70b
VAH
35 difference(){
36 union(){
3506b70b
VAH
37 difference(){
38 union(){
39 //piece along the flat side of a board
5e8013bd
VAH
40 cube_fillet([14, ylen, bottom_thickness], vertical=[3, 3, 0, 0]);
41 cube_fillet([5, ylen, thickness], vertical=[3, 3, 0, 0], top = [thickness/1.5, 0, 0, 5]);
3506b70b 42 //hole for Z axis is thru this
5e8013bd 43 cube_fillet([xlen, 14, bottom_thickness], vertical=[0, 0, 0, 3]);
3506b70b 44 //piece along cut side of the board
5e8013bd
VAH
45 if (i_am_box == 1) {
46 translate([-board_thickness, 0, 0]) cube_fillet([board_thickness + board_to_xz_distance, 5, thickness], radius=2, top = [0, 0, 0, thickness]);
47 } else {
48 translate([-board_thickness/2, 0, 0]) cube_fillet([board_thickness/2 + board_to_xz_distance+5, 5, thickness], radius=2, top = [0, 0, 0, thickness]);
49 }
50 //smooth rod insert
51 translate([board_to_xz_distance, 9, 0]) intersection() {
52 cylinder(h=bottom_thickness + layer_height, r=(bushing_z[0] + 5 * single_wall_width));
53 if (bushing_z[0] < 5) {
54 translate([0, -5 , bottom_thickness / 2]) cube([20, 20, bottom_thickness + 10], center=true);
55 } else {
56 translate([0, -bushing_z[0], bottom_thickness / 2]) cube([bushing_z[0] * 4, bushing_z[0] * 4, bottom_thickness + 10], center=true);
57 }
58 }
3506b70b
VAH
59 }
60 //smooth rod hole
5e8013bd
VAH
61 translate([board_to_xz_distance, 9, -1]) cylinder(h=board_thickness+2, r=(bushing_z[0]));
62 // cutout
63 translate([board_to_xz_distance-1, 5+(bushing_z[0]), 0.4]) cube([2, 10, 100]);
3506b70b 64 //inside rouned corner
5e8013bd 65 translate([0, 5, -1]) cylinder(r=1.2, h=100, $fn=8);
3506b70b 66 //side screw
5e8013bd
VAH
67 //translate([-board_thickness/2, 0, thickness/2-1.5]) rotate([-90, 0, 0]) screw(h=30, r_head=4);
68 //front screws
69 if (i_am_box != 1) {
70 //single plate has both screws on front
71 translate([17, 35.5, bottom_thickness+4]) rotate([0, -90, 0]) {
72 screw(head_drop=12, h=122, r_head=4);
73 }
74 translate([17, 15.5, bottom_thickness+4]) rotate([0, -90, 0]) {
75 screw(head_drop=12, h=122, r_head=4);
76 }
77 } else {
78 translate([17, 30, bottom_thickness+4]) rotate([0, -90, 0]) {
79 screw(head_drop=12, h=122, r_head=4);
80 }
81 //side screw
82 translate([-board_thickness/2, 0, thickness/2]) rotate([-90, 0, 0]) screw(h=30, r_head=4);
b32bbd0f 83 }
3506b70b
VAH
84 }
85 }
86 }
d3618a65
NZ
87}
88
5e8013bd
VAH
89translate([0, -2, 0]) mirror([0, 1, 0]) zmotorholder();
90translate([0, 2, 0]) zmotorholder();
b32bbd0f 91
5e8013bd
VAH
92translate([21, -62, 0]) zrodholder();
93translate([20, 62, 0]) mirror([0, 1, 0]) zrodholder();