public static BHS.Level FromTAS(this TBD.BuildingStorey tbdStorey) { BHS.Level level = new BHS.Level(); if (tbdStorey.GetPerimeter(0) != null) { BHG.Polyline levelCurve = tbdStorey.GetPerimeter(0).FromTAS(); double elevation = levelCurve.ControlPoints.First().Z; level.Name = "Level " + elevation.Round(); level.Elevation = elevation.Round(); } return(level); }
public static List <BHS.Level> FromTASLevels(this TBD.Building tbdBuilding) { List <BHS.Level> levels = new List <BHS.Level>(); int storeyIndex = 0; TBD.BuildingStorey storey = null; while ((storey = tbdBuilding.GetStorey(storeyIndex)) != null) { levels.Add(storey.FromTAS()); storeyIndex++; } return(levels); }