Cog3DShapeGeometricOperations AreRealParallel Method (Cog3DLine, Cog3DLine, Double)Cognex VisionPro
Check whether two lines are parallel including direction or anti-parallel within the specified tolerance. 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: 65.1.0.0
Syntax

public static bool AreRealParallel(
	Cog3DLine lineA,
	Cog3DLine lineB,
	double epsilon
)

Return Value

Type: Boolean
True if lineA and lineB are parallel including direction or anti-parallel within the specified tolerance, false otherwise.
Exceptions

ExceptionCondition
ArgumentNullException If lineA or lineB is null.
ArgumentException If lineA is degenerate or lineB is degenerate.
Remarks

Line parallelism checking methods compute the cross product and dot product of the two unit direction vectors of lineA and lineB.
  • If the length of the cross product vector is less than or equal to epsilon, AreRealParallel() returns true;
  • If the dot product is greater than 0 and AreRealParallel() is true, AreRealParallelIncludingDirection() returns true;
  • If the dot product is less than 0 and AreRealParallel() is true, AreRealAntiParallel() returns true.
See Also