My self designed awesome 3D printer
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

bearing_idler.scad 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. // #######################################################
  2. // ######################## Idler ########################
  3. // #######################################################
  4. // 624 bearing: 13x4x5
  5. bearing_outer = 13;
  6. bearing_inner = 4;
  7. bearing_height = 5;
  8. idler_outer_height = 7;
  9. idler_dia = 15;
  10. idler_ramp_dia = 16;
  11. belt_height = 6;
  12. dia_off = 0.1;
  13. ramp_step_size = 0.05;
  14. idler_dist = 0.1;
  15. spacer_size_add = 2;
  16. bearing_height_diff = belt_height - bearing_height;
  17. idler_ramp_add = (idler_outer_height - belt_height) / 2;
  18. spacer_height = idler_outer_height - bearing_height + idler_dist;
  19. bearing_spacer_height = (spacer_height - (idler_outer_height - bearing_height) / 2) * 2 + (idler_outer_height) * 2 + idler_dist;
  20. module bearing_624() {
  21. $fn = 15;
  22. difference() {
  23. cylinder(d = bearing_outer, h = bearing_height);
  24. translate([0, 0, -1])
  25. cylinder(d = 4, h = bearing_height + 2);
  26. translate([0, 0, bearing_height - 0.5])
  27. difference() {
  28. cylinder(d = bearing_outer - 2, h = 2);
  29. cylinder(d = bearing_inner + 2, h = 2);
  30. }
  31. translate([0, 0, -1.5])
  32. difference() {
  33. cylinder(d = bearing_outer - 2, h = 2);
  34. cylinder(d = bearing_inner + 2, h = 2);
  35. }
  36. }
  37. }
  38. module bearing_idler() {
  39. $fn = 30;
  40. translate([0, 0, idler_ramp_add]) {
  41. %translate([0, 0, bearing_height_diff / 2])
  42. bearing_624();
  43. color("yellow")
  44. difference() {
  45. cylinder(d = idler_dia, h = belt_height);
  46. translate([0, 0, -1])
  47. cylinder(d = bearing_outer + dia_off, h = belt_height + 2);
  48. }
  49. color("yellow")
  50. for (i = [ramp_step_size : ramp_step_size : idler_ramp_add]) {
  51. difference() {
  52. union() {
  53. translate([0, 0, belt_height + i - ramp_step_size])
  54. cylinder(d = idler_dia + (i * 4 * (idler_ramp_dia - idler_dia)), h = ramp_step_size);
  55. translate([0, 0, ramp_step_size - i])
  56. cylinder(d = idler_dia + (i * 4 * (idler_ramp_dia - idler_dia)), h = ramp_step_size);
  57. }
  58. translate([0, 0, -1])
  59. cylinder(d = bearing_outer + dia_off, h = belt_height + 2);
  60. }
  61. }
  62. }
  63. }
  64. module bearing_spacer(h = spacer_height, add_dia = 0, remove_dia = 0, enclose = false, enclose_size_add = 0) {
  65. $fn = 30;
  66. siz = bearing_inner + spacer_size_add + add_dia;
  67. difference() {
  68. hull() {
  69. if (enclose) {
  70. translate([-siz / 2, -(siz + enclose_size_add) / 2, 0])
  71. cube([siz, siz + enclose_size_add, 1]);
  72. }
  73. cylinder(d = siz, h = h);
  74. }
  75. translate([0, 0, -1])
  76. cylinder(d = bearing_inner + dia_off - remove_dia, h = h + 2);
  77. }
  78. }
  79. module bearing_spacer_assembly(only_outer, top) {
  80. translate([0, 0, spacer_height - (idler_outer_height - bearing_height) / 2]) {
  81. if ((!only_outer) || top) {
  82. color("magenta")
  83. translate([0, 0, -spacer_height + (idler_outer_height - bearing_height) / 2])
  84. bearing_spacer();
  85. }
  86. if (!only_outer) {
  87. bearing_idler();
  88. color("magenta")
  89. translate([0, 0, idler_outer_height - (idler_outer_height - bearing_height) / 2])
  90. bearing_spacer();
  91. translate([0, 0, (2 * idler_outer_height) + idler_dist])
  92. rotate([0, 180, 0])
  93. bearing_idler();
  94. }
  95. if ((!only_outer) || (!top)) {
  96. color("magenta")
  97. translate([0, 0, (2 * idler_outer_height) + idler_dist - (idler_outer_height - bearing_height) / 2])
  98. bearing_spacer();
  99. }
  100. }
  101. //echo(bearings_spacers_height=bearing_spacer_height);
  102. }
  103. bearing_mount_wall = 8;
  104. bearing_mount_width = 15;
  105. idler_distance = 3;
  106. idler_off_z = 0.5;
  107. module slot_mount_bracket(slot, preview) {
  108. $fn = 15;
  109. color("green")
  110. translate([0, 0, slot])
  111. difference() {
  112. cube([slot, bearing_mount_width, bearing_mount_wall]);
  113. translate([slot / 2, bearing_mount_width / 2, -1])
  114. cylinder(d = 4.2, h = bearing_mount_wall + 2);
  115. }
  116. color("green")
  117. translate([slot, 0, 0])
  118. difference() {
  119. cube([bearing_mount_wall, bearing_mount_width, slot + bearing_mount_wall]);
  120. translate([-1, bearing_mount_width / 2, slot / 2])
  121. rotate([0, 90, 0])
  122. cylinder(d = 4.2, h = bearing_mount_wall + 2);
  123. }
  124. difference() {
  125. bearing_appendage(slot, preview);
  126. translate([slot + bearing_mount_wall + idler_ramp_dia / 2 + idler_distance, bearing_mount_width / 2, -5])
  127. cylinder(d = 4.2, h = slot + (2 * bearing_mount_wall) + 2);
  128. }
  129. }
  130. module bearing_appendage(slot, preview) {
  131. color("green")
  132. translate([slot + bearing_mount_wall, 0, slot])
  133. hull() {
  134. cube([1, bearing_mount_width, bearing_mount_wall]);
  135. translate([idler_ramp_dia / 2 + idler_distance, bearing_mount_width / 2, 0])
  136. cylinder(d = bearing_inner + spacer_size_add, h = bearing_mount_wall);
  137. }
  138. translate([slot + bearing_mount_wall + idler_ramp_dia / 2 + idler_distance, bearing_mount_width / 2, slot - bearing_spacer_height + idler_off_z]) {
  139. bearing_spacer_assembly(true, false);
  140. bearing_spacer_assembly(true, true);
  141. if (preview) {
  142. bearing_spacer_assembly(false);
  143. }
  144. }
  145. color("green")
  146. translate([slot + bearing_mount_wall, 0, 0]) {
  147. hull() {
  148. cube([1, bearing_mount_width, bearing_mount_wall]);
  149. translate([idler_ramp_dia / 2 + idler_distance, bearing_mount_width / 2, 0])
  150. cylinder(d = bearing_inner + spacer_size_add, h = bearing_mount_wall);
  151. }
  152. translate([idler_ramp_dia / 2 + idler_distance, bearing_mount_width / 2, bearing_mount_wall])
  153. cylinder(d = bearing_inner + spacer_size_add, h = 7);
  154. }
  155. }
  156. //bearing_idler();
  157. //slot_mount_bracket(30, true);