SMC_InvCoordinateTransformation3D (FB)
FUNCTION_BLOCK SMC_InvCoordinateTransformation3D
This function block will calculate the coordinates of a point given in respect of the old coordinate system and transformed to the new coordinate system. For this purpose, the inverse coordinate transformation is defined by the translation of the origin and the new unit vectors (given in respect of the old coordinate system).
(note: That this FB only works correct, if the vectors vX, vY and vZ are perpendicular to each other)
For detailed information of transformation modules see the survey on Coordinate Transformations.
InOut:
Scope |
Name |
Type |
Comment |
Input |
piIn |
Point in old coordinates |
|
vX |
SMC_Vector3D |
Unit vector of new coordinate system |
|
vY |
SMC_Vector3D |
Unit vector of new coordinate system |
|
vZ |
SMC_Vector3D |
Unit vector of new coordinate system |
|
vTranslation |
SMC_Vector3D |
Translation vector for origin = origin of new coordinate system in old coordinates |
|
Output |
piOut |
Point in new coordinates. |