feat: Use double layer electronic mount

This commit is contained in:
Leni Aniva 2024-08-02 00:24:25 -07:00
parent 2ccb4160db
commit 0ad5b17f07
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
2 changed files with 9 additions and 22 deletions

View File

@ -493,12 +493,10 @@ class ElectronicBoard(Model):
length: float = 70.0 length: float = 70.0
width: float = 170.0 width: float = 170.0
mount_holes: list[Hole] = field(default_factory=lambda: [ mount_holes: list[Hole] = field(default_factory=lambda: [
Hole(x=30, y=80), Hole(x=25, y=70),
Hole(x=30, y=0), Hole(x=25, y=-70),
Hole(x=30, y=-80), Hole(x=-25, y=70),
Hole(x=-30, y=80), Hole(x=-25, y=-70),
Hole(x=-30, y=0),
Hole(x=-30, y=-80),
]) ])
panel_thickness: float = 25.4 / 16 panel_thickness: float = 25.4 / 16
mount_panel_thickness: float = 25.4 / 4 mount_panel_thickness: float = 25.4 / 4

View File

@ -462,22 +462,11 @@ class WingProfile(Model):
result.add(self.electronic_board.assembly(), name="electronic_board") result.add(self.electronic_board.assembly(), name="electronic_board")
for hole in self.electronic_board.mount_holes: for hole in self.electronic_board.mount_holes:
assert hole.tag assert hole.tag
nut_name = f"electronic_board_{hole.tag}_nut" result.constrain(
( f"electronic_mount2?{hole.tag}",
result f'electronic_board/{hole.tag}_spacer?top',
.addS( "Plane",
self.electronic_board.nut.assembly(), param=0
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"
)
) )
return result.solve() return result.solve()