From d70ccf649120ecdb4c365c6c96914c6652dbf0e9 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Fri, 28 Mar 2025 08:20:07 -0500 Subject: [PATCH] fix an issue with decorative plate sizing I was taking a hull of the whole button negative shape in many places, rather than a hull of the sliced shape, which meant the amount of decorative plate beyond the button holes varied depending on the exact positioning of how it was sliced. this was brittle in general, but more importantly made many plates too big when I cleaned up some code to remove an override that I thought was irrelevant --- it was actually affecting the overall geometry outside of the slice Signed-off-by: Brian S. Stephan --- demo/all-together-demo-extended-with-windows.scad | 1 - ...ate-aux-control-tight-three-button-cluster.scad | 12 +++++++----- src/misc/decorative-plate-24mm-button.scad | 4 ++-- ...orative-plate-dir_arc-plus-w-24mm-8-button.scad | 4 ++-- ...rc-plus-w-30mm-and-sega-2p-nine-superplate.scad | 2 +- ...plate-dir_arc-plus-w-30mm-and-sega-2p-nine.scad | 6 +++--- ...decorative-plate-dir_arc-plus-w-30mm-plate.scad | 10 ++++++---- src/misc/decorative-plate-dir_arc-plus-w-30mm.scad | 4 ++-- src/misc/decorative-plate-sega-2p-6-button.scad | 4 ++-- .../decorative-plate-sega-2p-eleven-plate.scad | 10 ++++++---- src/misc/decorative-plate-sega-2p-nine-plate.scad | 14 +++++++------- src/misc/decorative-plate-sega-2p-nine.scad | 4 ++-- src/misc/decorative-plate-sega-2p.scad | 4 ++-- 13 files changed, 42 insertions(+), 37 deletions(-) diff --git a/demo/all-together-demo-extended-with-windows.scad b/demo/all-together-demo-extended-with-windows.scad index dd49472..1e4dbe8 100644 --- a/demo/all-together-demo-extended-with-windows.scad +++ b/demo/all-together-demo-extended-with-windows.scad @@ -31,7 +31,6 @@ color(frame_top_bottom_color) translate([frame_x/2-4, 0, -2.5]) rotate([180, 180 color(bottom_panel_color) translate([-panel_x/2, 0, -5-frame_z/2+5]) panel(); color(bottom_panel_color) translate([panel_x/2, 0, -5-frame_z/2+5]) panel(); -/* color(top_deco_color) translate([0, 0, 3+frame_z/2-4]) dir_arc_plus_w_30mm_and_sega_2p_nine_decorative_plate_of_plates(); */ color(top_deco_color) translate([0, 0, 3+frame_z/2-panel_z]) dir_arc_plus_w_30mm_and_sega_2p_nine_decorative_plate(); color(top_deco_color) translate([-170, 20, 3+frame_z/2-panel_z]) lsx_nobi_dustwasher(); color(top_deco_color) translate([panel_x-24, 30, 3+frame_z/2-panel_z]) button_24mm_decorative_plate(); diff --git a/src/extras/bss-ae/decorative-plate-aux-control-tight-three-button-cluster.scad b/src/extras/bss-ae/decorative-plate-aux-control-tight-three-button-cluster.scad index 525aa84..b5274ae 100644 --- a/src/extras/bss-ae/decorative-plate-aux-control-tight-three-button-cluster.scad +++ b/src/extras/bss-ae/decorative-plate-aux-control-tight-three-button-cluster.scad @@ -10,11 +10,13 @@ include module aux_control_three_button_tight_cluster_decorative_plate() { difference() { - // get a 2mm slice of the bigger button cylinders - translate([0, 0, -25]) hull() aux_control_three_button_tight_cluster(); - // keep a thin slice - translate([0, 0, -100]) cube([500, 500, 198], center=true); - translate([0, 0, 100]) cube([500, 500, 198], center=true); + hull() difference() { + // get a 2mm slice of the decorative button cylinders + translate([0, 0, -50]) aux_control_three_button_tight_cluster(); + // keep a thin slice + translate([0, 0, -100]) cube([500, 500, 198], center=true); + translate([0, 0, 100]) cube([500, 500, 198], center=true); + } // cut out the normal holes translate([0, 0, -1]) aux_control_three_button_tight_cluster(); } diff --git a/src/misc/decorative-plate-24mm-button.scad b/src/misc/decorative-plate-24mm-button.scad index ba900e0..4435601 100644 --- a/src/misc/decorative-plate-24mm-button.scad +++ b/src/misc/decorative-plate-24mm-button.scad @@ -9,8 +9,8 @@ include module button_24mm_decorative_plate() { difference() { - // get a 2mm slice of the bigger button cylinders - translate([0, 0, -55]) button_24mm_hole(); + // get a 2mm slice of the decorative button cylinders + translate([0, 0, -50]) button_24mm_hole(); translate([0, 0, -100]) cube([500, 500, 198], center=true); translate([0, 0, 100]) cube([500, 500, 198], center=true); // cut out the normal holes diff --git a/src/misc/decorative-plate-dir_arc-plus-w-24mm-8-button.scad b/src/misc/decorative-plate-dir_arc-plus-w-24mm-8-button.scad index af7e519..2c5e164 100644 --- a/src/misc/decorative-plate-dir_arc-plus-w-24mm-8-button.scad +++ b/src/misc/decorative-plate-dir_arc-plus-w-24mm-8-button.scad @@ -8,8 +8,8 @@ include module dir_arc_plus_w_24mm_8_button_decorative_plate() { difference() { - // get a 2mm slice of the bigger button cylinders - translate([0, 0, -55]) dir_arc_plus_w_24mm_8_button(); + // get a 2mm slice of the decorative button cylinders + translate([0, 0, -50]) dir_arc_plus_w_24mm_8_button(); translate([0, 0, -100]) cube([500, 500, 198], center=true); translate([0, 0, 100]) cube([500, 500, 198], center=true); // cut out the normal holes diff --git a/src/misc/decorative-plate-dir_arc-plus-w-30mm-and-sega-2p-nine-superplate.scad b/src/misc/decorative-plate-dir_arc-plus-w-30mm-and-sega-2p-nine-superplate.scad index cf9a014..c352069 100644 --- a/src/misc/decorative-plate-dir_arc-plus-w-30mm-and-sega-2p-nine-superplate.scad +++ b/src/misc/decorative-plate-dir_arc-plus-w-30mm-and-sega-2p-nine-superplate.scad @@ -12,7 +12,7 @@ module dir_arc_plus_w_30mm_and_sega_2p_nine_decorative_superplate() { difference() { union() { hull() difference() { - // get a 2mm slice of the bigger button cylinders + // get a 2mm slice of the decorative button cylinders union() { translate([-panel_x/2, 0, -50]) dir_arc_w_30mm(); translate([panel_x/2, 0, -50]) sega_2p_nine(); diff --git a/src/misc/decorative-plate-dir_arc-plus-w-30mm-and-sega-2p-nine.scad b/src/misc/decorative-plate-dir_arc-plus-w-30mm-and-sega-2p-nine.scad index 54abee5..bab62f6 100644 --- a/src/misc/decorative-plate-dir_arc-plus-w-30mm-and-sega-2p-nine.scad +++ b/src/misc/decorative-plate-dir_arc-plus-w-30mm-and-sega-2p-nine.scad @@ -8,10 +8,10 @@ include module dir_arc_plus_w_30mm_and_sega_2p_nine_decorative_plate() { difference() { - // get a 2mm slice of the bigger button cylinders + // get a 2mm slice of the jumbo decorative button cylinders union() { - translate([-panel_x/2, 0, -65]) dir_arc_w_30mm(); - translate([panel_x/2, 0, -65]) sega_2p_nine(); + translate([-panel_x/2, 0, -70]) dir_arc_w_30mm(); + translate([panel_x/2, 0, -70]) sega_2p_nine(); } translate([0, 0, -100]) cube([500, 500, 198], center=true); translate([0, 0, 100]) cube([500, 500, 198], center=true); diff --git a/src/misc/decorative-plate-dir_arc-plus-w-30mm-plate.scad b/src/misc/decorative-plate-dir_arc-plus-w-30mm-plate.scad index 9fa3d3c..24caa09 100644 --- a/src/misc/decorative-plate-dir_arc-plus-w-30mm-plate.scad +++ b/src/misc/decorative-plate-dir_arc-plus-w-30mm-plate.scad @@ -10,10 +10,12 @@ include module dir_arc_plus_w_30mm_plate_decorative_plate() { difference() { - // get a 2mm slice of the bigger button cylinders - translate([-panel_x/2, 0, -25]) hull() dir_arc_w_30mm(); - translate([0, 0, -100]) cube([500, 500, 198], center=true); - translate([0, 0, 100]) cube([500, 500, 198], center=true); + hull() difference() { + // get a 2mm slice of the decorative button cylinders + translate([-panel_x/2, 0, -50]) dir_arc_w_30mm(); + translate([0, 0, -100]) cube([500, 500, 198], center=true); + translate([0, 0, 100]) cube([500, 500, 198], center=true); + } // cut out the normal holes translate([-panel_x/2, 0, -1]) dir_arc_w_30mm(); } diff --git a/src/misc/decorative-plate-dir_arc-plus-w-30mm.scad b/src/misc/decorative-plate-dir_arc-plus-w-30mm.scad index 8a5313f..41443d2 100644 --- a/src/misc/decorative-plate-dir_arc-plus-w-30mm.scad +++ b/src/misc/decorative-plate-dir_arc-plus-w-30mm.scad @@ -8,8 +8,8 @@ include module dir_arc_plus_w_30mm_decorative_plate() { difference() { - // get a 2mm slice of the bigger button cylinders - translate([0, 0, -55]) dir_arc_w_30mm(); + // get a 2mm slice of the decorative button cylinders + translate([0, 0, -50]) dir_arc_w_30mm(); translate([0, 0, -100]) cube([500, 500, 198], center=true); translate([0, 0, 100]) cube([500, 500, 198], center=true); // cut out the normal holes diff --git a/src/misc/decorative-plate-sega-2p-6-button.scad b/src/misc/decorative-plate-sega-2p-6-button.scad index 5f1d336..09311bf 100644 --- a/src/misc/decorative-plate-sega-2p-6-button.scad +++ b/src/misc/decorative-plate-sega-2p-6-button.scad @@ -8,8 +8,8 @@ include module sega_2p_6_button_decorative_plate() { difference() { - // get a 2mm slice of the bigger button cylinders - translate([0, 0, -55]) sega_2p_6_button(); + // get a 2mm slice of the decorative button cylinders + translate([0, 0, -50]) sega_2p_6_button(); translate([0, 0, -100]) cube([500, 500, 198], center=true); translate([0, 0, 100]) cube([500, 500, 198], center=true); // cut out the normal holes diff --git a/src/misc/decorative-plate-sega-2p-eleven-plate.scad b/src/misc/decorative-plate-sega-2p-eleven-plate.scad index 5eb6795..d616f59 100644 --- a/src/misc/decorative-plate-sega-2p-eleven-plate.scad +++ b/src/misc/decorative-plate-sega-2p-eleven-plate.scad @@ -10,10 +10,12 @@ include module sega_2p_eleven_plate_decorative_plate() { difference() { - // get a 2mm slice of the bigger button cylinders - translate([panel_x/2, 0, -25]) hull() sega_2p_eleven(); - translate([0, 0, -100]) cube([500, 500, 198], center=true); - translate([0, 0, 100]) cube([500, 500, 198], center=true); + hull() difference() { + // get a 2mm slice of the decorative button cylinders + translate([panel_x/2, 0, -50]) sega_2p_eleven(); + translate([0, 0, -100]) cube([500, 500, 198], center=true); + translate([0, 0, 100]) cube([500, 500, 198], center=true); + } // cut out the normal holes translate([panel_x/2, 0, -1]) sega_2p_eleven(); } diff --git a/src/misc/decorative-plate-sega-2p-nine-plate.scad b/src/misc/decorative-plate-sega-2p-nine-plate.scad index 49cd191..6b2bac3 100644 --- a/src/misc/decorative-plate-sega-2p-nine-plate.scad +++ b/src/misc/decorative-plate-sega-2p-nine-plate.scad @@ -8,17 +8,17 @@ include decorative_radius_scale = 1.5; include -module sega_2p_nine_decorative_plate_of_plates() { +module sega_2p_nine_decorative_plate() { difference() { - // get a 2mm slice of the bigger button cylinders - union() { - translate([panel_x/2, 0, -25]) hull() sega_2p_nine(); + hull() difference() { + // get a 2mm slice of the decorative button cylinders + translate([panel_x/2, 0, -50]) sega_2p_nine(); + translate([0, 0, -100]) cube([500, 500, 198], center=true); + translate([0, 0, 100]) cube([500, 500, 198], center=true); } - translate([0, 0, -100]) cube([500, 500, 198], center=true); - translate([0, 0, 100]) cube([500, 500, 198], center=true); // cut out the normal holes translate([panel_x/2, 0, -1]) sega_2p_nine(); } } -sega_2p_nine_decorative_plate_of_plates(); +sega_2p_nine_decorative_plate(); diff --git a/src/misc/decorative-plate-sega-2p-nine.scad b/src/misc/decorative-plate-sega-2p-nine.scad index a063c08..cef69d0 100644 --- a/src/misc/decorative-plate-sega-2p-nine.scad +++ b/src/misc/decorative-plate-sega-2p-nine.scad @@ -8,8 +8,8 @@ include module sega_2p_nine_decorative_plate() { difference() { - // get a 2mm slice of the bigger button cylinders - translate([0, 0, -55]) sega_2p_nine(); + // get a 2mm slice of the decorative button cylinders + translate([0, 0, -50]) sega_2p_nine(); translate([0, 0, -100]) cube([500, 500, 198], center=true); translate([0, 0, 100]) cube([500, 500, 198], center=true); // cut out the normal holes diff --git a/src/misc/decorative-plate-sega-2p.scad b/src/misc/decorative-plate-sega-2p.scad index 888b783..c1a66a3 100644 --- a/src/misc/decorative-plate-sega-2p.scad +++ b/src/misc/decorative-plate-sega-2p.scad @@ -9,8 +9,8 @@ include module sega_2p_decorative_plate() { difference() { - // get a 2mm slice of the bigger button cylinders - translate([0, 0, -55]) sega_2p(); + // get a 2mm slice of the decorative button cylinders + translate([0, 0, -50]) sega_2p(); translate([0, 0, -100]) cube([500, 500, 198], center=true); translate([0, 0, 100]) cube([500, 500, 198], center=true); // cut out the normal holes