fix: Elbow joint z offset problem

This commit is contained in:
Leni Aniva 2024-07-21 18:49:07 -07:00
parent 2bdae6df01
commit 71da0c10a7
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
1 changed files with 4 additions and 4 deletions

View File

@ -972,13 +972,13 @@ class ElbowJoint(Model):
Cq.Location((-lip_dz, 0, 0), (1, 0, 0), 90) *
Cq.Location((0, 0, 0), (0, 1, 0), 90)
)
loc_disk = flip_x * flip_z * Cq.Location((-self.child_arm_radius, 0, -dz), (0, 0, 1), angle)
loc_disk = flip_x * flip_z * Cq.Location((-self.child_arm_radius, 0, 0), (0, 0, 1), angle)
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)
result = (
Cq.Assembly()
.add(self.disk_joint.disk(), name="disk")
.add(self.disk_joint.disk(), name="disk", loc=Cq.Location((0, 0, -dz)))
.add(self.lip().cut(disk_cut), name="lip", loc=loc_disk.inverse * loc_lip)
.add(self.actuator_mount(), name="act", loc=self.actuator_mount_loc(child=True))
)
@ -1014,7 +1014,7 @@ class ElbowJoint(Model):
)
housing = self.disk_joint.housing_upper()
housing_loc = Cq.Location(
(0, 0, housing_dz),
(0, 0, 0),
(0, 0, 1),
-self.disk_joint.tongue_span / 2 + self.angle_neutral
)
@ -1022,7 +1022,7 @@ class ElbowJoint(Model):
loc_net_housing = axial_offset * housing_loc
result = (
Cq.Assembly()
.add(housing, name="housing")
.add(housing, name="housing", loc=Cq.Location((0, 0, housing_dz)))
.add(self.lip(), name="lip", loc=
loc_net_housing.inverse *
Cq.Location((0, 0, 0), (0, 1, 0), 180) *