From 791720c3614f1ed13994358e2ab0c3d8e25fe528 Mon Sep 17 00:00:00 2001 From: Joel Ebel Date: Sat, 19 May 2018 15:42:22 -0400 Subject: [PATCH] Scale interior filet to keep concentric corners If the filet is more than double the thickness, scale the interior filets so that the walls have a constant thickness around the corners and the interior and exterior filets have a common center axis. If the filets are smaller, then keep the old behavior, making the corners mostly square. --- files/U_Box_V104_Test_Cleaned.scad | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/U_Box_V104_Test_Cleaned.scad b/files/U_Box_V104_Test_Cleaned.scad index 70d23f5..58a62ba 100644 --- a/files/U_Box_V104_Test_Cleaned.scad +++ b/files/U_Box_V104_Test_Cleaned.scad @@ -166,6 +166,7 @@ LeftEdgeOfBoardWRTBPanel = RightEdgeMargin - (PanelGap/2); yzshrink: the amount to reduce the width or height on one edge compared to the full box */ module RoundBox(xshrink=0, yzshrink=0) { + Filet = (Filet > Thick*2) ? Filet - yzshrink : Filet; translate([xshrink, yzshrink, yzshrink]) { rotate([90, 0, 90]) { linear_extrude(height=Length - xshrink*2) { @@ -409,7 +410,8 @@ module Feet() { but uses the global parameters. */ module Panel() { - echo("Panel:", Thick=PanelThick, PanelWidth=PanelWidth, PanelHeight=PanelHeight); + Filet = (Filet > Thick*2) ? Filet - Thick - PanelGap/2 : Filet - PanelGap/2; + echo("Panel:", Thick=PanelThick, PanelWidth=PanelWidth, PanelHeight=PanelHeight, Filet=Filet); translate([Filet, Filet, 0]) { offset(r=Filet, $fn=Resolution) { square([PanelWidth - Filet*2, PanelHeight - Filet*2]);