Exemple #1
0
        public static OpeningDefinitions convert2TempOpening(MemorySafe_OpeningDefinitions opening)
        {
            OpeningDefinitions Opening = new OpeningDefinitions();

            foreach (Vector.MemorySafe_CartCoord coord in opening.coordinateList)
            {
                Vector.CartCoord opCoord = new Vector.CartCoord();
                opCoord.X = coord.X;
                opCoord.Y = coord.Y;
                opCoord.Z = coord.Z;
                Opening.coordinateList.Add(opCoord);
            }
            Vector.CartVect RHR = Vector.convertToTempVector(opening.rHRVector);


            Opening.nameId                      = opening.nameId;
            Opening.openingType                 = opening.openingType;
            Opening.parentSurfaceNameId         = opening.parentSurfaceNameId;
            Opening.parentAzimuth               = opening.parentAzimuth;
            Opening.parentTilt                  = opening.parentTilt;
            Opening.outsideBoundaryConditionObj = opening.outsideBoundaryConditionObj;
            Opening.viewFactortoGround          = opening.viewFactortoGround;
            Opening.shadeControlSch             = opening.shadeControlSch;

            Opening.Azimuth             = opening.Azimuth;
            Opening.Tilt                = opening.Tilt;
            Opening.rHRVector           = RHR;
            Opening.constructionName    = opening.constructionName;
            Opening.frameAndDividerName = opening.frameAndDividerName;
            Opening.multiplier          = opening.multiplier;
            Opening.numVertices         = opening.numVertices;
            Opening.area                = opening.area;

            return(Opening);
        }
Exemple #2
0
        public static MemorySafe_ADOpeningDefinitions convert2ADMemorySafeOpening(OpeningDefinitions opening)
        {
            List <Vector.MemorySafe_CartCoord> surfaceCoords = new List <Vector.MemorySafe_CartCoord>();

            Vector.CartVect dummy = new Vector.CartVect();
            dummy.X = -999;
            dummy.Y = -999;
            dummy.Z = -999;
            Vector.MemorySafe_CartVect memSafeRHR = Vector.convertToMemorySafeVector(dummy);
            string openingType     = "N/A";
            double parentAzimuth   = 0;
            double parentTilt      = 0;
            string outsideBoundary = "Outdoors";
            double viewFactor      = 0;
            double az          = -999;
            double tilt        = -999;
            int    numvertices = 4;
            double area        = opening.height * opening.length;
            MemorySafe_ADOpeningDefinitions memOpening = new MemorySafe_ADOpeningDefinitions(opening.nameId,
                                                                                             openingType, opening.parentSurfaceNameId,
                                                                                             parentAzimuth, parentTilt, outsideBoundary, viewFactor,
                                                                                             opening.shadeControlSch, surfaceCoords, az, tilt, memSafeRHR,
                                                                                             opening.constructionName, opening.frameAndDividerName, opening.multiplier, numvertices,
                                                                                             opening.area, opening.X, opening.Z, opening.height, opening.length);

            return(memOpening);
        }