예제 #1
0
        /***************************************************/

        public static IBHoMObject FromRevit(this SpatialElement spatialElement, Discipline discipline, Transform transform = null, RevitSettings settings = null, Dictionary <string, List <IBHoMObject> > refObjects = null)
        {
            IElement2D result = null;

            switch (discipline)
            {
            case Discipline.Environmental:
                result = spatialElement.SpaceFromRevit(settings, refObjects);
                break;

            case Discipline.Facade:
            case Discipline.Architecture:
            case Discipline.Physical:
                result = spatialElement.RoomFromRevit(settings, refObjects);
                break;
            }

            if (result != null && transform?.IsIdentity == false)
            {
                TransformMatrix bHoMTransform = transform.FromRevit();
                result = result.ITransform(bHoMTransform);
            }

            return(result as IBHoMObject);
        }
예제 #2
0
        /***************************************************/

        public static IBHoMObject FromRevit(this SpatialElement spatialElement, Discipline discipline, RevitSettings settings = null, Dictionary <string, List <IBHoMObject> > refObjects = null)
        {
            switch (discipline)
            {
            case Discipline.Environmental:
                return(spatialElement.SpaceFromRevit(settings, refObjects));

            case Discipline.Architecture:
            case Discipline.Physical:
                return(spatialElement.RoomFromRevit(settings, refObjects));

            default:
                return(null);
            }
        }