From b8e14c126474ab5e9af69c6a381ba8abd9ae629e Mon Sep 17 00:00:00 2001 From: Arthur Moore Date: Thu, 29 Aug 2024 00:51:21 -0400 Subject: [PATCH] Fix only_corners not working correctly --- gridfinity-rebuilt-utility.scad | 2 +- tests/test_bins.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gridfinity-rebuilt-utility.scad b/gridfinity-rebuilt-utility.scad index 80f28e2..22a27a1 100644 --- a/gridfinity-rebuilt-utility.scad +++ b/gridfinity-rebuilt-utility.scad @@ -230,7 +230,7 @@ module gridfinityBase(gx, gy, l, dx, dy, hole_options=bundle_hole_options(), off if(only_corners) { difference(){ pattern_linear(gx/dbnx, gy/dbny, dbnx*l, dbny*l) - block_base(gx, gy, l, dbnx, dbny, 0, off); + block_base(gx, gy, l, dbnx, dbny, bundle_hole_options(), off); copy_mirror([0, 1, 0]) { copy_mirror([1, 0, 0]) { diff --git a/tests/test_bins.py b/tests/test_bins.py index 1c922b0..8959eea 100644 --- a/tests/test_bins.py +++ b/tests/test_bins.py @@ -37,6 +37,14 @@ class TestBinHoles(unittest.TestCase): vars["screw_holes"] = False self.scad_runner.create_image([], Path('no_holes.png')) + def test_only_corner_holes(self): + vars = self.scad_runner.parameters + vars["refined_holes"] = True + vars["magnet_holes"] = False + vars["screw_holes"] = False + vars["only_corners"] = True + self.scad_runner.create_image([], Path('only_corner_holes.png')) + def test_refined_holes(self): vars = self.scad_runner.parameters vars["refined_holes"] = True