/// <summary> /// Crosses the plane with an other plane and returns the crossline. /// </summary> /// <param name="aPlane">The other plane</param> /// <returns></returns> public LineType Cross(Plane aPlane) { LineType Result = new LineType(); xyz Dir = NormalUnit & aPlane.NormalUnit; if (Dir.isZero()) { return(Result); } xyz s = Dir & NormalUnit; double Lam = (aPlane.P - P) * aPlane.NormalUnit / (s * aPlane.NormalUnit); Result.P = P + s * Lam; Result.Direction = Dir; return(Result); }