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.

300 lines
8.0 KiB

2 years ago
  1. round_quality = 100;
  2. show_faceplate = true;
  3. if(show_faceplate) {
  4. // Basic structures
  5. translate([-30,-80,0])
  6. gimbal_unit_face();
  7. translate([0,0,0])
  8. pi_screen();
  9. translate([100,0,0])
  10. m5stack();
  11. translate([95,-80,0])
  12. gimbal_unit_face();
  13. // Spacers
  14. difference() {
  15. spacers();
  16. // Power Switch 1
  17. translate([20,-80,0])
  18. cube([11,16,5], center=true);
  19. // Power Switch 2
  20. translate([45,-80,0])
  21. cube([11,16,5], center=true);
  22. // Screw Holes
  23. translate([-70,38,0])
  24. cylinder($fn=round_quality, h=5, d=5, center=true);
  25. translate([-70,-38,0])
  26. cylinder($fn=round_quality, h=5, d=5, center=true);
  27. translate([-70,-110,0])
  28. cylinder($fn=round_quality, h=5, d=5, center=true);
  29. translate([70,38,0])
  30. cylinder($fn=round_quality, h=5, d=5, center=true);
  31. translate([70,-38,0])
  32. cylinder($fn=round_quality, h=5, d=5, center=true);
  33. translate([133,-110,0])
  34. cylinder($fn=round_quality, h=5, d=5, center=true);
  35. translate([133,-38,0])
  36. cylinder($fn=round_quality, h=5, d=5, center=true);
  37. translate([133,38,0])
  38. cylinder($fn=round_quality, h=5, d=5, center=true);
  39. translate([33,-110,0])
  40. cylinder($fn=round_quality, h=5, d=5, center=true);
  41. }
  42. // Ruler
  43. // translate([30,-48,0])
  44. // cube([360,2,2], center=true);
  45. // Display Decor
  46. translate([0,0,3])
  47. difference() {
  48. cube([130,86,5], center=true);
  49. cube([121,76,8], center=true);
  50. }
  51. // M5Stack Decor
  52. translate([100,0,3])
  53. difference() {
  54. translate([0,0,0])
  55. cube([55,55,5], center=true);
  56. translate([0,0,0])
  57. cube([50,50,8], center=true);
  58. }
  59. // Pi Screen and M5Stack Links
  60. translate([0,0,3]) {
  61. translate([70,0,0])
  62. cube([10,5,2], center=true);
  63. translate([70,10,0])
  64. cube([10,5,2], center=true);
  65. translate([70,20,0])
  66. cube([10,5,2], center=true);
  67. translate([70,-20,0])
  68. cube([10,5,2], center=true);
  69. translate([70,-10,0])
  70. cube([10,5,2], center=true);
  71. }
  72. } // End of show_faceplate
  73. // Gimbal Decor
  74. translate([17,-55,-20])
  75. gimbal_ring();
  76. translate([143,-55,-20])
  77. gimbal_ring();
  78. /**
  79. translate([-125,-8,0])
  80. gimbal_unit_face();
  81. translate([125,-8,0])
  82. gimbal_unit_face();
  83. translate([0,0,0])
  84. pi_screen();
  85. translate([0,-72,0])
  86. m5stack();
  87. // Bridges
  88. translate([0,0,0])
  89. face_bridges();
  90. **/
  91. module spacers() {
  92. translate([-70,0,0])
  93. cube([10,86,2], center=true);
  94. translate([68,0,0])
  95. cube([10,86,2], center=true);
  96. translate([132,0,0])
  97. cube([10,86,2], center=true);
  98. translate([100,35,0])
  99. cube([55,16,2], center=true);
  100. translate([100,-35,0])
  101. cube([55,16,2], center=true);
  102. translate([31,-44,0])
  103. cube([212,5,2], center=true);
  104. translate([30,-80,0])
  105. cube([60,70,2], center=true);
  106. translate([-70,-80,0])
  107. cube([10,70,2], center=true);
  108. translate([132,-80,0])
  109. cube([10,70,2], center=true);
  110. }
  111. module face_bridges() {
  112. translate([-80,0,0])
  113. cube([30,86,2], center=true);
  114. translate([80,0,0])
  115. cube([30,86,2], center=true);
  116. translate([0,48,0])
  117. cube([190,10,2], center=true);
  118. translate([0,-48,0])
  119. difference() {
  120. cube([320,10,2], center=true);
  121. translate([0,-25,1])
  122. m5stack_solid();
  123. }
  124. }
  125. module m5stack_solid() {
  126. cube([55,55,10], center=true);
  127. }
  128. module m5stack() {
  129. difference() {
  130. translate([0,0,0])
  131. cube([55,55,2], center=true);
  132. translate([0,0,0])
  133. cube([50,50,3], center=true);
  134. }
  135. }
  136. // 121mm x 76mm (hole)
  137. module pi_screen() {
  138. difference() {
  139. translate([0,0,0])
  140. cube([130,86,2], center=true);
  141. translate([0,0,0])
  142. cube([121,76,3], center=true);
  143. }
  144. }
  145. module gimbal_unit_face() {
  146. translate([0,0,0]) {
  147. // Top
  148. difference() {
  149. translate([0,0,0])
  150. rotate([0,0,0])
  151. cube([70,70,2], center=true);
  152. // Frsky M9 Gimbal
  153. translate([0,0,0])
  154. rotate([0,0,0])
  155. cylinder($fn=round_quality, h=5,d=49, center=true);
  156. // Frsky M9 Screen Top Left
  157. translate([-27.25,27.25,0])
  158. rotate([0,0,0])
  159. cylinder($fn=round_quality, h=5,d=5.6, center=true);
  160. // Frsky M9 Screen Top Right
  161. translate([27.25,27.25,0])
  162. rotate([0,0,0])
  163. cylinder($fn=round_quality, h=5,d=5.6, center=true);
  164. // Frsky M9 Screen Bottom Left
  165. translate([-27.25,-27.25,0])
  166. rotate([0,0,0])
  167. cylinder($fn=round_quality, h=5,d=5.6, center=true);
  168. // Frsky M9 Screen Bottom Right
  169. translate([27.25,-27.25,0])
  170. rotate([0,0,0])
  171. cylinder($fn=round_quality, h=5,d=5.6, center=true);
  172. /*
  173. translate([0,0,0])
  174. rotate([0,0,0])
  175. cube([77,51,4], center=true);
  176. */
  177. }
  178. }
  179. // Just a ruler
  180. /***
  181. translate([-13.9,-44.4])
  182. cube([100,10,10], center=true);
  183. ***/
  184. }
  185. module gimbal_ring_full() {
  186. translate([-47,-25,23.5])
  187. cylinder(h=5, d=64.5, center=true, $fn=round_quality);
  188. translate([-71,-49,23.5])
  189. rotate([0,0,45])
  190. difference() {
  191. cube([15,10,5], center=true);
  192. translate([-9,0,2])
  193. rotate([0,-15,0])
  194. cube([25,15,5], center=true);
  195. translate([-4,0,0])
  196. cylinder(h=10, d=3.5, center=true, $fn=round_quality);
  197. translate([-4,0,0])
  198. cylinder(h=3, d=5.6, center=true, $fn=round_quality);
  199. }
  200. translate([-23,-49,23.5])
  201. mirror([-1,0,0]) {
  202. rotate([0,0,45])
  203. difference() {
  204. cube([15,10,5], center=true);
  205. translate([-9,0,2])
  206. rotate([0,-15,0])
  207. cube([25,15,5], center=true);
  208. translate([-4,0,0])
  209. cylinder(h=10, d=3.5, center=true, $fn=round_quality);
  210. translate([-4,0,0])
  211. cylinder(h=3, d=5.6, center=true, $fn=round_quality);
  212. }
  213. }
  214. translate([-71,-0.8,23.5])
  215. mirror([0,-1,0]) {
  216. rotate([0,0,45])
  217. difference() {
  218. cube([15,10,5], center=true);
  219. translate([-9,0,2])
  220. rotate([0,-15,0])
  221. cube([25,15,5], center=true);
  222. translate([-4,0,0])
  223. cylinder(h=10, d=3.5, center=true, $fn=round_quality);
  224. translate([-4,0,0])
  225. cylinder(h=3, d=5.6, center=true, $fn=round_quality);
  226. }
  227. }
  228. translate([-22.5,-0.5,23.5])
  229. mirror([-1,-1,0]) {
  230. rotate([0,0,45])
  231. difference() {
  232. cube([15,10,5], center=true);
  233. translate([-9,0,2])
  234. rotate([0,-15,0])
  235. cube([25,15,5], center=true);
  236. translate([-4,0,0])
  237. cylinder(h=10, d=3.5, center=true, $fn=round_quality);
  238. translate([-4,0,0])
  239. cylinder(h=3, d=5.6, center=true, $fn=round_quality);
  240. }
  241. }
  242. }
  243. module gimbal_ring() {
  244. difference() {
  245. gimbal_ring_full();
  246. translate([-47,-25,23.5])
  247. cylinder(h=6, d1=47.5, d2=57.5, center=true, $fn=round_quality);
  248. }
  249. }