screen-front-v4b.scad 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. screws_ay=19.5;
  2. screws_by=196.7;
  3. frame_width=290;
  4. frame_depth=205;
  5. frame_height=4;
  6. screw_head_h=1.5;
  7. border_gap=0;
  8. border_slope=19;
  9. border_thickness=3;
  10. module screw_hole(x,y) {
  11. shh=screw_head_h*2;
  12. translate([x,y,shh+1]) cylinder(h=shh, r=6.4/2, center = true, $fn=40);
  13. translate([x,y,0]) cylinder(h=frame_height*2, r=3.4/2, center = true, $fn=20);
  14. }
  15. module border(border_h,length) {
  16. rotate([90,0,0]) linear_extrude(height = length, center = true, convexity = 10) polygon(points=[[0,0],[border_h,0],[border_h/2,border_h],[0,border_h]]);
  17. }
  18. difference() {
  19. cube([frame_width,frame_depth,frame_height]);
  20. // hinge cutouts
  21. translate([29,-0.2,-0.1]) cube([28,8.2,4.2]);
  22. translate([frame_width-29-28,-0.2,-0.1]) cube([28,8.2,4.2]);
  23. // screen cutouts
  24. translate([13,36,-0.1]) cube([261,150.5,4.2]);
  25. translate([3,29,-0.1]) cube([283,163,2.2]);
  26. // screws bottom
  27. screw_hole(8,19.9);
  28. screw_hole(144.9,19.9);
  29. screw_hole(281.9,19.9);
  30. // screws top
  31. screw_hole(8,screws_by);
  32. screw_hole(144.9,screws_by);
  33. screw_hole(281.9,screws_by);
  34. // cutout for strap
  35. translate([139.25,188,-0.1]) cube([11,18,1.1]);
  36. // cutout for magnet
  37. translate([51,14,1.4]) cylinder(h=4, r=11/2, center = true, $fn=20);
  38. // hinge cutout back
  39. translate([2, 0.8,-0.1]) cube([28, 16.2,3]);
  40. translate([14,0.8,-0.1]) cube([16.1,26.2,3]);
  41. translate([frame_width-28-2, 0.8,-0.1]) cube([28, 16.2,3]);
  42. translate([frame_width-16.1-14,0.8,-0.1]) cube([16.1,26.2,3]);
  43. }
  44. // border
  45. difference() {
  46. translate([0,frame_depth/2+border_gap/2,frame_height]) border(border_thickness,frame_depth-border_gap);
  47. translate([0,border_gap+border_slope-0.1,4+border_thickness+0.1]) rotate([270,0,270]) linear_extrude(height=10,center=true,convexity=10) polygon(points=[[0,0],[border_slope,0],[border_slope,border_thickness]]);
  48. }
  49. difference() {
  50. translate([frame_width,frame_depth/2+border_gap/2,frame_height]) rotate([0,0,180]) border(border_thickness,frame_depth-border_gap);
  51. translate([frame_width-2.5,border_gap+border_slope-0.1,4+border_thickness+0.1]) rotate([270,0,270]) linear_extrude(height=10,center=true,convexity=10) polygon(points=[[0,0],[border_slope,0],[border_slope,border_thickness]]);
  52. }
  53. translate([frame_width/2,frame_depth,frame_height]) rotate([0,0,270]) border(border_thickness,frame_width);