SolderFan.scad 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. $fn=60;
  2. // fan itself
  3. fanLen = 180;
  4. fanDepth = 35;
  5. fanRoundingRad = 10;
  6. // outer printed rim around fan
  7. rimLen = 20;
  8. rimDepth = fanDepth + 5;
  9. rimRoundingRad = 3;
  10. // banana plug
  11. bananaHeadLen = 21.1;
  12. bananaHeadDia = 10.3;
  13. bananaRodLen=20;
  14. bananaRodDia=5;
  15. bananaNutLen=4.1;
  16. bananaNutDia=9.2;
  17. bananaNutSidelen = bananaNutDia/2.0;
  18. //@see https://www.redcrab-software.com/de/Rechner/Hexagon
  19. bananaNutInsideDia = (sqrt(3) * bananaNutSidelen);
  20. // cut out channel
  21. cutoutGap=5;
  22. // grid cut out on back
  23. gridSideLen=30;
  24. gridGap=2;
  25. gridSize=30;
  26. /////////////////////////////////////////////////////////////////////////
  27. // Main
  28. /////////////////////////////////////////////////////////////////////////
  29. difference()
  30. {
  31. // outer enclosure:
  32. makeEnclosure();
  33. // banana plugs:
  34. translate([rimLen+fanLen/2-bananaHeadDia,rimDepth+5,rimLen/2])
  35. color("red") makeBananaPlug();
  36. translate([rimLen+fanLen/2+bananaHeadDia,rimDepth+5,rimLen/2])
  37. color("black") makeBananaPlug();
  38. // cut out channel for banana plug
  39. translate([rimLen+fanLen/2-bananaHeadDia,rimDepth-bananaHeadLen,rimLen/2])
  40. makeBananaCutOut();
  41. translate([rimLen+fanLen/2+bananaHeadDia,rimDepth-bananaHeadLen,rimLen/2])
  42. makeBananaCutOut();
  43. // cut out channel for cable
  44. translate([fanLen/2+rimLen-bananaHeadDia-bananaNutInsideDia/2,rimDepth-bananaHeadLen-(bananaRodLen-cutoutGap),rimLen/2+bananaNutDia/2])
  45. makeCableCutOut();
  46. // cut out grid on backside
  47. translate([0.05,rimDepth-gridSideLen+1,0.05])
  48. makeGridCutOut();
  49. // cut out label: - 12V +
  50. makeLabels();
  51. }
  52. /////////////////////////////////////////////////////////////////////////
  53. // Modules
  54. /////////////////////////////////////////////////////////////////////////
  55. module makeLabels()
  56. {
  57. translate([fanLen/2+rimLen,rimDepth-2, 8])
  58. rotate([90,0,180]) linear_extrude(height=3)
  59. text("- 12 +", size = 4, halign="center", font="Andale Mono");
  60. }
  61. /////////////////////////////////////////////////////////////////////////
  62. module makeGridCutOut()
  63. {
  64. intersection()
  65. {
  66. scale([0.999,0.999,0.999]) makeFan();
  67. translate([-(gridSize*(gridSideLen+gridGap)/2)+3,0,-3]) rotate([0,45,0])
  68. makeGrid(gridSideLen,gridSideLen,gridGap, gridSize) {cube(gridSideLen);};
  69. }
  70. }
  71. /////////////////////////////////////////////////////////////////////////
  72. module makeGrid(objectLen, objectHeight, spacing, gridSize)
  73. {
  74. for( a = [0 : gridSize-1])
  75. {
  76. translate([a*objectLen+a*spacing, 0, 0])
  77. for( a = [0 : gridSize-1])
  78. {
  79. translate([0, 0, a*objectHeight+a*spacing])
  80. children(0);
  81. }
  82. }
  83. }
  84. /////////////////////////////////////////////////////////////////////////
  85. module makeCableCutOut()
  86. {
  87. cube([fanLen/2+bananaHeadDia+bananaNutInsideDia/2,bananaRodLen-cutoutGap,rimLen],center=false);
  88. }
  89. /////////////////////////////////////////////////////////////////////////
  90. module makeBananaCutOut()
  91. {
  92. translate([0,-((bananaRodLen-cutoutGap)/2),0])
  93. union()
  94. {
  95. translate([0,0,rimLen/2])
  96. cube([bananaNutInsideDia,bananaRodLen-cutoutGap,rimLen],center=true);
  97. rotate([90,90,0])
  98. cylinder(d=bananaNutDia, h=bananaRodLen-cutoutGap, center=true, $fn=6);
  99. }
  100. }
  101. /////////////////////////////////////////////////////////////////////////
  102. module makeBananaPlug()
  103. {
  104. translate([0,-bananaRodLen/2-bananaHeadLen+0.1,0])
  105. rotate([-90,0,0])
  106. union()
  107. {
  108. // head
  109. translate([0,0,bananaHeadLen/2+bananaRodLen/2-0.1])
  110. cylinder(d=bananaHeadDia, h=bananaHeadLen, center=true);
  111. // rod
  112. cylinder(d=bananaRodDia, h=bananaRodLen, center=true);
  113. // nut
  114. // rotate([0,0,30])
  115. // translate([0,0,-bananaRodLen/2+bananaNutLen/2+1])
  116. // cylinder(d=bananaNutDia, h=bananaNutLen, center=true, $fn=6);
  117. }
  118. }
  119. /////////////////////////////////////////////////////////////////////////
  120. module makeEnclosure()
  121. {
  122. difference()
  123. {
  124. makeRim();
  125. makeFan();
  126. }
  127. }
  128. /////////////////////////////////////////////////////////////////////////
  129. module makeRim()
  130. {
  131. translate([rimRoundingRad,rimDepth,rimRoundingRad])
  132. rotate([90,0,0])
  133. minkowski()
  134. {
  135. cube([fanLen+2*rimLen-2*rimRoundingRad,fanLen+2*rimLen-2*rimRoundingRad,rimDepth-1]);
  136. cylinder(r=rimRoundingRad,h=1);
  137. }
  138. }
  139. /////////////////////////////////////////////////////////////////////////
  140. module makeFan()
  141. {
  142. translate([fanRoundingRad+rimLen,fanDepth,fanRoundingRad+rimLen])
  143. rotate([90,0,0])
  144. minkowski()
  145. {
  146. cube([fanLen-2*fanRoundingRad,fanLen-2*fanRoundingRad,fanDepth]);
  147. cylinder(r=fanRoundingRad,h=1);
  148. }
  149. }
  150. /////////////////////////////////////////////////////////////////////////