Esempio n. 1
0
        /***************************************************/

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

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

            case Discipline.Structural:
                result = roofBase.StructuralPanelsFromRevit(settings, refObjects);
                break;

            case Discipline.Facade:
            case Discipline.Architecture:
            case Discipline.Physical:
                result = new List <IElement2D> {
                    roofBase.RoofFromRevit(settings, refObjects)
                };
                break;
            }

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

            return(result?.Cast <IBHoMObject>().ToList());
        }
Esempio n. 2
0
        /***************************************************/

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

            case Discipline.Structural:
                return(roofBase.StructuralPanelsFromRevit(settings, refObjects));

            case Discipline.Architecture:
            case Discipline.Physical:
                return(new List <IBHoMObject> {
                    roofBase.RoofFromRevit(settings, refObjects)
                });

            default:
                return(null);
            }
        }