/// <summary>
/// 投影到一个平面
/// </summary>
/// <param name=""></param>
/// <param name="xyz"></param>
/// <returns></returns>
public static XYZ GetProjectPoint(Plane plane, XYZ xyz)
{
Transform tf = Transform.Identity;
tf.BasisX = plane.XVec;
tf.BasisY = plane.YVec;
tf.BasisZ = plane.Normal;
tf.Origin = plane.Origin;
XYZ p = tf.Inverse.OfPoint(xyz);
p = new XYZ(p.X, p.Y, 0);
return tf.OfPoint(p);
}
点到面的投影
最新推荐文章于 2023-06-28 16:16:07 发布