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.
This commit is contained in:
Joel Ebel 2018-05-19 15:42:22 -04:00
parent 526a6b01f0
commit 791720c361

View File

@ -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]);