CADability dotNET
Calculates the minimal distance between two lines and the parameter on the lines where the minimal distance occures. If the lines are parallel, the parameters will be double.MaxValue. The point l1Start + par1*l1Dir is closest to the second line, and the point l2Start + par2*l2Dir is closest to the first line.

Namespace: CADability
Assembly: CADability (in CADability.dll) Version: 1.1.4254.24737 (1.1.*)

Syntax

C#
public static double DistLL(
	GeoPoint l1Start,
	GeoVector l1Dir,
	GeoPoint l2Start,
	GeoVector l2Dir,
	out double par1,
	out double par2
)
Visual Basic
Public Shared Function DistLL ( _
	l1Start As GeoPoint, _
	l1Dir As GeoVector, _
	l2Start As GeoPoint, _
	l2Dir As GeoVector, _
	<OutAttribute> ByRef par1 As Double, _
	<OutAttribute> ByRef par2 As Double _
) As Double
Visual C++
public:
static double DistLL(
	GeoPoint l1Start, 
	GeoVector l1Dir, 
	GeoPoint l2Start, 
	GeoVector l2Dir, 
	[OutAttribute] double% par1, 
	[OutAttribute] double% par2
)

Parameters

l1Start
Type: CADability..::..GeoPoint
Startpoint of the first line
l1Dir
Type: CADability..::..GeoVector
Direction of the first line
l2Start
Type: CADability..::..GeoPoint
Startpoint of the second line
l2Dir
Type: CADability..::..GeoVector
Direction of the second line
par1
Type: System..::..Double%
Parameter on the first line
par2
Type: System..::..Double%
Parameter on the second line

Return Value

Minimal distance

See Also