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.

linear_bearing.scad 28KB

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