cosplay: Touhou/Houjuu Nue #4

Open
aniva wants to merge 189 commits from touhou/houjuu-nue into main
2 changed files with 10 additions and 3 deletions
Showing only changes of commit 33e32aa14b - Show all commits

View File

@ -1,6 +1,6 @@
import cadquery as Cq
from dataclasses import dataclass, field
from typing import Tuple, Optional, Union
from typing import Tuple, Optional, Union, Callable
from nhf.build import Model, TargetKind, target
import nhf.utils
@ -64,6 +64,8 @@ class MountingBox(Model):
# Determines the position of side tags
flip_y: bool = False
profile_callback: Optional[Callable[[Cq.Sketch], Cq.Sketch]] = None
def __post_init__(self):
for i, hole in enumerate(self.holes):
if hole.tag is None:
@ -84,6 +86,8 @@ class MountingBox(Model):
for hole in self.holes:
diam = hole.diam if hole.diam else self.hole_diam
result.push([(hole.x, hole.y)]).circle(diam / 2, mode='s')
if self.profile_callback:
profile = self.profile_callback(profile)
return result
def generate(self) -> Cq.Workplane:

View File

@ -33,7 +33,6 @@ WRIST_PARAMS = dict(
radius_disk=13.0,
radius_housing=15.0,
),
actuator=LINEAR_ACTUATOR_21,
)
@dataclass(kw_only=True)
@ -1107,6 +1106,7 @@ class WingR(WingProfile):
flexor_mount_angle_child=-40,
hole_pos=[10, 20],
lip_length=50,
actuator=LINEAR_ACTUATOR_21,
#flexor_pos_smaller=False,
**WRIST_PARAMS
))
@ -1363,8 +1363,11 @@ class WingL(WingProfile):
lip_length=30,
child_arm_radius=23.0,
parent_arm_radius=30.0,
flexor_offset_angle=30.0,
flexor_offset_angle=0.0,
flexor_child_arm_radius=None,
flexor_line_length=50.0,
flexor_line_slack=1.0,
actuator=LINEAR_ACTUATOR_10,
**WRIST_PARAMS
))