PopufareHousingPowerAdapterMid.scad 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // License: CC0
  2. //
  3. // To the extent possible under law, Clementine Computing LLC has waived
  4. // all copyright and related or neighboring rights to this file.
  5. //
  6. // This work is published from: United States.
  7. //
  8. include <PopufareHousingCommon.scad>
  9. module PopufareHousingPowerAdapterMidPlate() {
  10. //_w = _POWER_BOX_WIDTH;
  11. //_h = _POWER_BOX_HEIGHT;
  12. _r = _POWER_BOX_R;
  13. conw = _POWER_CONNECTOR_WIDTH;
  14. conh = _POWER_CONNECTOR_HEIGHT;
  15. _w = conh*2 + 20;
  16. _h = conw + 20;
  17. piu_usb_h = _POWER_BOX_PIU_USB_H;
  18. buck_dw = _BUCK_V2_DW;
  19. buck_r = _BUCK_V2_R;
  20. buck_cx = _w/2 + 2*buck_r;
  21. buck_cy = -_h/12;
  22. wall_w = 6*_r;
  23. difference() {
  24. union() {
  25. // rounded_rect(_w, _h, _r);
  26. translate([0, (_h/2 - 3*_r)]) rounded_rect(_w, wall_w, _r);
  27. translate([ (_w/2 - 3*_r), 0]) rounded_rect(wall_w, _h, _r);
  28. translate([0, -(_h/2 - 3*_r)]) rounded_rect(_w, wall_w, _r);
  29. }
  30. // power connector access
  31. //
  32. square([conh, conw], center=true);
  33. // housing holes
  34. //
  35. translate([ (_w/2 - 3*_r), (_h/2 - 3*_r)]) circle(_r);
  36. translate([-(_w/2 - 3*_r), (_h/2 - 3*_r)]) circle(_r);
  37. translate([-(_w/2 - 3*_r),-(_h/2 - 3*_r)]) circle(_r);
  38. translate([ (_w/2 - 3*_r),-(_h/2 - 3*_r)]) circle(_r);
  39. }
  40. }
  41. //PopufareHousingPowerAdapterMidPlate();