aboutsummaryrefslogtreecommitdiff
path: root/gridfinity.scad
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2023-01-23 21:22:23 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2023-01-23 21:22:23 +0100
commitf71d6271675282f121cca286a932cab236f8f542 (patch)
tree002a93c204849669c39e0174f381c28667832c4d /gridfinity.scad
parentad581dba314fdbd54b9aad863189e4535ba75a14 (diff)
downloadoscad_gridfinity-f71d6271675282f121cca286a932cab236f8f542.tar.gz
add fill option
Diffstat (limited to 'gridfinity.scad')
-rw-r--r--gridfinity.scad16
1 files changed, 14 insertions, 2 deletions
diff --git a/gridfinity.scad b/gridfinity.scad
index a26e758..c67fe3c 100644
--- a/gridfinity.scad
+++ b/gridfinity.scad
@@ -148,7 +148,7 @@ module bottom_cutout(units_x, units_y) {
}
}
-module gridfinity(units_x, units_y, units_z, lip = true, magnets = false) {
+module gridfinity(units_x, units_y, units_z, lip = true, magnets = false, fill = true, bottom_height = 0) {
units_x = floor(abs(units_x));
units_y = floor(abs(units_y));
units_z = floor(abs(units_z));
@@ -167,7 +167,19 @@ module gridfinity(units_x, units_y, units_z, lip = true, magnets = false) {
linear_extrude(extr)
rounded_square(units_x * width - 0.5, units_y * width - 0.5, rounding);
}
- bottom_cutout(units_x, units_y);
+ union(){
+ bottom_cutout(units_x, units_y);
+
+ // remove solid block if set, leave walls
+ if (! fill) {
+ wall_thickness = 2.95; // thickness of stacking lip
+ extr = units_z * height - (4.75 + minimal_thickness) - bottom_height + 0.01;
+
+ translate([coord_centered(units_x), coord_centered(units_y), 4.75 + minimal_thickness + bottom_height])
+ linear_extrude(extr)
+ rounded_square(units_x * width - wall_thickness * 2, units_y * width - wall_thickness * 2, 0.7);
+ }
+ }
}
// Stacking Lip