feat: Right side wrist joint all clear

This commit is contained in:
Leni Aniva 2024-07-25 12:31:25 -07:00
parent 82570528da
commit 720de20b85
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
1 changed files with 39 additions and 10 deletions

View File

@ -33,13 +33,7 @@ WRIST_PARAMS = dict(
radius_disk=13.0, radius_disk=13.0,
radius_housing=15.0, radius_housing=15.0,
), ),
hole_pos=[10], actuator=LINEAR_ACTUATOR_21,
lip_length=30,
child_arm_radius=23.0,
parent_arm_radius=30.0,
actuator=LINEAR_ACTUATOR_10,
flexor_offset_angle=30.0,
flexor_child_arm_radius=None,
) )
@dataclass(kw_only=True) @dataclass(kw_only=True)
@ -775,7 +769,7 @@ class WingProfile(Model):
segment_thickness=self.s2_thickness, segment_thickness=self.s2_thickness,
child=True, child=True,
) )
@submodel(name="spacer-s1-elbow-act") @submodel(name="spacer-s2-elbow-act")
def spacer_s2_elbow_act(self) -> MountingBox: def spacer_s2_elbow_act(self) -> MountingBox:
return MountingBox( return MountingBox(
length=self.s2_thickness, length=self.s2_thickness,
@ -876,9 +870,12 @@ class WingProfile(Model):
return profile return profile
def surface_s3(self, def surface_s3(self,
front: bool = True) -> Cq.Workplane: front: bool = True) -> Cq.Workplane:
loc_wrist = Cq.Location.rot2d(self.wrist_rotate) * self.wrist_joint.child_arm_loc() rot_wrist = Cq.Location.rot2d(self.wrist_rotate)
loc_wrist = rot_wrist * self.wrist_joint.child_arm_loc()
tags = [ tags = [
("wrist", self.wrist_axle_loc * loc_wrist), ("wrist", self.wrist_axle_loc * loc_wrist),
("wrist_act", self.wrist_axle_loc * rot_wrist *
self.wrist_joint.actuator_mount_loc(child=True)),
("wrist_bot", self.wrist_axle_loc * loc_wrist * ("wrist_bot", self.wrist_axle_loc * loc_wrist *
Cq.Location.from2d(0, self.wrist_h2)), Cq.Location.from2d(0, self.wrist_h2)),
("wrist_top", self.wrist_axle_loc * loc_wrist * ("wrist_top", self.wrist_axle_loc * loc_wrist *
@ -906,6 +903,17 @@ class WingProfile(Model):
segment_thickness=self.s3_thickness, segment_thickness=self.s3_thickness,
child=True, child=True,
) )
@submodel(name="spacer-s3-wrist-act")
def spacer_s3_wrist_act(self) -> MountingBox:
return MountingBox(
length=self.s3_thickness,
width=self.s3_thickness,
thickness=self.spacer_thickness,
holes=[Hole(x=0,y=0)],
centred=(True, True),
hole_diam=self.wrist_joint.hole_diam,
centre_left_right_tags=True,
)
@assembly() @assembly()
def assembly_s3(self) -> Cq.Assembly: def assembly_s3(self) -> Cq.Assembly:
result = ( result = (
@ -930,6 +938,12 @@ class WingProfile(Model):
.constrain("back?wrist_bot", "extra_back?wrist_bot", "Plane") .constrain("back?wrist_bot", "extra_back?wrist_bot", "Plane")
.constrain("back?wrist_top", "extra_back?wrist_top", "Plane") .constrain("back?wrist_top", "extra_back?wrist_top", "Plane")
) )
self._assembly_insert_spacer(
result,
self.spacer_s3_wrist_act().generate(),
point_tag="wrist_act",
flipped=True,
)
self._assembly_insert_spacer( self._assembly_insert_spacer(
result, result,
self.spacer_s3_wrist().generate(), self.spacer_s3_wrist().generate(),
@ -1084,7 +1098,16 @@ class WingR(WingProfile):
wrist_height: float = 60.0 wrist_height: float = 60.0
wrist_joint: ElbowJoint = field(default_factory=lambda: ElbowJoint( wrist_joint: ElbowJoint = field(default_factory=lambda: ElbowJoint(
flip=True, flip=True,
angle_neutral=0.0, angle_neutral=-20.0,
child_arm_radius=23.0,
parent_arm_radius=30.0,
flexor_offset_angle=30.0,
flexor_child_arm_radius=50.0,
flexor_mount_angle_parent=20,
flexor_mount_angle_child=-40,
hole_pos=[10, 20],
lip_length=50,
#flexor_pos_smaller=False,
**WRIST_PARAMS **WRIST_PARAMS
)) ))
@ -1336,6 +1359,12 @@ class WingL(WingProfile):
wrist_height: float = 43.0 wrist_height: float = 43.0
wrist_joint: ElbowJoint = field(default_factory=lambda: ElbowJoint( wrist_joint: ElbowJoint = field(default_factory=lambda: ElbowJoint(
flip=False, flip=False,
hole_pos=[10],
lip_length=30,
child_arm_radius=23.0,
parent_arm_radius=30.0,
flexor_offset_angle=30.0,
flexor_child_arm_radius=None,
**WRIST_PARAMS **WRIST_PARAMS
)) ))