Difference between revisions of "API Panel.Position.MoveAlong"

From Flowcode Help
Jump to navigationJump to search
(XML import of API documentation)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
<sidebar>API Contents</sidebar>
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Moves the object by the given offset relative to its parent along an axis
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MoveAlong'''
 
+
|-
<div style="width:25%; float:right" class="toc">
+
| colspan="2" | Moves the object by the given offset relative to its parent along an axis&nbsp;
====Class hierarchy====
+
|-
[[API Panel|Panel]]
+
|-
:[[API Panel.Position|Position]]
+
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
::[[API Panel.Position|MoveAlong]]
+
| width="90%" | Handle
</div>
+
|-
__TOC__
+
| colspan="2" | The position or component to update&nbsp;
 
+
|-
==Parameters==
+
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
[[Variable Types|HANDLE]] ''Handle''
+
| width="90%" | Axis
:The position or component to update
+
|-
:''The default value for this parameter is: '''''this'''
+
| colspan="2" | A position or component representing the X,Y,Z axis to move in&nbsp;
 
+
|-
[[Variable Types|HANDLE]] ''Axis''
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
:A position or component representing the X,Y,Z axis to move in
+
| width="90%" | X
 
+
|-
[[Variable Types|FLOAT]] ''X''
+
| colspan="2" | Local coordinate X to increment by&nbsp;
:Local coordinate X to increment by
+
|-
:''The default value for this parameter is: '''''0'''
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
+
| width="90%" | Y
[[Variable Types|FLOAT]] ''Y''
+
|-
:Local coordinate Y to increment by
+
| colspan="2" | Local coordinate Y to increment by&nbsp;
:''The default value for this parameter is: '''''0'''
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
[[Variable Types|FLOAT]] ''Z''
+
| width="90%" | Z
:Local coordinate Z to increment by
+
|-
:''The default value for this parameter is: '''''0'''
+
| colspan="2" | Local coordinate Z to increment by&nbsp;
 
+
|-
 
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - NONE
==Return value==
+
| width="90%" style="border-top: 2px solid #000;" | ''Return''
''This call does not return a value''
+
|}
  
  
Line 50: Line 50:
  
 
===Flowcode example file===
 
===Flowcode example file===
Download [[File:SIMAPI_Panel_Position_MoveAlong.fcf]] and open it in Flowcode v6. In this example, there are three cubiods that represent Axis X,Y,Z. Note they are coloured exactly as the panel axis indicator which represents your viewing position. There is a sphere also on the panel. The sphere moves first along the X-Axis 100 units then back to it's original position, then does the same for the Y and Z axis. Note - to see the sphere moving along the Z axis you will need to turn on perspective or change the viewing plane with via the panel axis indicator.
+
Download {{Fcfile|SIMAPI_Panel_Position_MoveAlong.fcfx|SIMAPI_Panel_Position_MoveAlong}} and open it in Flowcode v6. In this example, there are three cubiods that represent Axis X,Y,Z. Note they are coloured exactly as the panel axis indicator which represents your viewing position. There is a sphere also on the panel. The sphere moves first along the X-Axis 100 units then back to it's original position, then does the same for the Y and Z axis. Note - to see the sphere moving along the Z axis you will need to turn on perspective or change the viewing plane with via the panel axis indicator.
  
 
The screenshots below show the effect and also highlight the code used by the example.
 
The screenshots below show the effect and also highlight the code used by the example.

Latest revision as of 11:41, 16 January 2023

Fc9-comp-macro.png MoveAlong
Moves the object by the given offset relative to its parent along an axis 
Fc9-h32-icon.png - HANDLE Handle
The position or component to update 
Fc9-h32-icon.png - HANDLE Axis
A position or component representing the X,Y,Z axis to move in 
Fc9-f32-icon.png - FLOAT X
Local coordinate X to increment by 
Fc9-f32-icon.png - FLOAT Y
Local coordinate Y to increment by 
Fc9-f32-icon.png - FLOAT Z
Local coordinate Z to increment by 
Fc9-void-icon.png - NONE Return


Detailed description

This adjusts the Handle position by moving it along the specified Axis a number of units in the X, Y and Z directions.


If the Axis is zero then world space is assumed. Under typical usage 'this' would be a common axis, representing the object space of the component.


Examples

Calling in a calculation

  • Add to a calculation icon:
    ::Panel.Position.MoveAlong(handle, axis, x, y, z)


Flowcode example file

Download FC6 Icon.png SIMAPI_Panel_Position_MoveAlong and open it in Flowcode v6. In this example, there are three cubiods that represent Axis X,Y,Z. Note they are coloured exactly as the panel axis indicator which represents your viewing position. There is a sphere also on the panel. The sphere moves first along the X-Axis 100 units then back to it's original position, then does the same for the Y and Z axis. Note - to see the sphere moving along the Z axis you will need to turn on perspective or change the viewing plane with via the panel axis indicator.

The screenshots below show the effect and also highlight the code used by the example.

SIMAPI Panel Position MoveAlong Pic1.pngSIMAPI Panel Position MoveAlong Pic2.pngSIMAPI Panel Position MoveAlong Pic3.pngSIMAPI Panel Position MoveAlong Pic4.png

SIMAPI Panel Position MoveAlong Pic0.png