Flesh out basic dressup feature tests
This commit is contained in:
@@ -26,7 +26,7 @@ class TestChamfer(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.Doc = FreeCAD.newDocument("PartDesignTestChamfer")
|
||||
|
||||
def testChamfer(self):
|
||||
def testChamferCubeToOctahedron(self):
|
||||
self.Body = self.Doc.addObject('PartDesign::Body','Body')
|
||||
self.Box = self.Doc.addObject('PartDesign::AdditiveBox','Box')
|
||||
self.Body.addObject(self.Box)
|
||||
@@ -34,15 +34,13 @@ class TestChamfer(unittest.TestCase):
|
||||
self.Box.Width=10.00
|
||||
self.Box.Height=10.00
|
||||
self.Doc.recompute()
|
||||
self.Revolution = self.Doc.addObject("PartDesign::Revolution","Revolution")
|
||||
self.Revolution.Profile = (self.Box, ["Face6"])
|
||||
self.Revolution.ReferenceAxis = (self.Doc.Y_Axis,[""])
|
||||
self.Revolution.Angle = 180.0
|
||||
self.Revolution.Reversed = 1
|
||||
self.Body.addObject(self.Revolution)
|
||||
self.Chamfer = self.Doc.addObject("PartDesign::Chamfer","Chamfer")
|
||||
self.Chamfer.Base = (self.Box, ['Face'+str(i+1) for i in range(6)])
|
||||
self.Chamfer.Size = 4.999999
|
||||
self.Body.addObject(self.Chamfer)
|
||||
self.Doc.recompute()
|
||||
# depending on if refinement is done we expect 8 or 10 faces
|
||||
self.assertIn(len(self.Revolution.Shape.Faces), (8, 10))
|
||||
self.MajorFaces = [face for face in self.Chamfer.Shape.Faces if face.Area > 1e-3]
|
||||
self.assertEqual(len(self.MajorFaces), 8)
|
||||
|
||||
def tearDown(self):
|
||||
#closing doc
|
||||
|
||||
Reference in New Issue
Block a user