PopufareHousingPowerAdapterTop.scad 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 PopufareHousingPowerAdapterTopPlate() {
  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. pcb_conn_c = [0,0];
  23. pcb_conn_screw_h = 44.034;
  24. pcb_conn_screw_w = 17.65;
  25. difference() {
  26. union() {
  27. rounded_rect(_w, _h, 4);
  28. }
  29. // power connector access
  30. //
  31. square([conh, conw], center=true);
  32. // housing holes
  33. //
  34. translate([ (_w/2 - 3*_r), (_h/2 - 3*_r)]) circle(_r);
  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. // PCB housing holes
  39. //
  40. translate([pcb_conn_c[0], pcb_conn_c[1]]) translate([ pcb_conn_screw_w/2, pcb_conn_screw_h/2]) circle(_M3r);
  41. translate([pcb_conn_c[0], pcb_conn_c[1]]) translate([ pcb_conn_screw_w/2, -pcb_conn_screw_h/2]) circle(_M3r);
  42. translate([pcb_conn_c[0], pcb_conn_c[1]]) translate([-pcb_conn_screw_w/2, -pcb_conn_screw_h/2]) circle(_M3r);
  43. translate([pcb_conn_c[0], pcb_conn_c[1]]) translate([-pcb_conn_screw_w/2, pcb_conn_screw_h/2]) circle(_M3r);
  44. }
  45. }
  46. //PopufareHousingPowerAdapterTopPlate();