Beispiel #1
0
        /// <summary>
        /// 点投影到线
        /// </summary>
        /// <param name="po"></param>
        /// <param name="l"></param>
        /// <returns></returns>
        public static Point ProjectTo(this Point po, Line l)
        {
            XYZ     dbpo   = po.ToXyz();
            DBcurve dbline = l.ToRevitType();
            XYZ     newpo  = dbline.Project(dbpo).XYZPoint;

            return(Point.ByCoordinates(newpo.X, newpo.Y, newpo.Z));
        }