From 71da0c10a74415a609ea46e8a2fccf8cd2d86bd6 Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Sun, 21 Jul 2024 18:49:07 -0700 Subject: [PATCH] fix: Elbow joint z offset problem --- nhf/touhou/houjuu_nue/joints.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nhf/touhou/houjuu_nue/joints.py b/nhf/touhou/houjuu_nue/joints.py index cbf600b..6bc40e4 100644 --- a/nhf/touhou/houjuu_nue/joints.py +++ b/nhf/touhou/houjuu_nue/joints.py @@ -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) *