Skip to content

Commit

Permalink
Fix RevoluteJoint rotation
Browse files Browse the repository at this point in the history
Fixes #355.
The `relative_to()` method was rotating around `Axis.Z`, instead of
`self.relative_axis`. This now matches what the other `Joint` classes
are doing.
  • Loading branch information
nicola-sorace committed Oct 28, 2023
1 parent 159ff7d commit 6521108
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/build123d/joints.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ def relative_to(
rotation = Location(
Plane(
origin=(0, 0, 0),
x_dir=self.angle_reference.rotate(Axis.Z, angle),
z_dir=(0, 0, 1),
x_dir=self.angle_reference.rotate(self.relative_axis, angle),
z_dir=self.relative_axis.direction,
)
)
return (
Expand Down

0 comments on commit 6521108

Please sign in to comment.