From dcb3c31c1d751300194d43f93740944d3a7df2f8 Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Tue, 9 Jul 2024 22:22:48 -0700 Subject: [PATCH] feat: Prototype flag, spring re-parameter --- nhf/build.py | 2 ++ nhf/touhou/houjuu_nue/__init__.py | 19 ++++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/nhf/build.py b/nhf/build.py index 25e957f..dcfbba7 100644 --- a/nhf/build.py +++ b/nhf/build.py @@ -39,10 +39,12 @@ class Target: def __init__(self, method, name: str, + prototype: bool = False, kind: TargetKind = TargetKind.STL, **kwargs): self._method = method self.name = name + self.prototype = prototype self.kind = kind self.kwargs = kwargs def __str__(self): diff --git a/nhf/touhou/houjuu_nue/__init__.py b/nhf/touhou/houjuu_nue/__init__.py index e7c0337..6e3254d 100644 --- a/nhf/touhou/houjuu_nue/__init__.py +++ b/nhf/touhou/houjuu_nue/__init__.py @@ -103,6 +103,8 @@ class Parameters(Model): track_disk_height=5.0, rider_disk_height=7.0, radius_axle=8.0, + radius_spring=9 + 1.2 * 2, + spring_thickness=1.3, )) # Two holes on each side (top and bottom) are used to attach the shoulder @@ -149,8 +151,8 @@ class Parameters(Model): @target(name="trident/handle-insertion") def handle_insertion(self): return self.trident_handle.insertion() - @target(name="trident/proto-handle-terminal-connector") - def handle_experimental_connector(self): + @target(name="trident/proto-handle-connector", prototype=True) + def proto_handle_connector(self): return self.trident_handle.one_side_connector(height=15) @target(name="trident/handle-terminal-connector") def handle_terminal_connector(self): @@ -305,7 +307,7 @@ class Parameters(Model): #def joining_plate(self) -> Cq.Workplane: # return self.wing_joining_plate.plate() - @target(name="wing_root") + @target(name="wing/root") def wing_root(self) -> Cq.Assembly: """ Generate the wing root which contains a Hirth joint at its base and a @@ -320,7 +322,14 @@ class Parameters(Model): conn_thickness=self.wing_s0_thickness, ) - @target(name="shoulder_joint_parent") + @target(name="wing/proto-shoulder-joint-parent", prototype=True) + def proto_shoulder_joint_parent(self): + return self.shoulder_torsion_joint.track() + @target(name="wing/proto-shoulder-joint-child", prototype=True) + def proto_shoulder_joint_child(self): + return self.shoulder_torsion_joint.rider() + + @target(name="wing/shoulder_joint_parent") def shoulder_joint_parent(self) -> Cq.Workplane: joint = self.shoulder_torsion_joint # Thickness of the lip connecting this joint to the wing root @@ -365,7 +374,7 @@ class Parameters(Model): joint = self.shoulder_torsion_joint return self.wing_profile.shoulder_height - 2 * joint.total_height + 2 * joint.rider_disk_height - @target(name="shoulder_joint_child") + @target(name="wing/shoulder_joint_child") def shoulder_joint_child(self) -> Cq.Assembly: """ Creates the top/bottom shoulder child joint