Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gridfinity-rebuilt-bins.scad
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ style_tab = 1; //[0:Full,1:Auto,2:Left,3:Center,4:Right,5:None]
// which divisions have tabs
place_tab = 0; // [0:Everywhere-Normal,1:Top-Left Division]
// how should the top lip act
style_lip = 0; //[0: Regular lip, 1:remove lip subtractively, 2: remove lip and retain height]
style_lip = 0; //[0: Regular lip, 1:remove lip subtractively, 2: remove lip and retain height, 3: regular Lip with Notches]
// scoop weight percentage. 0 disables scoop, 1 is regular scoop. Any real number will scale the scoop.
scoop = 1; //[0:0.1:1]

Expand Down
48 changes: 43 additions & 5 deletions src/core/gridfinity-rebuilt-utility.scad
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,25 @@ module gridfinityInit(gx, gy, h, fill_height = 0, grid_dimensions = GRID_DIMENSI
translate([0, 0, BASE_HEIGHT])
//todo: Remove these constants
sweep_rounded(foreach_add(grid_size_mm, -2*BASE_TOP_RADIUS-0.5-0.001)) {
if ($style_lip == 0) {
if ($style_lip == 0 || $style_lip == 3) {
profile_wall(h);
} else {
profile_wall2(h);
}
}
if($style_lip == 3) {
color("lemonchiffon")

for(i=[1:gx-1]) {
translate([grid_dimensions.x*gx/2-d_clear-grid_dimensions.x*i,grid_dimensions.y*gy/2-d_clear,h+BASE_HEIGHT])lipNotch();
translate([grid_dimensions.x*gx/2-d_clear-grid_dimensions.x*i,-(grid_dimensions.y*gy/2-d_clear),h+BASE_HEIGHT])rotate([0,0,180])lipNotch();
}
for(j=[1:gy-1]) {
translate([grid_dimensions.x*gx/2-d_clear,grid_dimensions.y*gy/2-d_clear-j*grid_dimensions.y,h+BASE_HEIGHT])rotate([0,0,270])lipNotch();
translate([-(grid_dimensions.x*gx/2-d_clear),grid_dimensions.y*gy/2-d_clear-j*grid_dimensions.y,h+BASE_HEIGHT])rotate([0,0,90])lipNotch();
}
}

}
// Function to include in the custom() module to individually slice bins
// Will try to clamp values to fit inside the provided base size
Expand Down Expand Up @@ -597,10 +610,10 @@ module block_cutter(x,y,w,h,t,s,tab_width=d_tabw,tab_height=d_tabh) {
v_ang_tab = a_tab;
v_ang_lip = 45;

ycutfirst = y == 0 && $style_lip == 0;
ycutlast = abs(y+h-$gyy)<0.001 && $style_lip == 0;
xcutfirst = x == 0 && $style_lip == 0;
xcutlast = abs(x+w-$gxx)<0.001 && $style_lip == 0;
ycutfirst = y == 0 && ($style_lip == 0 || $style_lip == 3);
ycutlast = abs(y+h-$gyy)<0.001 && ($style_lip == 0 || $style_lip == 3);
xcutfirst = x == 0 && ($style_lip == 0 || $style_lip == 3);
xcutlast = abs(x+w-$gxx)<0.001 && ($style_lip == 0 || $style_lip == 3);
zsmall = ($dh+BASE_HEIGHT)/7 < 3;

ylen = h*($gyy*l_grid+d_magic)/$gyy-d_div;
Expand Down Expand Up @@ -759,3 +772,28 @@ module profile_cutter_tab(h, tab, ang) {
polygon([[0,h],[tab,h],[0,h-tab*tan(ang)]]);

}

module lipNotch() {
// this parameter is a complex calculation of the filleted .6mm radius top of the stacking lip used by gridfinity-rebuilt
// rather than duplicate the calculation from parameters, I'm just copying the value directly here
lipHeight=3.55147;
//these parameters are not 'named' values in standard.scad but are there in STACKING_LIP_LINE
lipBase = STACKING_LIP_LINE[1].x; //0.7
lipMidZ = STACKING_LIP_LINE[2].y - lipBase; //1.8
lipTop = STACKING_LIP_LINE[3].x - lipBase; //1.9

difference() {
union() {
translate([-r_base,-lipBase-1.9,0])cube([2*r_base,lipBase+1.9,lipHeight-STACKING_LIP_FILLET_RADIUS]);
translate([-r_base,-lipBase-1.9,0])cube([2*r_base,lipBase-1.9-STACKING_LIP_FILLET_RADIUS,lipHeight]);
translate([0,-STACKING_LIP_FILLET_RADIUS,lipHeight-STACKING_LIP_FILLET_RADIUS])rotate([0,90,0])cylinder(r=STACKING_LIP_FILLET_RADIUS,h=2*r_base,center=true);
}
translate([-r_base,-r_base,lipBase/2])cylinder(r1=0+(r_base-lipBase-lipTop),r2=r_base-lipTop,h=lipBase,center=true);
translate([-r_base,-r_base,lipBase+lipMidZ/2])cylinder(r1=r_base-lipTop,r2=r_base-lipTop,h=lipMidZ+0.01,center=true);
translate([-r_base,-r_base,lipBase+lipMidZ+lipTop/2])cylinder(r1=r_base-lipTop,r2=r_base,h=lipTop,center=true);

translate([r_base,-r_base,lipBase/2])cylinder(r1=0+(r_base-lipBase-lipTop),r2=r_base-lipTop,h=lipBase,center=true);
translate([r_base,-r_base,lipBase+lipMidZ/2])cylinder(r1=r_base-lipTop,r2=r_base-lipTop,h=lipMidZ+0.01,center=true);
translate([r_base,-r_base,lipBase+lipMidZ+lipTop/2])cylinder(r1=r_base-lipTop,r2=r_base,h=lipTop,center=true);
}
}