/// <summary> /// 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. /// </summary> static BoundingBoxXYZ GetBoundingBox( IList <IList <BoundarySegment> > boundary) { BoundingBoxXYZ bb = new BoundingBoxXYZ(); bb.Clear(); 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); }