cosplay: Touhou/Houjuu Nue #4
|
@ -38,6 +38,7 @@ import nhf.touhou.houjuu_nue.wing as MW
|
||||||
import nhf.touhou.houjuu_nue.trident as MT
|
import nhf.touhou.houjuu_nue.trident as MT
|
||||||
import nhf.touhou.houjuu_nue.joints as MJ
|
import nhf.touhou.houjuu_nue.joints as MJ
|
||||||
import nhf.touhou.houjuu_nue.harness as MH
|
import nhf.touhou.houjuu_nue.harness as MH
|
||||||
|
from nhf.parts.item import Item
|
||||||
import nhf.utils
|
import nhf.utils
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
@ -61,7 +62,7 @@ class Parameters(Model):
|
||||||
))
|
))
|
||||||
wing_l1: MW.WingL = field(default_factory=lambda: MW.WingL(
|
wing_l1: MW.WingL = field(default_factory=lambda: MW.WingL(
|
||||||
name="l1",
|
name="l1",
|
||||||
wrist_angle=-45.0,
|
wrist_angle=-60.0,
|
||||||
))
|
))
|
||||||
wing_l2: MW.WingL = field(default_factory=lambda: MW.WingL(
|
wing_l2: MW.WingL = field(default_factory=lambda: MW.WingL(
|
||||||
name="l2",
|
name="l2",
|
||||||
|
@ -147,6 +148,7 @@ class Parameters(Model):
|
||||||
"wing-depth": bbox.ylen,
|
"wing-depth": bbox.ylen,
|
||||||
"wing-height": bbox.zlen,
|
"wing-height": bbox.zlen,
|
||||||
"wing-mass": a.total_mass(),
|
"wing-mass": a.total_mass(),
|
||||||
|
"items": Item.count(a),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,7 @@ class ShoulderJoint(Model):
|
||||||
mass=float('nan'),
|
mass=float('nan'),
|
||||||
)
|
)
|
||||||
|
|
||||||
height: float = 60.0
|
height: float = 70.0
|
||||||
torsion_joint: TorsionJoint = field(default_factory=lambda: TorsionJoint(
|
torsion_joint: TorsionJoint = field(default_factory=lambda: TorsionJoint(
|
||||||
radius_track=18,
|
radius_track=18,
|
||||||
radius_rider=18,
|
radius_rider=18,
|
||||||
|
@ -271,6 +271,7 @@ class ShoulderJoint(Model):
|
||||||
|
|
||||||
directrix_id: int = 0
|
directrix_id: int = 0
|
||||||
angle_neutral: float = 10.0
|
angle_neutral: float = 10.0
|
||||||
|
angle_max_deflection: float = 80.0
|
||||||
|
|
||||||
def __post_init__(self):
|
def __post_init__(self):
|
||||||
assert self.parent_lip_length * 2 < self.height
|
assert self.parent_lip_length * 2 < self.height
|
||||||
|
@ -440,6 +441,7 @@ class ShoulderJoint(Model):
|
||||||
|
|
||||||
@assembly()
|
@assembly()
|
||||||
def assembly(self, fastener_pos: float = 0.0, deflection: float = 0) -> Cq.Assembly:
|
def assembly(self, fastener_pos: float = 0.0, deflection: float = 0) -> Cq.Assembly:
|
||||||
|
assert deflection <= self.angle_max_deflection
|
||||||
directrix = self.directrix_id
|
directrix = self.directrix_id
|
||||||
mat = Material.RESIN_TRANSPERENT
|
mat = Material.RESIN_TRANSPERENT
|
||||||
mat_spring = Material.STEEL_SPRING
|
mat_spring = Material.STEEL_SPRING
|
||||||
|
|
|
@ -615,9 +615,10 @@ class WingProfile(Model):
|
||||||
.constrain("s0/base?conn2", "root/child?conn2", "Plane", param=0)
|
.constrain("s0/base?conn2", "root/child?conn2", "Plane", param=0)
|
||||||
)
|
)
|
||||||
if "shoulder" in parts:
|
if "shoulder" in parts:
|
||||||
|
angle = shoulder_deflection * self.shoulder_joint.angle_max_deflection
|
||||||
result.add(self.shoulder_joint.assembly(
|
result.add(self.shoulder_joint.assembly(
|
||||||
fastener_pos=fastener_pos,
|
fastener_pos=fastener_pos,
|
||||||
deflection=shoulder_deflection * 80), name="shoulder")
|
deflection=angle), name="shoulder")
|
||||||
if "s0" in parts and "shoulder" in parts:
|
if "s0" in parts and "shoulder" in parts:
|
||||||
(
|
(
|
||||||
result
|
result
|
||||||
|
@ -805,11 +806,11 @@ class WingR(WingProfile):
|
||||||
@dataclass(kw_only=True)
|
@dataclass(kw_only=True)
|
||||||
class WingL(WingProfile):
|
class WingL(WingProfile):
|
||||||
|
|
||||||
elbow_bot_loc: Cq.Location = Cq.Location.from2d(250.0, 110.0, 10.0)
|
elbow_bot_loc: Cq.Location = Cq.Location.from2d(260.0, 110.0, 0.0)
|
||||||
elbow_height: float = 80.0
|
elbow_height: float = 80.0
|
||||||
|
|
||||||
wrist_angle: float = -45.0
|
wrist_angle: float = -45.0
|
||||||
wrist_bot_loc: Cq.Location = Cq.Location.from2d(480.0, 0.0, -45.0)
|
wrist_bot_loc: Cq.Location = Cq.Location.from2d(460.0, -10.0, -45.0)
|
||||||
wrist_height: float = 43.0
|
wrist_height: float = 43.0
|
||||||
|
|
||||||
shoulder_bezier_ext: float = 120.0
|
shoulder_bezier_ext: float = 120.0
|
||||||
|
|
Loading…
Reference in New Issue