PopufareHousingInnerBack.scad 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. // when looking down (to negative z-axis)
  10. // it's as if you're looking at the back of the panel,
  11. // screen facing outwards, front ribbon on screen
  12. // going 'down' (negative y-axis).
  13. //
  14. module PopufareHousingInnerBackPlate() {
  15. _r = 3;
  16. _outr = 16;
  17. hole_width = POPUFARE_INNER_PLATE_HOLE_WIDTH;
  18. hole_height = POPUFARE_INNER_PLATE_HOLE_HEIGHT;
  19. w2 = hole_width/2;
  20. h2 = hole_height/2;
  21. x = hole_width + _outr;
  22. y = hole_height + _outr;
  23. rpi_hole_c = [_RASPBERRY_PI_B_CX, _RASPBERRY_PI_B_CY];
  24. rpi_hole_dx = _RASPBERRY_PI_B_HOLE_DX;
  25. rpi_hole_dy = _RASPBERRY_PI_B_HOLE_DY;
  26. screen_hole_c = [_SCREEN_CX,_SCREEN_CY];
  27. screen_hole_dx = _SCREEN_HOLE_DX;
  28. screen_hole_dy = _SCREEN_HOLE_DY;
  29. d_pi_screen = [screen_hole_dx - rpi_hole_dx, screen_hole_dy - rpi_hole_dy];
  30. access_left_w = 25;
  31. access_left_h = screen_hole_dy - 10;
  32. access_left_c = [ rpi_hole_c[0] - rpi_hole_dx/2 - d_pi_screen[0]/2, screen_hole_c[1] ];
  33. access_middle_w = rpi_hole_dx - 16;
  34. access_middle_h = rpi_hole_dy - 16;
  35. access_middle_c = [_RASPBERRY_PI_B_CX,_RASPBERRY_PI_B_CY];
  36. access_right_w = hole_width/2 - (rpi_hole_c[0] + rpi_hole_dx/2);
  37. access_right_h = 5*hole_height/8;
  38. access_right_c = [ (rpi_hole_c[0] + rpi_hole_dx/2) + access_right_w/2 + _r, 0];
  39. access_top_w = rpi_hole_dx - 25;
  40. access_top_h = 6;
  41. access_top_c = [rpi_hole_c[0], rpi_hole_c[1] + rpi_hole_dy/2 + access_top_h/2 + 4];
  42. access_bottom_w = rpi_hole_dx - 25;
  43. access_bottom_h = 24;
  44. access_bottom_c = [rpi_hole_c[0], rpi_hole_c[1] - rpi_hole_dy/2 - access_bottom_h/2 - 8];
  45. sx2 = hole_width/2;
  46. sy2 = hole_height/2;
  47. difference() {
  48. rounded_rect(x,y,_r);
  49. // RPi m2 joining holes
  50. //
  51. translate(rpi_hole_c) translate([ rpi_hole_dx/2, rpi_hole_dy/2]) circle(_M2_5r);
  52. translate(rpi_hole_c) translate([ rpi_hole_dx/2,-rpi_hole_dy/2]) circle(_M2_5r);
  53. translate(rpi_hole_c) translate([-rpi_hole_dx/2,-rpi_hole_dy/2]) circle(_M2_5r);
  54. translate(rpi_hole_c) translate([-rpi_hole_dx/2, rpi_hole_dy/2]) circle(_M2_5r);
  55. // opening access points in case we need them (heat sinks, USB cables, etc.)
  56. //
  57. translate(rpi_hole_c) rounded_rect(3*rpi_hole_dx/4, 3*rpi_hole_dy/4, _r);
  58. translate(access_left_c) rounded_rect(access_left_w,access_left_h, _r);
  59. translate(access_right_c) rounded_rect(access_right_w, access_right_h, _r);
  60. translate(access_top_c) rounded_rect(access_top_w, access_top_h, _r);
  61. translate(access_bottom_c) rounded_rect(access_bottom_w, access_bottom_h, _r);
  62. // screen m2 joining holes
  63. //
  64. translate(screen_hole_c) translate([ screen_hole_dx/2, screen_hole_dy/2]) circle(_M2_5r);
  65. translate(screen_hole_c) translate([ screen_hole_dx/2,-screen_hole_dy/2]) circle(_M2_5r);
  66. translate(screen_hole_c) translate([-screen_hole_dx/2,-screen_hole_dy/2]) circle(_M2_5r);
  67. translate(screen_hole_c) translate([-screen_hole_dx/2, screen_hole_dy/2]) circle(_M2_5r);
  68. // Joining for outer angle plate
  69. //
  70. translate([-hole_width/2, -hole_height/2]) circle(_M3r);
  71. translate([ hole_width/2, -hole_height/2]) circle(_M3r);
  72. translate([ hole_width/2, hole_height/2]) circle(_M3r);
  73. translate([-hole_width/2, hole_height/2]) circle(_M3r);
  74. // usb power out
  75. //
  76. translate([-1*x/7,-3.5*y/10]) translate([0, _POWER_USB_HOLE_DW/2]) circle(_POWER_USB_HOLE_R);
  77. translate([-1*x/7,-3.5*y/10]) translate([0, -_POWER_USB_HOLE_DW/2]) circle(_POWER_USB_HOLE_R);
  78. translate([-2.1*x/7,-4*y/10]) translate([ _POWER_USB_HOLE_DW/2, 0]) circle(_POWER_USB_HOLE_R);
  79. translate([-2.1*x/7,-4*y/10]) translate([-_POWER_USB_HOLE_DW/2, 0]) circle(_POWER_USB_HOLE_R);
  80. translate([-2.1*x/7, 4*y/10]) translate([ _POWER_USB_HOLE_DW/2, 0]) circle(_POWER_USB_HOLE_R);
  81. translate([-2.1*x/7, 4*y/10]) translate([-_POWER_USB_HOLE_DW/2, 0]) circle(_POWER_USB_HOLE_R);
  82. translate([ 2.1*x/7, 4.2*y/10]) translate([ _POWER_USB_HOLE_DW/2, 0]) circle(_POWER_USB_HOLE_R);
  83. translate([ 2.1*x/7, 4.2*y/10]) translate([-_POWER_USB_HOLE_DW/2, 0]) circle(_POWER_USB_HOLE_R);
  84. }
  85. }
  86. //PopufareHousingInnerBackPlate();