GDEY0583T81.scad 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. // GDEY0583T81 mockup
  2. //
  3. // FPC dimensions from GDEY0583T81 mechanical drawing:
  4. // right edge: 55.47 mm from display right → 69.93 mm from display left
  5. // stiffened section (at glass edge): 14.50 mm wide, 6.00 mm deep
  6. // cable section (remainder): 12.50 mm wide, 18.00 mm long
  7. // total extension: 24.00 mm from display Y+ face; thickness 0.30 mm
  8. // contact zone at tip: 11.50 mm wide × 2.50 mm deep (24 pins, 0.5 mm pitch)
  9. //
  10. // Optional bend parameters (all default to flat/no-bend):
  11. // fpc_bend_start — mm from display Y+ face where bend begins (undef = flat)
  12. // fpc_bend_r — bend radius mm (default 4.0)
  13. // fpc_bend_angle — bend angle degrees (default 90; arc clip assumes ≤ 90°)
  14. // fpc_post_clip — truncate post-bend segment to this length in mm (undef = full)
  15. module GDEY0583T81(fpc_bend_start=undef, fpc_bend_r=4.0, fpc_bend_angle=90, fpc_post_clip=undef) {
  16. dw = 125.4; dd = 99.5; dt = 1.2; // overall body
  17. aw = 118.78; ad = 88.22; // active area
  18. ax = (dw - aw) / 2; // active area X offset (symmetric)
  19. ay = 3.30; // active area Y offset from Y- edge (per drawing)
  20. fpc_right = dw - 55.47; // FPC right edge X (= 69.93 mm from display left)
  21. fpc_w_wide = 14.50;
  22. fpc_w_cable = 12.50;
  23. fpc_stiff = 6.00;
  24. fpc_len = 24.00;
  25. fpc_t = 0.30;
  26. contact_w = 11.50;
  27. contact_d = 2.50;
  28. fpc_xl = fpc_right - fpc_w_cable; // cable left edge X
  29. color([0.32, 0.32, 0.32])
  30. cube([dw, dd, dt]);
  31. color([0.82, 0.82, 0.82])
  32. translate([ax, ay, dt - 0.01])
  33. cube([aw, ad, 0.1]);
  34. color([0.65, 0.65, 0.65]) {
  35. if (is_undef(fpc_bend_start)) {
  36. // Flat cable (no bend)
  37. translate([fpc_right - fpc_w_wide, dd, 0])
  38. cube([fpc_w_wide, fpc_stiff, fpc_t]);
  39. translate([fpc_xl, dd + fpc_stiff, 0])
  40. cube([fpc_w_cable, fpc_len - fpc_stiff, fpc_t]);
  41. } else {
  42. _bs = fpc_bend_start;
  43. // Pre-bend straight sections
  44. if (_bs > 0)
  45. translate([fpc_right - fpc_w_wide, dd, 0])
  46. cube([fpc_w_wide, min(fpc_stiff, _bs), fpc_t]);
  47. if (_bs > fpc_stiff)
  48. translate([fpc_xl, dd + fpc_stiff, 0])
  49. cube([fpc_w_cable, _bs - fpc_stiff, fpc_t]);
  50. // Bend arc: quarter-annular tube sweeping in YZ plane, axis along X.
  51. // rotate([0,90,0]) cylinder → axis X, cross-section circle in YZ at origin.
  52. // Clip cube (Y≥0, Z≥0) selects the quadrant from (Y=0,Z=r) to (Y=r,Z=0),
  53. // which is cable-entry (flat, at Z=0) to cable-exit (going -Z).
  54. // Arc center placed at world (fpc_xl, dd+_bs, -fpc_bend_r).
  55. translate([fpc_xl, dd + _bs, -fpc_bend_r])
  56. intersection() {
  57. difference() {
  58. rotate([0, 90, 0])
  59. cylinder(r=fpc_bend_r + fpc_t, h=fpc_w_cable, $fn=32);
  60. rotate([0, 90, 0])
  61. cylinder(r=fpc_bend_r, h=fpc_w_cable, $fn=32);
  62. }
  63. cube([fpc_w_cable, fpc_bend_r + fpc_t + 1, fpc_bend_r + fpc_t + 1]);
  64. }
  65. // Post-bend straight segment: exits arc at (Y=dd+_bs+r, Z=-r), going -Z
  66. _arc_len = fpc_bend_r * fpc_bend_angle * PI / 180;
  67. _post_len = fpc_len - _bs - _arc_len;
  68. _post_show = is_undef(fpc_post_clip) ? _post_len : min(fpc_post_clip, _post_len);
  69. if (_post_show > 0)
  70. translate([fpc_xl, dd + _bs + fpc_bend_r, -fpc_bend_r - _post_show])
  71. cube([fpc_w_cable, fpc_t, _post_show]);
  72. }
  73. }
  74. // Contact pads shown only for flat cable (position undefined after bend)
  75. if (is_undef(fpc_bend_start))
  76. color([0.80, 0.70, 0.25])
  77. translate([fpc_right - fpc_w_cable + (fpc_w_cable - contact_w) / 2,
  78. dd + fpc_len - contact_d,
  79. -0.01])
  80. cube([contact_w, contact_d, fpc_t + 0.02]);
  81. }
  82. // Standalone render — runs only when this file is opened directly, not when use<>'d
  83. GDEY0583T81();