From caf8fb477a4c80b8847c0871bef51a42a7a52594 Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Mon, 24 Jun 2024 11:13:11 -0700 Subject: [PATCH] test: Joint integrity --- nhf/test.py | 5 +++++ nhf/touhou/houjuu_nue/test.py | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/nhf/test.py b/nhf/test.py index 03015ad..9c215ff 100644 --- a/nhf/test.py +++ b/nhf/test.py @@ -1,8 +1,13 @@ import unittest +import cadquery as Cq import nhf.joints 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): nhf.joints.hirth_assembly() def test_joints_comma_assembly(self): diff --git a/nhf/touhou/houjuu_nue/test.py b/nhf/touhou/houjuu_nue/test.py index 435d7e8..91808a7 100644 --- a/nhf/touhou/houjuu_nue/test.py +++ b/nhf/touhou/houjuu_nue/test.py @@ -1,11 +1,17 @@ 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() + assert isinstance(obj.val().solids(), Cq.Solid), "H-S joint must be in one piece" def test_wing_root(self): 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): p = M.Parameters() p.wing_r1()