doc: make complete-printer mockup work better
[clinton/prusa3.git] / box_frame / doc / complete-printer.scad
CommitLineData
2159eed1
VAH
1// PRUSA iteration3
2// Complete printer visualisation
0a84ec19
VAH
3// GNU GPL v3
4// Greg Frost
5// http://www.reprap.org/wiki/Prusa_Mendel
8e93419f 6// http://github.com/josefprusa/Prusa3
0a84ec19 7
f7aa2311 8include <../configuration.scad>
eb66dab2 9use <../y-drivetrain.scad>
f7aa2311 10use <../y-axis-corner.scad>
4bda8253 11use <../z-axis.scad>
df0b7f96 12use <../x-end.scad>
b000403d
CE
13use <../x-end-motor.scad>
14use <../x-end-idler.scad>
15//use <../x-end-orig.scad>
df0b7f96 16use <../x-carriage.scad>
0a84ec19 17
b000403d
CE
18// quick rendering
19$fa = 12;
20$fs = 2;
21
f35bb1ce 22module nutwasher(){
d4294528 23 color("silver")
4bda8253
TF
24 difference(){
25 union(){
d4294528
TF
26 translate([0,0,2])cylinder(r=15/2,h=7,$fn=6);
27 translate([0,0,0.5])cylinder(r=8.5,h=1);
4bda8253 28 }
b000403d 29 translate([0,0,-1])cylinder(r=8/2,h=12);
4bda8253 30 }
f35bb1ce 31}
f35bb1ce 32
d4294528 33// y motor mount
b000403d 34translate([56-yrodseparation/2,-y_smooth_rod_length/2+9,0])
d4294528
TF
35{
36 rotate([0,90,0]) rotate([0,0,90]) motorholder();
37 translate([10,0,30])rotate([0,90,0])nutwasher();
38 translate([0,0,30])rotate([0,90,180])nutwasher();
39 translate([10,0,10])rotate([0,90,0])nutwasher();
40 translate([0,0,10])rotate([0,90,180])nutwasher();
41}
42
43// y idler mount
b000403d 44translate([70-yrodseparation/2,y_smooth_rod_length/2-9,30])
d4294528 45{
b000403d 46 translate([0,0-33,-8])
d4294528
TF
47 rotate([0,-90,0]) idlermount();
48 translate([0,0,0])rotate([0,90,0])nutwasher();
49 translate([-20,0,0])rotate([0,90,180])nutwasher();
50}
51
4bda8253
TF
52yrodseparation=100;
53
54module yfront()
55{
56 // corners
57 leftfront();
58 translate([yrodseparation,0,0]) mirror([1,0,0]) leftfront();
59
60 // front bottom threaded rod
61 color("Aqua")
d4294528
TF
62 translate([-20,9,10]) rotate([0,90,0]) cylinder(h = 140, r=4);
63
64 translate([yrodseparation+11,9,10])rotate([0,90,0])nutwasher();
65 translate([yrodseparation-11,9,10])rotate([0,90,180])nutwasher();
66
67 translate([-11,9,10])rotate([0,90,180])nutwasher();
68 translate([11,9,10])rotate([0,90,0])nutwasher();
b000403d 69
4bda8253
TF
70 // front top threaded rod
71 color("Aqua")
d4294528
TF
72 translate([-20,9,30]) rotate([0,90,0]) cylinder(h = 140, r=4);
73
74% translate([-11,9,30])rotate([0,90,180])nutwasher();
75% translate([11,9,30])rotate([0,90,0])nutwasher();
76
77% translate([yrodseparation-11,9,30])rotate([0,90,180])nutwasher();
78% translate([yrodseparation+11,9,30])rotate([0,90,0])nutwasher();
f35bb1ce 79}
4bda8253
TF
80
81translate([-yrodseparation/2,-y_smooth_rod_length/2])
82{
83yfront();
b000403d 84translate([0,y_smooth_rod_length,0])
4bda8253
TF
85mirror([0,1,0])
86yfront();
f35bb1ce
KY
87}
88
4bda8253
TF
89module yside()
90{
91 translate([-yrodseparation/2,0])
92 {
93 // left top rod
94 color("MediumBlue")
b000403d 95 translate([0,0,45]) rotate([0,90,90]) cylinder(h = y_smooth_rod_length, r=bushing_xy[0],center=true);
4bda8253
TF
96 //left bottom rod
97 color("Aqua")
b000403d 98 translate([0,0,20]) rotate([0,90,90]) cylinder(h = y_smooth_rod_length, r=4,center=true);
df0b7f96 99 // middle nuts
d4294528
TF
100 translate([0,0,20])rotate([0,-90,90])nutwasher();
101 translate([0,board_thickness,20])rotate([0,90,90])nutwasher();
4bda8253 102
df0b7f96 103 // back nuts
d4294528
TF
104 translate([0,y_smooth_rod_length/2+2,20])rotate([0,90,90])nutwasher();
105 translate([0,y_smooth_rod_length/2+2-22,20])rotate([0,90,-90])nutwasher();
df0b7f96 106 // front nuts
d4294528
TF
107 translate([0,-y_smooth_rod_length/2-2,20])rotate([0,90,-90])nutwasher();
108 translate([0,-y_smooth_rod_length/2-2+22,20])rotate([0,90,90])nutwasher();
4bda8253 109 }
0a84ec19
VAH
110}
111
4bda8253
TF
112yside();
113translate([yrodseparation,0,0])yside();
699eb60c 114
4bda8253
TF
115// heat bed
116color("Lime",0.25)
117translate([0,0,58]) cube([bed_x_size,bed_y_size,6], center=true);
118
b000403d
CE
119board_sides=(frame_type == frame_alu) ? board_thickness : 50 ;
120// todo: auto set length of smooth rods and board using desired print volume
121// fixme: just copied board_w from wilson bom for my specific printer...
122board_w=(frame_type == frame_alu) ? 430 + board_thickness * 2 : bed_x_size+10+2*board_sides;
123board_h=(frame_type == frame_alu) ? z_smooth_rod_length + 50 : 300;
124board_cut_h=(frame_type == frame_alu) ? board_h - board_thickness * 2 : 200;
125board_cut_w=(frame_type == frame_alu) ? board_w - board_thickness * 2 : bed_x_size + 10;
126
4bda8253
TF
127
128// XZ board
b000403d 129translate([0,board_thickness/2,board_h/2])
4bda8253
TF
130%difference()
131{
b000403d
CE
132 cube([board_w,board_thickness,board_h], center=true);
133 translate([0,0,(frame_type == frame_alu) ? 0 : -15])
134 cube([board_cut_w,board_thickness+2,board_cut_h], center=true);
f35bb1ce 135}
699eb60c 136
4bda8253 137
b000403d
CE
138if (frame_type == frame_alu) {
139 // Z motor mounts
140 translate([-board_w/2-5,0,55 - 6])
141 rotate(-90)
142 zmotorholder (thickness=55, bottom_thickness=6);
143
144 translate([board_w/2+5,0,55 - 6])
145 rotate(-90)
146 mirror([0,1,0])
147 zmotorholder(thickness=55, bottom_thickness=6);
148
149 // Z rod mounts
150 // 6 = bottom_thickness
151 translate([-board_w/2-5,0,board_h - 6/2])
152 rotate(-90)
153 zrodholder(thickness=board_thickness * 2 + 5, ylen = board_thickness * 2 + 10, bottom_x=43 + zaxis_delta_x, bottom_thickness=6);
154
155 translate([board_w/2+5,0,board_h - 6/2])
156 rotate(-90)
157 mirror([0,1,0])
158 zrodholder(thickness=board_thickness * 2 + 5, ylen = board_thickness * 2 + 10, bottom_x=43 + zaxis_delta_x, bottom_thickness=6);
159} else {
160 // Z motor mounts
161 translate([-board_w/2-5,0,42])
162 rotate(-90)
163 zmotorholder ()
164
165 translate([board_w/2+5,0,42])
166 rotate(-90)
167 mirror([0,1,0])
168 zmotorholder();
169
170 // Z rod mounts
171 translate([-board_w/2-5,0,260])
172 rotate(-90)
173 zrodholder();
174
175 translate([board_w/2+5,0,260])
176 rotate(-90)
177 mirror([0,1,0])
178 zrodholder();
179}
4bda8253 180
df0b7f96
TF
181// Z rods
182module z_rods()
183{
184 color("MediumBlue")
b000403d
CE
185 // fixme: 55 - 6 is mount thickness - bottom_thickness
186 // fixme: board_w/2-4 ... should 4 be bushing_z[0] instead ?
187 translate([board_w/2-4-zaxis_delta_y, -(board_to_xz_distance + zaxis_delta_x),55 - 6])cylinder(h=z_smooth_rod_length,r=bushing_z[0]);
df0b7f96
TF
188}
189
190z_rods();
191mirror([1,0,0])z_rods();
192
b000403d
CE
193// Z leadscrew
194module z_leadscrew()
195{
196 position_y = board_to_xz_distance + zaxis_delta_y + zmotor_delta_y;
197 position_x = board_to_xz_distance + zaxis_delta_x + zmotor_delta_x;
198 color("Orange")
199 // fixme: 55 - 6 is mount thickness - bottom_thickness
200 // fixme: position_y+5, 5 = side_thickness
201 // fixme: board_w/2-4 ... should 4 be bushing_z[0] instead ?
202 translate([board_w/2-position_y+5, -position_x,55 - 6])cylinder(h=z_smooth_rod_length,r=4);
203}
204
205z_leadscrew();
206mirror([1,0,0])z_leadscrew();
df0b7f96 207// X ends
b000403d 208translate([-board_w/2+4+zaxis_delta_y,-(board_to_xz_distance+zaxis_delta_x),200])
df0b7f96
TF
209rotate([0,0,90])
210rotate([0,180,0])
211x_end_motor();
212
b000403d 213translate([board_w/2-4-zaxis_delta_y,-(board_to_xz_distance+zaxis_delta_x),200])
df0b7f96
TF
214rotate(90)
215rotate([0,180,0])
216x_end_idler();
217
218// X rods
b000403d 219// fixme: looks off a bit, also relies on value of pushfit_d
df0b7f96
TF
220for(i=[0:1])
221color("MediumBlue")
b000403d
CE
222translate([0,-board_to_xz_distance + 15 - zaxis_delta_x,200 - x_box_height+bushing_xy[0]+i*xaxis_rod_distance+3+1+0.1])rotate([0,90,0])cylinder(h=x_smooth_rod_length,r=bushing_xy[0],center=true);
223
224
df0b7f96
TF
225
226// X carriage
b000403d 227translate([0,-board_to_xz_distance + 15 - zaxis_delta_x,200 - x_box_height+bushing_xy[0]+3+1+0.1])
df0b7f96 228rotate([0,90,0])
b000403d 229x_carriage();