From 9f41f2ea3c7f719ac80e52d2a8ad2d911b79552d Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Fri, 12 Jul 2024 11:04:28 -0700 Subject: [PATCH] feat: Wing anchors for right side --- nhf/touhou/houjuu_nue/wing.py | 59 +++++++++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 6 deletions(-) diff --git a/nhf/touhou/houjuu_nue/wing.py b/nhf/touhou/houjuu_nue/wing.py index feb57a8..d39ca76 100644 --- a/nhf/touhou/houjuu_nue/wing.py +++ b/nhf/touhou/houjuu_nue/wing.py @@ -379,12 +379,12 @@ class WingProfile: ) return profile def surface_s1(self, - thickness:float = 25.4/16, - shoulder_mount_inset: float=20, - shoulder_joint_child_height: float=80, - elbow_mount_inset: float=20, - elbow_joint_parent_height: float=60, - front: bool=True) -> Cq.Workplane: + thickness: float = 25.4/16, + shoulder_mount_inset: float = 20, + shoulder_joint_child_height: float = 80, + elbow_mount_inset: float = 20, + elbow_joint_parent_height: float = 60, + front: bool = True) -> Cq.Workplane: assert shoulder_joint_child_height < self.shoulder_height assert elbow_joint_parent_height < self.elbow_height h = (self.shoulder_height - shoulder_joint_child_height) / 2 @@ -415,6 +415,36 @@ class WingProfile: .polygon(self._mask_elbow(), mode='s') ) return profile + def surface_s2(self, + thickness: float = 25.4/16, + elbow_mount_inset: float = 20, + elbow_joint_child_height: float = 80, + wrist_mount_inset: float = 20, + wrist_joint_parent_height: float = 60, + front: bool = True) -> Cq.Workplane: + assert elbow_joint_child_height < self.elbow_height + h = (self.elbow_height - elbow_joint_child_height) / 2 + tags_elbow = [ + ("elbow_bot", + self.elbow_to_abs(elbow_mount_inset, h), + self.elbow_angle + 90), + ("elbow_top", + self.elbow_to_abs(elbow_mount_inset, h + elbow_joint_child_height), + self.elbow_angle + 270), + ] + h = (self.wrist_height - wrist_joint_parent_height) / 2 + tags_wrist = [ + ("wrist_bot", + self.wrist_to_abs(-wrist_mount_inset, h), + self.wrist_angle + 90), + ("wrist_top", + self.wrist_to_abs(-wrist_mount_inset, h + wrist_joint_parent_height), + self.wrist_angle + 270), + ] + profile = self.profile_s2() + tags = tags_elbow + tags_wrist + return nhf.utils.extrude_with_markers(profile, thickness, tags, reverse=front) + def profile_s3(self) -> Cq.Sketch: profile = ( self.profile() @@ -422,6 +452,23 @@ class WingProfile: .polygon(self._mask_wrist(), mode='s') ) return profile + def surface_s3(self, + thickness: float = 25.4/16, + wrist_mount_inset: float = 20, + wrist_joint_child_height: float = 80, + front: bool = True) -> Cq.Workplane: + assert wrist_joint_child_height < self.wrist_height + h = (self.wrist_height - wrist_joint_child_height) / 2 + tags = [ + ("wrist_bot", + self.elbow_to_abs(wrist_mount_inset, h), + self.elbow_angle + 90), + ("wrist_top", + self.elbow_to_abs(wrist_mount_inset, h + wrist_joint_child_height), + self.elbow_angle + 270), + ] + profile = self.profile_s3() + return nhf.utils.extrude_with_markers(profile, thickness, tags, reverse=front) def wing_r1s1_profile(self) -> Cq.Sketch: