PopufareHousingFrontAngle.scad 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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 PopufareHousingFrontAnglePlate_resistive() {
  10. dh = POPUFARE_HOUSING_HEIGHT - POPUFARE_FRONT_HEIGHT;
  11. w = POPUFARE_HOUSING_WIDTH;
  12. h = sqrt(2.0)*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. screen_w = POPUFARE_SCREEN_WIDTH_RESISTIVE;
  19. screen_h = POPUFARE_SCREEN_HEIGHT_RESISTIVE;
  20. screen_cx = 0;
  21. screen_cy = 0;
  22. screen_attach_dw = POPUFARE_INNER_PLATE_HOLE_WIDTH;
  23. screen_attach_dh = POPUFARE_INNER_PLATE_HOLE_HEIGHT;
  24. difference() {
  25. union() {
  26. square([w + 2*lip,h + 2*lip + 2*lip], center=true);
  27. };
  28. // attach to side plate brackets
  29. //
  30. translate([ -(w/2 - bx), -(h/2-des) ]) circle(br);
  31. translate([ -(w/2 - bx), (h/2-des) ]) circle(br);
  32. translate([ (w/2 - bx), -(h/2-des) ]) circle(br);
  33. translate([ (w/2 - bx), (h/2-des) ]) circle(br);
  34. // screen center
  35. //
  36. translate([screen_cx, screen_cy]) square([screen_w, screen_h], center=true);
  37. translate([screen_cx, screen_cy]) translate([ screen_attach_dw/2, screen_attach_dh/2]) circle(_M3r);
  38. translate([screen_cx, screen_cy]) translate([ screen_attach_dw/2,-screen_attach_dh/2]) circle(_M3r);
  39. translate([screen_cx, screen_cy]) translate([-screen_attach_dw/2,-screen_attach_dh/2]) circle(_M3r);
  40. translate([screen_cx, screen_cy]) translate([-screen_attach_dw/2, screen_attach_dh/2]) circle(_M3r);
  41. }
  42. }
  43. module PopufareHousingFrontAnglePlate_resistive_waveshare() {
  44. dh = POPUFARE_HOUSING_HEIGHT - POPUFARE_FRONT_HEIGHT;
  45. lip = _MATERIAL_THICKNESS;
  46. w = POPUFARE_HOUSING_WIDTH;
  47. h = sqrt(2.0)*dh ;
  48. bx = POPUFARE_BRACKET_CX;
  49. br = POPUFARE_BRACKET_D/2.0;
  50. de = POPUFARE_BRACKET_DE;
  51. //des = POPUFARE_BRACKET_DE_SHORT;
  52. des = POPUFARE_BRACKET_DE_MEDIUM;
  53. lip = _MATERIAL_THICKNESS;
  54. screen_w = POPUFARE_SCREEN_WIDTH_CAPACITIVE;
  55. screen_h = POPUFARE_SCREEN_HEIGHT_CAPACITIVE;
  56. screen_cx = 0;
  57. screen_cy = 0;
  58. screen_attach_dw = POPUFARE_INNER_PLATE_HOLE_WIDTH;
  59. screen_attach_dh = POPUFARE_INNER_PLATE_HOLE_HEIGHT;
  60. bottom_extra = 4.25;
  61. top_extra = 1.25;
  62. left_extra = 2.25;
  63. right_extra = 2.25;
  64. difference() {
  65. union() {
  66. square([w + 2*lip,h + 4*lip], center=true);
  67. }
  68. // attach to side plate brackets
  69. //
  70. translate([ -(w/2 - bx), -(h/2-des) ]) circle(br);
  71. translate([ -(w/2 - bx), (h/2-des) ]) circle(br);
  72. translate([ (w/2 - bx), -(h/2-des) ]) circle(br);
  73. translate([ (w/2 - bx), (h/2-des) ]) circle(br);
  74. // screen center
  75. //
  76. translate([screen_cx, screen_cy]) square([screen_w - (left_extra + right_extra), screen_h - (top_extra + top_extra) ], center=true);
  77. translate([screen_cx, screen_cy]) translate([ screen_attach_dw/2, screen_attach_dh/2]) circle(_M3r);
  78. translate([screen_cx, screen_cy]) translate([ screen_attach_dw/2,-screen_attach_dh/2]) circle(_M3r);
  79. translate([screen_cx, screen_cy]) translate([-screen_attach_dw/2,-screen_attach_dh/2]) circle(_M3r);
  80. translate([screen_cx, screen_cy]) translate([-screen_attach_dw/2, screen_attach_dh/2]) circle(_M3r);
  81. }
  82. }
  83. module PopufareHousingFrontAnglePlate_capacitive() {
  84. dh = POPUFARE_HOUSING_HEIGHT - POPUFARE_FRONT_HEIGHT;
  85. lip = _MATERIAL_THICKNESS;
  86. w = POPUFARE_HOUSING_WIDTH;
  87. h = sqrt(2.0)*dh ;
  88. bx = POPUFARE_BRACKET_CX;
  89. br = POPUFARE_BRACKET_D/2.0;
  90. de = POPUFARE_BRACKET_DE;
  91. des = POPUFARE_BRACKET_DE_SHORT;
  92. lip = _MATERIAL_THICKNESS;
  93. screen_w = POPUFARE_SCREEN_WIDTH_CAPACITIVE;
  94. screen_h = POPUFARE_SCREEN_HEIGHT_CAPACITIVE;
  95. screen_cx = 0;
  96. screen_cy = 0;
  97. screen_attach_dw = POPUFARE_INNER_PLATE_HOLE_WIDTH;
  98. screen_attach_dh = POPUFARE_INNER_PLATE_HOLE_HEIGHT;
  99. difference() {
  100. union() {
  101. square([w + 2*lip,h + 4*lip], center=true);
  102. }
  103. // attach to side plate brackets
  104. //
  105. translate([ -(w/2 - bx), -(h/2-des) ]) circle(br);
  106. translate([ -(w/2 - bx), (h/2-des) ]) circle(br);
  107. translate([ (w/2 - bx), -(h/2-des) ]) circle(br);
  108. translate([ (w/2 - bx), (h/2-des) ]) circle(br);
  109. // screen center
  110. //
  111. translate([screen_cx, screen_cy]) square([screen_w, screen_h], center=true);
  112. translate([screen_cx, screen_cy]) translate([ screen_attach_dw/2, screen_attach_dh/2]) circle(_M3r);
  113. translate([screen_cx, screen_cy]) translate([ screen_attach_dw/2,-screen_attach_dh/2]) circle(_M3r);
  114. translate([screen_cx, screen_cy]) translate([-screen_attach_dw/2,-screen_attach_dh/2]) circle(_M3r);
  115. translate([screen_cx, screen_cy]) translate([-screen_attach_dw/2, screen_attach_dh/2]) circle(_M3r);
  116. }
  117. }
  118. module PopufareHousingFrontAnglePlate() {
  119. //PopufareHousingFrontAnglePlate_resistive();
  120. //PopufareHousingFrontAnglePlate_capacitive();
  121. PopufareHousingFrontAnglePlate_resistive_waveshare();
  122. }
  123. //PopufareHousingFrontAnglePlate();