F_VN_RotatedRectangleCorners
Computes the 4 corner points of a rotated rectangle.
Syntax
Definition:
FUNCTION F_VN_RotatedRectangleCorners : HRESULT
VAR_IN_OUT
stRect : TcVnRotatedRectangle;
aCorners : TcVnArray4_Point2_REAL;
END_VAR
VAR_INPUT
hrPrev : HRESULT;
END_VAR
Inputs
|
Name |
Type |
Description |
|---|---|---|
|
hrPrev |
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) |
In/Outputs
|
Name |
Type |
Description |
|---|---|---|
|
stRect |
Rotated rectangle | |
|
aCorners |
Returns the 4 corner points |
Further information
The function returns the four corners aCorners of the rotated rectangle as TcVnArray4_Point2_REAL, which corresponds to an Array [0..3] of TcVnPoint2_REAL . At an angle of 0°, aCorners[0] contains the coordinates of the lower left corner of the rectangle parallel to the axes. The remaining indices follow a clockwise order from the top left (aCorners[1]), top right (aCorners[2]), to the bottom right (aCorners[3]). If the rectangle is rotated by 165°, for example, the corner assignment rotates accordingly so that the original bottom left corner is now at the top right.

Required License
TC3 Vision Base
System Requirements
|
Development environment |
Target platform |
PLC libraries to include |
|---|---|---|
|
TwinCAT V3.1.4024.59 or later |
PC or CX (x64) with min. PL50, e.g. Intel 4-core Atom CPU |
Tc3_Vision |
Return value