cosplay: Touhou/Houjuu Nue #4
|
@ -905,14 +905,20 @@ class DiskJoint(Model):
|
||||||
return self.total_thickness / 2 - self.housing_thickness
|
return self.total_thickness / 2 - self.housing_thickness
|
||||||
|
|
||||||
def _disk_cut(self) -> Cq.Workplane:
|
def _disk_cut(self) -> Cq.Workplane:
|
||||||
return (
|
rl = Cq.Location((0, 0, 0), (0, 0, 1), self.spring_slot_offset)
|
||||||
|
r = (
|
||||||
Cq.Solid.makeBox(
|
Cq.Solid.makeBox(
|
||||||
length=self.spring.tail_length,
|
length=self.spring.tail_length,
|
||||||
width=self.spring.thickness,
|
width=self.spring.thickness,
|
||||||
height=self.spring.height-self.disk_bot_thickness,
|
height=self.disk_thickness - self.disk_bot_thickness,
|
||||||
)
|
)
|
||||||
.located(Cq.Location((0, self.spring.radius_inner, self.disk_bot_thickness)))
|
.moved(rl * Cq.Location((0, self.spring.radius_inner, self.disk_bot_thickness)))
|
||||||
.rotate((0, 0, 0), (0, 0, 1), self.spring_slot_offset)
|
#.rotate((0, 0, 0), (0, 0, 1), self.spring_slot_offset)
|
||||||
|
)
|
||||||
|
return (
|
||||||
|
Cq.Workplane()
|
||||||
|
.union(r)
|
||||||
|
.val()
|
||||||
)
|
)
|
||||||
|
|
||||||
@target(name="disk")
|
@target(name="disk")
|
||||||
|
@ -1267,8 +1273,10 @@ class ElbowJoint(Model):
|
||||||
loc_rot_neutral = Cq.Location.rot2d(self.angle_neutral)
|
loc_rot_neutral = Cq.Location.rot2d(self.angle_neutral)
|
||||||
loc_disk = flip_x * flip_z * Cq.Location((-self.child_arm_radius, 0, 0))
|
loc_disk = flip_x * flip_z * Cq.Location((-self.child_arm_radius, 0, 0))
|
||||||
loc_cut_rel = Cq.Location((0, self.disk_joint.spring.radius_inner, -self.disk_joint.disk_bot_thickness))
|
loc_cut_rel = Cq.Location((0, self.disk_joint.spring.radius_inner, -self.disk_joint.disk_bot_thickness))
|
||||||
disk_cut = self.disk_joint._disk_cut().located(
|
loc_disk_orient = Cq.Location((0, 0, -dz), (0,0,1), angle)
|
||||||
loc_lip.inverse * loc_cut_rel * loc_disk)
|
disk_cut = self.disk_joint._disk_cut().moved(
|
||||||
|
#Cq.Location(0,0,0))
|
||||||
|
loc_lip.inverse * loc_disk * loc_disk_orient)
|
||||||
#lip_extra = Cq.Solid.makeBox(
|
#lip_extra = Cq.Solid.makeBox(
|
||||||
# length=self.child_lip_extra_length,
|
# length=self.child_lip_extra_length,
|
||||||
# width=self.total_thickness,
|
# width=self.total_thickness,
|
||||||
|
@ -1281,7 +1289,7 @@ class ElbowJoint(Model):
|
||||||
result = (
|
result = (
|
||||||
Cq.Assembly()
|
Cq.Assembly()
|
||||||
.add(self.disk_joint.disk(), name="disk",
|
.add(self.disk_joint.disk(), name="disk",
|
||||||
loc=loc_rot_neutral * Cq.Location((0, 0, -dz), (0,0,1), angle))
|
loc=loc_rot_neutral * loc_disk_orient)
|
||||||
.add(self.lip().cut(disk_cut), name="lip",
|
.add(self.lip().cut(disk_cut), name="lip",
|
||||||
loc=loc_rot_neutral * loc_disk.inverse * loc_lip)
|
loc=loc_rot_neutral * loc_disk.inverse * loc_lip)
|
||||||
#.add(lip_extra, name="lip_extra",
|
#.add(lip_extra, name="lip_extra",
|
||||||
|
|
Loading…
Reference in New Issue