Cosplay/nhf/touhou/houjuu_nue/test.py

31 lines
934 B
Python

import unittest
import cadquery as Cq
import nhf.touhou.houjuu_nue as M
class Test(unittest.TestCase):
def test_hs_joint_parent(self):
p = M.Parameters()
obj = p.hs_joint_parent()
self.assertIsInstance(obj.val().solids(), Cq.Solid, msg="H-S joint must be in one piece")
def test_wing_root(self):
p = M.Parameters()
obj = p.wing_root()
self.assertIsInstance(obj.solids(), Cq.Solid, msg="Wing root must be in one piece")
def test_wings(self):
p = M.Parameters()
p.wing_r1()
def test_harness(self):
p = M.Parameters()
p.harness_assembly()
def test_trident(self):
p = M.Parameters()
assembly = p.trident_assembly()
bbox = assembly.toCompound().BoundingBox()
length = bbox.zlen
self.assertGreater(length, 1300)
self.assertLess(length, 1700)
if __name__ == '__main__':
unittest.main()