RAFreeBodyTranslation#

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

Bases: ansys.rocky.app.api_element_item.ApiElementItem

Rocky PrePost Scripting wrapper representing a Free Body Translation 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('Free Body Translation')
free_body_translation = motion_1.GetTypeObject()

Overview#

GetFreeMotionDirection

Get “Free Motion Direction” as a string.

SetFreeMotionDirection

Set the value of “Free Motion Direction”.

GetValidFreeMotionDirectionValues

Get a list of all possible values for “Free Motion Direction”.

Import detail#

from ansys.rocky.app.motion.ra_fbm_translation import RAFreeBodyTranslation

Method detail#

classmethod RAFreeBodyTranslation.GetWrappedClass()#
classmethod RAFreeBodyTranslation.GetClassName()#
RAFreeBodyTranslation.GetFreeMotionDirection() str#

Get “Free Motion Direction” as a string.

Returns:

The returned value will be one of [‘none’, ‘x’, ‘y’, ‘xy’, ‘z’, ‘xz’, ‘yz’, ‘xyz’].

RAFreeBodyTranslation.SetFreeMotionDirection(value: str) None#

Set the value of “Free Motion Direction”.

Parameters:

value – The value to set. Must be one of [‘none’, ‘x’, ‘y’, ‘xy’, ‘z’, ‘xz’, ‘yz’, ‘xyz’].

Raises:

RockyApiError – If value is not a valid “Free Motion Direction” option.

RAFreeBodyTranslation.GetValidFreeMotionDirectionValues() list[str]#

Get a list of all possible values for “Free Motion Direction”.

Returns:

The returned list is [‘none’, ‘x’, ‘y’, ‘xy’, ‘z’, ‘xz’, ‘yz’, ‘xyz’].