Added test of 2D drawing, including threePointArc and moveTo. This should be expanded later to include all 2D drawing constructs.
This commit is contained in:
parent
73688899aa
commit
7dea259659
|
@ -546,6 +546,23 @@ class TestCadQuery(BaseTest):
|
|||
|
||||
self.saveModel(r)
|
||||
|
||||
def test2DDrawing(self):
|
||||
"""Draw things like 2D lines and arcs, should be expanded later to include all 2D constructs"""
|
||||
s = Workplane(Plane.XY())
|
||||
r = s.lineTo(1.0, 0.0) \
|
||||
.lineTo(1.0, 1.0) \
|
||||
.threePointArc((1.0, 1.5), (0.0, 1.0)) \
|
||||
.lineTo(0.0, 0.0) \
|
||||
.moveTo(1.0, 0.0) \
|
||||
.lineTo(2.0, 0.0) \
|
||||
.lineTo(2.0, 2.0) \
|
||||
.threePointArc((2.0, 2.5), (0.0, 2.0)) \
|
||||
.lineTo(-2.0, 2.0) \
|
||||
.lineTo(-2.0, 0.0) \
|
||||
.close()
|
||||
|
||||
self.assertEqual(1, r.wires().size())
|
||||
|
||||
def testOccBottle(self):
|
||||
"""
|
||||
Make the OCC bottle example.
|
||||
|
|
Loading…
Reference in New Issue
Block a user