/// <summary>
        /// Creates AdjacencyCluster by the panels and spaces.
        /// </summary>
        /// <param name="panels">The SAM panels.</param>
        /// <param name="spaces">The spaces.</param>
        /// <param name="tolerance">The tolerance.</param>
        /// <param name="updatePanels">if set to <c>true</c> [update panels].</param>
        /// <returns name="adjacencyCluster"><see cref="SAM.Analytical.AdjacencyCluster"/></returns>
        public static SAM.Analytical.AdjacencyCluster ByPanelsAndSpaces(IEnumerable <SAM.Analytical.Panel> panels, IEnumerable <Space> spaces, double tolerance = SAM.Core.Tolerance.MacroDistance, bool updatePanels = true)
        {
            List <Topology>             topologies       = null;
            List <SAM.Analytical.Panel> panels_Redundant = null;

            SAM.Analytical.AdjacencyCluster adjacencyModel = SAM.Analytical.Topologic.Create.AdjacencyCluster(spaces, panels, out topologies, out panels_Redundant, SAM.Core.Tolerance.MacroDistance, updatePanels, true, null, tolerance);
            return(adjacencyModel);
        }
        /// <summary>
        /// Query Adjacencies/Connected Spaces from the specified adjacency cluster for Panels.
        /// </summary>
        /// <param name="adjacencyCluster">The adjacency cluster.</param>
        /// <param name="sAMObject">The s am object.</param>
        /// <returns name="adjacencies">Adjacencies for Panels</returns>
        /// <search>Adjacencies, adjacencies</search>
        public static IEnumerable <object> Adjacencies(SAM.Analytical.AdjacencyCluster adjacencyCluster, SAM.Core.SAMObject sAMObject)
        {
            if (sAMObject is SAM.Analytical.Panel)
            {
                return(adjacencyCluster.GetSpaces((SAM.Analytical.Panel)sAMObject));
            }

            if (sAMObject is Space)
            {
                return(adjacencyCluster.GetPanels((Space)sAMObject));
            }

            return(null);
        }
 /// <summary>
 /// Query Shadings panels from SAM Adjacency cluster.
 /// </summary>
 /// <param name="adjacencyCluster">The adjacency cluster.</param>
 /// <returns name="shadingPanel">Shading Panels
 ///   <see cref="IEnumerable{SAM.Analytical.Panel}"/>
 /// </returns>
 /// <search>ShadingPanels, shadingpanels</search>
 public static IEnumerable <SAM.Analytical.Panel> ShadingPanels(SAM.Analytical.AdjacencyCluster adjacencyCluster)
 {
     return(adjacencyCluster.GetShadingPanels());
 }
 /// <summary>
 /// Query Externals the panels from SAM Adjacency cluster.
 /// </summary>
 /// <param name="adjacencyCluster">The SAM adjacency cluster.</param>
 /// <returns>
 ///   <see cref="IEnumerable{SAM.Analytical.Panel}"/>
 /// </returns>
 /// <search>ExternalPanels, externalpanels</search>
 public static IEnumerable <SAM.Analytical.Panel> ExternalPanels(SAM.Analytical.AdjacencyCluster adjacencyCluster)
 {
     return(adjacencyCluster.GetExternalPanels());
 }
 /// <summary>
 /// Query Spaces from SAM Adjacency cluster.
 /// </summary>
 /// <param name="adjacencyCluster">The adjacency cluster.</param>
 /// <returns name="spaces"> SAM Spaces</returns>
 /// <search>Topologic, QuerySpaces</search>
 public static IEnumerable <Space> Spaces(SAM.Analytical.AdjacencyCluster adjacencyCluster)
 {
     return(adjacencyCluster.GetSpaces());
 }