From e780ad937da8cd2c9bb94ebfa62a41c9ca8429d6 Mon Sep 17 00:00:00 2001 From: Martin Budden Date: Wed, 8 Sep 2021 15:05:29 +0100 Subject: [PATCH] Reordered cone parameters. --- cadquery/cq.py | 2 +- tests/test_cadquery.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cadquery/cq.py b/cadquery/cq.py index 57cc3c7c9..54e84da6a 100644 --- a/cadquery/cq.py +++ b/cadquery/cq.py @@ -3803,9 +3803,9 @@ def sphere( def cone( self: T, height: float, - radius: float = 0, radius1: float = None, radius2: float = None, + radius: float = 0, direct: Vector = Vector(0, 0, 1), angle: float = 360, combine: bool = True, diff --git a/tests/test_cadquery.py b/tests/test_cadquery.py index 694a08bf4..312f07e36 100644 --- a/tests/test_cadquery.py +++ b/tests/test_cadquery.py @@ -2482,16 +2482,21 @@ def testConeDefaults(self): self.assertEqual(1, s.solids().size()) self.assertEqual(2, s.faces().size()) self.assertEqual(2, s.vertices().size()) - s1 = Workplane("XY").cone(40, radius1=10, radius2=5) + s1 = Workplane("XY").cone(40, 10, 5) self.assertEqual(1, s1.size()) self.assertEqual(1, s1.solids().size()) self.assertEqual(3, s1.faces().size()) self.assertEqual(2, s1.vertices().size()) - s2 = Workplane("XY").cone(40, radius1=10, radius2=5, combine=False) + s2 = Workplane("XY").cone(40, radius1=10, radius2=5) self.assertEqual(1, s2.size()) self.assertEqual(1, s2.solids().size()) self.assertEqual(3, s2.faces().size()) self.assertEqual(2, s2.vertices().size()) + s3 = Workplane("XY").cone(40, radius1=10, radius2=5, combine=False) + self.assertEqual(1, s3.size()) + self.assertEqual(1, s3.solids().size()) + self.assertEqual(3, s3.faces().size()) + self.assertEqual(2, s3.vertices().size()) def testWedgeDefaults(self): s = Workplane("XY").wedge(10, 10, 10, 5, 5, 5, 5)