BuildingCoder.CmdListAllRooms.GetBoundingBox C# (CSharp) Метод

GetBoundingBox() статический приватный Метод

Return bounding box calculated from the room boundary segments. The lower left corner turns out to be identical with the one returned by the standard room bounding box.
static private GetBoundingBox ( IList boundary ) : BoundingBoxXYZ
boundary IList
Результат BoundingBoxXYZ
        static BoundingBoxXYZ GetBoundingBox(
            IList<IList<BoundarySegment>> boundary)
        {
            BoundingBoxXYZ bb = new BoundingBoxXYZ();
              double infinity = double.MaxValue;

              bb.Min = new XYZ( infinity, infinity, infinity );
              bb.Max = -bb.Min;

              foreach( IList<BoundarySegment> loop in boundary )
              {
            foreach( BoundarySegment seg in loop )
            {
              Curve c = seg.GetCurve();
              IList<XYZ> pts = c.Tessellate();
              foreach( XYZ p in pts )
              {
            bb.ExpandToContain( p );
              }
            }
              }
              return bb;
        }