Added tests of the text feature
This commit is contained in:
@ -1800,3 +1800,17 @@ class TestCadQuery(BaseTest):
|
||||
|
||||
# The obj1 shape shall have the same volume as the obj2 shape.
|
||||
self.assertAlmostEqual(obj1.val().Volume(), obj2.val().Volume())
|
||||
|
||||
def testText(self):
|
||||
|
||||
box = Workplane("XY" ).box(4, 4, 0.5)
|
||||
|
||||
obj1 = box.faces('>Z').workplane().text('CQ 2.0',0.5,-.05,cut=True)
|
||||
|
||||
#combined object should have smaller volume
|
||||
self.assertGreater(box.val().Volume(),obj1.val().Volume())
|
||||
|
||||
obj2 = box.faces('>Z').workplane().text('CQ 2.0',0.5,.05,cut=False,combine=True)
|
||||
#combined object should have bigger volume
|
||||
self.assertLess(box.val().Volume(),obj2.val().Volume())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user