From 896ca8073bb89bdc0c1cd6e3441ea11e23ed3c61 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Sat, 11 Jul 2026 08:51:33 +0200 Subject: [PATCH] feat(case): split the plan section into plan_up and plan_down Factor the two halves of the horizontal cut into shared modules so each can be viewed alone (`plan_up` = deck/screen, `plan_down` = cavity), while `plan` keeps the exploded combo. Cut height and gap are now the `plan_z` / `plan_explode` params. --- hardware/case/typoena-case.scad | 43 +++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/hardware/case/typoena-case.scad b/hardware/case/typoena-case.scad index 7c7abcc..786a4b0 100644 --- a/hardware/case/typoena-case.scad +++ b/hardware/case/typoena-case.scad @@ -20,9 +20,11 @@ // "print_plate" – all printed parts laid out side by side // "section" – vertical cross-section: how the screen is trapped // "plan" – exploded horizontal section: deck lifted off the cavity +// "plan_up" – just the top half (deck / screen / bracket) +// "plan_down" – just the bottom half (cavity: standoffs, posts, ports) // ============================================================================ -show = "plan"; +show = "plan_up"; $fn = 48; // ---- body envelope -------------------------------------------------------- @@ -109,6 +111,10 @@ C_bracket= "#2B2B2B"; C_screen = "#F7F4EA"; C_foam = "#8a8f94"; +// ---- cutaway sections ----------------------------------------------------- +plan_z = 22; // height of the horizontal "plan" cut +plan_explode = 62; // gap between the halves in the exploded "plan" view + // =========================================================================== // helpers // =========================================================================== @@ -281,7 +287,7 @@ module placed_foam() { on_deck() translate([screen_off, screen_cy+screen_off, -lip_t-G_t-foam_t]) color(C_foam) foam(); } -// full coloured assembly, reused by the exploded plan section +// full coloured assembly, reused by the plan sections module plan_assembly() { color(C_body) case_body(); ghost_screen(); @@ -289,6 +295,19 @@ module plan_assembly() { placed_bracket(); translate([0,0,-0.01]) color(C_plate) baseplate(); } +// the two halves of the horizontal cut at plan_z +module plan_down() { // bottom: the cavity (standoffs, posts, ports) + intersection() { + plan_assembly(); + translate([-60, -60, plan_z-200]) cube([W+120, D+120, 200]); + } +} +module plan_up() { // top: the deck / lid (screen, bracket) + intersection() { + plan_assembly(); + translate([-60, -60, plan_z]) cube([W+120, D+120, 200]); + } +} if (show == "assembled") { color(C_body) case_body(); @@ -319,17 +338,11 @@ if (show == "assembled") { translate([W/2, -30, -70]) cube([W, D+60, 220]); } } else if (show == "plan") { - // HORIZONTAL slice at plan_z, shown EXPLODED: the bottom half (cavity — - // baseplate standoffs, corner posts, back-wall ports) stays put; the top - // half (deck, screen, bracket) lifts up so you see both sides of the cut. - plan_z = 30; - explode = 62; - intersection() { // bottom: the cavity - plan_assembly(); - translate([-60, -60, plan_z-200]) cube([W+120, D+120, 200]); - } - translate([0, 0, explode]) intersection() { // top: the deck, lifted - plan_assembly(); - translate([-60, -60, plan_z]) cube([W+120, D+120, 200]); - } + // EXPLODED horizontal section: deck/lid half lifted off the cavity half + plan_down(); + translate([0, 0, plan_explode]) plan_up(); +} else if (show == "plan_up") { + plan_up(); // just the top half — deck, screen, bracket +} else if (show == "plan_down") { + plan_down(); // just the bottom half — cavity, standoffs, ports } \ No newline at end of file