From ea426c4d406aa2ec781cc8c02f28f0719363c2b1 Mon Sep 17 00:00:00 2001 From: Ruud Swinkels Date: Wed, 22 Feb 2023 21:33:01 +0100 Subject: [PATCH] make all screw-togethers compatible in height --- gridfinity-rebuilt-baseplate.scad | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/gridfinity-rebuilt-baseplate.scad b/gridfinity-rebuilt-baseplate.scad index c3ee0f0..8750e53 100644 --- a/gridfinity-rebuilt-baseplate.scad +++ b/gridfinity-rebuilt-baseplate.scad @@ -58,6 +58,7 @@ style_hole = 1; // [0:none, 1:contersink, 2:counterbore] // ===== IMPLEMENTATION ===== // +screw_together = (style_plate == 3 || style_plate == 4); color("tomato") gridfinityBaseplate(gridx, gridy, length, distancex, distancey, style_plate, enable_magnet, style_hole, fitx, fity); @@ -75,7 +76,7 @@ module gridfinityBaseplate(gridx, gridy, length, dix, diy, sp, sm, sh, fitx, fit dx = max(gx*length-0.5, dix); dy = max(gy*length-0.5, diy); - off = (sp==0?0:sp==1?bp_h_bot:h_skel+(sm||sp==3||sp==4?h_hole:0)+(sh==0?(sp!=3&&sp!=4)?0:d_screw:sh==1?d_cs:h_cb)); + off = calculate_off(sp, sm, sh); offsetx = dix < dx ? 0 : (gx*length-0.5-dix)/2*fitx*-1; offsety = diy < dy ? 0 : (gy*length-0.5-diy)/2*fity*-1; @@ -115,6 +116,21 @@ module gridfinityBaseplate(gridx, gridy, length, dix, diy, sp, sm, sh, fitx, fit } +function calculate_off(sp, sm, sh) = + screw_together + ? 6.75 + :sp==0 + ?0 + : sp==1 + ?bp_h_bot + :h_skel + (sm + ?h_hole + : 0)+(sh==0 + ? d_screw + : sh==1 + ?d_cs + :h_cb); + module cutter_weight() { union() { linear_extrude(bp_cut_depth*2,center=true)