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 33KB

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