Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first pass at generating stacking tabs #122

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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: 2 additions & 0 deletions gridfinity-rebuilt-bins.scad
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ enable_zsnap = false;
style_tab = 1; //[0:Full,1:Auto,2:Left,3:Center,4:Right,5:None]
// how should the top lip act
style_lip = 0; //[0: Regular lip, 1:remove lip subtractively, 2: remove lip and retain height]
// generate tabs on the lid to help align stacked bins
stacking_tabs = false;
// scoop weight percentage. 0 disables scoop, 1 is regular scoop. Any real number will scale the scoop.
scoop = 1; //[0:0.1:1]
// only cut magnet/screw holes at the corners of the bin to save uneccesary print time
Expand Down
3 changes: 2 additions & 1 deletion gridfinity-rebuilt-lite.scad
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ divy = 2;
enable_zsnap = false;
// how should the top lip act
style_lip = 0; //[0: Regular lip, 1:remove lip subtractively, 2: remove lip and retain height]

// generate tabs on the lid to help align stacked bins
stacking_tabs = false;
/* [Other] */
// determine what the variable "gridz" applies to based on your use case
gridz_define = 0; // [0:gridz is the height of bins in units of 7mm increments - Zack's method,1:gridz is the internal height in millimeters, 2:gridz is the overall external height of the bin in millimeters]
Expand Down
48 changes: 48 additions & 0 deletions gridfinity-rebuilt-utility.scad
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ module gridfinityInit(gx, gy, h, h0 = 0, l = l_grid, sl = 0) {
if ($style_lip == 0) profile_wall(h);
else profile_wall2(h);
}

if ((style_lip == 0) && stacking_tabs) generate_tabs(h);
}
// 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 @@ -624,3 +626,49 @@ module profile_cutter_tab(h, tab, ang) {
polygon([[0,h],[tab,h],[0,h-tab*tan(ang)]]);

}

module generate_tabs(height_mm) {
if ($gxx > 1) {
for (xtab=[1:$gxx-1]) {
lip_tab(xtab, 0, height_mm);
lip_tab(xtab, $gyy, height_mm);
}
}

if ($gyy > 1) {
for (ytab=[1:$gyy-1]) {
lip_tab(0, ytab, height_mm);
lip_tab($gxx, ytab, height_mm);
}
}
}

module lip_tab(x, y, height_mm) {
//Calculate rotation of lip based on which edge it is on
rot = (x == $gxx) ? 0 : ((x == 0) ? 180 : ((y == $gyy) ? 90 : 270));
wall_thickness = r_base-r_c2+d_clear*2-r_c1;

translate(
[(x * l_grid) - ((l_grid * $gxx / 2)),
(y * l_grid) - ((l_grid * $gyy / 2)),
$dh+h_base]) {
rotate([0, 0, rot])
translate([-r_base-d_clear,-r_base,0]) {
//Extrude the wall profile in circle; same as you would at a corner of bin
//Intersection - limit it to the section where the lip would not interfere with the base
intersection() {
translate([wall_thickness, -r_base*1.5, 0]) cube([wall_thickness, r_base*5, (h_lip)*5]);
translate([0,0,-$dh]) union() {
rotate_extrude(angle=90) profile_wall(height_mm);
translate([0, r_base*2, 0]) rotate_extrude(angle=-90) profile_wall(height_mm);
}
}
//Fill the gap between rotational extrusions (think of it as the gap between bins, if this was multiple bins instead of tabs)
difference() {
translate([wall_thickness, 0, -h_lip*0.5]) cube([(r_base-wall_thickness)-r_f1, r_base*2, h_lip*1.5]);
cylinder(h=h_lip*3, r=r_base-r_f1, center=true);
translate([0, r_base*2, 0]) cylinder(h=h_lip*3, r=r_base-r_f1, center=true);
}
}
}
}
Loading