Esempio n. 1
0
        public static BHG.SettingOut.Level FromGBXML(this BHX.BuildingStorey storey)
        {
            BHG.SettingOut.Level level = new BHG.SettingOut.Level();

            level.Name      = storey.Name;
            level.Elevation = storey.Level;

            return(level);
        }
Esempio n. 2
0
        public static BHX.BuildingStorey ToGBXML(this BHG.SettingOut.Level level, BHG.Polyline storeyGeometry, GBXMLSettings settings)
        {
            BHX.BuildingStorey storey = new BHX.BuildingStorey();

            if (storeyGeometry != null)
            {
                storey.PlanarGeometry.PolyLoop = storeyGeometry.ToGBXML(settings);
            }

            storey.PlanarGeometry.ID = "LevelPlanarGeometry-" + Guid.NewGuid().ToString().Replace("-", "").Substring(0, 10);
            storey.Name  = level.Name;
            storey.ID    = "Level-" + level.Name.Replace(" ", "").ToLower();
            storey.Level = (float)level.Elevation;

            return(storey);
        }