1
0

test_rig_gimbal_clip.scad 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /*-------------------------------------------------
  2. [Gimbal Mic Clip]
  3. Author: Wisam Reid
  4. ------------------------------------------------- */
  5. /*
  6. Flags
  7. */
  8. render_clip = 1;
  9. render_gimbal_bracket = 1;
  10. render_capsule_holder = 1;
  11. // number of facets
  12. $fn=64;
  13. // Build Test Rig
  14. test_rig(20,20,20,1,10,1,5, 0.25, 0.15);
  15. module test_rig (diameter_clip, diameter_gimbal, clip_depth, taper_ratio, capsule_size,center_thickness, thickness, gimbal_spacing, pin_spacing) {
  16. translate([((thickness) + center_thickness)/2,0,0]) {
  17. // CAPSULE HOLDER
  18. difference(){ // cutout center for capsule
  19. // outer part of mic clip
  20. union(){ // unite pin and capsule holder
  21. translate([-(clip_depth + (diameter_gimbal/2)),0,0]){
  22. intersection() { // intersect with sphere for rounded edges
  23. sphere(r=((capsule_size/2)+thickness)- gimbal_spacing, center=true);
  24. cylinder(r=((capsule_size/2)+thickness) - gimbal_spacing, h=thickness, center=true);
  25. }
  26. }
  27. // pin
  28. rotate([90,0,0]){
  29. translate([-(clip_depth + (diameter_gimbal/2)),0,0]){
  30. cylinder(d=(thickness/2) - pin_spacing,h=diameter_gimbal + (thickness/2) - pin_spacing,center=true);
  31. }
  32. }
  33. }
  34. rotate([90,0,0]){
  35. translate([-(clip_depth + (diameter_gimbal/2)),0,0]){
  36. rotate(v=[0,0,1], a=45){
  37. cube(size=[(thickness/4), (thickness/4),diameter_gimbal + (thickness/2) - (pin_spacing*2)],center=true);
  38. }
  39. }
  40. }
  41. // inner cutout for gimbal
  42. translate([-(clip_depth + (diameter_gimbal/2)),0,0]){
  43. cylinder(d=capsule_size,h=diameter_clip, center=true);
  44. }
  45. }
  46. // GIMBAL BRACKET
  47. difference(){ // cut gimbal pinhole and inner mic clip radius
  48. union(){ // unite gimbal bracket with mic clip
  49. translate([-(thickness/(taper_ratio/2)),0,0]){
  50. difference(){ // cutout inner part of gimbal bracket
  51. intersection(){ // intersect with sphere for rounded edges
  52. hull(){ // convex hull of spheres
  53. translate([-2*clip_depth,0,0]){
  54. sphere(r=(diameter_gimbal/taper_ratio)-thickness, center=true);
  55. }
  56. sphere(r=(diameter_gimbal/taper_ratio)-2*thickness, center=true);
  57. }
  58. hull(){ // outer part of gimbal bracket
  59. translate([-clip_depth,0,0]){
  60. cylinder(d=diameter_gimbal+thickness,h=thickness, center=true);
  61. }
  62. cylinder(d=diameter_gimbal/taper_ratio,h=thickness, center=true);
  63. }
  64. }
  65. hull(){ // inner cutout for gimbal bracket
  66. translate([-clip_depth,0,0]){
  67. cylinder(d=diameter_gimbal,h=thickness, center=true);
  68. }
  69. translate([-(center_thickness+thickness),0,0]){
  70. cylinder(d=(diameter_gimbal/taper_ratio) - thickness,h=thickness,center=true);
  71. }
  72. }
  73. // C-shape cutout
  74. translate([-(diameter_gimbal+clip_depth)+(thickness/(taper_ratio/2)),0,-thickness/2]){
  75. rotate([0,0,45]){
  76. cube([diameter_gimbal,diameter_gimbal,2*thickness],center=true);
  77. }
  78. }
  79. }
  80. }
  81. if (render_clip)
  82. // MIC CLIP
  83. rotate([0,0,180]){
  84. translate([thickness/2,0,0]){
  85. difference(){ // cutout inner part of mic clip
  86. // outer part of mic clip
  87. translate([-(diameter_clip+thickness)/2,0,0]){
  88. rotate([0,0,180]){
  89. intersection() { // intersect with sphere for rounded edges
  90. sphere(r=diameter_clip-thickness, center=true);
  91. cylinder(r=diameter_clip-thickness, h=thickness, center=true);
  92. }
  93. // cylinder(d=diameter_clip+thickness,h=thickness, center=true);
  94. }
  95. }
  96. // cut clip opening
  97. translate([-(diameter_clip*1.5),-(diameter_clip/1.4),-(diameter_clip*3)]){
  98. rotate([0,0,45]){
  99. cube([diameter_clip,diameter_clip,6*diameter_clip]);
  100. }
  101. }
  102. }
  103. }
  104. }
  105. // gimbal rotation stopper
  106. intersection(){ // intersect with sphere for rounded edges
  107. hull(){ // convex hull of spheres
  108. translate([-2*clip_depth,0,0]){
  109. sphere(r=(diameter_gimbal/taper_ratio)-thickness, center=true);
  110. }
  111. sphere(r=(diameter_gimbal/taper_ratio)-2*thickness, center=true);
  112. }
  113. // rotation stopper
  114. rotate([90,0,0]){
  115. translate([-(clip_depth + (diameter_gimbal/2)) + (thickness/4),thickness/2 + thickness/15,(diameter_gimbal + (thickness/2))/2 - ((0.8*thickness) /3)]){
  116. union(){ // create small hold off
  117. rotate([0,5,0]){
  118. cube([(thickness/2),(thickness/10),0.8*thickness], center=true);
  119. translate([0,-thickness/40,0.2*thickness]){ // offset
  120. cube([(thickness/2),(thickness/10),0.4*thickness], center=true);
  121. }
  122. }
  123. }
  124. }
  125. }
  126. }
  127. }
  128. // CUT OUTS
  129. // inner cutout for mic clip
  130. translate([diameter_clip/2,0,0]){
  131. cylinder(d=diameter_clip,h=diameter_clip, center=true);
  132. }
  133. // gimbal pin hole
  134. translate([-(clip_depth + (diameter_gimbal/2)),0,0]){
  135. rotate([90,0,0]){
  136. cylinder(d=thickness/2,h=diameter_gimbal + (thickness/2), center=true);
  137. }
  138. }
  139. }
  140. }
  141. }