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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  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 = 5;
  63. fan_width = 40;
  64. fan_height = 20;
  65. fan_hole_off = 3; // TODO measure!
  66. draw_x_carriage = false;
  67. draw_y_carriage = false;
  68. draw_y_carriage_idlers = true;
  69. draw_rail_len = 200;
  70. module lm8uu() {
  71. $fn = 15;
  72. difference() {
  73. cylinder(d = lm8uu_outer, h = lm8uu_height);
  74. translate([0, 0, -1])
  75. cylinder(d = lm8uu_inner, h = lm8uu_height + 2);
  76. }
  77. }
  78. // TODO add cable tie canal for lm8uu mounting
  79. // TODO mounting holes on actual carriage
  80. // TODO also universal mounting holes
  81. // at front and back of carriage.
  82. // front: auto level sensor
  83. // back: filament fan
  84. // TODO get ready to actually print these
  85. module generate_spacer(pos) {
  86. color("green")
  87. translate([pos[0], pos[1], -0.5])
  88. bearing_spacer(pos[2] + 0.5 + ((idler_outer_height - bearing_height) / 2), 2, 1, true, 3);
  89. }
  90. module y_carriage(idler_a = [0, 0, 0], idler_b = [0, 0, 0]) {
  91. $fn = 20;
  92. // attaching to x-rails
  93. color("green")
  94. translate([y_carriage_width, 0, -y_carriage_block_height])
  95. difference() {
  96. cube([x_rail_mount_width, y_carriage_length, y_carriage_block_height + y_carriage_wall]);
  97. translate([0, -1, y_carriage_block_height])
  98. cube([x_rail_cutout_z, y_carriage_length + 2, y_carriage_wall + 1]);
  99. translate([0, -1, y_carriage_block_height - (x_rail_cutout_x / 2)])
  100. cube([y_carriage_block_width + 1, y_carriage_length + 2, x_rail_cutout_x]);
  101. translate([0, (y_carriage_length - x_rail_cutout_y) / 2, y_carriage_block_height])
  102. cube([y_carriage_block_width + 1, x_rail_cutout_y, y_carriage_wall + 1]);
  103. for (i = [y_carriage_len_add : x_rail_dist : x_rail_dist + y_carriage_len_add]) {
  104. translate([0, i, y_carriage_block_height])
  105. rotate([0, 90, 0])
  106. cylinder(d = lm8uu_inner + rail_mount_dia_add, h = y_carriage_block_width + 1);
  107. }
  108. for (i = [0 : x_rail_block_len + x_rail_cutout_y : x_rail_block_len + x_rail_cutout_y]) {
  109. translate([y_carriage_block_width / 2, x_rail_hole_off + i, -1]) {
  110. cylinder(d = 3.2, h = y_carriage_wall + 2 + y_carriage_block_height);
  111. cylinder(d = 6.1, h = 3.8, $fn = 6);
  112. translate([0, 0, y_carriage_wall + y_carriage_block_height - 2.5])
  113. cylinder(d = 6.1, h = 3.8);
  114. }
  115. translate([y_carriage_block_width / 2, x_rail_block_len - x_rail_hole_off + i, -1]) {
  116. cylinder(d = 3.2, h = y_carriage_wall + 2 + y_carriage_block_height);
  117. cylinder(d = 6.1, h = 3.8, $fn = 6);
  118. translate([0, 0, y_carriage_wall + y_carriage_block_height - 2.5])
  119. cylinder(d = 6.1, h = 3.8);
  120. }
  121. }
  122. }
  123. // attaching to y-rail
  124. color("green")
  125. difference() {
  126. union() {
  127. cube([y_carriage_width, y_carriage_length, y_carriage_wall]);
  128. translate([y_carriage_width - y_carriage_block_width, 0, -y_carriage_block_height])
  129. cube([y_carriage_block_width, y_carriage_length, y_carriage_block_height]);
  130. }
  131. translate([(lm8uu_outer + lm8uu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
  132. rotate([-90, 0, 0]) {
  133. translate([0, 0, -1])
  134. cylinder(d = lm8uu_inner + rail_dia_add, h = y_carriage_length + 2);
  135. translate([0, 0, y_carriage_rail_support - lm8uu_len_add / 2])
  136. cylinder(d = lm8uu_outer + lm8uu_dia_add, h = lm8uu_height + lm8uu_len_add);
  137. translate([0, 0, y_carriage_length - lm8uu_height - y_carriage_rail_support - lm8uu_len_add / 2])
  138. cylinder(d = lm8uu_outer + lm8uu_dia_add, h = lm8uu_height + lm8uu_len_add);
  139. }
  140. }
  141. color("magenta")
  142. translate([(lm8uu_outer + lm8uu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
  143. rotate([-90, 0, 0]) {
  144. // y-bearings
  145. %translate([0, 0, y_carriage_rail_support])
  146. lm8uu();
  147. %translate([0, 0, y_carriage_length - lm8uu_height - y_carriage_rail_support])
  148. lm8uu();
  149. }
  150. // idlers for the corexy belts
  151. translate([0, 0, y_carriage_wall]) {
  152. if (draw_y_carriage_idlers) {
  153. translate(idler_a)
  154. bearing_idler();
  155. translate(idler_b)
  156. bearing_idler();
  157. }
  158. generate_spacer(idler_a);
  159. generate_spacer(idler_b);
  160. }
  161. }
  162. module belt_fix() {
  163. difference() {
  164. color("green")
  165. cube([x_carriage_belt_block_width, x_carriage_block_length, x_carriage_block_height]);
  166. translate([x_carriage_belt_block_width / 2, -1, x_carriage_block_hole_off - 0.2])
  167. rotate([-90, 0, 0]) {
  168. cylinder(d = 3.2, h = x_carriage_belt_block_length + 2);
  169. cylinder(d = 6.1, h = 3.8, $fn = 6);
  170. }
  171. translate([x_carriage_belt_block_width / 2, -1, x_carriage_block_height - -x_carriage_block_hole_off - 9])
  172. rotate([-90, 0, 0]) {
  173. cylinder(d = 3.2, h = x_carriage_belt_block_length + 2);
  174. cylinder(d = 6.1, h = 3.8, $fn = 6);
  175. }
  176. }
  177. }
  178. module belt_mount(top, up) {
  179. $fn = 15;
  180. difference() {
  181. color("green")
  182. if (top) {
  183. cube([x_carriage_belt_block_width, x_carriage_belt_block_length, x_carriage_belt_block_height]);
  184. } else {
  185. cube([x_carriage_belt_block_width, x_carriage_belt_block_length, x_carriage_belt_block_height_b]);
  186. }
  187. if (top) {
  188. translate([-1, x_carriage_belt_block_length / 2, 16])
  189. rotate([0, 90, 0])
  190. cylinder(d = 2.6, h = x_carriage_belt_block_width + 2);
  191. translate([x_carriage_belt_block_width / 2, -1, 16 + x_carriage_block_hole_off])
  192. rotate([-90, 0, 0])
  193. cylinder(d = 3.2, h = x_carriage_belt_block_length + 2);
  194. translate([x_carriage_belt_block_width / 2, -1, 16 - x_carriage_block_hole_off])
  195. rotate([-90, 0, 0])
  196. cylinder(d = 3.2, h = x_carriage_belt_block_length + 2);
  197. } else {
  198. translate([-1, x_carriage_belt_block_length / 2, 9])
  199. rotate([0, 90, 0])
  200. cylinder(d = 2.7, h = x_carriage_belt_block_width + 2);
  201. translate([x_carriage_belt_block_width / 2, -1, 9 + x_carriage_block_hole_off])
  202. rotate([-90, 0, 0])
  203. cylinder(d = 3.2, h = x_carriage_belt_block_length + 2);
  204. translate([x_carriage_belt_block_width / 2, -1, 9 - x_carriage_block_hole_off])
  205. rotate([-90, 0, 0])
  206. cylinder(d = 3.2, h = x_carriage_belt_block_length + 2);
  207. }
  208. }
  209. if (up) {
  210. if (top) {
  211. translate([0, x_carriage_belt_block_length + x_carriage_block_off, x_carriage_belt_block_height - x_carriage_block_height])
  212. belt_fix();
  213. } else {
  214. translate([0, x_carriage_belt_block_length + x_carriage_block_off, x_carriage_belt_block_height_b - x_carriage_block_height])
  215. belt_fix();
  216. }
  217. } else {
  218. if (top) {
  219. translate([0, -x_carriage_block_length - x_carriage_block_off, x_carriage_belt_block_height - x_carriage_block_height])
  220. belt_fix();
  221. } else {
  222. translate([0, -x_carriage_block_length - x_carriage_block_off, x_carriage_belt_block_height_b - x_carriage_block_height])
  223. belt_fix();
  224. }
  225. }
  226. }
  227. module belt_mounts() {
  228. translate([0, x_carriage_belt_off, 0])
  229. belt_mount(false, true);
  230. translate([0, x_carriage_length - x_carriage_belt_off - x_carriage_belt_block_length, 0])
  231. belt_mount(true, false);
  232. translate([x_carriage_width - x_carriage_belt_block_width, x_carriage_belt_off, 0])
  233. belt_mount(true, true);
  234. translate([x_carriage_width - x_carriage_belt_block_width, x_carriage_length - x_carriage_belt_off - x_carriage_belt_block_length, 0])
  235. belt_mount(false, false);
  236. }
  237. module x_carriage() {
  238. $fn = 20;
  239. //color("green")
  240. difference() {
  241. union() {
  242. color("green")
  243. cube([x_carriage_width, x_rail_dist + (2 * x_carriage_len_add), x_carriage_wall]);
  244. translate([0, 0, x_carriage_wall])
  245. belt_mounts();
  246. }
  247. // big center cutout
  248. translate([x_carriage_width / 2, x_carriage_length / 2, x_carriage_wall / 2])
  249. cube([x_cutout_width, x_cutout_length, x_carriage_wall + 2], center=true);
  250. for (i = [0 : 1 : 1]) {
  251. translate([lm8uu_height + x_carriage_bearing_off + (i * (x_carriage_width - (2 * x_carriage_bearing_off) - lm8uu_height)), 0, ])
  252. rotate([0, -90, 0]) {
  253. // x-bearings
  254. color("magenta")
  255. %translate([0, x_carriage_len_add, 0])
  256. lm8uu();
  257. color("magenta")
  258. %translate([0, x_rail_dist + x_carriage_len_add, 0])
  259. lm8uu();
  260. color("green")
  261. translate([0, x_carriage_len_add, 0])
  262. cylinder(d = lm8uu_outer + lm8uu_dia_add, h = lm8uu_height + lm8uu_len_add);
  263. color("green")
  264. translate([0, x_rail_dist + x_carriage_len_add, 0])
  265. cylinder(d = lm8uu_outer + lm8uu_dia_add, h = lm8uu_height + lm8uu_len_add);
  266. color("green")
  267. translate([0, x_carriage_len_add, -x_carriage_width])
  268. cylinder(d = lm8uu_inner + rail_dia_add, h = x_carriage_width * 2);
  269. color("green")
  270. translate([0, x_rail_dist + x_carriage_len_add, -x_carriage_width])
  271. cylinder(d = lm8uu_inner + rail_dia_add, h = x_carriage_width * 2);
  272. }
  273. }
  274. /* mounting for hotend / tool */
  275. // left mounting screw
  276. translate([5.5, x_carriage_length / 2, -1])
  277. cylinder(d = e3d_hole_dia, h = x_carriage_wall + 12);
  278. // right mounting screw
  279. translate([x_carriage_width - 5.5, x_carriage_length / 2, -1])
  280. cylinder(d = e3d_hole_dia, h = x_carriage_wall + 12);
  281. // bottom mounting screw
  282. translate([x_carriage_width / 2, 19, -1])
  283. cylinder(d = e3d_hole_dia, h = x_carriage_wall + 12);
  284. // top mounting screw
  285. translate([x_carriage_width / 2, x_carriage_length - 19, -1])
  286. cylinder(d = e3d_hole_dia, h = x_carriage_wall + 12);
  287. }
  288. e3d_v6_triple_mount();
  289. }
  290. module e3d_v6_triple_mount() {
  291. translate([x_carriage_width / 2, x_carriage_length / 2, -e3d_v6_height + x_carriage_wall + e3d_v6_z_off]) {
  292. color("red")
  293. %translate([-e3d_v6_dist_x / 2, e3d_v6_dist_y / 2, 0])
  294. e3d_v6();
  295. color("yellow")
  296. %translate([e3d_v6_dist_x / 2, e3d_v6_dist_y / 2, 0])
  297. e3d_v6();
  298. color("blue")
  299. %translate([0, (e3d_v6_dist_y / 2) - e3d_v6_dist_y, 0])
  300. rotate([0, 0, 180])
  301. e3d_v6();
  302. }
  303. echo(m3_screw_len=e3d_clamp_length + (2 * e3d_clamp_b_length));
  304. // hotend clamp center piece
  305. translate([(x_carriage_width - e3d_clamp_width) / 2, (x_carriage_length - e3d_clamp_length) / 2, x_carriage_wall])
  306. difference() {
  307. union() {
  308. // center clamp part
  309. color("magenta")
  310. translate([-e3d_clamp_width_add, e3d_clamp_cut, 0])
  311. cube([e3d_clamp_width + (2 * e3d_clamp_width_add), e3d_clamp_length - (2 * e3d_clamp_cut), e3d_clamp_height]);
  312. // blue clamp
  313. color("cyan")
  314. translate([0, -e3d_clamp_b_length, 0])
  315. cube([e3d_clamp_width, e3d_clamp_b_length - e3d_clamp_cut, e3d_clamp_height]);
  316. // red & yellow clamp
  317. color("cyan")
  318. translate([0, e3d_clamp_length + e3d_clamp_cut, 0])
  319. cube([e3d_clamp_width, e3d_clamp_b_length - e3d_clamp_cut, e3d_clamp_height]);
  320. }
  321. // cable holes
  322. translate([9.5, 6, -1])
  323. cylinder(d = 7, h = e3d_clamp_height + 2);
  324. translate([e3d_clamp_width - 9.5, 6, -1])
  325. cylinder(d = 7, h = e3d_clamp_height + 2);
  326. // left clamping screw
  327. translate([e3d_clamp_hole_off, -e3d_clamp_b_length - 1, e3d_clamp_height / 2])
  328. rotate([-90, 0, 0])
  329. cylinder(d = e3d_hole_dia, h = x_cutout_width + 2);
  330. // right clamping screw
  331. translate([x_cutout_width - e3d_clamp_hole_off, -e3d_clamp_b_length - 1, e3d_clamp_height / 2])
  332. rotate([-90, 0, 0])
  333. cylinder(d = e3d_hole_dia, h = x_cutout_width + 2);
  334. // left mounting screw
  335. translate([-5, e3d_clamp_length / 2, -1])
  336. cylinder(d = e3d_hole_dia, h = e3d_clamp_height + 2);
  337. // right mounting screw
  338. translate([e3d_clamp_width + e3d_clamp_width_add - 5, e3d_clamp_length / 2, -1])
  339. cylinder(d = e3d_hole_dia, h = e3d_clamp_height + 2);
  340. // bottom mounting screw
  341. translate([e3d_clamp_width / 2, -e3d_clamp_b_length + 3.5, -1])
  342. cylinder(d = e3d_hole_dia, h = e3d_clamp_height + 2);
  343. // top mounting screw
  344. translate([e3d_clamp_width / 2, e3d_clamp_length + e3d_clamp_b_length - 3.5, -1])
  345. cylinder(d = e3d_hole_dia, h = e3d_clamp_height + 2);
  346. // red e3d clamp cutout
  347. translate([(e3d_clamp_width - e3d_v6_dist_x) / 2, e3d_clamp_length, -1])
  348. cylinder(d = e3d_upper_small_dia + e3d_clamp_dia_add, h = e3d_clamp_height + 2);
  349. // yellow e3d clamp cutout
  350. translate([(e3d_clamp_width + e3d_v6_dist_x) / 2, e3d_clamp_length, -1])
  351. cylinder(d = e3d_upper_small_dia + e3d_clamp_dia_add, h = e3d_clamp_height + 2);
  352. // blue e3d clamp cutout
  353. translate([e3d_clamp_width / 2, 0, -1])
  354. cylinder(d = e3d_upper_small_dia + e3d_clamp_dia_add, h = e3d_clamp_height + 2);
  355. }
  356. e3d_v6_triple_fan();
  357. }
  358. module simple_fan() {
  359. difference() {
  360. cube([fan_height, fan_width, fan_width]);
  361. translate([-1, fan_width / 2, fan_width / 2])
  362. rotate([0, 90, 0])
  363. cylinder(d = fan_width - 5, h = fan_height + 2);
  364. }
  365. }
  366. module fan_mount() {
  367. difference() {
  368. cube([fan_mount_wall, fan_width, fan_width + x_carriage_wall]);
  369. translate([-1, fan_mount_inset, fan_mount_inset])
  370. cube([fan_mount_wall + 2, fan_width - (fan_mount_inset * 2), fan_width - (fan_mount_inset * 2)]);
  371. }
  372. }
  373. module e3d_v6_triple_fan() {
  374. difference() {
  375. union() {
  376. translate([x_carriage_width, (x_carriage_length - fan_width) / 2, -fan_width]) {
  377. // hotend cooling fan on right side
  378. %translate([fan_mount_wall, 0, 0])
  379. simple_fan();
  380. // hotend cooling fan on left side
  381. %translate([-x_carriage_width - fan_height - fan_mount_wall, 0, 0])
  382. simple_fan();
  383. // fan mount on right side
  384. color("orange")
  385. fan_mount();
  386. // fan mount on left side
  387. color("orange")
  388. translate([-x_carriage_width - fan_mount_wall, 0, 0])
  389. fan_mount();
  390. }
  391. // fan duct
  392. color("orange")
  393. translate([x_carriage_width, (x_carriage_length - fan_width) / 2, 0])
  394. difference() {
  395. fan_duct(fan_width, 0);
  396. fan_duct(fan_width, 3);
  397. }
  398. }
  399. // mounting holes on carriage
  400. translate([-fan_mount_wall - fan_height - 1, x_carriage_length / 2, x_carriage_wall / 2])
  401. for (i = [-1 : 2 : 1]) {
  402. translate([0, i * ((fan_width / 2) - 8), 0])
  403. rotate([0, 90, 0])
  404. cylinder(d = 3.2, h = x_carriage_width + (2 * (fan_height + fan_mount_wall + 1)));
  405. }
  406. // fan holes (self-tapping)
  407. translate([-fan_mount_wall - fan_height - 1, x_carriage_length / 2, -fan_width / 2])
  408. for (i = [-1 : 2 : 1]) {
  409. for (j = [-1 : 2 : 1]) {
  410. translate([0, i * ((fan_width / 2) - fan_hole_off), j * ((fan_width / 2) - fan_hole_off)])
  411. rotate([0, 90, 0])
  412. cylinder(d = 2.7, h = fan_height + fan_mount_wall + 5);
  413. translate([fan_height + fan_mount_wall + x_carriage_width - 3, i * ((fan_width / 2) - fan_hole_off), j * ((fan_width / 2) - fan_hole_off)])
  414. rotate([0, 90, 0])
  415. cylinder(d = 2.7, h = fan_height + fan_mount_wall + 5);
  416. }
  417. }
  418. }
  419. }
  420. module fan_duct(fan_width, diff) {
  421. size = fan_width - diff;
  422. off = (fan_width - size) / 2;
  423. difference() {
  424. translate([0, off, -size - off]) {
  425. hull() {
  426. cube([1 + (diff / 10), size, size]);
  427. translate([-10, 0, 10])
  428. cube([1, size, size - 11]);
  429. }
  430. hull() {
  431. translate([-10, 0, 10])
  432. cube([1, size, size - 11]);
  433. translate([-15, -6, 17])
  434. cube([1, size + 12, size - 18]);
  435. }
  436. hull() {
  437. translate([-15, -6, 17])
  438. cube([1, size + 12, size - 18]);
  439. translate([-25, -6, 17])
  440. cube([1, size + 12, size - 20]);
  441. }
  442. hull() {
  443. translate([-25, -6, 17])
  444. cube([1, size + 12, size - 20]);
  445. translate([-55, -6, 17])
  446. cube([1, size + 12, size - 20]);
  447. }
  448. hull() {
  449. translate([-55, -6, 17])
  450. cube([1, size + 12, size - 20]);
  451. translate([-70, 15 - 10, 17])
  452. cube([1, size - 12 + 10, size - 20]);
  453. }
  454. hull() {
  455. translate([-70, 15 - 10, 17])
  456. cube([1, size - 12 + 10, size - 20]);
  457. translate([-80 - (off / 10), 0, 0])
  458. cube([1 + (off / 10), size, size]);
  459. }
  460. }
  461. translate([-26, 29.5, -size - 20])
  462. cylinder(d = e3d_max_dia + 3 - diff, h = 100);
  463. translate([-26 - e3d_v6_dist_x, 29.5, -size - 20])
  464. cylinder(d = e3d_max_dia + 3 - diff, h = 100);
  465. translate([-26 - e3d_v6_dist_x / 2, 29.5 - e3d_v6_dist_y, -size - 20])
  466. cylinder(d = e3d_max_dia + 3 - diff, h = 100);
  467. }
  468. }
  469. if (draw_y_carriage) {
  470. translate([(lm8uu_outer + lm8uu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
  471. rotate([-90, 0, 0]) {
  472. // y-bearings
  473. %translate([0, 0, y_carriage_rail_support])
  474. lm8uu();
  475. %translate([0, 0, y_carriage_length - lm8uu_height - y_carriage_rail_support])
  476. lm8uu();
  477. }
  478. // x-rails
  479. for (i = [y_carriage_len_add : x_rail_dist : x_rail_dist + y_carriage_len_add]) {
  480. %translate([y_carriage_width + 1, i, 0])
  481. rotate([0, 90, 0])
  482. cylinder(d = lm8uu_inner, h = draw_rail_len);
  483. }
  484. y_carriage(idler_a_blue, idler_b_blue);
  485. translate([(2 * y_carriage_width + y_carriage_block_width) + draw_rail_len -5, y_carriage_length, 0])
  486. rotate([0, 0, 180])
  487. y_carriage(idler_a_red, idler_b_red);
  488. if (draw_x_carriage) {
  489. translate([y_carriage_width + y_carriage_block_width + ((draw_rail_len - x_carriage_width) / 2), y_carriage_len_add - x_carriage_len_add, 0])
  490. x_carriage();
  491. }
  492. } else if (draw_x_carriage) {
  493. x_carriage();
  494. }