From 80fb2e997d0e8122cb96999c323ba6433bf9b7e5 Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Thu, 4 Jul 2024 01:13:22 -0700 Subject: [PATCH] feat: Build trident handle --- nhf/build.py | 2 +- nhf/touhou/houjuu_nue/__init__.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/nhf/build.py b/nhf/build.py index c3b0e4a..7b2531d 100644 --- a/nhf/build.py +++ b/nhf/build.py @@ -118,13 +118,13 @@ class Model: Build all targets in this model """ output_dir = Path(output_dir) - output_dir.mkdir(exist_ok=True, parents=True) for k, target in Target.methods(self).items(): output_file = output_dir / target.file_name(k) if output_file.is_file(): if verbose >= 1: print(f"{Fore.GREEN}Skipping{Style.RESET_ALL} {output_file}") continue + output_file.parent.mkdir(exist_ok=True, parents=True) if verbose >= 1: print(f"{Fore.BLUE}Building{Style.RESET_ALL} {output_file}") diff --git a/nhf/touhou/houjuu_nue/__init__.py b/nhf/touhou/houjuu_nue/__init__.py index ba99b00..8f5679e 100644 --- a/nhf/touhou/houjuu_nue/__init__.py +++ b/nhf/touhou/houjuu_nue/__init__.py @@ -112,6 +112,13 @@ class Parameters(Model): assert self.wing_root_radius > self.hs_hirth_joint.radius,\ "Wing root must be large enough to accomodate joint" + @target(name="trident/handle-connector") + def handle_connector(self): + return self.trident_handle.connector() + @target(name="trident/handle-insertion") + def handle_insertion(self): + return self.trident_handle.insertion() + def harness_profile(self) -> Cq.Sketch: """