@@ -137,7 +137,7 @@ module gridfinityInit(gx, gy, h, h0 = 0, l = l_grid, sl = 0) {
137
137
else profile_wall2(h);
138
138
}
139
139
140
- if ((style_lip == 0 ) && stacking_tabs) generate_tabs();
140
+ if ((style_lip == 0 ) && stacking_tabs) generate_tabs(h );
141
141
}
142
142
// Function to include in the custom() module to individually slice bins
143
143
// Will try to clamp values to fit inside the provided base size
@@ -627,33 +627,47 @@ module profile_cutter_tab(h, tab, ang) {
627
627
628
628
}
629
629
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
+ }
634
637
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
+ }
639
645
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;
641
650
642
651
translate (
643
652
[(x * l_grid) - ((l_grid * $ gxx / 2 )),
644
653
(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 );
655
664
}
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 );
657
671
}
658
672
}
659
673
}
0 commit comments