예제 #1
0
        public IBoundingBox BoundingBox()
        {
            var bbList = new List <IBoundingBox>();

            foreach (DwgEntity entity in Entities)
            {
                if (entity is Line3)
                {
                    Line3 line = entity as Line3;
                    bbList.Add(line.BoundingBox());
                }
                if (entity is Arc)
                {
                    Arc arc = entity as Arc;
                    bbList.Add(arc.BoundingBox());
                }
                if (entity is Vector3)
                {
                    Vector3 pt = entity as Vector3;
                    bbList.Add(pt.BoundingBox());
                }
            }
            return(BoundingBoxBuilder.Union(bbList));
        }