fix: Extension profiles for the left side

This commit is contained in:
Leni Aniva 2024-07-20 23:08:32 -07:00
parent 82d8cf9599
commit 0b385bdab5
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
1 changed files with 7 additions and 5 deletions

View File

@ -391,10 +391,12 @@ class WingProfile(Model):
radius: float, radius: float,
angle_span: float, angle_span: float,
bot: bool = False) -> Cq.Sketch: bot: bool = False) -> Cq.Sketch:
"""
Creates a sector profile which accomodates extension
"""
sign = -1 if bot else 1 sign = -1 if bot else 1
#sign = -1 axle_loc = axle_loc * Cq.Location.rot2d(-90 if bot else 90)
axle_loc = axle_loc * Cq.Location.rot2d(180 if bot else 0) loc_h = Cq.Location.from2d(radius, 0)
loc_h = Cq.Location.from2d(0, radius)
start = axle_loc * loc_h start = axle_loc * loc_h
mid = axle_loc * Cq.Location.rot2d(-sign * angle_span/2) * loc_h mid = axle_loc * Cq.Location.rot2d(-sign * angle_span/2) * loc_h
end = axle_loc * Cq.Location.rot2d(-sign * angle_span) * loc_h end = axle_loc * Cq.Location.rot2d(-sign * angle_span) * loc_h
@ -525,7 +527,7 @@ class WingProfile(Model):
axle_loc=self.elbow_axle_loc, axle_loc=self.elbow_axle_loc,
radius=self.elbow_height / 2, radius=self.elbow_height / 2,
angle_span=self.elbow_joint.motion_span, angle_span=self.elbow_joint.motion_span,
bot=True, bot=not self.flip,
), mode='a') ), mode='a')
) )
def surface_s1_bridge(self, front: bool = True) -> Cq.Workplane: def surface_s1_bridge(self, front: bool = True) -> Cq.Workplane:
@ -636,7 +638,7 @@ class WingProfile(Model):
axle_loc=self.wrist_axle_loc, axle_loc=self.wrist_axle_loc,
radius=self.wrist_height * (0.5 if self.flip else 1), radius=self.wrist_height * (0.5 if self.flip else 1),
angle_span=self.wrist_joint.motion_span, angle_span=self.wrist_joint.motion_span,
bot=False, bot=self.flip,
) )
# Generates the contraction (cut) profile. only required on the left # Generates the contraction (cut) profile. only required on the left
if self.flip: if self.flip: