aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2023-01-24 02:39:41 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2023-01-24 02:39:41 +0100
commitd7c7274170dc4dc3704e5b88c76d44ca9d9cbd83 (patch)
tree186f944cb5d270e43b7024e9a2b9c1f2346cade1
parent8e28165b815ecaf2ac273cbc386750a761765fdc (diff)
downloadoscad_gridfinity-d7c7274170dc4dc3704e5b88c76d44ca9d9cbd83.tar.gz
helper functions
-rw-r--r--gridfinity.scad7
1 files changed, 6 insertions, 1 deletions
diff --git a/gridfinity.scad b/gridfinity.scad
index c67fe3c..d4cf924 100644
--- a/gridfinity.scad
+++ b/gridfinity.scad
@@ -8,6 +8,7 @@ width_tolerance = 41.5;
rounding = 3.75;
minimal_thickness = 1.5;
+wall_thickness = 2.95; // thickness of stacking lip
// Get top of GridFinity object from GF units
function gf_top(units_z) =
@@ -26,6 +27,11 @@ function flatten(l) = [ for (a = l) for (b = a) b ] ;
function gf_top_center(units_x, units_y, units_z) =
flatten([gf_center(units_x,units_y),gf_top(units_z)]);
+function gf_inner_origin() = [-20.75 + wall_thickness,-20.75 + wall_thickness];
+
+// usable inner space
+function gf_inner(units_l) = 42*units_l -1 - 2*wall_thickness;
+
module rounding(r,angle) {
rotate(angle,[0,0,1])
translate([-r + 0.01, -r + 0.01])
@@ -172,7 +178,6 @@ module gridfinity(units_x, units_y, units_z, lip = true, magnets = false, fill =
// 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])