Ejemplo n.º 1
0
        public static Space FromGBXML(this GBXML.Space space, GBXMLSettings settings = null)
        {
            Space bhomS = new oM.Environment.Elements.Space();

            bhomS.Name      = space.Name;
            bhomS.Perimeter = space.PlanarGeoemtry.PolyLoop.FromGBXML();

            OriginContextFragment f = new OriginContextFragment();

            f.ElementID = space.ID;
            bhomS.Fragments.Add(f);
            return(bhomS);
        }
Ejemplo n.º 2
0
        private List <BHE.Space> ReadSpaces(BHX.GBXML gbx, List <string> ids = null)
        {
            //ToDo - Fix this!
            List <BHE.Space> s = new List <BHE.Space>();

            if (gbx.Campus != null)
            {
                foreach (BHX.Building b in gbx.Campus.Building)
                {
                    foreach (BHX.Space space in b.Space)
                    {
                        BHE.Space bhomS = new oM.Environment.Elements.Space();
                        bhomS.Name = space.Name;
                        OriginContextFragment f = new OriginContextFragment();
                        f.ElementID = space.ID;
                        bhomS.Fragments.Add(f);
                        s.Add(bhomS);
                    }
                }
            }

            return(s);
        }