Skip to content

Commit c5456e7

Browse files
committed
Add changes suggested by @Brunius
This adds the suggestions made by @Brunius in issue #122.
1 parent 7e78edc commit c5456e7

File tree

2 files changed

+35
-23
lines changed

2 files changed

+35
-23
lines changed

gridfinity-rebuilt-bins.scad

-2
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,8 @@ enable_zsnap = false;
7070
style_tab = 1; //[0:Full,1:Auto,2:Left,3:Center,4:Right,5:None]
7171
// how should the top lip act
7272
style_lip = 0; //[0: Regular lip, 1:remove lip subtractively, 2: remove lip and retain height]
73-
7473
// generate tabs on the lid to help align stacked bins
7574
stacking_tabs = false;
76-
7775
// scoop weight percentage. 0 disables scoop, 1 is regular scoop. Any real number will scale the scoop.
7876
scoop = 1; //[0:0.1:1]
7977
// only cut magnet/screw holes at the corners of the bin to save uneccesary print time

gridfinity-rebuilt-utility.scad

+35-21
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ module gridfinityInit(gx, gy, h, h0 = 0, l = l_grid, sl = 0) {
137137
else profile_wall2(h);
138138
}
139139

140-
if ((style_lip == 0) && stacking_tabs) generate_tabs();
140+
if ((style_lip == 0) && stacking_tabs) generate_tabs(h);
141141
}
142142
// Function to include in the custom() module to individually slice bins
143143
// Will try to clamp values to fit inside the provided base size
@@ -627,33 +627,47 @@ module profile_cutter_tab(h, tab, ang) {
627627

628628
}
629629

630-
module lip_tab(x, y) {
631-
// I can't figure out what the wall thickness is, I'll assume 2.15
632-
633-
wall_thickness = 2.15;
630+
module generate_tabs(height_mm) {
631+
if ($gxx > 1) {
632+
for (xtab=[1:$gxx-1]) {
633+
lip_tab(xtab, 0, height_mm);
634+
lip_tab(xtab, $gyy, height_mm);
635+
}
636+
}
634637

635-
// how much of the first outer bevel sits "above" the lip when these mate properly
636-
// This is an odd unit of measure.
637-
percent_over = .33;
638-
distance_offset = (1 - percent_over) * wall_thickness;
638+
if ($gyy > 1) {
639+
for (ytab=[1:$gyy-1]) {
640+
lip_tab(0, ytab, height_mm);
641+
lip_tab($gxx, ytab, height_mm);
642+
}
643+
}
644+
}
639645

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

642651
translate(
643652
[(x * l_grid) - ((l_grid * $gxx / 2)),
644653
(y * l_grid) - ((l_grid * $gyy / 2)),
645-
$dh + h_lip + distance_offset]) {
646-
rotate([0, 0, rot]) {
647-
difference() {
648-
translate([d_clear, 2 * r_c2, 0])
649-
rotate([90, 0, 0])
650-
hull() {
651-
cube([r_f1, r_f1, 4 * r_c2]);
652-
translate([wall_thickness - d_clear - r_f1, 0]) cube([r_f1, r_f1, 4 * r_c2]);
653-
translate([wall_thickness - d_clear - r_f1, h_base - distance_offset - r_f1]) cube([r_f1, r_f1, 4 * r_c2]);
654-
translate([r_f1, h_base - distance_offset - r_f1]) cylinder(r=r_f1, h=4* r_c2);
654+
$dh+h_base]) {
655+
rotate([0, 0, rot])
656+
translate([-r_base-d_clear,-r_base,0]) {
657+
//Extrude the wall profile in circle; same as you would at a corner of bin
658+
//Intersection - limit it to the section where the lip would not interfere with the base
659+
intersection() {
660+
translate([wall_thickness, -r_base*1.5, 0]) cube([wall_thickness, r_base*5, (h_lip)*5]);
661+
translate([0,0,-$dh]) union() {
662+
rotate_extrude(angle=90) profile_wall(height_mm);
663+
translate([0, r_base*2, 0]) rotate_extrude(angle=-90) profile_wall(height_mm);
655664
}
656-
gridfinityBase(2, 2, l_grid, 1, 1, 0, 0.5, false);
665+
}
666+
//Fill the gap between rotational extrusions (think of it as the gap between bins, if this was multiple bins instead of tabs)
667+
difference() {
668+
translate([wall_thickness, 0, -h_lip*0.5]) cube([(r_base-wall_thickness)-r_f1, r_base*2, h_lip*1.5]);
669+
cylinder(h=h_lip*3, r=r_base-r_f1, center=true);
670+
translate([0, r_base*2, 0]) cylinder(h=h_lip*3, r=r_base-r_f1, center=true);
657671
}
658672
}
659673
}

0 commit comments

Comments
 (0)