fix: Spring slot in disk
This commit is contained in:
parent
aa1f4efa98
commit
1f99b5e41f
|
@ -905,14 +905,20 @@ class DiskJoint(Model):
|
|||
return self.total_thickness / 2 - self.housing_thickness
|
||||
|
||||
def _disk_cut(self) -> Cq.Workplane:
|
||||
return (
|
||||
rl = Cq.Location((0, 0, 0), (0, 0, 1), self.spring_slot_offset)
|
||||
r = (
|
||||
Cq.Solid.makeBox(
|
||||
length=self.spring.tail_length,
|
||||
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)))
|
||||
.rotate((0, 0, 0), (0, 0, 1), self.spring_slot_offset)
|
||||
.moved(rl * Cq.Location((0, self.spring.radius_inner, self.disk_bot_thickness)))
|
||||
#.rotate((0, 0, 0), (0, 0, 1), self.spring_slot_offset)
|
||||
)
|
||||
return (
|
||||
Cq.Workplane()
|
||||
.union(r)
|
||||
.val()
|
||||
)
|
||||
|
||||
@target(name="disk")
|
||||
|
@ -1267,8 +1273,10 @@ class ElbowJoint(Model):
|
|||
loc_rot_neutral = Cq.Location.rot2d(self.angle_neutral)
|
||||
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))
|
||||
disk_cut = self.disk_joint._disk_cut().located(
|
||||
loc_lip.inverse * loc_cut_rel * loc_disk)
|
||||
loc_disk_orient = Cq.Location((0, 0, -dz), (0,0,1), angle)
|
||||
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(
|
||||
# length=self.child_lip_extra_length,
|
||||
# width=self.total_thickness,
|
||||
|
@ -1281,7 +1289,7 @@ class ElbowJoint(Model):
|
|||
result = (
|
||||
Cq.Assembly()
|
||||
.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",
|
||||
loc=loc_rot_neutral * loc_disk.inverse * loc_lip)
|
||||
#.add(lip_extra, name="lip_extra",
|
||||
|
|
Loading…
Reference in New Issue