在Revit中求得点到面的投影
public static XYZ PointProjectPlane(PlanarFace plane, XYZ xyz)
{
Transform tf = Transform.Identity;
tf.BasisX = plane.XVector;
tf.BasisY = plane.YVector;
tf.BasisZ = plane.FaceNormal;
tf.Origin = plane.Origin;
XYZ p = tf.Inverse.OfPoint(xyz);
p = new XYZ(p.X, p.Y, 0);
return tf.OfPoint(p);
}