PopufareHousingFrontAngle.scad 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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_waveshare() {
  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. des = POPUFARE_BRACKET_DE_MEDIUM;
  93. lip = _MATERIAL_THICKNESS;
  94. screen_w = POPUFARE_SCREEN_WIDTH_CAPACITIVE;
  95. screen_h = POPUFARE_SCREEN_HEIGHT_CAPACITIVE;
  96. screen_cx = 0;
  97. screen_cy = 0;
  98. screen_attach_dw = POPUFARE_INNER_PLATE_HOLE_WIDTH;
  99. screen_attach_dh = POPUFARE_INNER_PLATE_HOLE_HEIGHT;
  100. bottom_extra = 4.25;
  101. top_extra = 1.25;
  102. left_extra = 2.25;
  103. right_extra = 2.25;
  104. difference() {
  105. union() {
  106. square([w + 2*lip,h + 4*lip], center=true);
  107. }
  108. // attach to side plate brackets
  109. //
  110. translate([ -(w/2 - bx), -(h/2-des) ]) circle(br);
  111. translate([ -(w/2 - bx), (h/2-des) ]) circle(br);
  112. translate([ (w/2 - bx), -(h/2-des) ]) circle(br);
  113. translate([ (w/2 - bx), (h/2-des) ]) circle(br);
  114. // screen center
  115. //
  116. //translate([screen_cx, screen_cy]) square([screen_w - (left_extra + right_extra), screen_h - (top_extra + top_extra) ], center=true);
  117. translate([screen_cx, screen_cy]) square([screen_w, screen_h], center=true);
  118. translate([screen_cx, screen_cy]) translate([ screen_attach_dw/2, screen_attach_dh/2]) circle(_M3r);
  119. translate([screen_cx, screen_cy]) translate([ screen_attach_dw/2,-screen_attach_dh/2]) circle(_M3r);
  120. translate([screen_cx, screen_cy]) translate([-screen_attach_dw/2,-screen_attach_dh/2]) circle(_M3r);
  121. translate([screen_cx, screen_cy]) translate([-screen_attach_dw/2, screen_attach_dh/2]) circle(_M3r);
  122. }
  123. }
  124. module PopufareHousingFrontAnglePlate_capacitive() {
  125. dh = POPUFARE_HOUSING_HEIGHT - POPUFARE_FRONT_HEIGHT;
  126. lip = _MATERIAL_THICKNESS;
  127. w = POPUFARE_HOUSING_WIDTH;
  128. h = sqrt(2.0)*dh ;
  129. bx = POPUFARE_BRACKET_CX;
  130. br = POPUFARE_BRACKET_D/2.0;
  131. de = POPUFARE_BRACKET_DE;
  132. des = POPUFARE_BRACKET_DE_SHORT;
  133. lip = _MATERIAL_THICKNESS;
  134. screen_w = POPUFARE_SCREEN_WIDTH_CAPACITIVE;
  135. screen_h = POPUFARE_SCREEN_HEIGHT_CAPACITIVE;
  136. screen_cx = 0;
  137. screen_cy = 0;
  138. screen_attach_dw = POPUFARE_INNER_PLATE_HOLE_WIDTH;
  139. screen_attach_dh = POPUFARE_INNER_PLATE_HOLE_HEIGHT;
  140. difference() {
  141. union() {
  142. square([w + 2*lip,h + 4*lip], center=true);
  143. }
  144. // attach to side plate brackets
  145. //
  146. translate([ -(w/2 - bx), -(h/2-des) ]) circle(br);
  147. translate([ -(w/2 - bx), (h/2-des) ]) circle(br);
  148. translate([ (w/2 - bx), -(h/2-des) ]) circle(br);
  149. translate([ (w/2 - bx), (h/2-des) ]) circle(br);
  150. // screen center
  151. //
  152. translate([screen_cx, screen_cy]) square([screen_w, screen_h], center=true);
  153. translate([screen_cx, screen_cy]) translate([ screen_attach_dw/2, screen_attach_dh/2]) circle(_M3r);
  154. translate([screen_cx, screen_cy]) translate([ screen_attach_dw/2,-screen_attach_dh/2]) circle(_M3r);
  155. translate([screen_cx, screen_cy]) translate([-screen_attach_dw/2,-screen_attach_dh/2]) circle(_M3r);
  156. translate([screen_cx, screen_cy]) translate([-screen_attach_dw/2, screen_attach_dh/2]) circle(_M3r);
  157. }
  158. }
  159. module PopufareHousingFrontAnglePlate() {
  160. //PopufareHousingFrontAnglePlate_resistive();
  161. //PopufareHousingFrontAnglePlate_capacitive();
  162. //PopufareHousingFrontAnglePlate_resistive_waveshare();
  163. PopufareHousingFrontAnglePlate_capacitive_waveshare();
  164. }
  165. //PopufareHousingFrontAnglePlate();