예제 #1
0
파일: Level.cs 프로젝트: BHoM/TAS_Toolkit
        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);
        }
예제 #2
0
파일: Level.cs 프로젝트: BHoM/TAS_Toolkit
        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);
        }