From 7fc0499ebe673c8c7d3892060d95917d8b6ba4fe Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Thu, 25 Jul 2024 22:40:44 -0700 Subject: [PATCH] feat: Add support structure to wing --- nhf/touhou/houjuu_nue/electronics.py | 2 ++ nhf/touhou/houjuu_nue/wing.py | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/nhf/touhou/houjuu_nue/electronics.py b/nhf/touhou/houjuu_nue/electronics.py index a17c819..300c6e0 100644 --- a/nhf/touhou/houjuu_nue/electronics.py +++ b/nhf/touhou/houjuu_nue/electronics.py @@ -484,8 +484,10 @@ class ElectronicBoard(Model): width: float = 170.0 mount_holes: list[Hole] = field(default_factory=lambda: [ Hole(x=30, y=80), + Hole(x=30, y=0), Hole(x=30, y=-80), Hole(x=-30, y=80), + Hole(x=-30, y=0), Hole(x=-30, y=-80), ]) panel_thickness: float = 25.4 / 16 diff --git a/nhf/touhou/houjuu_nue/wing.py b/nhf/touhou/houjuu_nue/wing.py index 080b097..8aa4d0e 100644 --- a/nhf/touhou/houjuu_nue/wing.py +++ b/nhf/touhou/houjuu_nue/wing.py @@ -47,6 +47,7 @@ class WingProfile(Model): # 1/4" acrylic for the spacer. Anything thinner would threathen structural # strength spacer_thickness: float = 25.4 / 4 + rod_width: float = 10.0 shoulder_joint: ShoulderJoint = field(default_factory=lambda: ShoulderJoint( )) @@ -290,7 +291,7 @@ class WingProfile(Model): flip_y=self.flip, centre_bot_top_tags=True, ) - @submodel(name="spacer-s0-shoulder") + @submodel(name="spacer-s0-base") def spacer_s0_base(self) -> MountingBox: """ Base side connects to H-S joint @@ -635,6 +636,13 @@ class WingProfile(Model): profile = self.profile_s1() return extrude_with_markers( profile, self.panel_thickness, tags, reverse=front) + @submodel(name="spacer-s1-rod") + def spacer_s1_rod(self) -> MountingBox: + return MountingBox( + length=self.s1_thickness, + width=self.rod_width, + thickness=self.panel_thickness, + ) @submodel(name="spacer-s1-shoulder") def spacer_s1_shoulder(self) -> MountingBox: sign = 1#-1 if self.flip else 1 @@ -773,6 +781,13 @@ class WingProfile(Model): ] return extrude_with_markers( profile, self.panel_thickness, tags, reverse=not front) + @submodel(name="spacer-s2-rod") + def spacer_s2_rod(self) -> MountingBox: + return MountingBox( + length=self.s2_thickness, + width=self.rod_width, + thickness=self.panel_thickness, + ) @submodel(name="spacer-s2-elbow") def spacer_s2_elbow(self) -> MountingBox: return self._spacer_from_disk_joint( @@ -907,6 +922,13 @@ class WingProfile(Model): Cq.Location.from2d(0, -self.wrist_h2)), ] return extrude_with_markers(profile, self.panel_thickness, tags, reverse=not front) + @submodel(name="spacer-s3-rod") + def spacer_s3_rod(self) -> MountingBox: + return MountingBox( + length=self.s3_thickness, + width=self.rod_width, + thickness=self.panel_thickness, + ) @submodel(name="spacer-s3-wrist") def spacer_s3_wrist(self) -> MountingBox: return self._spacer_from_disk_joint(