pytha.rotate_element - pytha-3d-cad/pytha-lua-api GitHub Wiki

Rotates a single element or a table of elements.

Similar to the Part tools -> Rotate function in the PYTHA user interface.

pytha.rotate_element(element, origin, axis, angle) 
Parameter Type Description
element element_handle or {...} A single element handle or a table of element handles
origin {x,y,z} Coordinates of the center of rotation
axis {x,y,z} Axis of the rotation
angle number Rotational angle (degree)

Additional information

If element contains element handles to groups, all members of these group will be rotated as well.

The angle is measured counter-clockwise around the axis of rotation.

See also:

pytha, Part Tools Functions, Element Handles, Groups, move_element, copy_element