public static List <SAMType> UpdateConstructions(this TBDDocument tBDDocument, AnalyticalModel analyticalModel)
        {
            if (tBDDocument == null || analyticalModel == null)
            {
                return(null);
            }

            Building building = tBDDocument.Building;

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

            AdjacencyCluster adjacencyCluster = analyticalModel.AdjacencyCluster;

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

            adjacencyCluster.SetConstructionsDefaultPanelType();

            List <SAMType> result = new List <SAMType>();

            Dictionary <System.Guid, Construction> dictionary_Construction = new Dictionary <System.Guid, Construction>();

            foreach (Panel panel in adjacencyCluster.GetPanels())
            {
                if (panel == null || panel.PanelType == PanelType.Air)
                {
                    continue;
                }

                Construction construction = panel.Construction;
                if (construction == null)
                {
                    continue;
                }

                dictionary_Construction[construction.Guid] = construction;
            }

            if (dictionary_Construction != null && dictionary_Construction.Count != 0)
            {
                List <Construction> constructions = UpdateConstructions(building, dictionary_Construction.Values, analyticalModel.MaterialLibrary);
                if (constructions != null && constructions.Count != 0)
                {
                    constructions.ForEach(x => result.Add(x));
                }
            }

            List <ApertureConstruction> apertureConstructions = analyticalModel.AdjacencyCluster?.GetApertureConstructions();

            if (apertureConstructions != null && apertureConstructions.Count != 0)
            {
                apertureConstructions = UpdateConstructions(building, apertureConstructions, analyticalModel.MaterialLibrary);
                if (apertureConstructions != null && apertureConstructions.Count != 0)
                {
                    apertureConstructions.ForEach(x => result.Add(x));
                }
            }

            return(result);
        }