This commit is contained in:
Nelson Graça 2023-02-09 01:19:50 +00:00
parent 7c25918ef4
commit 570fda7644
1 changed files with 6 additions and 6 deletions

View File

@ -40,9 +40,9 @@ distancex = 0;
distancey = 0;
// split space to fit equal on each side along x or offset to the positive side or negative
fitx = -1; // [-1:1]
fitx = 0; // [-1:0.01:1]
// split space to fit equal on each side along y
fity = 0; // [-1:1]
fity = 0; // [-1:0.01:1]
/* [Styles] */
@ -76,8 +76,8 @@ module gridfinityBaseplate(gridx, gridy, length, dix, diy, sp, sm, sh, fitx, fit
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));
offsetx=(gx*length-0.5-dix)/2*fitx*-1;
offsety=(gy*length-0.5-diy)/2*fity*-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;
difference() {
translate([offsetx,offsety,h_base])