예제 #1
0
        public static Shade ToLadybugTools_Shade(this IPartition partition)
        {
            if (partition == null)
            {
                return(null);
            }

            Face3D face3D = partition.Face3D?.ToLadybugTools();

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

            ShadePropertiesAbridged shadePropertiesAbridged = new ShadePropertiesAbridged();

            Shade shade = new Shade(Query.UniqueName(partition), face3D, shadePropertiesAbridged, partition.Name);

            return(shade);
        }
예제 #2
0
        public static Shade ToLadybugTools_Shade(this Panel panel)
        {
            if (panel == null || panel.PanelType != PanelType.Shade)
            {
                return(null);
            }

            Face3D face3D = panel.GetFace3D(true)?.ToLadybugTools();

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

            ShadePropertiesAbridged shadePropertiesAbridged = new ShadePropertiesAbridged();

            Shade shade = new Shade(Query.UniqueName(panel), face3D, shadePropertiesAbridged, panel.Name);

            return(shade);
        }