public static XYZ GetProjectPoint(Plane plane, XYZ point) { double d = GetSignedDistance(plane, point); XYZ q = GeomUtil.AddXYZ(point, GeomUtil.MultiplyVector(plane.Normal, d)); return(IsPointInPlane(plane, q) ? q : GeomUtil.AddXYZ(point, GeomUtil.MultiplyVector(plane.Normal, -d))); }