test: Joint integrity

This commit is contained in:
Leni Aniva 2024-06-24 11:13:11 -07:00
parent d5ddbc4186
commit caf8fb477a
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
2 changed files with 12 additions and 1 deletions

View File

@ -1,8 +1,13 @@
import unittest import unittest
import cadquery as Cq
import nhf.joints import nhf.joints
class TestJoints(unittest.TestCase): class TestJoints(unittest.TestCase):
def test_joint_hirth(self):
j = nhf.joints.hirth_joint()
assert isinstance(j.val().solids(), Cq.Solid),\
"Hirth joint must be in one piece"
def test_joints_hirth_assembly(self): def test_joints_hirth_assembly(self):
nhf.joints.hirth_assembly() nhf.joints.hirth_assembly()
def test_joints_comma_assembly(self): def test_joints_comma_assembly(self):

View File

@ -1,11 +1,17 @@
import unittest import unittest
import cadquery as Cq
import nhf.touhou.houjuu_nue as M import nhf.touhou.houjuu_nue as M
class Test(unittest.TestCase): class Test(unittest.TestCase):
def test_hs_joint_parent(self):
p = M.Parameters()
obj = p.hs_joint_parent()
assert isinstance(obj.val().solids(), Cq.Solid), "H-S joint must be in one piece"
def test_wing_root(self): def test_wing_root(self):
p = M.Parameters() p = M.Parameters()
p.wing_root() obj = p.wing_root()
assert isinstance(obj.solids(), Cq.Solid), "Wing root must be in one piece"
def test_wings(self): def test_wings(self):
p = M.Parameters() p = M.Parameters()
p.wing_r1() p.wing_r1()