fix: Elbow joint output problem
This commit is contained in:
parent
b7ca30bc28
commit
57deefbd5f
|
@ -1252,8 +1252,7 @@ class ElbowJoint(Model):
|
||||||
)
|
)
|
||||||
return mbox.generate()
|
return mbox.generate()
|
||||||
|
|
||||||
@target(name="child")
|
def child_joint(self, generate_mount: bool=False, generate_tags=True) -> Cq.Assembly:
|
||||||
def child_joint(self, generate_mount: bool=False) -> Cq.Assembly:
|
|
||||||
angle = -self.disk_joint.tongue_span / 2
|
angle = -self.disk_joint.tongue_span / 2
|
||||||
dz = self.disk_joint.disk_thickness / 2
|
dz = self.disk_joint.disk_thickness / 2
|
||||||
# We need to ensure the disk is on the "other" side so
|
# We need to ensure the disk is on the "other" side so
|
||||||
|
@ -1290,7 +1289,7 @@ class ElbowJoint(Model):
|
||||||
)
|
)
|
||||||
# Orientes the hole surface so it faces +X
|
# Orientes the hole surface so it faces +X
|
||||||
loc_thickness = Cq.Location((-self.lip_thickness, 0, 0), (0, 1, 0), 90)
|
loc_thickness = Cq.Location((-self.lip_thickness, 0, 0), (0, 1, 0), 90)
|
||||||
if self.flexor:
|
if self.flexor and generate_tags:
|
||||||
loc_mount = self.actuator_mount_loc(child=True, unflip=True)
|
loc_mount = self.actuator_mount_loc(child=True, unflip=True)
|
||||||
result.add(
|
result.add(
|
||||||
Cq.Edge.makeLine((-1,0,0), (1,0,0)),
|
Cq.Edge.makeLine((-1,0,0), (1,0,0)),
|
||||||
|
@ -1306,12 +1305,15 @@ class ElbowJoint(Model):
|
||||||
)
|
)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
@target(name="child")
|
||||||
|
def target_child(self) -> Cq.Assembly:
|
||||||
|
return self.child_joint(generate_tags=False)
|
||||||
|
|
||||||
@target(name="parent-lower")
|
@target(name="parent-lower")
|
||||||
def parent_joint_lower(self) -> Cq.Workplane:
|
def parent_joint_lower(self) -> Cq.Workplane:
|
||||||
return self.disk_joint.housing_lower()
|
return self.disk_joint.housing_lower()
|
||||||
|
|
||||||
@target(name="parent-upper")
|
def parent_joint_upper(self, generate_mount: bool=False, generate_tags=True):
|
||||||
def parent_joint_upper(self, generate_mount: bool=False):
|
|
||||||
axial_offset = Cq.Location((self.parent_arm_radius, 0, 0))
|
axial_offset = Cq.Location((self.parent_arm_radius, 0, 0))
|
||||||
housing_dz = self.disk_joint.housing_upper_dz
|
housing_dz = self.disk_joint.housing_upper_dz
|
||||||
conn_h = self.disk_joint.total_thickness
|
conn_h = self.disk_joint.total_thickness
|
||||||
|
@ -1355,7 +1357,7 @@ class ElbowJoint(Model):
|
||||||
#.constrain("connector", "Fixed")
|
#.constrain("connector", "Fixed")
|
||||||
#.solve()
|
#.solve()
|
||||||
)
|
)
|
||||||
if self.flexor:
|
if self.flexor and generate_tags:
|
||||||
loc_mount = self.actuator_mount_loc(child=False, unflip=True)
|
loc_mount = self.actuator_mount_loc(child=False, unflip=True)
|
||||||
result.add(
|
result.add(
|
||||||
Cq.Edge.makeLine((-1,0,0), (1,0,0)),
|
Cq.Edge.makeLine((-1,0,0), (1,0,0)),
|
||||||
|
@ -1371,6 +1373,10 @@ class ElbowJoint(Model):
|
||||||
)
|
)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
@target(name="parent-upper")
|
||||||
|
def target_parent_upper(self) -> Cq.Assembly:
|
||||||
|
return self.parent_joint_upper(generate_tags=False)
|
||||||
|
|
||||||
@assembly()
|
@assembly()
|
||||||
def assembly(self,
|
def assembly(self,
|
||||||
angle: float = 0,
|
angle: float = 0,
|
||||||
|
|
Loading…
Reference in New Issue