cosplay: Touhou/Houjuu Nue #4

Open
aniva wants to merge 189 commits from touhou/houjuu-nue into main
1 changed files with 12 additions and 6 deletions
Showing only changes of commit 57deefbd5f - Show all commits

View File

@ -1252,8 +1252,7 @@ class ElbowJoint(Model):
)
return mbox.generate()
@target(name="child")
def child_joint(self, generate_mount: bool=False) -> Cq.Assembly:
def child_joint(self, generate_mount: bool=False, generate_tags=True) -> Cq.Assembly:
angle = -self.disk_joint.tongue_span / 2
dz = self.disk_joint.disk_thickness / 2
# 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
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)
result.add(
Cq.Edge.makeLine((-1,0,0), (1,0,0)),
@ -1306,12 +1305,15 @@ class ElbowJoint(Model):
)
return result
@target(name="child")
def target_child(self) -> Cq.Assembly:
return self.child_joint(generate_tags=False)
@target(name="parent-lower")
def parent_joint_lower(self) -> Cq.Workplane:
return self.disk_joint.housing_lower()
@target(name="parent-upper")
def parent_joint_upper(self, generate_mount: bool=False):
def parent_joint_upper(self, generate_mount: bool=False, generate_tags=True):
axial_offset = Cq.Location((self.parent_arm_radius, 0, 0))
housing_dz = self.disk_joint.housing_upper_dz
conn_h = self.disk_joint.total_thickness
@ -1355,7 +1357,7 @@ class ElbowJoint(Model):
#.constrain("connector", "Fixed")
#.solve()
)
if self.flexor:
if self.flexor and generate_tags:
loc_mount = self.actuator_mount_loc(child=False, unflip=True)
result.add(
Cq.Edge.makeLine((-1,0,0), (1,0,0)),
@ -1371,6 +1373,10 @@ class ElbowJoint(Model):
)
return result
@target(name="parent-upper")
def target_parent_upper(self) -> Cq.Assembly:
return self.parent_joint_upper(generate_tags=False)
@assembly()
def assembly(self,
angle: float = 0,