From 0ad5b17f07d5de3268aa8a87d171a4f2e939bb7c Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Fri, 2 Aug 2024 00:24:25 -0700 Subject: [PATCH] feat: Use double layer electronic mount --- nhf/touhou/houjuu_nue/electronics.py | 10 ++++------ nhf/touhou/houjuu_nue/wing.py | 21 +++++---------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/nhf/touhou/houjuu_nue/electronics.py b/nhf/touhou/houjuu_nue/electronics.py index d29fd17..da980db 100644 --- a/nhf/touhou/houjuu_nue/electronics.py +++ b/nhf/touhou/houjuu_nue/electronics.py @@ -493,12 +493,10 @@ class ElectronicBoard(Model): length: float = 70.0 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), + Hole(x=25, y=70), + Hole(x=25, y=-70), + Hole(x=-25, y=70), + Hole(x=-25, y=-70), ]) panel_thickness: float = 25.4 / 16 mount_panel_thickness: float = 25.4 / 4 diff --git a/nhf/touhou/houjuu_nue/wing.py b/nhf/touhou/houjuu_nue/wing.py index 03867f4..e0fbb20 100644 --- a/nhf/touhou/houjuu_nue/wing.py +++ b/nhf/touhou/houjuu_nue/wing.py @@ -462,22 +462,11 @@ class WingProfile(Model): result.add(self.electronic_board.assembly(), name="electronic_board") for hole in self.electronic_board.mount_holes: assert hole.tag - nut_name = f"electronic_board_{hole.tag}_nut" - ( - result - .addS( - self.electronic_board.nut.assembly(), - name=nut_name) - .constrain( - f"electronic_mount?{hole.rev_tag}", - f'{nut_name}?top', - "Plane" - ) - .constrain( - f"electronic_mount?{hole.tag}", - f'electronic_board/{hole.tag}_spacer?bot', - "Plane" - ) + result.constrain( + f"electronic_mount2?{hole.tag}", + f'electronic_board/{hole.tag}_spacer?top', + "Plane", + param=0 ) return result.solve()