Skip to content

Commit

Permalink
Improved cone docstring. Removed saveModel from cone test.
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbudden committed Sep 2, 2021
1 parent 0708779 commit 9855fc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions cadquery/cq.py
Original file line number Diff line number Diff line change
Expand Up @@ -3831,11 +3831,14 @@ def cone(
:type combine: true to combine shapes, false otherwise
:param clean: call :py:meth:`clean` afterwards to have a clean shape
:return: A cone object for each point on the stack
One cone is created for each item on the current stack. If no items are on the stack, one
cone is created using the current workplane center.
If combine is true, the result will be a single object on the stack. If a solid was found
in the chain, the result is that solid with all cones produced fused onto it otherwise,
the result is the combination of all the produced cones.
If combine is false, the result will be a list of the cones produced.
"""

Expand Down
2 changes: 0 additions & 2 deletions tests/test_cadquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -2477,13 +2477,11 @@ def testCylinderCentering(self):
)
def testConeDefaults(self):
s = Workplane("XY").cone(40, 10)
self.saveModel(s)
self.assertEqual(1, s.size())
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)
self.saveModel(s)
self.assertEqual(1, s1.size())
self.assertEqual(1, s1.solids().size())
self.assertEqual(3, s1.faces().size())
Expand Down

0 comments on commit 9855fc2

Please sign in to comment.