pylabrobot.resources.Resource.rotate#
- Resource.rotate(x: float = 0, y: float = 0, z: float = 0, pivot_coordinate: Coordinate | None = None)#
Rotate counter-clockwise around the parent-coordinate axes by the given degrees.
- Parameters:
x (float) – degrees to turn about X.
y (float) – degrees to turn about Y.
z (float) – degrees to turn about Z.
pivot_coordinate (Coordinate | None) – what to turn about, in this resource’s own frame. Its own origin when None, which is what a resource turns about when nothing is said. Given one,
locationcarries by however far the turn moved it, so it ends where it began.
- Raises:
NoLocationError – If a pivot is given for a resource with no location. A pivot is held by moving
location, so there is nothing to hold it with.