epd_case.scad 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // Waveshare GDEY0583T81 5.83" ePaper Display Case
  2. // Display slides in from Y-; no Y- side wall
  3. // FPC cable exits toward Y+ then bends 90° toward Z- through backplate slot
  4. include <params.scad>
  5. use <GDEY0583T81.scad>
  6. /* [Preview] */
  7. SHOW_DISP = true;
  8. EPD_EXPLODE = 0; // mm to pull display mockup toward Y- for inspection
  9. module epd_case() {
  10. color("#004B49") {
  11. difference() {
  12. // Solid case body — open at Y=0 (no Y- wall) by construction
  13. rounded_box(epd_case_w, epd_case_d, epd_case_h, CORNER_R);
  14. // Display cavity: slides in from Y=0; BEZEL_Y extends depth so display seats at Y=BEZEL_Y
  15. translate([WALL, -0.01, WALL])
  16. cube([epd_cav_w, BEZEL_Y + epd_cav_d + DISP_Y_EXTRA + 0.01, DISP_T + TOL]);
  17. // Active area window: straight portion + chamfered top edges
  18. // Extends 0.01 mm into the display cavity to avoid a coplanar face with the mockup
  19. translate([epd_win_x, epd_win_y, WALL + DISP_T - 0.01])
  20. cube([epd_win_w, ACT_D, LIP - CHAM + 0.02]);
  21. hull() {
  22. translate([epd_win_x, epd_win_y, epd_case_h - CHAM])
  23. cube([epd_win_w, ACT_D, 0.01]);
  24. translate([epd_win_x - _cham_xy, epd_win_y - _cham_xy, epd_case_h])
  25. cube([epd_win_w + 2*_cham_xy, ACT_D + 2*_cham_xy, 0.01]);
  26. }
  27. // FPC cable slot — quarter-cylinder swept volume of cable arc from horizontal to vertical.
  28. // Arc center at (Y=DISP_D, Z=WALL−FPC_BEND_R); first-quadrant slice (Y≥DISP_D, Z≥arc_center_z).
  29. // Creates opening through backplate floor and clears Y+ wall material for bend.
  30. translate([_fpc_x1, BEZEL_Y + DISP_D + DISP_Y_EXTRA, WALL - FPC_BEND_R])
  31. intersection() {
  32. rotate([0, 90, 0])
  33. cylinder(r=_fpc_ro, h=_fpc_xw, $fn=32);
  34. cube([_fpc_xw, _fpc_ro + 1, _fpc_ro + 1]);
  35. }
  36. }}
  37. // Display mockup — seated at case origin; EPD_EXPLODE pulls it toward Y-
  38. if ($preview && SHOW_DISP)
  39. color("#F0F0F0")
  40. translate([WALL + TOL, BEZEL_Y + DISP_Y_EXTRA - EPD_EXPLODE, WALL])
  41. GDEY0583T81(fpc_bend_start=0, fpc_bend_r=FPC_BEND_R, fpc_post_clip=2);
  42. }
  43. epd_case();