Ejemplo n.º 1
0
        public static OpeningSimulationResult ToSAM_OpeningSimulationResult(this TAS3D.window window)
        {
            if (window == null)
            {
                return(null);
            }

            OpeningSimulationResult result = new OpeningSimulationResult(window.name, Assembly.GetExecutingAssembly().GetName()?.Name, window.name);

            result.SetValue("Color", Core.Convert.ToColor(window.colour));
            result.SetValue("Description", window.description);
            result.SetValue("Frame Depth", window.frameDepth);
            result.SetValue("Frame Width", window.frameWidth);
            result.SetValue("Height", window.height);
            result.SetValue("Internal Shadows", window.internalShadows);
            result.SetValue("Position Type", window.positionType);
            result.SetValue("Pane Depth", window.paneDepth);
            result.SetValue("Pane Offset", window.paneOffset);
            result.SetValue("Transparent", window.paneOffset);
            result.SetValue("Width", window.width);
            result.SetValue("Level", window.level);
            result.SetValue("Frame Percentage", window.level);
            result.SetValue("Frame Guid", window.frameGUID);
            result.SetValue("Pane Guid", window.paneGUID);
            result.SetValue("Is Percentage Frame", window.isPercFrame);
            result.SetValue("Is Used", window.isUsed);

            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets TAS Building Windows
        /// </summary>
        /// <param name="Building">TAS Building</param>
        /// <returns name="Windows">Building Windows</returns>
        /// <search>
        /// TAS, Builidng, Windows, Get Building Windows, getbuildingwindows, Windows, GetWindows, getWindows
        /// </search>
        public static List<Window> Windows(Building Building)
        {
            List<Window> aWindowList = new List<Window>();

            int aIndex = 1;
            TAS3D.window aWindow = Building.pBuilding.GetWindow(aIndex);
            while (aWindow != null)
            {
                aWindowList.Add(new Window(aWindow));
                aIndex++;
                aWindow = Building.pBuilding.GetWindow(aIndex);
            }
            return aWindowList;
        }
Ejemplo n.º 3
0
        public static Aperture ToSAM(this TAS3D.window window)
        {
            if (window == null)
            {
                return(null);
            }

            ParameterSet parameterSet = Create.ParameterSet(ActiveSetting.Setting, window);

            Aperture aperture = new Aperture(new ApertureConstruction(window.name, ApertureType.Window), null);

            aperture.Add(parameterSet);

            return(aperture);
        }
Ejemplo n.º 4
0
        public static List <TAS3D.window> Windows(this TAS3D.Building building)
        {
            List <TAS3D.window> result = new List <TAS3D.window>();

            int index = 1;

            TAS3D.window window = building.GetWindow(index);
            while (window != null)
            {
                result.Add(window);
                index++;

                window = building.GetWindow(index);
            }

            return(result);
        }
Ejemplo n.º 5
0
        public static string Name(this TAS3D.window window)
        {
            if (window == null)
            {
                return(null);
            }

            string name = window.name;

            if (string.IsNullOrWhiteSpace(name))
            {
                return(null);
            }

            name = name.Trim();

            return(name);
        }
Ejemplo n.º 6
0
        public static Dictionary <string, object> GetWindowData(T3DDocument T3DDocument, string WindowName)
        {
            TAS3D.Zone   aZone        = null;
            TAS3D.window aWindow      = null;
            double       aArea        = double.MinValue;
            double       aOrientation = double.MinValue;
            object       aCoords      = null;
            bool         aResult      = Document.GetWindowData(WindowName, out aZone, out aWindow, out aArea, out aOrientation, out aCoords);

            return(new Dictionary <string, object>
            {
                { "WindowData", aResult },
                { "Zone", new Zone(aZone) },
                { "Window", new Window(aWindow) },
                { "Area", aArea },
                { "Orientation", aOrientation },
                { "Coords", aCoords }
            });
        }
Ejemplo n.º 7
0
        public static ApertureConstruction Match(this TAS3D.window window, IEnumerable <ApertureConstruction> apertureConstructions)
        {
            if (apertureConstructions == null || window == null)
            {
                return(null);
            }

            string name = Name(window);

            if (string.IsNullOrWhiteSpace(name))
            {
                return(null);
            }

            List <ApertureConstruction> apertureConstructions_Temp = apertureConstructions.ToList();

            apertureConstructions_Temp.RemoveAll(x => x == null || string.IsNullOrWhiteSpace(x.Name));

            foreach (ApertureConstruction apertureConstruction in apertureConstructions_Temp)
            {
                if (name.Equals(apertureConstruction.Name.Trim()))
                {
                    return(apertureConstruction);
                }
            }

            foreach (ApertureConstruction apertureConstruction in apertureConstructions_Temp)
            {
                if (name.EndsWith(string.Format(": {0}", apertureConstruction.Name.Trim())))
                {
                    return(apertureConstruction);
                }
            }

            return(null);
        }
Ejemplo n.º 8
0
 internal Window(TAS3D.window Window)
 {
     pWindow = Window;
 }