@@ -477,32 +477,31 @@ module generate_tabs() {
477
477
478
478
479
479
module lip_tab(x, y) {
480
- // I can't figure out what the wall thickness is, I'll assume 2.15
481
480
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;
490
484
491
485
translate (
492
486
[(x * l_grid) - ((l_grid * $ gxx / 2 )),
493
487
(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( );
504
498
}
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 );
506
505
}
507
506
}
508
507
}
0 commit comments