feat: Simplify geometry in electronic mount
This commit is contained in:
parent
0ad5b17f07
commit
40ebf93dc5
|
@ -493,10 +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=25, y=70),
|
Hole(x=25, y=75),
|
||||||
Hole(x=25, y=-70),
|
Hole(x=25, y=-75),
|
||||||
Hole(x=-25, y=70),
|
Hole(x=-25, y=75),
|
||||||
Hole(x=-25, y=-70),
|
Hole(x=-25, y=-75),
|
||||||
])
|
])
|
||||||
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
|
||||||
|
@ -526,7 +526,7 @@ class ElectronicBoard(Model):
|
||||||
result = (
|
result = (
|
||||||
Cq.Assembly()
|
Cq.Assembly()
|
||||||
.addS(panel.generate(), name="panel",
|
.addS(panel.generate(), name="panel",
|
||||||
role=Role.STRUCTURE, material=self.material)
|
role=Role.ELECTRONIC | Role.STRUCTURE, material=self.material)
|
||||||
)
|
)
|
||||||
for hole in panel.holes:
|
for hole in panel.holes:
|
||||||
spacer_name = f"{hole.tag}_spacer"
|
spacer_name = f"{hole.tag}_spacer"
|
||||||
|
|
|
@ -351,6 +351,12 @@ class WingProfile(Model):
|
||||||
Hole(x=h.x, y=h.y, face=face, tag=h.tag)
|
Hole(x=h.x, y=h.y, face=face, tag=h.tag)
|
||||||
for h in self.electronic_board.mount_holes
|
for h in self.electronic_board.mount_holes
|
||||||
]
|
]
|
||||||
|
def post(sketch: Cq.Sketch) -> Cq.Sketch:
|
||||||
|
return (
|
||||||
|
sketch
|
||||||
|
.push([(0,0)])
|
||||||
|
.rect(70, 130, mode='s')
|
||||||
|
)
|
||||||
return MountingBox(
|
return MountingBox(
|
||||||
holes=holes,
|
holes=holes,
|
||||||
hole_diam=self.electronic_board.mount_hole_diam,
|
hole_diam=self.electronic_board.mount_hole_diam,
|
||||||
|
@ -360,6 +366,7 @@ class WingProfile(Model):
|
||||||
thickness=self.spacer_thickness,
|
thickness=self.spacer_thickness,
|
||||||
flip_y=False,#self.flip,
|
flip_y=False,#self.flip,
|
||||||
generate_reverse_tags=True,
|
generate_reverse_tags=True,
|
||||||
|
profile_callback=post,
|
||||||
)
|
)
|
||||||
@submodel(name="spacer-s0-shoulder-act")
|
@submodel(name="spacer-s0-shoulder-act")
|
||||||
def spacer_s0_shoulder_act(self) -> MountingBox:
|
def spacer_s0_shoulder_act(self) -> MountingBox:
|
||||||
|
|
Loading…
Reference in New Issue