Ejemplo n.º 1
0
        public HangingPointLoadComposeBase(int i, int j, string orient, float[,] xLoad, float[,] yLoad, float[,] zLoad, string group, string link,
                                           List <HangingPointParas> pointsParas, HangingPointSettingParas raios, TowerTemplate template, List <StruCalsDicGroup> dicGrps)
        {
            iIndex      = i;
            jIndex      = j;
            orientation = orient;

            xLineLoad = xLoad;
            yLineLoad = yLoad;
            zLineLoad = zLoad;

            if (orient == "X")
            {
                lineLoad = xLoad;
            }
            else if (orient == "Y")
            {
                lineLoad = yLoad;
            }
            else
            {
                lineLoad = zLoad;
            }

            ratioParas    = raios;
            towerTemplate = template;

            wireType = towerTemplate.Wires[i];
            wd       = towerTemplate.WorkConditionCombos[j];

            StruCalsDicGroup dicGroup = new StruCalsDicGroup();

            if (link.Contains("常规"))
            {
                pointParas = pointsParas.Where(item => item.WireType == wireType).First();

                string vStr = pointParas.StringType.Contains("V") ? "V串" : pointParas.StringType;
                dicGroup = dicGrps.Where(item => item.Group == group && item.FixedType == vStr && item.Link == link).First();
            }
            else if (link.Contains("转向"))
            {
                pointParas = pointsParas.Where(item => item.WireType == wireType).First();
                dicGroup   = dicGrps.Where(item => item.Group == group && item.Link == link).First();
            }
            else
            {
                string wCC   = template.WorkConditionCombos[jIndex].WorkConditionCode;
                string array = wCC.Substring(wCC.Length - 1);

                pointParas = pointsParas.Where(item => item.WireType == wireType && item.Array != null && item.Array.Contains(array)).First();
                dicGroup   = dicGrps.Where(item => item.Group == group && item.Link == link).First();
            }

            option         = dicGroup.Options.Where(item => item.Num == pointParas.PointNum).First();
            dicComposeInfo = option.ComposrInfos.Where(item => item.Orientation == orientation).First().PointCompose;
        }
        protected void SetParas(string link, string orientation)
        {
            StruCalsDicGroup dicGroup;

            //常规挂点
            if (link.Contains("常规"))
            {
                //悬垂塔常规挂点XY和Z向分别来自NormalXYPoints和NormalZPoints
                if (!isTensionTower)
                {
                    if (orientation == "X" || orientation == "Y")
                    {
                        pointParas = hpPointsParas.NormalXYPoints.Where(item => item.WireType == wireType).First();
                    }
                    else
                    {
                        pointParas = hpPointsParas.NormalZPoints.Where(item => item.WireType == wireType).First();
                    }
                }
                //耐张塔常规导线挂点XYZ向全部来做NormalXYPoints, 常规跳线挂点XYZ向全部来做NormalZPoints
                else
                {
                    if (!link.Contains("跳线"))
                    {
                        pointParas = hpPointsParas.NormalXYPoints.Where(item => item.WireType == wireType).First();
                    }
                    else
                    {
                        pointParas = hpPointsParas.NormalZPoints.Where(item => item.WireType == wireType).First();
                    }
                }

                string vStr = pointParas.StringType.Contains("V") ? "V串" : pointParas.StringType;
                dicGroup = dicGroupOptions.Where(item => item.Group == group && item.FixedType == vStr && item.Link == link).First();
            }
            //转向和过滑车挂点
            else if (link.Contains("转向") || link.Contains("过滑车"))
            {
                //转向和过滑车挂点XYZ向都来自TurningPoints
                pointParas = hpPointsParas.TurningPoints.Where(item => item.WireType == wireType).First();
                dicGroup   = dicGroupOptions.Where(item => item.Group == group && item.Link == link).First();
            }
            //吊装挂点
            else
            {
                List <HangingPointParas> pointsParas;

                //悬垂塔吊装挂点XY和Z向分别来自InstallXYPoints和InstallZPoints
                //耐张塔跳线吊装挂点XY和Z向分别来自InstallXYPoints和InstallZPoints
                if (orientation == "X" || orientation == "Y")
                {
                    pointsParas = hpPointsParas.InstallXYPoints;
                }
                else
                {
                    pointsParas = hpPointsParas.InstallZPoints;
                }


                //吊装挂点会分a/b/c组,需要找到对应组别的挂点信息
                string wCC   = towerTemplate.WorkConditionCombos[jIndex].WorkConditionCode;
                string array = wCC.Substring(wCC.Length - 1);
                pointParas = pointsParas.Where(item => item.WireType == wireType && item.Array != null && item.Array.Contains(array)).First();

                if (!isTensionTower)
                {
                    //悬垂塔的吊装挂点全部按照I串
                    dicGroup = dicGroupOptions.Where(item => item.Group == group && item.Link == link).First();
                }
                else
                {
                    //耐张塔需要区分I串V串两种情况
                    string vStr = pointParas.StringType.Contains("V") ? "V串" : pointParas.StringType;
                    dicGroup = dicGroupOptions.Where(item => item.Group == group && item.FixedType == vStr && item.Link == link).First();
                }
            }

            option         = dicGroup.Options.Where(item => item.Num == pointParas.PointNum).First();
            dicComposeInfo = option.ComposrInfos.Where(item => item.Orientation == orientation).First().PointCompose;
        }