diff --git a/cadquery/cq.py b/cadquery/cq.py index fd614ef..a84a010 100644 --- a/cadquery/cq.py +++ b/cadquery/cq.py @@ -1773,7 +1773,7 @@ def close(self): s = Workplane().lineTo(1,0).lineTo(1,1).close().extrude(0.2) """ - endPoint = self._findFromPoint(False) + endPoint = self._findFromPoint(True) startPoint = self.ctx.firstPoint # Check if there is a distance between startPoint and endPoint diff --git a/tests/TestCadQuery.py b/tests/TestCadQuery.py index 9b5a245..4085db3 100644 --- a/tests/TestCadQuery.py +++ b/tests/TestCadQuery.py @@ -1607,3 +1607,13 @@ def testClose(self): # The b shape shall have twice the volume of the a shape. self.assertAlmostEqual(a.val().wrapped.Volume * 2.0, b.val().wrapped.Volume) + + # Testcase 3 from issue #238 + thickness = 3 + length = 10 + width = 5 + + obj = Workplane('XY', origin=(0, 0, -thickness / 2)) \ + .moveTo(length / 2, 0).threePointArc((0, width / 2), (-length / 2, 0)) \ + .threePointArc((0, -width / 2), (length / 2, 0)) \ + .close().extrude(thickness)