| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- // GDEY0583T81 — Waveshare 5.83" ePaper Display Case
- use <GDEY0583T81.scad>
- // Display slides in from Y-; no Y- side wall
- // FPC cable exits toward Y+ then bends 90° toward Z- through backplate slot
- // --- Display Dimensions ---
- DISP_W = 125.4; // overall width (X)
- DISP_D = 99.5; // overall depth (Y)
- DISP_T = 1.2; // thickness (Z)
- // --- Active (Visible) Area ---
- ACT_W = 118.78; // active area width (X)
- ACT_D = 88.22; // active area depth (Y)
- // --- Case Parameters ---
- WALL = 2.0; // wall and backplate thickness
- LIP = 1.5; // front bezel lip thickness (Z, sits on top of display)
- TOL = 0.3; // per-side clearance for display fit (0.3 mm suits FDM sliding tolerances)
- CHAM = 1.0; // chamfer Z height at window opening
- CHAM_ANGLE = 60; // chamfer face angle from vertical (deg); 45 = equal bevel, lower = less overhang
- CORNER_R = 2.5; // XY corner fillet radius (matches EE04 case)
- BEZEL_Y = 2.5; // extra Y- bezel beyond the display's natural 3.30 mm border
- EXPLODE = 0; // mm to pull display mockup toward Y- in preview
- SHOW_DISP = true; // show GDEY0583T81 mockup in preview
- FPC_BEND_R = 4.0; // FPC cable bend radius toward Z- (starting at display Y+ edge)
- CLIP_Z = 0; // preview-only: mm to remove from Z+ (0 = full model; LIP reveals cavity; LIP+DISP_T reveals floor)
- // --- Derived Dimensions ---
- cav_w = DISP_W + TOL * 2;
- cav_d = DISP_D + TOL; // tolerance on Y+ side only; Y- is open
- case_w = cav_w + WALL * 2;
- case_h = WALL + DISP_T + LIP;
- // FPC slot geometry — cable dims from 583.scad (12.5 mm wide, 0.3 mm thick;
- // right edge 55.47 mm from display right edge)
- _fpc_x1 = WALL + TOL + DISP_W - 55.47 - 12.50 - 2.5; // slot left edge (2.5 mm wider each side)
- _fpc_xw = 12.50 + 5.0; // slot width (5 mm wider than cable)
- _fpc_ro = FPC_BEND_R + 0.30 + TOL; // outer clearance radius (bend_r + fpc_t + tol)
- // max Y reached by arc at Z=0 (backplate bottom); drives minimum case_d
- _bend_my = BEZEL_Y + DISP_D + sqrt(_fpc_ro*_fpc_ro - (FPC_BEND_R - WALL)*(FPC_BEND_R - WALL));
- case_d = max(cav_d + WALL + BEZEL_Y, _bend_my + WALL);
- _cham_xy = CHAM * tan(CHAM_ANGLE); // horizontal expansion derived from angle
- // Active window position in case coordinates
- // X: symmetric (3.31 mm border each side)
- // Y: offset per drawing — 3.30 mm from Y- entry edge, 7.98 mm from Y+ (FPC) edge
- win_x = WALL + TOL + (DISP_W - ACT_W) / 2;
- win_y = 3.30 + BEZEL_Y;
- module rounded_box(l, w, h, r) {
- hull()
- for (dx = [r, l-r], dy = [r, w-r])
- translate([dx, dy, 0]) cylinder(r=r, h=h, $fn=32);
- }
- module epd_case() {
- difference() {
- // Solid case body — open at Y=0 (no Y- wall) by construction
- rounded_box(case_w, case_d, case_h, CORNER_R);
- // Display cavity: slides in from Y=0; BEZEL_Y extends depth so display seats at Y=BEZEL_Y
- translate([WALL, -0.01, WALL])
- cube([cav_w, BEZEL_Y + cav_d + 0.01, DISP_T + TOL]);
- // Active area window: straight portion + chamfered top edges
- // Extends 0.01 mm into the display cavity to avoid a coplanar face with the mockup
- translate([win_x, win_y, WALL + DISP_T - 0.01])
- cube([ACT_W, ACT_D, LIP - CHAM + 0.02]);
- hull() {
- translate([win_x, win_y, case_h - CHAM])
- cube([ACT_W, ACT_D, 0.01]);
- translate([win_x - _cham_xy, win_y - _cham_xy, case_h])
- cube([ACT_W + 2*_cham_xy, ACT_D + 2*_cham_xy, 0.01]);
- }
- // FPC cable slot — quarter-cylinder swept volume of cable arc from horizontal to vertical.
- // Arc center at (Y=DISP_D, Z=WALL−FPC_BEND_R); first-quadrant slice (Y≥DISP_D, Z≥arc_center_z).
- // Creates opening through backplate floor and clears Y+ wall material for bend.
- translate([_fpc_x1, BEZEL_Y + DISP_D, WALL - FPC_BEND_R])
- intersection() {
- rotate([0, 90, 0])
- cylinder(r=_fpc_ro, h=_fpc_xw, $fn=32);
- cube([_fpc_xw, _fpc_ro + 1, _fpc_ro + 1]);
- }
- }
- }
- color("#004B49")
- intersection() {
- epd_case();
- cube([case_w + 1, case_d + 1,
- ($preview && CLIP_Z > 0) ? max(0.01, case_h - CLIP_Z) : case_h + 1]);
- }
- // Display mockup — seated at case origin; EXPLODE pulls it toward Y-
- if ($preview && SHOW_DISP)
- translate([WALL + TOL, BEZEL_Y - EXPLODE, WALL])
- GDEY0583T81(fpc_bend_start=0, fpc_bend_r=FPC_BEND_R, fpc_post_clip=2);
|