SMC_DetermineCuboidBearing (FB)ΒΆ
FUNCTION_BLOCK SMC_DetermineCuboidBearing
This function block will determine the position of a cuboid (corner mark, edge alignment) in the space in dependence of 6 (3/2/1) points given:

For detailed information of transformation modules see the overview on kinematic transformations in the CNC online help.
- InOut:
Scope
Name
Type
Initial
Comment
Input
A1
SMC_Vector3D
First of three points that are located on the surface A of a cube and do not lie on a common line.
A2
SMC_Vector3D
Second of three points that are located on the surface A of a cube and do not lie on a common line.
A3
SMC_Vector3D
Third of three points that are located on the surface A of a cube and do not lie on a common line.
B1
SMC_Vector3D
First of two points that are located on another cube surface B adjacent to A. The projection of this point on surface A may not coincide with the projection of B2.
B2
SMC_Vector3D
Second of two points that are located on another cube surface B adjacent to A. The projection of this point on surface A may not coincide with the projection of B1.
C1
SMC_Vector3D
Point on a further cube surface adjacent to A and B
Output
M
SMC_Vector3D
Common corner point of cube surfaces A, B and C
vAB
SMC_Vector3D
Unit vector on edge line between A and B with start point M
vBC
SMC_Vector3D
Unit vector on edge line between B and C with start point M
vCA
SMC_Vector3D
Unit vector on edge line between A and C with start point M
bError
BOOL
Signals, that an error has occurred within the function block
nError
WORD
0
Error description:
0: No error (
bError=FALSE
)1: A1,A2,A3 lie on common line
2: Projections of B1 and B2 on surface A coincide