PopufareHousingTop.scad 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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 PopufareHousingTopPlate_hinge0() {
  10. dh = POPUFARE_HOUSING_HEIGHT - POPUFARE_FRONT_HEIGHT;
  11. w = POPUFARE_HOUSING_WIDTH;
  12. h = POPUFARE_HOUSING_DEPTH-dh;
  13. bx = POPUFARE_BRACKET_CX;
  14. br = POPUFARE_BRACKET_D/2.0;
  15. de = POPUFARE_BRACKET_DE;
  16. des = POPUFARE_BRACKET_DE_SHORT;
  17. lip = _MATERIAL_THICKNESS;
  18. hinge_dw = POPUFARE_HINGE_TOP_HOLE_WIDTH;
  19. hinge_r = POPUFARE_HINGE_D/2;
  20. hinge_de = POPUFARE_HINGE_TOP_HOLE_DE;
  21. difference() {
  22. union() {
  23. square([w,h], center=true);
  24. translate([0, (h/2 + lip/2) - 0.001]) square([w, lip], center=true);
  25. // add overhang to back and sides but not front
  26. //
  27. translate([-w/2, -h/4]) square([lip, h/2], center=true);
  28. translate([ w/2, -h/4]) square([lip, h/2], center=true);
  29. translate([-w/2, h/4 + lip/2]) square([lip, h/2 + lip], center=true);
  30. translate([ w/2, h/4 + lip/2]) square([lip, h/2 + lip], center=true);
  31. };
  32. // shave off top front panel to accomodate angle plate
  33. //
  34. translate([0, -(h/2 - lip/2) - 0.01]) square([2*w, lip], center=true);
  35. // attach to back plate bracket
  36. //
  37. //translate([ -(w/2 - de), (h/2-bx) ]) circle(br);
  38. //translate([ (w/2 - de), (h/2-bx) ]) circle(br);
  39. // side plate bracket attachment
  40. //
  41. translate([ -(w/2 - bx), (h/2-des)]) circle(br);
  42. translate([ -(w/2 - bx),-(h/2-des)]) circle(br);
  43. translate([ (w/2 - bx), (h/2-des)]) circle(br);
  44. translate([ (w/2 - bx),-(h/2-des)]) circle(br);
  45. // hinge attachment
  46. //
  47. translate([ -hinge_dw/2, h/2 - hinge_de ]) circle(hinge_r);
  48. translate([ hinge_dw/2, h/2 - hinge_de ]) circle(hinge_r);
  49. }
  50. }
  51. // hinge1 measurements
  52. // dh_inner = 10.5
  53. // dh_outter = 22
  54. // dh_first = 8
  55. // dh_second = 3.75
  56. // bot_to_under = 8.25
  57. // dw = 27.75, 35.5
  58. module PopufareHousingTopPlate_hinge1() {
  59. dh = POPUFARE_HOUSING_HEIGHT - POPUFARE_FRONT_HEIGHT;
  60. w = POPUFARE_HOUSING_WIDTH;
  61. h = POPUFARE_HOUSING_DEPTH-dh;
  62. bx = POPUFARE_BRACKET_CX;
  63. br = POPUFARE_BRACKET_D/2.0;
  64. de = POPUFARE_BRACKET_DE;
  65. des = POPUFARE_BRACKET_DE_SHORT;
  66. lip = _MATERIAL_THICKNESS;
  67. hinge_de = POPUFARE_HINGE1_TOP_DE;
  68. hinge_dh = POPUFARE_HINGE1_TOP_DH;
  69. hinge_dw = POPUFARE_HINGE1_TOP_DW;
  70. hinge_r = POPUFARE_HINGE1_TOP_R + 0.25;
  71. difference() {
  72. union() {
  73. square([w,h], center=true);
  74. translate([0, (h/2 + lip/2) - 0.001]) square([w, lip], center=true);
  75. // add overhang to back and sides but not front
  76. //
  77. translate([-w/2, -h/4]) square([lip, h/2], center=true);
  78. translate([ w/2, -h/4]) square([lip, h/2], center=true);
  79. translate([-w/2, h/4 + lip/2]) square([lip, h/2 + lip], center=true);
  80. translate([ w/2, h/4 + lip/2]) square([lip, h/2 + lip], center=true);
  81. };
  82. // shave off top front panel to accomodate angle plate
  83. //
  84. translate([0, -(h/2 - lip/2) - 0.01]) square([2*w, lip], center=true);
  85. // attach to back plate bracket
  86. //
  87. //translate([ -(w/2 - de), (h/2-bx) ]) circle(br);
  88. //translate([ (w/2 - de), (h/2-bx) ]) circle(br);
  89. // side plate bracket attachment
  90. //
  91. translate([ -(w/2 - bx), (h/2-des)]) circle(br);
  92. translate([ -(w/2 - bx),-(h/2-des)]) circle(br);
  93. translate([ (w/2 - bx), (h/2-des)]) circle(br);
  94. translate([ (w/2 - bx),-(h/2-des)]) circle(br);
  95. // hinge attachment
  96. //
  97. translate([ -hinge_dw/2, h/2 - hinge_de ]) circle(hinge_r);
  98. translate([ hinge_dw/2, h/2 - hinge_de ]) circle(hinge_r);
  99. translate([ -hinge_dw/2, h/2 - (hinge_de + hinge_dh) ]) circle(hinge_r);
  100. translate([ hinge_dw/2, h/2 - (hinge_de + hinge_dh) ]) circle(hinge_r);
  101. }
  102. }
  103. module PopufareHousingTopPlate() {
  104. PopufareHousingTopPlate_hinge1();
  105. }
  106. //PopufareHousingTopPlate();