My self designed awesome 3D printer
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

linear_bearing.scad 33KB

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