CogMath AngleLineLine Method Cognex VisionPro 9.7
Returns the angle in radians measured from LineA to LineB.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 73.0.0.0
Syntax

public static double AngleLineLine(
	CogLine lineA,
	CogLine lineB,
	ICogImage image
)

Return Value

Type: Double

The angle between the two lines.

Exceptions

ExceptionCondition
ArgumentException

lineA or lineB is NULL.

CogSpaceTreeInvalidNameSyntaxException

At least one shape's selected space names is not a legal space name.

CogSpaceTreeNotUniqueException

At least one shape's selected space names is a nonqualified space name and more than one instance of it exists in image's coordinate space tree.

CogSpaceTreeNotInTreeException

At least one shape does not exist in image's coordinate space tree.

CogImageNoTreeException

The coordinate space tree is missing from image.

Remarks

Returns the angle in radians measured from lineA to lineB. The angle is normalized to the range -π to π.

If you supply a value for the image parameter, then lineA and lineB are mapped to the selected space of image before the measurement is computed and the result is expressed in that space.

If you do not supply a value for image, then lineA and lineB are presumed to be in the same coordinate space.

If the selected space of lineA and lineB is already the same as the selected space of image, the angle is equivalent to lineB.Rotation-lineA.Rotation.

See Also