import cadquery as Cq from dataclasses import dataclass @dataclass(frozen=True) class Parameters: """ Thickness of the exoskeleton panel in millimetres """ panel_thickness: float = 25.4 / 16 # Wing root properties """ Radius of the mounting mechanism of the wing root. This is constrained by the size of the harness. """ root_radius: float = 60 def wing_root(self, side_width=30, side_height=100): """ Generate the wing root which contains a Hirth joint at its base and a rectangular opening on its side, with the necessary interfaces. """ result = ( Cq.Workplane("XY") .circle(self.root_radius) .transformed(offset=Cq.Vector(80, 0, 80), rotate=Cq.Vector(0, 45, 0)) .rect(side_width, side_height) .loft() ) return result