From ba33e79b9a9ab6a5d38deb08a0f96969a72d7942 Mon Sep 17 00:00:00 2001 From: Greyson Christoforo Date: Wed, 8 Jun 2022 10:21:09 +0100 Subject: [PATCH 1/2] stop `eachpoint(..., useLocalCoordinates=False)` from manipulating the object's location fixes https://github.com/CadQuery/cadquery/issues/1099 --- cadquery/cq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cadquery/cq.py b/cadquery/cq.py index cd787dc39..7e04e7ee0 100644 --- a/cadquery/cq.py +++ b/cadquery/cq.py @@ -2476,7 +2476,7 @@ def eachpoint( if useLocalCoordinates: res = [callback(p).move(loc) for p in pnts] else: - res = [callback(p * loc) for p in pnts] + res = [callback(p) for p in pnts] for r in res: if isinstance(r, Wire) and not r.forConstruction: From 87890b83d253920fd9a1e03c70190f85716ac217 Mon Sep 17 00:00:00 2001 From: Greyson Christoforo Date: Sat, 7 Jan 2023 17:11:00 +0000 Subject: [PATCH 2/2] test(testEachpoint): set useLocalCoordinates --- tests/test_cadquery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_cadquery.py b/tests/test_cadquery.py index 4ba12bd27..cc23eb167 100644 --- a/tests/test_cadquery.py +++ b/tests/test_cadquery.py @@ -5119,7 +5119,7 @@ def testEachpoint(self): Face.makePlane(1, 1), ] ) - .eachpoint(lambda l: Face.makePlane(1, 1).locate(l)) + .eachpoint(lambda l: Face.makePlane(1, 1).locate(l), True) ) self.assertTrue(len(r1.objects) == 4)