physical_apertures.rotated#
Rotation of an existing physical aperture around a specified pivot.
Classes
|
Rotate an aperture counterclockwise about +z. |
- class RotatedAperture(aperture: BaseAperture, angle: float, center_x: float = 0.0, center_y: float = 0.0)[source]#
Rotate an aperture counterclockwise about +z.
- Parameters:
aperture – The aperture to rotate.
angle – Rotation angle in radians.
center_x – Pivot x-coordinate, defaulting to the surface origin.
center_y – Pivot y-coordinate, defaulting to the surface origin.
- Raises:
ValueError – If the angle or pivot coordinates are not finite.
- contains(x: BEArray, y: BEArray) BEArray[source]#
Test points after inverse rotation into the child aperture’s frame.
- property extent: tuple[float, float, float, float]#
Return an enclosing rotated bounding box, including unbounded shapes.
- classmethod from_dict(data: dict[str, Any]) RotatedAperture[source]#
Restore a rotation using the shared native aperture dispatch.
- scale(scale_factor: float) None[source]#
Scale the child aperture and pivot together, retaining the angle.
- to_dict() dict[str, Any][source]#
Persist the child definition, angle and pivot in native aperture data.