RAConeCrusherFrame
Last update: 17.07.2025class RAConeCrusherFrame
Rocky PrePost Scripting wrapper for a cone crusher frame.
The class contains methods to configure a cone crusher frame. There are some options
to retrieve a specific RAConeCrusherFrame in a project from a RAStudy,
a RAMotionFrameSource, another RAConeCrusherFrame or a RAMotionFrame:
# From the RAStudy
motion_frame = study.GetElement('<motion frame name>')
# From the RAMotionFrameSource
frame_source = study.GetMotionFrameSource()
motion_frame = frame_source.GetMotionFrame('<motion frame name>')
# From a "parent" motion frame
frame_1 = study.GetElement('<frame name>')
frame_2 = frame_1.GetMotionFrame('<frame name>')
Motion frames can be created on the “root” of the project’s cone crusher frames (the source returned
in RAStudy.GetMotionFrameSource()), or as a ‘child’ frame of a pre-existing cone crusher frame:
frame_source = study.GetMotionFrameSource()
# Create a motion frame with no parent frame
frame_1 = frame_source.NewConeCrusherFrame()
# Configure this new frame frame_1
frame_1.SetInitialOrientation(...)
frame_1.SetPivotPoint(...)
# Create a new frame, as a child of `frame_1`
frame_2 = frame_1.NewConeCrusherFrame()
# Configure this new frame frame_2
frame_2.SetInitialOrientation(...)
# ... configure motions, etc.
Methods:
| Name | Description |
|---|---|
GetInitialOrientation([unit]) |
Get the value of "Initial Orientation". |
GetMotionFrame(frame_name) |
Get a specific motion frame given its name. |
GetParentMotionFrame() |
Gets the parent motion frame. |
GetPivotPoint([unit]) |
Get the value of "Pivot Point". |
GetRotationAxis([unit]) |
Get the value of "Rotation Axis". |
GetRotationalVelocity([unit]) |
Get the value of "Rotational Velocity". |
GetStartTime([unit]) |
Get the value of "Start Time". |
GetStopTime([unit]) |
Get the value of "Stop Time". |
IterMotionFrames() |
Iterates over all the motion frames available (recursively). |
NewConeCrusherFrame() |
Creates a new cone crusher frame. |
NewFrame() |
Creates a new motion frame. |
RemoveFrame(motion_frame) |
Removes a previously-created motion frame. |
SetInitialOrientation(values[, unit]) |
Set the values of "Initial Orientation". |
SetPivotPoint(values[, unit]) |
Set the values of "Pivot Point". |
SetRotationAxis(values[, unit]) |
Set the values of "Rotation Axis". |
SetRotationalVelocity(value[, unit]) |
Set the value of "Rotational Velocity". |
SetStartTime(value[, unit]) |
Set the value of "Start Time". |
SetStopTime(value[, unit]) |
Set the value of "Stop Time". |
GetInitialOrientation(unit: Optional[str] = None)
Get the value of “Initial Orientation”.
- Parameters: unit – The unit for the returned values. If no unit is provided, the returned values will be in “m”.
GetMotionFrame(frame_name)
Get a specific motion frame given its name.
- Parameters: frame_name (unicode) –
- Return type: RAMotionFrame
GetParentMotionFrame()
Gets the parent motion frame. If the Motion Frame is a RAMotionFrameSource it returns None.
- Return type: RAMotionFrame
GetPivotPoint(unit: Optional[str] = None)
Get the value of “Pivot Point”.
- Parameters: unit – The unit for the returned values. If no unit is provided, the returned values will be in “m”.
GetRotationAxis(unit: Optional[str] = None)
Get the value of “Rotation Axis”.
- Parameters: unit – The unit for the returned values. If no unit is provided, the returned values will be in “m”.
GetRotationalVelocity(unit: Optional[str] = None)
Get the value of “Rotational Velocity”.
- Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “rad/s”.
GetStartTime(unit: Optional[str] = None)
Get the value of “Start Time”.
- Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “s”.
GetStopTime(unit: Optional[str] = None)
Get the value of “Stop Time”.
- Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “s”.
IterMotionFrames()
Iterates over all the motion frames available (recursively).
- Return iter(RAMotionFrame):
NewConeCrusherFrame()
Creates a new cone crusher frame.
- Return type: RAConeCrusherFrame
NewFrame()
Creates a new motion frame.
RemoveFrame(motion_frame)
Removes a previously-created motion frame.
- Parameters: motion_frame (RAMotionFrame or RAConeCrusherFrame) –
SetInitialOrientation(values: Sequence[Union[str, float]], unit: Optional[str] = None)
Set the values of “Initial Orientation”.
- 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”.
- Raises: RockyApiError – If values doesn’t have exactly 3 elements.
SetPivotPoint(values: Sequence[Union[str, float]], unit: Optional[str] = None)
Set the values of “Pivot Point”.
- 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”.
- Raises: RockyApiError – If values doesn’t have exactly 3 elements.
SetRotationAxis(values: Sequence[Union[str, float]], unit: Optional[str] = None)
Set the values of “Rotation Axis”.
- 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”.
- Raises: RockyApiError – If values doesn’t have exactly 3 elements.
SetRotationalVelocity(value: Union[str, float], unit: Optional[str] = None)
Set the value of “Rotational Velocity”.
- Parameters:
- value – The value to set. This value can be an expression with input variables or float type.
- unit – The unit for value. If no unit is provided, value is assumed to be in “rad/s”.
SetStartTime(value: Union[str, float], unit: Optional[str] = None)
Set the value of “Start Time”.
- Parameters:
- value – The value to set. This value can be an expression with input variables or float type.
- unit – The unit for value. If no unit is provided, value is assumed to be in “s”.
SetStopTime(value: Union[str, float], unit: Optional[str] = None)
Set the value of “Stop Time”.
- Parameters:
- value – The value to set. This value can be an expression with input variables or float type.
- unit – The unit for value. If no unit is provided, value is assumed to be in “s”.