예제 #1
0
        /// <summary>
        /// Gets the plane edge set and z axis value equals no zero.
        /// </summary>
        /// <param name="box"></param>
        /// <returns></returns>
        public static List <Line> GetPlaneEdges(this BoundingBoxXYZ box)
        {
            var vectors = box.GetPlaneVectors();
            var p1      = vectors[0];
            var p2      = vectors[1];
            var p3      = vectors[2];
            var p4      = vectors[3];
            var p12     = Line.CreateBound(p1, p2);
            var p23     = Line.CreateBound(p2, p3);
            var p34     = Line.CreateBound(p3, p4);
            var p41     = Line.CreateBound(p4, p1);

            return(new List <Line> {
                p12, p23, p34, p41
            });
        }