My self designed awesome 3D printer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

carriages_xy.scad 33KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886
  1. include <bearing_idler.scad>
  2. include <linear_rail.scad>
  3. include <e3d_v6_all_metall_hotend.scad>
  4. // #######################################################
  5. // #################### X-Y Carriages ####################
  6. // #######################################################
  7. x_rail_dia = 10;
  8. y_rail_dia = 12;
  9. x_rail_dist = 70;
  10. lmXuu_dia_add = 0.5;
  11. lmXuu_len_add = 1.0;
  12. rail_dia_add = 3.0;
  13. y_carriage_wall = 2 + y_rail_dia; // z-axis
  14. y_carriage_len_add = 15; // y-axis
  15. y_carriage_width = 25; // x-axis
  16. y_carriage_block_width = 10; // x-axis
  17. y_carriage_block_height = 10; // z-axis
  18. y_carriage_rail_support = 2; // dist between rail and edge
  19. y_carriage_length = x_rail_dist + (2 * y_carriage_len_add);
  20. rail_mount_dia_add = 0.4;
  21. x_rail_mount_width = 10;
  22. x_rail_cutout_z = 0.5; // in x-axis
  23. x_rail_cutout_x = 0.5; // in z-axis
  24. x_rail_cutout_y = x_rail_dist - (2 * y_carriage_len_add);
  25. x_rail_hole_off = 5;
  26. x_rail_block_len = (y_carriage_length - x_rail_cutout_y) / 2;
  27. x_carriage_width = 80;
  28. x_carriage_len_add = 12;
  29. x_carriage_wall = 10;
  30. x_carriage_bearing_off = 3;
  31. x_carriage_belt_off = 19;
  32. x_carriage_belt_block_width = 8;
  33. x_carriage_belt_block_length = 8;
  34. x_carriage_belt_block_height = 25;
  35. x_carriage_belt_block_height_b = x_carriage_belt_block_height - 7;
  36. x_carriage_block_hole_off = 6.0;
  37. x_carriage_block_length = 4;
  38. x_carriage_block_off = 2.5;
  39. x_carriage_block_add = 4.4;
  40. x_carriage_length = x_rail_dist + (2 * x_carriage_len_add);
  41. x_carriage_block_height = 2 * (x_carriage_block_hole_off + x_carriage_block_add);
  42. x_cutout_width = x_carriage_width - (2 * x_carriage_belt_block_width) - 5;
  43. x_cutout_length = x_rail_dist - 25;
  44. // y-carriage belt idlers
  45. idler_a_blue = [ 19, 15, 5.5 - (y_rail_dia - 8)];
  46. idler_a_red = [ 19, x_rail_dist + 15, 12.5 - (y_rail_dia - 8)];
  47. idler_b_blue = [30.3, x_rail_dist + 15, 12.5 - (y_rail_dia - 8)];
  48. idler_b_red = [30.3, 15, 5.5 - (y_rail_dia - 8)];
  49. e3d_v6_dist_x = 23 + 5;
  50. e3d_v6_dist_y = 18 + 1;
  51. e3d_v6_z_off = 13;
  52. e3d_clamp_width = x_cutout_width;
  53. e3d_clamp_width_add = 10;
  54. e3d_clamp_length = e3d_v6_dist_y;
  55. e3d_clamp_b_length = ((x_cutout_length - e3d_clamp_length) / 2) + 7;
  56. e3d_clamp_height = e3d_upper_small_height;
  57. e3d_clamp_dia_add = 0.2;
  58. e3d_clamp_cut = 0.2; // x2
  59. e3d_clamp_hole_off = 4;
  60. e3d_hole_dia = 3.2;
  61. fan_mount_wall = 5;
  62. fan_mount_inset = 6;
  63. fan_mount_hole_inset = 8;
  64. fan_width = 40;
  65. fan_height = 20;
  66. fan_hole_off = 3.9;
  67. universal_mount_hole_off = 6;
  68. nut_cut_width = 5.7;
  69. nut_cut_depth = 2.6;
  70. nut_cut_off = 3.2;
  71. nut_cut_height = 20;
  72. sensor_mount_width_add = 8;
  73. sensor_mount_wall = 4;
  74. sensor_mount_y_offset = -1;
  75. sensor_mount_height = 8;
  76. sensor_dia = 19;
  77. sensor_dia_add = 6;
  78. sensor_mount_width = (2 * universal_mount_hole_off) + sensor_mount_width_add;
  79. draw_x_carriage = false;
  80. draw_e3d_fan_duct = false;
  81. draw_radial_fan = false;
  82. draw_bed_sensor = false;
  83. draw_e3d_hotends = false;
  84. draw_y_carriage = false;
  85. draw_y_carriage_idlers = true;
  86. draw_rail_len = 220;
  87. print_x_carriage = false;
  88. print_x_carriage_clamps = false;
  89. print_e3d_mount = false;
  90. print_e3d_fans = false;
  91. print_fan_mount = false;
  92. print_sensor_mount = false;
  93. print_y_carriage_a = false;
  94. print_y_carriage_b = false;
  95. print_y_carriage_a_clamps = false;
  96. print_y_carriage_b_clamps = false;
  97. module nut_cut() {
  98. translate([-nut_cut_width / 2, 2, nut_cut_off - nut_cut_height]) {
  99. cube([nut_cut_width, nut_cut_depth, nut_cut_height]);
  100. translate([nut_cut_width / 2, -5, nut_cut_height - nut_cut_off])
  101. rotate([-90, 0, 0])
  102. cylinder(d = 3.2, h = nut_cut_depth + 5);
  103. }
  104. }
  105. module generate_spacer(pos) {
  106. color("green")
  107. translate([pos[0], pos[1], -0.5])
  108. bearing_spacer(pos[2] + 0.5 + ((idler_outer_height - bearing_height) / 2), 2, 1, true, 3);
  109. }
  110. module y_carriage(x_rail_dia, y_rail_dia, idler_a = [0, 0, 0], idler_b = [0, 0, 0], block = true, clamp = true) {
  111. $fn = 20;
  112. // attaching to x-rails
  113. translate([y_carriage_width, 0, -y_carriage_block_height])
  114. difference() {
  115. union() {
  116. color("green")
  117. cube([x_rail_mount_width, y_carriage_length, y_carriage_block_height + y_carriage_wall]);
  118. // idlers for the corexy belts
  119. translate([-y_carriage_width, 0, y_carriage_wall + y_carriage_block_height]) {
  120. if (draw_y_carriage_idlers) {
  121. %translate(idler_a)
  122. bearing_idler();
  123. %translate(idler_b)
  124. bearing_idler();
  125. }
  126. generate_spacer(idler_a);
  127. generate_spacer(idler_b);
  128. }
  129. }
  130. if (!block) {
  131. translate([-y_carriage_width, 0, 0])
  132. cube([y_carriage_width, y_carriage_length, 100]);
  133. translate([0, 0, -10])
  134. cube([y_carriage_width, y_carriage_length, 20]);
  135. }
  136. translate([0, -1, y_carriage_block_height])
  137. cube([x_rail_cutout_z, y_carriage_length + 2, y_carriage_wall + 1]);
  138. if (clamp) {
  139. translate([0, -1, y_carriage_block_height - (x_rail_cutout_x / 2)])
  140. cube([y_carriage_block_width + 1, y_carriage_length + 2, x_rail_cutout_x]);
  141. } else {
  142. translate([0, -1, y_carriage_block_height - (x_rail_cutout_x / 2)])
  143. cube([y_carriage_block_width + 1, y_carriage_length + 2, 100]);
  144. }
  145. translate([0, (y_carriage_length - x_rail_cutout_y) / 2, y_carriage_block_height])
  146. cube([y_carriage_block_width + 1, x_rail_cutout_y, y_carriage_wall + 1]);
  147. for (i = [y_carriage_len_add : x_rail_dist : x_rail_dist + y_carriage_len_add]) {
  148. translate([0, i, y_carriage_block_height])
  149. rotate([0, 90, 0])
  150. cylinder(d = x_rail_dia + rail_mount_dia_add, h = y_carriage_block_width + 1);
  151. }
  152. for (i = [0 : x_rail_block_len + x_rail_cutout_y : x_rail_block_len + x_rail_cutout_y]) {
  153. translate([y_carriage_block_width / 2, x_rail_hole_off + i, -1]) {
  154. cylinder(d = 3.2, h = y_carriage_wall + 2 + y_carriage_block_height);
  155. cylinder(d = 6.1, h = 3.8, $fn = 6);
  156. translate([0, 0, y_carriage_wall + y_carriage_block_height - 2.5])
  157. cylinder(d = 6.1, h = 3.8);
  158. }
  159. translate([y_carriage_block_width / 2, x_rail_block_len - x_rail_hole_off + i, -1]) {
  160. cylinder(d = 3.2, h = y_carriage_wall + 2 + y_carriage_block_height);
  161. cylinder(d = 6.1, h = 3.8, $fn = 6);
  162. translate([0, 0, y_carriage_wall + y_carriage_block_height - 2.5])
  163. cylinder(d = 6.1, h = 3.8);
  164. }
  165. }
  166. }
  167. // attaching to y-rail
  168. if (block)
  169. color("green")
  170. difference() {
  171. union() {
  172. cube([y_carriage_width, y_carriage_length, y_carriage_wall]);
  173. translate([y_carriage_width - y_carriage_block_width, 0, -y_carriage_block_height])
  174. cube([y_carriage_block_width, y_carriage_length, y_carriage_block_height]);
  175. }
  176. translate([(lmXuu_outer(y_rail_dia) + lmXuu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
  177. rotate([-90, 0, 0]) {
  178. translate([0, 0, -1])
  179. cylinder(d = y_rail_dia + rail_dia_add, h = y_carriage_length + 2);
  180. translate([0, 0, y_carriage_rail_support - lmXuu_len_add / 2])
  181. cylinder(d = lmXuu_outer(y_rail_dia) + lmXuu_dia_add, h = lmXuu_height(y_rail_dia) + lmXuu_len_add);
  182. translate([0, 0, y_carriage_length - lmXuu_height(y_rail_dia) - y_carriage_rail_support - lmXuu_len_add / 2])
  183. cylinder(d = lmXuu_outer(y_rail_dia) + lmXuu_dia_add, h = lmXuu_height(y_rail_dia) + lmXuu_len_add);
  184. }
  185. translate([(lmXuu_outer(y_rail_dia) + lmXuu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
  186. rotate([90, 0, 0]) {
  187. translate([0, 0, -11])
  188. lmXuu_cable_tie(y_rail_dia);
  189. translate([0, 0, -20])
  190. lmXuu_cable_tie(y_rail_dia);
  191. translate([0, 0, -83])
  192. lmXuu_cable_tie(y_rail_dia);
  193. translate([0, 0, -92])
  194. lmXuu_cable_tie(y_rail_dia);
  195. }
  196. }
  197. if (block)
  198. color("magenta")
  199. translate([(lmXuu_outer(y_rail_dia) + lmXuu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
  200. rotate([-90, 0, 0]) {
  201. // y-bearings
  202. %translate([0, 0, y_carriage_rail_support])
  203. lmXuu(y_rail_dia);
  204. %translate([0, 0, y_carriage_length - lmXuu_height(y_rail_dia) - y_carriage_rail_support])
  205. lmXuu(y_rail_dia);
  206. }
  207. }
  208. module belt_fix() {
  209. difference() {
  210. color("green")
  211. cube([x_carriage_belt_block_width, x_carriage_block_length, x_carriage_block_height]);
  212. translate([x_carriage_belt_block_width / 2, -1, x_carriage_block_hole_off - 0.2])
  213. rotate([-90, 0, 0]) {
  214. cylinder(d = 3.2, h = x_carriage_belt_block_length + 2);
  215. cylinder(d = 6.1, h = 3.8, $fn = 6);
  216. }
  217. translate([x_carriage_belt_block_width / 2, -1, x_carriage_block_height - -x_carriage_block_hole_off - 9])
  218. rotate([-90, 0, 0]) {
  219. cylinder(d = 3.2, h = x_carriage_belt_block_length + 2);
  220. cylinder(d = 6.1, h = 3.8, $fn = 6);
  221. }
  222. }
  223. }
  224. module belt_mount(top, up, block, clamp) {
  225. $fn = 15;
  226. if (block)
  227. difference() {
  228. color("green")
  229. if (top) {
  230. cube([x_carriage_belt_block_width, x_carriage_belt_block_length, x_carriage_belt_block_height]);
  231. } else {
  232. cube([x_carriage_belt_block_width, x_carriage_belt_block_length, x_carriage_belt_block_height_b]);
  233. }
  234. if (top) {
  235. translate([-1, x_carriage_belt_block_length / 2, 16])
  236. rotate([0, 90, 0])
  237. cylinder(d = 2.6, h = x_carriage_belt_block_width + 2);
  238. translate([x_carriage_belt_block_width / 2, -1, 16 + x_carriage_block_hole_off])
  239. rotate([-90, 0, 0])
  240. cylinder(d = 3.2, h = x_carriage_belt_block_length + 2);
  241. translate([x_carriage_belt_block_width / 2, -1, 16 - x_carriage_block_hole_off])
  242. rotate([-90, 0, 0])
  243. cylinder(d = 3.2, h = x_carriage_belt_block_length + 2);
  244. } else {
  245. translate([-1, x_carriage_belt_block_length / 2, 9])
  246. rotate([0, 90, 0])
  247. cylinder(d = 2.7, h = x_carriage_belt_block_width + 2);
  248. translate([x_carriage_belt_block_width / 2, -1, 9 + x_carriage_block_hole_off])
  249. rotate([-90, 0, 0])
  250. cylinder(d = 3.2, h = x_carriage_belt_block_length + 2);
  251. translate([x_carriage_belt_block_width / 2, -1, 9 - x_carriage_block_hole_off])
  252. rotate([-90, 0, 0])
  253. cylinder(d = 3.2, h = x_carriage_belt_block_length + 2);
  254. }
  255. }
  256. if (clamp) {
  257. if (up) {
  258. if (top) {
  259. translate([0, x_carriage_belt_block_length + x_carriage_block_off, x_carriage_belt_block_height - x_carriage_block_height])
  260. belt_fix();
  261. } else {
  262. translate([0, x_carriage_belt_block_length + x_carriage_block_off, x_carriage_belt_block_height_b - x_carriage_block_height])
  263. belt_fix();
  264. }
  265. } else {
  266. if (top) {
  267. translate([0, -x_carriage_block_length - x_carriage_block_off, x_carriage_belt_block_height - x_carriage_block_height])
  268. belt_fix();
  269. } else {
  270. translate([0, -x_carriage_block_length - x_carriage_block_off, x_carriage_belt_block_height_b - x_carriage_block_height])
  271. belt_fix();
  272. }
  273. }
  274. }
  275. }
  276. module belt_mounts(block=true, clamp=true) {
  277. translate([0, x_carriage_belt_off, 0])
  278. belt_mount(false, true, block, clamp);
  279. translate([0, x_carriage_length - x_carriage_belt_off - x_carriage_belt_block_length, 0])
  280. belt_mount(true, false, block, clamp);
  281. translate([x_carriage_width - x_carriage_belt_block_width, x_carriage_belt_off, 0])
  282. belt_mount(true, true, block, clamp);
  283. translate([x_carriage_width - x_carriage_belt_block_width, x_carriage_length - x_carriage_belt_off - x_carriage_belt_block_length, 0])
  284. belt_mount(false, false, block, clamp);
  285. }
  286. module x_carriage(x_rail_dia, with_body=true, with_tool=true, with_clamps=true, with_fan=true, with_cool=true, with_sensor=true) {
  287. $fn = 20;
  288. if (!with_body) {
  289. if (with_clamps) {
  290. translate([0, 0, x_carriage_wall])
  291. belt_mounts(with_body, with_clamps);
  292. }
  293. }
  294. if (with_body)
  295. difference() {
  296. union() {
  297. if (with_body) {
  298. color("green")
  299. cube([x_carriage_width, x_rail_dist + (2 * x_carriage_len_add), x_carriage_wall]);
  300. }
  301. translate([0, 0, x_carriage_wall])
  302. belt_mounts(with_body, with_clamps);
  303. }
  304. // big center cutout
  305. translate([x_carriage_width / 2, x_carriage_length / 2, x_carriage_wall / 2])
  306. cube([x_cutout_width, x_cutout_length, x_carriage_wall + 2], center=true);
  307. for (i = [0 : 1 : 1]) {
  308. translate([lmXuu_height(x_rail_dia) + x_carriage_bearing_off + (i * (x_carriage_width - (2 * x_carriage_bearing_off) - lmXuu_height(x_rail_dia))), 0, ])
  309. rotate([0, -90, 0]) {
  310. // x-bearings
  311. color("magenta")
  312. %translate([0, x_carriage_len_add, 0])
  313. lmXuu(x_rail_dia);
  314. color("magenta")
  315. %translate([0, x_rail_dist + x_carriage_len_add, 0])
  316. lmXuu(x_rail_dia);
  317. color("green")
  318. translate([0, x_carriage_len_add, 0])
  319. cylinder(d = lmXuu_outer(x_rail_dia) + lmXuu_dia_add, h = lmXuu_height(x_rail_dia) + lmXuu_len_add);
  320. color("green")
  321. translate([0, x_rail_dist + x_carriage_len_add, 0])
  322. cylinder(d = lmXuu_outer(x_rail_dia) + lmXuu_dia_add, h = lmXuu_height(x_rail_dia) + lmXuu_len_add);
  323. color("green")
  324. translate([0, x_carriage_len_add, -x_carriage_width])
  325. cylinder(d = x_rail_dia + rail_dia_add, h = x_carriage_width * 2);
  326. color("green")
  327. translate([0, x_rail_dist + x_carriage_len_add, -x_carriage_width])
  328. cylinder(d = x_rail_dia + rail_dia_add, h = x_carriage_width * 2);
  329. }
  330. }
  331. // bearing cable tie mount front
  332. translate([8, x_carriage_len_add, 0])
  333. rotate([90, 0, 90])
  334. lmXuu_cable_tie(x_rail_dia);
  335. translate([18, x_carriage_len_add, 0])
  336. rotate([90, 0, 90])
  337. lmXuu_cable_tie(x_rail_dia);
  338. translate([58, x_carriage_len_add, 0])
  339. rotate([90, 0, 90])
  340. lmXuu_cable_tie(x_rail_dia);
  341. translate([68, x_carriage_len_add, 0])
  342. rotate([90, 0, 90])
  343. lmXuu_cable_tie(x_rail_dia);
  344. // bearing cable tie mount back
  345. translate([8, x_carriage_len_add + x_rail_dist, 0])
  346. rotate([90, 0, 90])
  347. lmXuu_cable_tie(x_rail_dia);
  348. translate([18, x_carriage_len_add + x_rail_dist, 0])
  349. rotate([90, 0, 90])
  350. lmXuu_cable_tie(x_rail_dia);
  351. translate([58, x_carriage_len_add + x_rail_dist, 0])
  352. rotate([90, 0, 90])
  353. lmXuu_cable_tie(x_rail_dia);
  354. translate([68, x_carriage_len_add + x_rail_dist, 0])
  355. rotate([90, 0, 90])
  356. lmXuu_cable_tie(x_rail_dia);
  357. /* mounting for hotend / tool */
  358. // left mounting screw
  359. translate([5.5, x_carriage_length / 2, -1])
  360. cylinder(d = e3d_hole_dia, h = x_carriage_wall + 12);
  361. // right mounting screw
  362. translate([x_carriage_width - 5.5, x_carriage_length / 2, -1])
  363. cylinder(d = e3d_hole_dia, h = x_carriage_wall + 12);
  364. // bottom mounting screw
  365. translate([x_carriage_width / 2, x_carriage_len_add + 9, -1])
  366. cylinder(d = e3d_hole_dia, h = x_carriage_wall + 12);
  367. // top mounting screw
  368. translate([x_carriage_width / 2, x_carriage_length - x_carriage_len_add - 9, -1])
  369. cylinder(d = e3d_hole_dia, h = x_carriage_wall + 12);
  370. // fan mount attachment holes on left side
  371. translate([-fan_mount_wall - 1, ((x_carriage_length - fan_width) / 2) + fan_mount_hole_inset, x_carriage_wall / 2])
  372. rotate([0, 90, 0])
  373. cylinder(d = 3.2, h = ((x_carriage_width - x_cutout_width) / 2) + fan_mount_wall + 2);
  374. translate([-fan_mount_wall - 1, ((x_carriage_length + fan_width) / 2) - fan_mount_hole_inset, x_carriage_wall / 2])
  375. rotate([0, 90, 0])
  376. cylinder(d = 3.2, h = ((x_carriage_width - x_cutout_width) / 2) + fan_mount_wall + 2);
  377. // fan mount attachment holes on right side
  378. translate([((x_carriage_width + x_cutout_width) / 2) - 1, ((x_carriage_length - fan_width) / 2) + fan_mount_hole_inset, x_carriage_wall / 2])
  379. rotate([0, 90, 0])
  380. cylinder(d = 3.2, h = ((x_carriage_width - x_cutout_width) / 2) + fan_mount_wall + 2);
  381. translate([((x_carriage_width + x_cutout_width) / 2) - 1, ((x_carriage_length + fan_width) / 2) - fan_mount_hole_inset, x_carriage_wall / 2])
  382. rotate([0, 90, 0])
  383. cylinder(d = 3.2, h = ((x_carriage_width - x_cutout_width) / 2) + fan_mount_wall + 2);
  384. // universal add-on mounting on front
  385. translate([(x_carriage_width / 2) + universal_mount_hole_off, 0, x_carriage_wall / 2])
  386. rotate([0, 180, 0])
  387. nut_cut();
  388. translate([(x_carriage_width / 2) - universal_mount_hole_off, 0, x_carriage_wall / 2])
  389. rotate([0, 180, 0])
  390. nut_cut();
  391. // universal add-on mounting on back
  392. translate([(x_carriage_width / 2) + universal_mount_hole_off, x_carriage_length, x_carriage_wall / 2])
  393. rotate([0, 180, 180])
  394. nut_cut();
  395. translate([(x_carriage_width / 2) - universal_mount_hole_off, x_carriage_length, x_carriage_wall / 2])
  396. rotate([0, 180, 180])
  397. nut_cut();
  398. }
  399. if (with_sensor) {
  400. translate([(x_carriage_width - sensor_mount_width) / 2, -sensor_mount_wall, 0])
  401. sensor_mount();
  402. }
  403. if (with_cool) {
  404. translate([(x_carriage_width - sensor_mount_width) / 2, x_carriage_length, 0]) {
  405. radial_fan_mount(true);
  406. translate([0, 15 + sensor_mount_wall, 0])
  407. radial_fan_mount(false);
  408. }
  409. }
  410. e3d_v6_triple_mount(with_tool, with_fan);
  411. }
  412. module radial_fan_mount(with_fan = true) {
  413. $fn = 15;
  414. color("yellow")
  415. universal_mount_plate();
  416. for (i = [0 : 52 + sensor_mount_width : 52 + sensor_mount_width])
  417. translate([i, 0, 0]) {
  418. color("yellow")
  419. translate([-52, 0, 0])
  420. cube([52, sensor_mount_wall, x_carriage_wall]);
  421. color("yellow")
  422. translate([-9, 0, x_carriage_wall])
  423. difference() {
  424. cube([9, sensor_mount_wall, 13]);
  425. translate([4.5, -1, 9])
  426. rotate([-90, 0, 0])
  427. cylinder(d = 4.2, h = sensor_mount_wall + 2);
  428. }
  429. color("yellow")
  430. translate([-52, 0, -23])
  431. difference() {
  432. cube([9, sensor_mount_wall, 23]);
  433. translate([4.5, -1, 4])
  434. rotate([-90, 0, 0])
  435. cylinder(d = 4.2, h = sensor_mount_wall + 2);
  436. }
  437. if (draw_radial_fan && with_fan) {
  438. // 5015 fan mockup
  439. %color("gray")
  440. translate([-(x_carriage_width - sensor_mount_width) / 2 + 4, sensor_mount_wall, 0])
  441. rotate([90, 0, 180])
  442. fan_5015();
  443. }
  444. }
  445. }
  446. module fan_5015() {
  447. // adapted from https://www.thingiverse.com/thing:1383913
  448. $fn=30;
  449. difference() {
  450. union() {
  451. hull() {
  452. translate([0.5, 0, 0]) cylinder(d=50, h=15);
  453. translate([-1, 0, 0]) cylinder(d=50, h=15);
  454. }
  455. hull() {
  456. translate([-43/2, 38/2, 0]) cylinder(d=7, h=15);
  457. translate([43/2, -38/2, 0]) cylinder(d=7, h=15);
  458. }
  459. translate([-26, -26, 0]) cube([20,26,15]);
  460. }
  461. difference() {
  462. union() {
  463. translate([-26+16+11,-2,1]) cylinder(d=32, h=15);
  464. translate([0,0,1]) hull(){
  465. translate([0.5, 0]) cylinder(d=48, h=13);
  466. translate([-1, 0]) cylinder(d=48, h=13);
  467. }
  468. translate([-25,-27,1]) cube([18,25,13]);
  469. }
  470. translate([-26+16+11,-2,1]) cylinder(d=24, h=15);
  471. }
  472. translate([-43/2, 38/2, -1]) cylinder(d=4.4, h=17);
  473. translate([43/2, -38/2, -1]) cylinder(d=4.4, h=17);
  474. }
  475. }
  476. module universal_mount_plate() {
  477. $fn = 20;
  478. difference() {
  479. cube([sensor_mount_width, sensor_mount_wall, x_carriage_wall]);
  480. translate([sensor_mount_width_add / 2, -1, x_carriage_wall / 2])
  481. rotate([-90, 0, 0])
  482. cylinder(d = 3.2, h = sensor_mount_wall + 2);
  483. translate([(universal_mount_hole_off * 2) + (sensor_mount_width_add / 2), -1, x_carriage_wall / 2])
  484. rotate([-90, 0, 0])
  485. cylinder(d = 3.2, h = sensor_mount_wall + 2);
  486. }
  487. }
  488. module sensor_mount() {
  489. $fn = 30;
  490. color("yellow")
  491. universal_mount_plate();
  492. color("yellow")
  493. translate([sensor_mount_width / 2, -(sensor_dia + sensor_dia_add) / 2, -sensor_mount_height])
  494. difference() {
  495. hull() {
  496. translate([-sensor_mount_width / 2, (sensor_dia + sensor_dia_add) / 2, 0])
  497. cube([sensor_mount_width, sensor_mount_wall, sensor_mount_height]);
  498. translate([0, sensor_mount_y_offset, 0])
  499. cylinder(d = sensor_dia + sensor_dia_add, h = sensor_mount_height);
  500. }
  501. translate([0, sensor_mount_y_offset, -1])
  502. cylinder(d = sensor_dia, h = sensor_mount_height + 2);
  503. }
  504. if (draw_bed_sensor) {
  505. // sensor mockup
  506. %translate([sensor_mount_width / 2, -(sensor_dia + sensor_dia_add) / 2 + sensor_mount_y_offset, -22]) {
  507. color("gray")
  508. cylinder(d = 18.2, h = 55);
  509. color("orange")
  510. translate([0, 0, -10])
  511. cylinder(d = 18.2, h = 10);
  512. }
  513. }
  514. }
  515. module e3d_v6_triple_mount(with_tool, with_fan) {
  516. if (draw_e3d_hotends && with_tool)
  517. translate([x_carriage_width / 2, x_carriage_length / 2, -e3d_v6_height + x_carriage_wall + e3d_v6_z_off]) {
  518. color("red")
  519. %translate([-e3d_v6_dist_x / 2, e3d_v6_dist_y / 2, 0])
  520. e3d_v6();
  521. color("yellow")
  522. %translate([e3d_v6_dist_x / 2, e3d_v6_dist_y / 2, 0])
  523. e3d_v6();
  524. color("blue")
  525. %translate([0, (e3d_v6_dist_y / 2) - e3d_v6_dist_y, 0])
  526. rotate([0, 0, 180])
  527. e3d_v6();
  528. }
  529. echo(m3_screw_len=e3d_clamp_length + (2 * e3d_clamp_b_length));
  530. // hotend clamp center piece
  531. if (with_tool)
  532. translate([(x_carriage_width - e3d_clamp_width) / 2, (x_carriage_length - e3d_clamp_length) / 2, x_carriage_wall])
  533. difference() {
  534. union() {
  535. // center clamp part
  536. color("magenta")
  537. translate([-e3d_clamp_width_add, e3d_clamp_cut, 0])
  538. cube([e3d_clamp_width + (2 * e3d_clamp_width_add), e3d_clamp_length - (2 * e3d_clamp_cut), e3d_clamp_height]);
  539. // blue clamp
  540. color("cyan")
  541. translate([0, -e3d_clamp_b_length, 0])
  542. cube([e3d_clamp_width, e3d_clamp_b_length - e3d_clamp_cut, e3d_clamp_height]);
  543. // red & yellow clamp
  544. color("cyan")
  545. translate([0, e3d_clamp_length + e3d_clamp_cut, 0])
  546. cube([e3d_clamp_width, e3d_clamp_b_length - e3d_clamp_cut, e3d_clamp_height]);
  547. }
  548. // cable holes
  549. translate([9.5, 6, -1])
  550. cylinder(d = 7, h = e3d_clamp_height + 2);
  551. translate([e3d_clamp_width - 9.5, 6, -1])
  552. cylinder(d = 7, h = e3d_clamp_height + 2);
  553. // left clamping screw
  554. translate([e3d_clamp_hole_off, -e3d_clamp_b_length - 1, e3d_clamp_height / 2])
  555. rotate([-90, 0, 0])
  556. cylinder(d = e3d_hole_dia, h = x_cutout_width + 2);
  557. // right clamping screw
  558. translate([x_cutout_width - e3d_clamp_hole_off, -e3d_clamp_b_length - 1, e3d_clamp_height / 2])
  559. rotate([-90, 0, 0])
  560. cylinder(d = e3d_hole_dia, h = x_cutout_width + 2);
  561. // left mounting screw
  562. translate([-5, e3d_clamp_length / 2, -1])
  563. cylinder(d = e3d_hole_dia, h = e3d_clamp_height + 2);
  564. // right mounting screw
  565. translate([e3d_clamp_width + e3d_clamp_width_add - 5, e3d_clamp_length / 2, -1])
  566. cylinder(d = e3d_hole_dia, h = e3d_clamp_height + 2);
  567. // bottom mounting screw
  568. translate([e3d_clamp_width / 2, -e3d_clamp_b_length + 3.5, -1])
  569. cylinder(d = e3d_hole_dia, h = e3d_clamp_height + 2);
  570. // top mounting screw
  571. translate([e3d_clamp_width / 2, e3d_clamp_length + e3d_clamp_b_length - 3.5, -1])
  572. cylinder(d = e3d_hole_dia, h = e3d_clamp_height + 2);
  573. // red e3d clamp cutout
  574. translate([(e3d_clamp_width - e3d_v6_dist_x) / 2, e3d_clamp_length, -1])
  575. cylinder(d = e3d_upper_small_dia + e3d_clamp_dia_add, h = e3d_clamp_height + 2);
  576. // yellow e3d clamp cutout
  577. translate([(e3d_clamp_width + e3d_v6_dist_x) / 2, e3d_clamp_length, -1])
  578. cylinder(d = e3d_upper_small_dia + e3d_clamp_dia_add, h = e3d_clamp_height + 2);
  579. // blue e3d clamp cutout
  580. translate([e3d_clamp_width / 2, 0, -1])
  581. cylinder(d = e3d_upper_small_dia + e3d_clamp_dia_add, h = e3d_clamp_height + 2);
  582. }
  583. if (with_fan) {
  584. e3d_v6_triple_fan();
  585. }
  586. }
  587. module simple_fan() {
  588. difference() {
  589. cube([fan_height, fan_width, fan_width]);
  590. translate([-1, fan_width / 2, fan_width / 2])
  591. rotate([0, 90, 0])
  592. cylinder(d = fan_width - 5, h = fan_height + 2);
  593. }
  594. }
  595. module fan_mount() {
  596. difference() {
  597. cube([fan_mount_wall, fan_width, fan_width + x_carriage_wall]);
  598. translate([-1, fan_mount_inset, fan_mount_inset])
  599. cube([fan_mount_wall + 2, fan_width - (fan_mount_inset * 2), fan_width - (fan_mount_inset * 2)]);
  600. }
  601. }
  602. module e3d_v6_triple_fan() {
  603. difference() {
  604. union() {
  605. translate([x_carriage_width, (x_carriage_length - fan_width) / 2, -fan_width]) {
  606. // hotend cooling fan on right side
  607. %translate([fan_mount_wall, 0, 0])
  608. simple_fan();
  609. // hotend cooling fan on left side
  610. %translate([-x_carriage_width - fan_height - fan_mount_wall, 0, 0])
  611. simple_fan();
  612. // fan mount on right side
  613. color("orange")
  614. fan_mount();
  615. // fan mount on left side
  616. color("orange")
  617. translate([-x_carriage_width - fan_mount_wall, 0, 0])
  618. fan_mount();
  619. }
  620. // fan duct
  621. if (draw_e3d_fan_duct) {
  622. color("orange")
  623. translate([x_carriage_width, (x_carriage_length - fan_width) / 2, 0])
  624. difference() {
  625. fan_duct(fan_width, 0);
  626. fan_duct(fan_width, 3);
  627. }
  628. }
  629. }
  630. // mounting holes on carriage
  631. translate([-fan_mount_wall - fan_height - 1, x_carriage_length / 2, x_carriage_wall / 2])
  632. for (i = [-1 : 2 : 1]) {
  633. translate([0, i * ((fan_width / 2) - fan_mount_hole_inset), 0])
  634. rotate([0, 90, 0])
  635. cylinder(d = 3.2, h = x_carriage_width + (2 * (fan_height + fan_mount_wall + 1)));
  636. }
  637. // fan holes (self-tapping)
  638. translate([-fan_mount_wall - fan_height - 1, x_carriage_length / 2, -fan_width / 2])
  639. for (i = [-1 : 2 : 1]) {
  640. for (j = [-1 : 2 : 1]) {
  641. translate([0, i * ((fan_width / 2) - fan_hole_off), j * ((fan_width / 2) - fan_hole_off)])
  642. rotate([0, 90, 0])
  643. cylinder(d = 2.7, h = fan_height + fan_mount_wall + 5);
  644. translate([fan_height + fan_mount_wall + x_carriage_width - 3, i * ((fan_width / 2) - fan_hole_off), j * ((fan_width / 2) - fan_hole_off)])
  645. rotate([0, 90, 0])
  646. cylinder(d = 2.7, h = fan_height + fan_mount_wall + 5);
  647. }
  648. }
  649. }
  650. }
  651. module fan_duct(fan_width, diff) {
  652. size = fan_width - diff;
  653. off = (fan_width - size) / 2;
  654. difference() {
  655. translate([0, off, -size - off]) {
  656. hull() {
  657. cube([1 + (diff / 10), size, size]);
  658. translate([-10, 0, 10])
  659. cube([1, size, size - 11]);
  660. }
  661. hull() {
  662. translate([-10, 0, 10])
  663. cube([1, size, size - 11]);
  664. translate([-15, -6, 17])
  665. cube([1, size + 12, size - 18]);
  666. }
  667. hull() {
  668. translate([-15, -6, 17])
  669. cube([1, size + 12, size - 18]);
  670. translate([-25, -6, 17])
  671. cube([1, size + 12, size - 20]);
  672. }
  673. hull() {
  674. translate([-25, -6, 17])
  675. cube([1, size + 12, size - 20]);
  676. translate([-55, -6, 17])
  677. cube([1, size + 12, size - 20]);
  678. }
  679. hull() {
  680. translate([-55, -6, 17])
  681. cube([1, size + 12, size - 20]);
  682. translate([-70, 15 - 10, 17])
  683. cube([1, size - 12 + 10, size - 20]);
  684. }
  685. hull() {
  686. translate([-70, 15 - 10, 17])
  687. cube([1, size - 12 + 10, size - 20]);
  688. translate([-80 - (off / 10), 0, 0])
  689. cube([1 + (off / 10), size, size]);
  690. }
  691. }
  692. translate([-26, 29.5, -size - 20])
  693. cylinder(d = e3d_max_dia + 3 - diff, h = 100);
  694. translate([-26 - e3d_v6_dist_x, 29.5, -size - 20])
  695. cylinder(d = e3d_max_dia + 3 - diff, h = 100);
  696. translate([-26 - e3d_v6_dist_x / 2, 29.5 - e3d_v6_dist_y, -size - 20])
  697. cylinder(d = e3d_max_dia + 3 - diff, h = 100);
  698. }
  699. }
  700. if (print_x_carriage) {
  701. x_carriage(x_rail_dia, true, false, false, false, false, false);
  702. }
  703. if (print_x_carriage_clamps) {
  704. x_carriage(x_rail_dia, false, false, true, false, false, false);
  705. }
  706. if (print_e3d_mount) {
  707. x_carriage(x_rail_dia, false, true, false, false, false, false);
  708. }
  709. if (print_e3d_fans) {
  710. x_carriage(x_rail_dia, false, false, false, true, false, false);
  711. }
  712. if (print_fan_mount) {
  713. x_carriage(x_rail_dia, false, false, false, false, true, false);
  714. }
  715. if (print_sensor_mount) {
  716. x_carriage(x_rail_dia, false, false, false, false, false, true);
  717. }
  718. if (print_y_carriage_a || print_y_carriage_a_clamps) {
  719. y_carriage(x_rail_dia, y_rail_dia, idler_a_blue, idler_b_blue, print_y_carriage_a, print_y_carriage_a_clamps);
  720. }
  721. if (print_y_carriage_b || print_y_carriage_b_clamps) {
  722. y_carriage(x_rail_dia, y_rail_dia, idler_a_red, idler_b_red, print_y_carriage_b, print_y_carriage_b_clamps);
  723. }
  724. if (draw_y_carriage) {
  725. // x-rails
  726. for (i = [y_carriage_len_add : x_rail_dist : x_rail_dist + y_carriage_len_add]) {
  727. %translate([y_carriage_width + 1, i, 0])
  728. rotate([0, 90, 0])
  729. cylinder(d = x_rail_dia, h = draw_rail_len);
  730. }
  731. y_carriage(x_rail_dia, y_rail_dia, idler_a_blue, idler_b_blue);
  732. translate([(2 * y_carriage_width + y_carriage_block_width) + draw_rail_len -5, y_carriage_length, 0])
  733. rotate([0, 0, 180])
  734. y_carriage(x_rail_dia, y_rail_dia, idler_a_red, idler_b_red);
  735. if (draw_x_carriage) {
  736. translate([y_carriage_width + y_carriage_block_width + ((draw_rail_len - x_carriage_width - fan_height) / 2), y_carriage_len_add - x_carriage_len_add, 0])
  737. x_carriage(x_rail_dia);
  738. }
  739. } else if (draw_x_carriage) {
  740. x_carriage(x_rail_dia);
  741. }