From b4061d45d923c935ee7a14b39e7cb9141f317caf Mon Sep 17 00:00:00 2001 From: Arthur Moore Date: Sun, 28 Apr 2024 13:07:12 -0400 Subject: [PATCH] Caculate stacking lip support based on an angle Removes the need for a magic constant. --- standard.scad | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/standard.scad b/standard.scad index 19289c8..1a7b772 100644 --- a/standard.scad +++ b/standard.scad @@ -80,7 +80,6 @@ h_lip = 3.548; d_wall2 = r_base-r_c1-d_clear*sqrt(2); d_magic = -2*d_clear-2*d_wall+d_div; - // **************************************** // Stacking Lip Constants // Based on https://gridfinity.xyz/specification/ @@ -96,10 +95,19 @@ stacking_lip_height = stacking_lip_wall_height_mm + stacking_lip_outer_slope_height_mm; -// Extracted from `profile_wall_sub_sub`. +// Height of the innermost section. +// Used to keep the innermost lip from just being a triangle. +// Spec implicitly expects wall width to equal stacking lip depth, +// so does not define this. stacking_lip_support_wall_height_mm = 1.2; + +// Support so the stacking lip is not floating in mid air +// when wall width is less than stacking lip depth. +stacking_lip_support_angle = 45; + stacking_lip_support_height_mm = - stacking_lip_support_wall_height_mm + d_wall2; + stacking_lip_support_wall_height_mm + + tan(90 - stacking_lip_support_angle) * stacking_lip_depth; // **************************************** // Base constants