My self-made 3D-printable designs, mainly in OpenSCAD
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Z-Fan.scad 7.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. /*
  2. * Created by:
  3. * Thomas Buck <xythobuz@xythobuz.de> in April 2016
  4. *
  5. * Licensed under the Creative Commons - Attribution license.
  6. */
  7. // -----------------------------------------------------------
  8. base_width = 33;
  9. base_height = 33;
  10. base_depth = 2;
  11. cutout_width = 16;
  12. cutout_height = 25;
  13. hole_dist_left = 3.6;
  14. hole_dist_right = 3.6;
  15. hole_dist_top = 7;
  16. hole_dist_bottom = 10;
  17. hole_size = 3;
  18. fan_width = 26;
  19. fan_diameter = 24;
  20. fan_hole = 2.8;
  21. fan_hole_dist = 2.5;
  22. fan_angle = 10;
  23. fan_x = -2;
  24. fan_y = 0;
  25. fan_z = 6;
  26. first_wall = 3;
  27. wall_size = 1.4;
  28. angled_wall_size = 0.8;
  29. rotation_add_x = -0.4;
  30. rotation_add_z = 4.55;
  31. mirror_dist_y = 6.6;
  32. $fn = 25;
  33. // -----------------------------------------------------------
  34. module base() {
  35. difference() {
  36. cube([base_width, base_height, base_depth]);
  37. translate([(base_width - cutout_width) / 2, (base_height - cutout_height) / 2, -1])
  38. cube([cutout_width, cutout_height, base_depth + 2]);
  39. translate([hole_dist_left, hole_dist_bottom, -1])
  40. cylinder(d = hole_size, h = base_depth + 2);
  41. translate([hole_dist_left, base_height - hole_dist_top, -1])
  42. cylinder(d = hole_size, h = base_depth + 2);
  43. translate([base_width - hole_dist_right, hole_dist_bottom, -1])
  44. cylinder(d = hole_size, h = base_depth + 2);
  45. translate([base_width - hole_dist_right, base_height - hole_dist_top, -1])
  46. cylinder(d = hole_size, h = base_depth + 2);
  47. }
  48. }
  49. module rim() {
  50. translate([-wall_size, 0, 0])
  51. cube([wall_size, cutout_height, first_wall]);
  52. translate([-wall_size, -wall_size, 0])
  53. cube([cutout_width + (2 * wall_size), wall_size, first_wall]);
  54. translate([cutout_width, 0, 0])
  55. cube([wall_size, cutout_height, first_wall]);
  56. translate([-wall_size, cutout_height, 0])
  57. cube([cutout_width + (2 * wall_size), wall_size, first_wall]);
  58. }
  59. module angled() {
  60. polyhedron(points = [
  61. // 0: down, top left
  62. [(base_width - cutout_width) / 2 - wall_size, (base_height - cutout_height) / 2, base_depth + first_wall],
  63. // 1: down, top right
  64. [(base_width - cutout_width) / 2 + cutout_width + wall_size, (base_height - cutout_height) / 2, base_depth + first_wall],
  65. // 2: down, bottom right
  66. [(base_width - cutout_width) / 2 + cutout_width + wall_size, (base_height - cutout_height) / 2 - wall_size, base_depth + first_wall],
  67. // 3: down, bottom left
  68. [(base_width - cutout_width) / 2 - wall_size, (base_height - cutout_height) / 2 - wall_size, base_depth + first_wall],
  69. // 4: up, top left
  70. [(base_width - fan_width) / 2 + fan_x, (base_height - fan_width) / 2 + fan_y + angled_wall_size, base_depth + fan_z],
  71. // 5: up, top right
  72. [(base_width - fan_width) / 2 + fan_x + fan_width + rotation_add_x, (base_height - fan_width) / 2 + fan_y + angled_wall_size, base_depth + fan_z + rotation_add_z],
  73. // 6: up, bottom right
  74. [(base_width - fan_width) / 2 + fan_x + fan_width + rotation_add_x, (base_height - fan_width) / 2 + fan_y, base_depth + fan_z + rotation_add_z],
  75. // 7: up, bottom left
  76. [(base_width - fan_width) / 2 + fan_x, (base_height - fan_width) / 2 + fan_y, base_depth + fan_z]
  77. ], faces = [
  78. [0, 1, 2, 3], // bottom
  79. [4, 5, 1, 0], // back
  80. [7, 6, 5, 4], // top
  81. [5, 6, 2, 1], // right
  82. [6, 7, 3, 2], // front
  83. [7, 4, 0, 3] // left
  84. ]);
  85. }
  86. module fan_mount() {
  87. difference() {
  88. cube([fan_width, fan_width, base_depth]);
  89. translate([fan_width / 2, fan_width / 2, -1])
  90. cylinder(d = fan_diameter, h = base_depth + 2);
  91. translate([fan_hole_dist, fan_hole_dist, -1])
  92. cylinder(d = fan_hole, h = base_depth + 2);
  93. translate([fan_width - fan_hole_dist, fan_hole_dist, -1])
  94. cylinder(d = fan_hole, h = base_depth + 2);
  95. translate([fan_hole_dist, fan_width - fan_hole_dist, -1])
  96. cylinder(d = fan_hole, h = base_depth + 2);
  97. translate([fan_width - fan_hole_dist, fan_width - fan_hole_dist, -1])
  98. cylinder(d = fan_hole, h = base_depth + 2);
  99. }
  100. }
  101. base();
  102. translate([(base_width - cutout_width) / 2, (base_height - cutout_height) / 2, base_depth])
  103. rim();
  104. angled();
  105. translate([0, cutout_height + wall_size + mirror_dist_y, 0])
  106. mirror([0, 1, 0])
  107. angled();
  108. polyhedron(points = [
  109. // 0: down, top left
  110. [(base_width - cutout_width) / 2, (base_height - cutout_height) / 2 + cutout_height, base_depth + first_wall],
  111. // 1: down, top right
  112. [(base_width - cutout_width) / 2, (base_height - cutout_height) / 2 - wall_size, base_depth + first_wall],
  113. // 2: down, bottom right
  114. [(base_width - cutout_width) / 2 - wall_size, (base_height - cutout_height) / 2 - wall_size, base_depth + first_wall],
  115. // 3: down, bottom left
  116. [(base_width - cutout_width) / 2 - wall_size, (base_height - cutout_height) / 2 + cutout_height, base_depth + first_wall],
  117. // 4: up, top left
  118. [(base_width - fan_width) / 2 + fan_x + angled_wall_size, (base_height - fan_width) / 2 + fan_y + fan_width, base_depth + fan_z],
  119. // 5: up, top right
  120. [(base_width - fan_width) / 2 + fan_x + angled_wall_size, (base_height - fan_width) / 2 + fan_y, base_depth + fan_z],
  121. // 6: up, bottom right
  122. [(base_width - fan_width) / 2 + fan_x, (base_height - fan_width) / 2 + fan_y, base_depth + fan_z],
  123. // 7: up, bottom left
  124. [(base_width - fan_width) / 2 + fan_x, (base_height - fan_width) / 2 + fan_y + fan_width, base_depth + fan_z]
  125. ], faces = [
  126. [0, 1, 2, 3], // bottom
  127. [4, 5, 1, 0], // back
  128. [7, 6, 5, 4], // top
  129. [5, 6, 2, 1], // right
  130. [6, 7, 3, 2], // front
  131. [7, 4, 0, 3] // left
  132. ]);
  133. polyhedron(points = [
  134. // 0: down, top left
  135. [(base_width - cutout_width) / 2 + cutout_width, (base_height - cutout_height) / 2 - wall_size, base_depth + first_wall],
  136. // 1: down, top right
  137. [(base_width - cutout_width) / 2 + cutout_width, (base_height - cutout_height) / 2 + cutout_height, base_depth + first_wall],
  138. // 2: down, bottom right
  139. [(base_width - cutout_width) / 2 + cutout_width + wall_size, (base_height - cutout_height) / 2 + cutout_height, base_depth + first_wall],
  140. // 3: down, bottom left
  141. [(base_width - cutout_width) / 2 + cutout_width + wall_size, (base_height - cutout_height) / 2 - wall_size, base_depth + first_wall],
  142. // 4: up, top left
  143. [(base_width - fan_width) / 2 + fan_x + fan_width + rotation_add_x - angled_wall_size, (base_height - fan_width) / 2 + fan_y, base_depth + fan_z + rotation_add_z],
  144. // 5: up, top right
  145. [(base_width - fan_width) / 2 + fan_x + fan_width + rotation_add_x - angled_wall_size, (base_height - fan_width + wall_size) / 2 + fan_y + cutout_height, base_depth + fan_z + rotation_add_z],
  146. // 6: up, bottom right
  147. [(base_width - fan_width) / 2 + fan_x + fan_width + rotation_add_x, (base_height - fan_width + wall_size) / 2 + fan_y + cutout_height, base_depth + fan_z + rotation_add_z],
  148. // 7: up, bottom left
  149. [(base_width - fan_width) / 2 + fan_x + fan_width + rotation_add_x, (base_height - fan_width) / 2 + fan_y, base_depth + fan_z + rotation_add_z]
  150. ], faces = [
  151. [0, 1, 2, 3], // bottom
  152. [4, 5, 1, 0], // back
  153. [7, 6, 5, 4], // top
  154. [5, 6, 2, 1], // right
  155. [6, 7, 3, 2], // front
  156. [7, 4, 0, 3] // left
  157. ]);
  158. translate([(base_width - fan_width) / 2 + fan_x, (base_height - fan_width) / 2 + fan_y, base_depth + fan_z])
  159. rotate([0, -fan_angle, 0])
  160. fan_mount();