// Compartments can be placed anywhere (this includes non-integer positions like 1/2 or 1/3). The grid is defined as (0,0) being the bottom left corner of the bin, with each unit being 1 base long. Each cut() module is a compartment, with the first four values defining the area that should be made into a compartment (X coord, Y coord, width, and height). These values should all be positive. t is the tab style of the compartment (0:full, 1:auto, 2:left, 3:center, 4:right, 5:none). s is a toggle for the bottom scoop.
/*
gridfinityCustom(){
cut(x=0,y=0,w=1.5,h=0.5,t=5,s=false);
cut(0,0.5,1.5,0.5,5,false);
cut(0,1,1.5,0.5,5,false);
cut(0,1.5,0.5,1.5,5,false);
cut(0.5,1.5,0.5,1.5,5,false);
cut(1,1.5,0.5,1.5,5,false);
cut(1.5,0,1.5,5/3,2);
cut(1.5,5/3,1.5,4/3,4);
}*/
// Compartments can overlap! This allows for weirdly shaped compartments, such as this "2" bin.
/*
gridfinityCustom(){
cut(0,2,2,1,5,false);
cut(1,0,1,3,5);
cut(1,0,2,1,5);
cut(0,0,1,2);
cut(2,1,1,2);
}*/
// Areas without a compartment are solid material, where you can put your own cutout shapes. using the cut_move() function, you can select an area, and any child shapes will be moved from the origin to the center of that area, and subtracted from the block. For example, a pattern of three cylinderical holes.
/*
gridfinityCustom(){
cut(x=0,y=0,w=2,h=3);
cut(x=0,y=0,w=3,h=1,t=5);
cut_move(x=2,y=1,w=1,h=2)
pattern_linear(x=1,y=3,spacing=length/2)
cylinder(r=5,h=10*d_height,center=true);
}*/
// You can use loops as well as the bin dimensions to make different parametric functions, such as this one, which divides the box into columns, with a small 1x1 top compartment and a long vertical compartment below