PopufareHousingSideRight.scad 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright (c) 2019 Clementine Computing LLC.
  3. *
  4. * This file is part of PopuFare.
  5. *
  6. * PopuFare is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Affero General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * PopuFare is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Affero General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Affero General Public License
  17. * along with PopuFare. If not, see <https://www.gnu.org/licenses/>.
  18. *
  19. */
  20. include <PopufareHousingCommon.scad>
  21. module PopufareHousingSideRightPlate() {
  22. w = POPUFARE_HOUSING_DEPTH;
  23. h = POPUFARE_HOUSING_HEIGHT;
  24. br = POPUFARE_BRACKET_D/2.0;
  25. bx = POPUFARE_BRACKET_CX;
  26. de = POPUFARE_BRACKET_DE;
  27. dh = POPUFARE_HOUSING_HEIGHT - POPUFARE_FRONT_HEIGHT;
  28. alen = dh*sqrt(2.0);
  29. w_right = w - dh;
  30. difference() {
  31. square([w,h], center=true);
  32. // chop off angle
  33. //
  34. translate([ w/2,-(h/2-POPUFARE_FRONT_HEIGHT)]) rotate(-45, [0,0,1])
  35. translate([-4*w,0]) square([4*w,4*w]);
  36. // bottom bracket
  37. //
  38. translate([-(w/2-de), -(h/2-bx) ]) circle(br);
  39. translate([ (w/2-de), -(h/2-bx) ]) circle(br);
  40. // front bracket
  41. //
  42. translate( [ (w/2-bx), -(h/2 - POPUFARE_FRONT_HEIGHT/2) ]) circle(br);
  43. // front angle bracket
  44. //
  45. translate([ w/2, -(h/2-POPUFARE_FRONT_HEIGHT)]) rotate(-45, [0,0,1])
  46. translate([-de, -bx]) circle(br);
  47. translate([ w/2, -(h/2-POPUFARE_FRONT_HEIGHT)]) rotate(-45, [0,0,1])
  48. translate([-(alen - de), -bx]) circle(br);
  49. // top bracket
  50. //
  51. translate([ -(w/2 - (w_right/2.0)), (h/2 - bx) ]) circle(br);
  52. // no back bracket
  53. //f
  54. }
  55. }
  56. //PopufareHousingSideRight();