RATranslation#
- class ansys.rocky.app.motion.ra_translation.RATranslation(id: str, model_id: str | None = None)#
Bases:
ansys.rocky.app.api_element_item.ApiElementItemRocky PrePost Scripting wrapper representing a 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('Translation') translation = motion_1.GetTypeObject()
Overview#
Get the value of “Acceleration”. |
|
Set the values of “Acceleration”. |
|
Get “Input” as a string. |
|
Set the value of “Input”. |
|
Get a list of all possible values for “Input”. |
|
Get the value of “Final Velocity”. |
|
Set the values of “Final Velocity”. |
|
Get the value of “Velocity”. |
|
Set the values of “Velocity”. |
Import detail#
from ansys.rocky.app.motion.ra_translation import RATranslation
Method detail#
- classmethod RATranslation.GetWrappedClass()#
- classmethod RATranslation.GetClassName()#
- RATranslation.GetAcceleration(unit: str | None = None) list[float]#
Get the value of “Acceleration”.
- Parameters:
unit – The unit for the returned values. If no unit is provided, the returned values will be in “m/s2”.
- RATranslation.SetAcceleration(values: collections.abc.Sequence[str | float], unit: str | None = None) None#
Set the values of “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 “m/s2”.
- Raises:
RockyApiError – If values doesn’t have exactly 3 elements.
- RATranslation.GetInput() str#
Get “Input” as a string.
- Returns:
The returned value will be one of [‘fixed_velocity’, ‘initial_and_final_velocity’, ‘initial_velocity_and_acceleration’].
- RATranslation.SetInput(value: str) None#
Set the value of “Input”.
- Parameters:
value – The value to set. Must be one of [‘fixed_velocity’, ‘initial_and_final_velocity’, ‘initial_velocity_and_acceleration’].
- Raises:
RockyApiError – If value is not a valid “Input” option.
- RATranslation.GetValidInputValues() list[str]#
Get a list of all possible values for “Input”.
- Returns:
The returned list is [‘fixed_velocity’, ‘initial_and_final_velocity’, ‘initial_velocity_and_acceleration’].
- RATranslation.GetFinalVelocity(unit: str | None = None) list[float]#
Get the value of “Final Velocity”.
- Parameters:
unit – The unit for the returned values. If no unit is provided, the returned values will be in “m/s”.
- RATranslation.SetFinalVelocity(values: collections.abc.Sequence[str | float], unit: str | None = None) None#
Set the values of “Final 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 “m/s”.
- Raises:
RockyApiError – If values doesn’t have exactly 3 elements.
- RATranslation.GetVelocity(unit: str | None = None) list[float]#
Get the value of “Velocity”.
- Parameters:
unit – The unit for the returned values. If no unit is provided, the returned values will be in “m/s”.
- RATranslation.SetVelocity(values: collections.abc.Sequence[str | float], unit: str | None = None) None#
Set the values of “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 “m/s”.
- Raises:
RockyApiError – If values doesn’t have exactly 3 elements.