add_arrange_rotate#

MCADComponent.add_arrange_rotate(axis: str = 'X', angle: str = '0deg') → Arrange#

Add a rotation transformation to the component.

Register a rotation operation to be applied to this component during assembly. Rotations are applied in the order they are added and use the component’s target coordinate system as the reference.

Parameters:
axisstr, optional

Axis of rotation. Valid values are "X", "Y", or "Z". The default is "X".

anglestr, optional

Rotation angle as an expression string (e.g., "90deg", "45deg"). The default is "0deg".

Returns:
Arrange

The created rotation transformation object.

Examples

Rotate a component 90 degrees around the Z-axis:

>>> comp.add_arrange_rotate(axis="Z", angle="90deg")