Merge pull request #66 from TomHotston/main

Changed default offset during baseplate screw together mode to account for screw diameter.
This commit is contained in:
Kenneth 2023-02-15 18:57:28 -07:00 committed by GitHub
commit 51b5053de2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,7 +74,8 @@ module gridfinityBaseplate(gridx, gridy, length, dix, diy, sp, sm, sh, fitx, fit
gy = gridy == 0 ? floor(diy/length) : gridy; gy = gridy == 0 ? floor(diy/length) : gridy;
dx = max(gx*length-0.5, dix); dx = max(gx*length-0.5, dix);
dy = max(gy*length-0.5, diy); dy = max(gy*length-0.5, diy);
off = (sp==0?0:sp==1?bp_h_bot:h_skel+(sm?h_hole:0)+(sh==0?0:sh==1?d_cs:h_cb));
off = (sp==0?0:sp==1?bp_h_bot:h_skel+(sm?h_hole:0)+(sh==0?(sp!=3&&sp!=4)?0:d_screw:sh==1?d_cs:h_cb));
offsetx = dix < dx ? 0 : (gx*length-0.5-dix)/2*fitx*-1; offsetx = dix < dx ? 0 : (gx*length-0.5-dix)/2*fitx*-1;
offsety = diy < dy ? 0 : (gy*length-0.5-diy)/2*fity*-1; offsety = diy < dy ? 0 : (gy*length-0.5-diy)/2*fity*-1;
@ -185,4 +186,4 @@ module cutter_screw_together(gx, gy, off) {
rotate([0,90,0]) rotate([0,90,0])
cylinder(h=length/2, d=d_screw, center = true); cylinder(h=length/2, d=d_screw, center = true);
} }
} }