Caculate stacking lip support based on an angle

Removes the need for a magic constant.
This commit is contained in:
Arthur Moore 2024-04-28 13:07:12 -04:00
parent 09e8cf0de9
commit b4061d45d9

View file

@ -80,7 +80,6 @@ h_lip = 3.548;
d_wall2 = r_base-r_c1-d_clear*sqrt(2); d_wall2 = r_base-r_c1-d_clear*sqrt(2);
d_magic = -2*d_clear-2*d_wall+d_div; d_magic = -2*d_clear-2*d_wall+d_div;
// **************************************** // ****************************************
// Stacking Lip Constants // Stacking Lip Constants
// Based on https://gridfinity.xyz/specification/ // Based on https://gridfinity.xyz/specification/
@ -96,10 +95,19 @@ stacking_lip_height =
stacking_lip_wall_height_mm + stacking_lip_wall_height_mm +
stacking_lip_outer_slope_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; 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_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 // Base constants