Example #1
0
        /// <summary>
        /// Gets the space edge set.
        /// </summary>
        /// <param name="box"></param>
        /// <returns></returns>
        public static List <Line> GetSpaceEdgeList(this BoundingBoxXYZ box)
        {
            if (box == null)
            {
                throw new ArgumentNullException(nameof(box));
            }

            var vectors = box.GetSpaceVectorList();
            var p1      = vectors[0];
            var p2      = vectors[1];
            var p3      = vectors[2];
            var p4      = vectors[3];
            var p5      = vectors[4];
            var p6      = vectors[5];
            var p7      = vectors[6];
            var p8      = vectors[7];
            var p12     = Line.CreateBound(p1, p2);
            var p14     = Line.CreateBound(p1, p4);
            var p15     = Line.CreateBound(p1, p5);
            var p23     = Line.CreateBound(p2, p3);
            var p24     = Line.CreateBound(p2, p4);
            var p34     = Line.CreateBound(p3, p4);
            var p37     = Line.CreateBound(p3, p7);
            var p48     = Line.CreateBound(p4, p8);
            var p56     = Line.CreateBound(p5, p6);
            var p58     = Line.CreateBound(p5, p8);
            var p67     = Line.CreateBound(p6, p7);
            var p78     = Line.CreateBound(p7, p8);

            return(new List <Line> {
                p12, p14, p15, p23, p24, p34, p37, p48, p56, p58, p67, p78
            });
        }