cosplay: Touhou/Houjuu Nue #4

Open
aniva wants to merge 189 commits from touhou/houjuu-nue into main
1 changed files with 45 additions and 0 deletions
Showing only changes of commit 1bcb27c711 - Show all commits

View File

@ -231,6 +231,51 @@ def wing_root(joint: HirthJoint,
) )
return result return result
@dataclass
class WingRoot:
"""
Generator for the wing root profile and model
"""
panel_thickness: float = 25.4 / 16
height: float = 100.0
shoulder_width: float = 20.0
root_width: float = 60.0
def outer_spline(self) -> list[Tuple[float, float]]:
"""
Generate outer wing shape spline
"""
def profile(self) -> Cq.Sketch:
tip_x, tip_y = -100.0, 70.0
sketch = (
Cq.Sketch()
.segment((-self.root_width, 0), (0, 0))
.spline([
(0, 0),
(-30.0, 50.0),
(tip_x, tip_y)
])
.segment(
(tip_x, tip_y),
(tip_x, tip_y - self.shoulder_width)
)
.segment(
(tip_x, tip_y - self.shoulder_width),
(-self.root_width, 0)
)
.assemble()
)
return sketch
def xy_surface(self) -> Cq.Workplane:
return (
Cq.Workplane()
.placeSketch(self.profile())
.extrude(self.panel_thickness)
)
@dataclass @dataclass
class WingProfile: class WingProfile: