From d7c7274170dc4dc3704e5b88c76d44ca9d9cbd83 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Tue, 24 Jan 2023 02:39:41 +0100 Subject: helper functions --- gridfinity.scad | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gridfinity.scad') 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]) -- cgit v1.2.3