public static WindowConstructionAbridged ToLadybugTools_WindowConstructionAbridged(this ApertureConstruction apertureConstruction, bool reverse = true)
        {
            if (apertureConstruction == null)
            {
                return(null);
            }

            List <ConstructionLayer> constructionLayers = apertureConstruction.PaneConstructionLayers;

            if (constructionLayers == null)
            {
                return(null);
            }

            if (reverse)
            {
                constructionLayers.Reverse();
            }

            WindowConstructionAbridged result = new WindowConstructionAbridged(
                identifier: Query.UniqueName(apertureConstruction, reverse),
                materials: constructionLayers.ConvertAll(x => x.Name),
                displayName: apertureConstruction.Name);

            return(result);
        }
        public static WindowConstructionAbridged ToLadybugTools_WindowConstructionAbridged(this WindowType windowType, bool reverse = true)
        {
            if (windowType == null)
            {
                return(null);
            }

            List <Architectural.MaterialLayer> materialLayers = windowType.PaneMaterialLayers;

            if (materialLayers == null)
            {
                return(null);
            }

            if (reverse)
            {
                materialLayers.Reverse();
            }

            WindowConstructionAbridged result = new WindowConstructionAbridged(
                identifier: Query.UniqueName(windowType, reverse),
                materials: materialLayers.ConvertAll(x => x.Name),
                displayName: windowType.Name);

            return(result);
        }
Beispiel #3
0
        public static ApertureConstruction ToSAM(this WindowConstructionAbridged windowConstructionAbridged, Core.MaterialLibrary materialLibrary = null)
        {
            if (windowConstructionAbridged == null)
            {
                return(null);
            }

            List <ConstructionLayer> constructionLayers = Query.ConstructionLayers(materialLibrary, windowConstructionAbridged.Materials);

            ApertureConstruction result = new ApertureConstruction(System.Guid.NewGuid(), windowConstructionAbridged.Identifier, ApertureType.Window, constructionLayers);

            return(result);
        }