Skip to content

Commit 18f1b0c

Browse files
committed
Add changes suggested by @Brunius
This adds the suggestions made by @Brunius in issue #122.
1 parent fc8dc87 commit 18f1b0c

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

gridfinity-rebuilt-utility.scad

+19-20
Original file line numberDiff line numberDiff line change
@@ -477,32 +477,31 @@ module generate_tabs() {
477477

478478

479479
module lip_tab(x, y) {
480-
// I can't figure out what the wall thickness is, I'll assume 2.15
481480

482-
wall_thickness = 2.15;
483-
484-
// how much of the first outer bevel sits "above" the lip when these mate properly
485-
// This is an odd unit of measure.
486-
percent_over = .33;
487-
distance_offset = (1 - percent_over) * wall_thickness;
488-
489-
rot = (x == $gxx) ? 180 : ((x == 0) ? 0 : ((y == $gyy) ? 270 : 90));
481+
//Calculate rotation of lip based on which edge it is on
482+
rot = (x == $gxx) ? 0 : ((x == 0) ? 180 : ((y == $gyy) ? 90 : 270));
483+
wall_thickness = r_base-r_c2+d_clear*2-r_c1;
490484

491485
translate(
492486
[(x * l_grid) - ((l_grid * $gxx / 2)),
493487
(y * l_grid) - ((l_grid * $gyy / 2)),
494-
$dh + h_lip + distance_offset]) {
495-
rotate([0, 0, rot]) {
496-
difference() {
497-
translate([d_clear, 2 * r_c2, 0])
498-
rotate([90, 0, 0])
499-
hull() {
500-
cube([r_f1, r_f1, 4 * r_c2]);
501-
translate([wall_thickness - d_clear - r_f1, 0]) cube([r_f1, r_f1, 4 * r_c2]);
502-
translate([wall_thickness - d_clear - r_f1, h_base - distance_offset - r_f1]) cube([r_f1, r_f1, 4 * r_c2]);
503-
translate([r_f1, h_base - distance_offset - r_f1]) cylinder(r=r_f1, h=4* r_c2);
488+
$dh+h_base]) {
489+
rotate([0, 0, rot])
490+
translate([-r_base-d_clear,-r_base,0]) {
491+
//Extrude the wall profile in circle; same as you would at a corner of bin
492+
//Intersection - limit it to the section where the lip would not interfere with the base
493+
intersection() {
494+
translate([wall_thickness, -r_base*1.5, 0]) cube([wall_thickness, r_base*5, (h_lip)*5]);
495+
translate([0,0,-$dh]) union() {
496+
rotate_extrude(angle=90) profile_wall();
497+
translate([0, r_base*2, 0]) rotate_extrude(angle=-90) profile_wall();
504498
}
505-
gridfinityBase(2, 2, l_grid, 1, 1, 0, 0.5, false);
499+
}
500+
//Fill the gap between rotational extrusions (think of it as the gap between bins, if this was multiple bins instead of tabs)
501+
difference() {
502+
translate([wall_thickness, 0, -h_lip*0.5]) cube([(r_base-wall_thickness)-r_f1, r_base*2, h_lip*1.5]);
503+
cylinder(h=h_lip*3, r=r_base-r_f1, center=true);
504+
translate([0, r_base*2, 0]) cylinder(h=h_lip*3, r=r_base-r_f1, center=true);
506505
}
507506
}
508507
}

0 commit comments

Comments
 (0)