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.

rail_mount.scad 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // #######################################################
  2. // ###################### Mechanics ######################
  3. // #######################################################
  4. rail_mount_wall = 5;
  5. rail_mount_len = 10;
  6. rail_mount_block = 22;
  7. rail_dia = 8;
  8. rail_y_off_1 = 10;
  9. cutout_width = 0.5;
  10. rail_mount_height = rail_y_off_1 + 6;
  11. draw_rail_mount = false;
  12. // #######################################################
  13. if (draw_rail_mount) rail_mount(30, 20);
  14. module rail_mount(slot, rail_mount_len = rail_mount_len) {
  15. $fn = 20;
  16. echo(rail_mount_len=rail_mount_len);
  17. difference() {
  18. union() {
  19. // main body
  20. cube([rail_mount_wall, rail_mount_len, 2 * slot]);
  21. // rail clamp
  22. translate([rail_mount_wall, 0, ((2 * slot) - rail_mount_block ) / 2])
  23. cube([rail_mount_height, rail_mount_len, rail_mount_block]);
  24. }
  25. // M4 slot mounting holes
  26. translate([-1, rail_mount_len / 2, slot / 2])
  27. rotate([0, 90, 0])
  28. cylinder(d = 4.2, h = rail_mount_wall + 2);
  29. translate([-1, rail_mount_len / 2, slot * 3 / 2])
  30. rotate([0, 90, 0])
  31. cylinder(d = 4.2, h = rail_mount_wall + 2);
  32. translate([rail_dia / 2 + rail_y_off_1, -1, slot])
  33. rotate([-90, 0, 0])
  34. cylinder(d = rail_dia + 0.1, h = rail_mount_len + 2);
  35. // clamping cutout
  36. translate([rail_y_off_1 + (rail_dia - cutout_width) / 2, -1, ((2 * slot) - (rail_mount_block + 2)) / 2])
  37. cube([cutout_width, rail_mount_len + 2, rail_mount_block + 2]);
  38. translate([-1, rail_mount_len / 2, slot + rail_mount_block / 3])
  39. rotate([0, 90, 0]) {
  40. cylinder(d = 3.2, h = rail_mount_height + rail_mount_wall + 2);
  41. cylinder(d = 6.1, h = 3.8, $fn = 6);
  42. translate([0, 0, rail_mount_height + rail_mount_wall -2.5])
  43. cylinder(d = 6.1, h = 3.8);
  44. }
  45. translate([-1, rail_mount_len / 2, slot - rail_mount_block / 3])
  46. rotate([0, 90, 0]) {
  47. cylinder(d = 3.2, h = rail_mount_height + rail_mount_wall + 2);
  48. cylinder(d = 6.1, h = 3.8, $fn = 6);
  49. translate([0, 0, rail_mount_height + rail_mount_wall -2.5])
  50. cylinder(d = 6.1, h = 3.8);
  51. }
  52. translate([-10, -10, -22])
  53. cube([30, rail_mount_len + 20, 30]);
  54. translate([-10, -10, 2 * slot - 8])
  55. cube([30, rail_mount_len + 20, 30]);
  56. }
  57. }