/// <summary>
 /// Initializes the bounding box of the polygon.
 /// </summary>
 private void SetBoundingBox()
 {
     BoundBox = new BoundingBoxREXxyz();
     foreach (REXxyz pt in Points)
     {
         BoundBox.AddPoint(pt);
     }
 }
        /// <summary>
        /// Sets the bounding box based on the current list of triangles.
        /// </summary>
        void SetBoundingBox()
        {
            BoundingBoxREXxyz boundBox = new BoundingBoxREXxyz();

            foreach (Main.Triangle tr in Triangles)
            {
                boundBox.AddPoint(tr.Pt1);
                boundBox.AddPoint(tr.Pt2);
                boundBox.AddPoint(tr.Pt3);
            }

            BoundBox = boundBox;
        }