Cog3DShapeGeometricOperations ComputeNearestPoints Method Cognex VisionPro 9.8
Compute the pair of nearest points between two lines. It is the caller responsibility to map the shapes to a common 3D space before calling this method.

Namespace: Cognex.VisionPro3D
Assembly: Cognex.VisionPro3D.Core (in Cognex.VisionPro3D.Core.dll) Version: 75.1.0.0
Syntax

public static void ComputeNearestPoints(
	Cog3DLine lineA,
	Cog3DLine lineB,
	out Cog3DVect3 pointOnLineA,
	out Cog3DVect3 pointOnLineB
)

Parameters

lineA
Type: Cognex.VisionPro3D Cog3DLine
The first line. May not be null.
lineB
Type: Cognex.VisionPro3D Cog3DLine
The second line. May not be null.
pointOnLineA
Type: Cognex.VisionPro3D Cog3DVect3 
This output parameter is a point on lineA. The distance between pointOnLineA and pointOnLineB is the shortest distance between lineA and lineB.
pointOnLineB
Type: Cognex.VisionPro3D Cog3DVect3 
This output parameter is a point on lineB. The distance between pointOnLineA and pointOnLineB is the shortest distance between lineA and lineB.
Exceptions

ExceptionCondition
ArgumentNullException If lineA or lineB is null.
Remarks

If lineA and lineB are parallel or coincident, then the pair of nearest points is not unique. (pointOnLineA, pointOnLineB) is just one of the pairs of nearest points.
See Also