コード例 #1
0
ファイル: FromRevit.cs プロジェクト: chuongmep/Revit_Toolkit
        /***************************************************/

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

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

            case Discipline.Facade:
            case Discipline.Architecture:
            case Discipline.Physical:
                result = new List <IElement2D> {
                    ceiling.CeilingFromRevit(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());
        }
コード例 #2
0
        /***************************************************/

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

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

            default:
                return(null);
            }
        }