RARotation#

class ansys.rocky.app.motion.ra_rotation.RARotation(id: str, model_id: str | None = None)#

Bases: ansys.rocky.app.api_element_item.ApiElementItem

Rocky PrePost Scripting wrapper representing a Rotation motion.

Retrieve this specific wrapper after setting the correct motion type on a RAMotion. For example:

motions = motion_frame.GetMotions()
motion_1 = motions.New()
motion_1.SetType('Rotation')
rotation = motion_1.GetTypeObject()

Overview#

GetAngularAcceleration

Get the value of “Angular Acceleration”.

SetAngularAcceleration

Set the values of “Angular Acceleration”.

GetInitialAngularVelocity

Get the value of “Initial Angular Velocity”.

SetInitialAngularVelocity

Set the values of “Initial Angular Velocity”.

Import detail#

from ansys.rocky.app.motion.ra_rotation import RARotation

Method detail#

classmethod RARotation.GetWrappedClass()#
classmethod RARotation.GetClassName()#
RARotation.GetAngularAcceleration(unit: str | None = None) list[float]#

Get the value of “Angular Acceleration”.

Parameters:

unit – The unit for the returned values. If no unit is provided, the returned values will be in “rad/s2”.

RARotation.SetAngularAcceleration(values: collections.abc.Sequence[str | float], unit: str | None = None) None#

Set the values of “Angular Acceleration”.

Parameters:
  • values – The values to set. The values can be heterogeneous, the element of values can be an expression with input variables or a float. Must have exactly 3 elements.

  • unit – The unit for values. If no unit is provided, values is assumed to be in “rad/s2”.

Raises:

RockyApiError – If values doesn’t have exactly 3 elements.

RARotation.GetInitialAngularVelocity(unit: str | None = None) list[float]#

Get the value of “Initial Angular Velocity”.

Parameters:

unit – The unit for the returned values. If no unit is provided, the returned values will be in “rad/s”.

RARotation.SetInitialAngularVelocity(values: collections.abc.Sequence[str | float], unit: str | None = None) None#

Set the values of “Initial Angular Velocity”.

Parameters:
  • values – The values to set. The values can be heterogeneous, the element of values can be an expression with input variables or a float. Must have exactly 3 elements.

  • unit – The unit for values. If no unit is provided, values is assumed to be in “rad/s”.

Raises:

RockyApiError – If values doesn’t have exactly 3 elements.