cosplay: Touhou/Houjuu Nue #4

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

View File

@ -62,6 +62,8 @@ class WingProfile(Model):
radius_disk=13.0, radius_disk=13.0,
radius_housing=15.0, radius_housing=15.0,
), ),
child_arm_radius=20.0,
parent_arm_radius=30.0,
)) ))
# Distance between the two spacers on the elbow, halved # Distance between the two spacers on the elbow, halved
wrist_h2: float = 5.0 wrist_h2: float = 5.0
@ -464,7 +466,8 @@ class WingProfile(Model):
] ]
profile = self.profile_s1() profile = self.profile_s1()
tags = tags_shoulder + tags_elbow tags = tags_shoulder + tags_elbow
return nhf.utils.extrude_with_markers(profile, self.panel_thickness, tags, reverse=front) return nhf.utils.extrude_with_markers(
profile, self.panel_thickness, tags, reverse=front)
@submodel(name="spacer-s1-shoulder") @submodel(name="spacer-s1-shoulder")
def spacer_s1_shoulder(self) -> MountingBox: def spacer_s1_shoulder(self) -> MountingBox:
holes = [ holes = [
@ -505,7 +508,7 @@ class WingProfile(Model):
result, result,
o, o,
point_tag=t, point_tag=t,
flipped=is_top != True #is_parent, flipped=not is_top,
) )
return result.solve() return result.solve()
@ -527,10 +530,10 @@ class WingProfile(Model):
tags_elbow = [ tags_elbow = [
("elbow_bot", ("elbow_bot",
self.elbow_to_abs(elbow_mount_inset, h - self.elbow_h2), self.elbow_to_abs(elbow_mount_inset, h - self.elbow_h2),
self.elbow_angle), self.elbow_angle + 180),
("elbow_top", ("elbow_top",
self.elbow_to_abs(elbow_mount_inset, h + self.elbow_h2), self.elbow_to_abs(elbow_mount_inset, h + self.elbow_h2),
self.elbow_angle), self.elbow_angle + 180),
] ]
h = self.wrist_height / 2 h = self.wrist_height / 2
tags_wrist = [ tags_wrist = [
@ -578,8 +581,8 @@ class WingProfile(Model):
result, result,
o.generate(), o.generate(),
point_tag=t, point_tag=t,
flipped=is_top,# != is_parent, flipped=is_top == is_parent,
rotate=is_parent, #rotate=True,
) )
return result.solve() return result.solve()
@ -598,10 +601,10 @@ class WingProfile(Model):
tags = [ tags = [
("wrist_bot", ("wrist_bot",
self.wrist_to_abs(wrist_mount_inset, h - self.wrist_h2), self.wrist_to_abs(wrist_mount_inset, h - self.wrist_h2),
self.wrist_angle), self.wrist_angle + 180),
("wrist_top", ("wrist_top",
self.wrist_to_abs(wrist_mount_inset, h + self.wrist_h2), self.wrist_to_abs(wrist_mount_inset, h + self.wrist_h2),
self.wrist_angle), self.wrist_angle + 180),
] ]
profile = self.profile_s3() profile = self.profile_s3()
return nhf.utils.extrude_with_markers(profile, self.panel_thickness, tags, reverse=front) return nhf.utils.extrude_with_markers(profile, self.panel_thickness, tags, reverse=front)
@ -632,7 +635,8 @@ class WingProfile(Model):
result, result,
o.generate(), o.generate(),
point_tag=t, point_tag=t,
flipped=is_top != is_parent, flipped=is_top,# != is_parent,
#rotate=True,
) )
return result.solve() return result.solve()
@ -698,20 +702,20 @@ class WingProfile(Model):
# Mounted backwards to bend in other direction # Mounted backwards to bend in other direction
( (
result result
.constrain("s2/wrist_top?conn0", "wrist/parent_upper/bot?conn0", "Plane") .constrain("s2/wrist_top?conn0", "wrist/parent_upper/lip?conn_bot0", "Plane")
.constrain("s2/wrist_top?conn1", "wrist/parent_upper/bot?conn1", "Plane") .constrain("s2/wrist_top?conn1", "wrist/parent_upper/lip?conn_bot1", "Plane")
.constrain("s2/wrist_bot?conn0", "wrist/parent_upper/top?conn0", "Plane") .constrain("s2/wrist_bot?conn0", "wrist/parent_upper/lip?conn_top0", "Plane")
.constrain("s2/wrist_bot?conn1", "wrist/parent_upper/top?conn1", "Plane") .constrain("s2/wrist_bot?conn1", "wrist/parent_upper/lip?conn_top1", "Plane")
) )
if "s3" in parts: if "s3" in parts:
result.add(self.assembly_s3(), name="s3") result.add(self.assembly_s3(), name="s3")
if "s3" in parts and "wrist" in parts: if "s3" in parts and "wrist" in parts:
( (
result result
.constrain("s3/wrist_top?conn0", "wrist/child/bot?conn0", "Plane") .constrain("s3/wrist_top?conn0", "wrist/child/lip?conn_bot0", "Plane")
.constrain("s3/wrist_top?conn1", "wrist/child/bot?conn1", "Plane") .constrain("s3/wrist_top?conn1", "wrist/child/lip?conn_bot1", "Plane")
.constrain("s3/wrist_bot?conn0", "wrist/child/top?conn0", "Plane") .constrain("s3/wrist_bot?conn0", "wrist/child/lip?conn_top0", "Plane")
.constrain("s3/wrist_bot?conn1", "wrist/child/top?conn1", "Plane") .constrain("s3/wrist_bot?conn1", "wrist/child/lip?conn_top1", "Plane")
) )
if len(parts) > 1: if len(parts) > 1:
result.solve() result.solve()
@ -970,6 +974,6 @@ class WingL(WingProfile):
(self.elbow_x, self.wrist_y), (self.elbow_x, self.wrist_y),
(self.wrist_x, self.wrist_y), (self.wrist_x, self.wrist_y),
(self.wrist_top_x, self.wrist_top_y), (self.wrist_top_x, self.wrist_top_y),
(self.elbow_x, self.elbow_top_y + 50), (self.elbow_x, self.elbow_top_y + l),
(0, l), (0, l),
] ]