aux-plate.scad 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // Licnese - CC0
  2. FN=20;
  3. m5r = 5.2/2;
  4. m2r = 2.2/2;
  5. fix_width = 152.5;
  6. lip_height = 30;
  7. speaker_r = 65/2;
  8. speaker_screw_d = 52;
  9. speaker_vol_d = 32.5;
  10. gps_d = 30;
  11. gps_ant_d = 16;
  12. module rounded_rect(w,h,r) {
  13. _w = w-2*r;
  14. _h = h-2*r;
  15. x2 = _w/2;
  16. y2 = _h/2;
  17. hull() {
  18. translate([-x2, y2]) circle(r, $fn=FN);
  19. translate([ x2, y2]) circle(r, $fn=FN);
  20. translate([ x2,-y2]) circle(r, $fn=FN);
  21. translate([-x2,-y2]) circle(r, $fn=FN);
  22. }
  23. }
  24. module speaker_tab() {
  25. _r=3;
  26. w = 2*speaker_r + 20;
  27. h = 2*speaker_r + 20 + lip_height/2;
  28. d = speaker_screw_d /2;
  29. cx = 0;
  30. cy = lip_height/2 ;
  31. difference() {
  32. rounded_rect(w,h,_r);
  33. translate([cx,cy]) circle(speaker_r, $fn=2*FN);
  34. translate([cx + d, cy + d]) circle(m2r, $fn=FN);
  35. translate([cx + d, cy - d]) circle(m2r, $fn=FN);
  36. translate([cx - d, cy - d]) circle(m2r, $fn=FN);
  37. translate([cx - d, cy + d]) circle(m2r, $fn=FN);
  38. }
  39. }
  40. //speaker_tab();
  41. module plate() {
  42. _r = 3;
  43. difference() {
  44. union() {
  45. rounded_rect(fix_width + 4*m5r, lip_height, _r);
  46. translate([-fix_width/2, lip_height+10]) speaker_tab();
  47. translate([5,lip_height-4]) rounded_rect(80,30,_r);
  48. translate([-15,30+lip_height]) rounded_rect(46,60,_r);
  49. }
  50. translate([-30,lip_height]) circle(m2r, $fn=FN);
  51. translate([-30+speaker_vol_d,lip_height]) circle(m2r, $fn=FN);
  52. translate([0,60]) square([5,20], center=true);
  53. translate([-gps_d,60]) square([5,20], center=true);
  54. translate([-15,77]) square([20,5], center=true);
  55. translate([-fix_width/2,0]) circle(m5r, $fn=FN);
  56. translate([ fix_width/2,0]) circle(m5r, $fn=FN);
  57. }
  58. }
  59. plate();