mirror of
https://github.com/kennetek/gridfinity-rebuilt-openscad.git
synced 2024-05-15 03:44:51 +00:00
Merge ee5ddedcad
into c95938da94
This commit is contained in:
commit
b433526491
|
@ -54,7 +54,9 @@ 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]
|
||||
// scoop weight percentage. 0 disables scoop, 1 is regular scoop. Any real number will scale the scoop.
|
||||
// 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
|
||||
only_corners = false;
|
||||
|
@ -155,4 +157,4 @@ gridfinityInit(gx, gy, height(6), 0, 42) {
|
|||
cut(j*gx/(i+1),gy-i-1,gx/(i+1),1,0);
|
||||
}
|
||||
gridfinityBase(gx, gy, 42, 0, 0, 1);
|
||||
*/
|
||||
*/
|
||||
|
|
|
@ -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]
|
||||
|
@ -94,4 +95,4 @@ module gridfinityLite(gridx, gridy, gridz, gridz_define, style_lip, enable_zsnap
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,9 @@ module gridfinityInit(gx, gy, h, h0 = 0, l = l_grid) {
|
|||
block_wall(gx, gy, l) {
|
||||
if (style_lip == 0) profile_wall();
|
||||
else profile_wall2();
|
||||
}
|
||||
}
|
||||
|
||||
if ((style_lip == 0) && stacking_tabs) generate_tabs();
|
||||
}
|
||||
}
|
||||
// Function to include in the custom() module to individually slice bins
|
||||
|
@ -494,3 +496,82 @@ module sweep_rounded(w=10, h=10) {
|
|||
}
|
||||
}
|
||||
|
||||
module generate_tabs() {
|
||||
if ($gxx > 1) {
|
||||
for (xtab=[1:$gxx-1]) {
|
||||
lip_tab(xtab, 0);
|
||||
lip_tab(xtab, $gyy);
|
||||
}
|
||||
}
|
||||
|
||||
if ($gyy > 1) {
|
||||
for (ytab=[1:$gyy-1]) {
|
||||
lip_tab(0, ytab);
|
||||
lip_tab($gxx, ytab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module lip_tab(x, y) {
|
||||
|
||||
//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;
|
||||
|
||||
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();
|
||||
translate([0, r_base*2, 0]) rotate_extrude(angle=-90) profile_wall();
|
||||
}
|
||||
}
|
||||
//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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// module lip_tab(x, y) {
|
||||
// // I can't figure out what the wall thickness is, I'll assume 2.15
|
||||
|
||||
// wall_thickness = 2.15;
|
||||
|
||||
// // how much of the first outer bevel sits "above" the lip when these mate properly
|
||||
// // This is an odd unit of measure.
|
||||
// percent_over = .33;
|
||||
// distance_offset = (1 - percent_over) * wall_thickness;
|
||||
|
||||
// rot = (x == $gxx) ? 180 : ((x == 0) ? 0 : ((y == $gyy) ? 270 : 90));
|
||||
|
||||
// translate(
|
||||
// [(x * l_grid) - ((l_grid * $gxx / 2)),
|
||||
// (y * l_grid) - ((l_grid * $gyy / 2)),
|
||||
// $dh + h_lip + distance_offset]) {
|
||||
// rotate([0, 0, rot]) {
|
||||
// difference() {
|
||||
// translate([d_clear, 2 * r_c2, 0])
|
||||
// rotate([90, 0, 0])
|
||||
// hull() {
|
||||
// cube([r_f1, r_f1, 4 * r_c2]);
|
||||
// translate([wall_thickness - d_clear - r_f1, 0]) cube([r_f1, r_f1, 4 * r_c2]);
|
||||
// translate([wall_thickness - d_clear - r_f1, h_base - distance_offset - r_f1]) cube([r_f1, r_f1, 4 * r_c2]);
|
||||
// translate([r_f1, h_base - distance_offset - r_f1]) cylinder(r=r_f1, h=4* r_c2);
|
||||
// }
|
||||
// gridfinityBase(2, 2, l_grid, 1, 1, 0, 0.5, false);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
|
Loading…
Reference in a new issue