This method calculates the distance to an other line only in case, when the distance is smaller then MaxDist else Utils.big will be returned. You can imagine a cylinder with radius MaxDist around the line. If now a line goes through the cylinder, then this is a good one and the distance will be calculated and returned. If CheckP is true then additional to the Cylinder a halfsphere with center P and radius Maxdist is considered and analogusly for CheckQ.
This method calculates the distance to an other line only in case, when the distance is smaller then MaxDist else Utils.big will be returned. You can imagine a cylinder with radius MaxDist around the line. If now a line goes through the cylinder, then this is a good one and the distance will be calculated and returned. If CheckP is true then additional to the Cylinder a halfsphere with center P and radius Maxdist is considered and analogusly for CheckQ.
public double Distance(LineType,double,bool,bool,out double);
This method calculates the distance to a Line L The parameter Lam1 can be taken to calculate the point, which have the smallest distance to the other Line L . Nearest1 = Value(Lam1). The parameter Lam2 can be taken to calculate the point of L , which have the smallest distance to the Linetype this. Nearest2 = L.Value(Lam2).
public double Distance(LineType,out double,out double,out xyz,out xyz);
This method calculates the distance to a point Pt. The parameter Lam can be taken to calculate the nearest point of the LineType, which is also return by the outvalue Nearest
public double Distance(xyz,out double,out xyz);