From 4dd43f7151d497270b22352d9312eeb9ce981d37 Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Thu, 27 Jun 2024 23:22:54 -0400 Subject: [PATCH] refactor: Separate H-S joint component --- nhf/touhou/houjuu_nue/__init__.py | 16 ++++++++++------ nhf/touhou/houjuu_nue/test.py | 6 ++++++ nhf/touhou/houjuu_nue/wing.py | 26 +++++++++++++++++++++----- 3 files changed, 37 insertions(+), 11 deletions(-) diff --git a/nhf/touhou/houjuu_nue/__init__.py b/nhf/touhou/houjuu_nue/__init__.py index fbdc328..38e4f81 100644 --- a/nhf/touhou/houjuu_nue/__init__.py +++ b/nhf/touhou/houjuu_nue/__init__.py @@ -174,16 +174,20 @@ class Parameters: (-dx, dx), ] + def hs_joint_component(self): + hirth = nhf.joints.hirth_joint( + radius=self.hs_joint_radius, + radius_inner=self.hs_joint_radius_inner, + tooth_height=self.hs_joint_tooth_height, + base_height=self.hs_joint_ring_thickness) + return hirth + def hs_joint_parent(self): """ Parent part of the Houjuu-Scarlett joint, which is composed of a Hirth coupling, a cylindrical base, and a mounting base. """ - hirth = nhf.joints.hirth_joint( - radius=self.hs_joint_radius, - radius_inner=self.hs_joint_radius_inner, - tooth_height=self.hs_joint_tooth_height, - base_height=self.hs_joint_ring_thickness).val() + hirth = self.hs_joint_component().val() #hirth = ( # hirth # .faces("X").tag("conn") + return result