cosplay: Touhou/Houjuu Nue #4
|
@ -389,6 +389,8 @@ class ShoulderJoint(Model):
|
||||||
# The parent side has arms which connect to the lips
|
# The parent side has arms which connect to the lips
|
||||||
parent_arm_width: float = 25.0
|
parent_arm_width: float = 25.0
|
||||||
parent_arm_height: float = 12.0
|
parent_arm_height: float = 12.0
|
||||||
|
# remove a bit of material from the base so it does not interfere with gluing
|
||||||
|
parent_arm_base_shift: float = 2.0
|
||||||
|
|
||||||
# Generates a child guard which covers up the internals. The lip length is
|
# Generates a child guard which covers up the internals. The lip length is
|
||||||
# relative to the +X surface of the guard.
|
# relative to the +X surface of the guard.
|
||||||
|
@ -515,17 +517,24 @@ class ShoulderJoint(Model):
|
||||||
assert self.parent_arm_width <= joint.radius_track * 2
|
assert self.parent_arm_width <= joint.radius_track * 2
|
||||||
assert self.parent_lip_ext > joint.radius_track
|
assert self.parent_lip_ext > joint.radius_track
|
||||||
|
|
||||||
|
cut_arm = Cq.Solid.makeBox(
|
||||||
|
self.parent_lip_ext + self.parent_lip_width / 2,
|
||||||
|
self.parent_arm_width,
|
||||||
|
self.parent_arm_base_shift,
|
||||||
|
)
|
||||||
arm = (
|
arm = (
|
||||||
Cq.Solid.makeBox(
|
Cq.Solid.makeBox(
|
||||||
self.parent_lip_ext + self.parent_lip_width / 2,
|
self.parent_lip_ext + self.parent_lip_width / 2,
|
||||||
self.parent_arm_width,
|
self.parent_arm_width,
|
||||||
self.parent_arm_height)
|
self.parent_arm_height)
|
||||||
|
.cut(cut_arm)
|
||||||
.located(Cq.Location((0, -self.parent_arm_width/2 , 0)))
|
.located(Cq.Location((0, -self.parent_arm_width/2 , 0)))
|
||||||
.cut(Cq.Solid.makeCylinder(joint.radius_track, self.parent_arm_height))
|
.cut(Cq.Solid.makeCylinder(joint.radius_track, self.parent_arm_height))
|
||||||
.cut(self._contraction_cut_geometry(parent=True, mirror=top))
|
.cut(self._contraction_cut_geometry(parent=True, mirror=top))
|
||||||
)
|
)
|
||||||
|
t = self.parent_arm_base_shift
|
||||||
lip_args = dict(
|
lip_args = dict(
|
||||||
length=self.parent_lip_length,
|
length=self.parent_lip_length - t,
|
||||||
width=self.parent_lip_width,
|
width=self.parent_lip_width,
|
||||||
thickness=self.parent_lip_thickness,
|
thickness=self.parent_lip_thickness,
|
||||||
hole_diam=self.parent_conn_hole_diam,
|
hole_diam=self.parent_conn_hole_diam,
|
||||||
|
@ -534,19 +543,20 @@ class ShoulderJoint(Model):
|
||||||
lip1 = MountingBox(
|
lip1 = MountingBox(
|
||||||
**lip_args,
|
**lip_args,
|
||||||
holes=[
|
holes=[
|
||||||
Hole(x=self.height / 2 - x, y=-y)
|
Hole(x=self.height / 2 - x - t, y=-y)
|
||||||
for x, y in self.parent_conn_hole_pos
|
for x, y in self.parent_conn_hole_pos
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
lip2 = MountingBox(
|
lip2 = MountingBox(
|
||||||
**lip_args,
|
**lip_args,
|
||||||
holes=[
|
holes=[
|
||||||
Hole(x=self.height / 2 - x, y=y)
|
Hole(x=self.height / 2 - x - t, y=y)
|
||||||
for x, y in self.parent_conn_hole_pos
|
for x, y in self.parent_conn_hole_pos
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
lip_dy = self.parent_arm_width / 2 - self.parent_lip_thickness
|
lip_dy = self.parent_arm_width / 2 - self.parent_lip_thickness
|
||||||
# Flip so the lip's holes point to -X
|
# Flip so the lip's holes point to -X
|
||||||
|
loc_shift = Cq.Location((self.parent_arm_base_shift, 0, 0))
|
||||||
loc_axis = Cq.Location((0,0,0), (0, 1, 0), -90)
|
loc_axis = Cq.Location((0,0,0), (0, 1, 0), -90)
|
||||||
loc_dir1 = Cq.Location((0,lip_dy,0), (0, 0, 1), -90)
|
loc_dir1 = Cq.Location((0,lip_dy,0), (0, 0, 1), -90)
|
||||||
loc_dir2 = Cq.Location((0,-lip_dy,0), (0, 0, 1), 90)
|
loc_dir2 = Cq.Location((0,-lip_dy,0), (0, 0, 1), 90)
|
||||||
|
@ -562,8 +572,8 @@ class ShoulderJoint(Model):
|
||||||
.add(joint.track(), name="track",
|
.add(joint.track(), name="track",
|
||||||
loc=Cq.Location((0, 0, 0), (0, 0, 1), rot))
|
loc=Cq.Location((0, 0, 0), (0, 0, 1), rot))
|
||||||
.add(arm, name="arm")
|
.add(arm, name="arm")
|
||||||
.add(lip1.generate(), name=lip_p_tag, loc=loc_pos * loc_dir1 * loc_axis)
|
.add(lip1.generate(), name=lip_p_tag, loc=loc_pos * loc_dir1 * loc_axis * loc_shift)
|
||||||
.add(lip2.generate(), name=lip_n_tag, loc=loc_pos * loc_dir2 * loc_axis)
|
.add(lip2.generate(), name=lip_n_tag, loc=loc_pos * loc_dir2 * loc_axis * loc_shift)
|
||||||
)
|
)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue