/// <summary>
        /// V串挂点的分配
        /// </summary>
        protected void GeneratePointsLoadVString(int index, string orientation, bool isLeft, VStringCompose vString, out string loadStr, out StruCalsPointLoad pointLoad)
        {
            GetPointProportion(dicComposeInfo[index], out float proportion);

            float load;

            if (orientation == "X")
            {
                load = (isLeft ? vString.VCX1: vString.VCX2) * proportion;
            }
            else if (orientation == "Y")
            {
                load = (isLeft ? vString.VCY1 : vString.VCY2) * proportion;
            }
            else
            {
                load = (isLeft ? vString.VCZ1 : vString.VCZ2) * proportion;
            }

            loadStr = pointParas.Points[index].PadLeft(10) + proportion.ToString("0.00").PadLeft(10) + load.ToString("0.00").PadLeft(10);

            pointLoad = new StruCalsPointLoad()
            {
                Name            = Convert.ToInt32(pointParas.Points[index]),
                Wire            = wireType,
                WorkConditionId = jIndex,
                Orientation     = orientation,
                Proportion      = proportion,
                Load            = load,
                HPSettingName   = hpPointsParas.HangingPointSettingName,
            };
        }
Exemplo n.º 2
0
        public void ComposeHangingPointsLoad(out string resStr, out List <StruCalsPointLoad> resList, bool isTurningPoint = false)
        {
            resList = new List <StruCalsPointLoad>();

            string preStr = "  " + wireType;

            if (isTurningPoint)
            {
                preStr += "转向荷载";
            }

            preStr += ("工况" + (jIndex + 1).ToString()).PadLeft(8);
            resStr  = preStr + orientation.PadLeft(6) + lineLoad[jIndex, iIndex].ToString("0.00").PadLeft(10);

            //导线V串
            if (pointParas.StringType != null && pointParas.StringType.Contains("V"))
            {
                //跳跃脱冰工况
                if (wd.WorkConditionCode == "T" && wd.WireIndexCodes[iIndex] > 10)
                {
                    if (!wireType.Contains("右"))
                    {
                        //左边和中间的导线,获取左侧挂点
                        for (int kl = 0; kl < option.LeftPoints.Count(); kl++)
                        {
                            int pointIndex = Convert.ToInt32(option.LeftPoints[kl].Substring(1)) - 1;

                            GetPointProportionAndLoad(dicComposeInfo[pointIndex], lineLoad[jIndex, iIndex], out float proportion, out float laod);

                            resStr += pointParas.Points[pointIndex].PadLeft(10) + proportion.ToString("0.00").PadLeft(10) + laod.ToString("0.00").PadLeft(10);

                            resList.Add(new StruCalsPointLoad()
                            {
                                Name            = Convert.ToInt32(pointParas.Points[pointIndex]),
                                Wire            = wireType,
                                WorkConditionId = jIndex,
                                Orientation     = orientation,
                                Proportion      = proportion,
                                Load            = laod,
                                HPSettingName   = ratioParas.HangingPointSettingName,
                            });
                        }
                    }
                    else
                    {
                        for (int kr = 0; kr < option.RightPoints.Count(); kr++)
                        {
                            int pointIndex = Convert.ToInt32(option.RightPoints[kr].Substring(1)) - 1;

                            GetPointProportionAndLoad(dicComposeInfo[pointIndex], lineLoad[jIndex, iIndex], out float proportion, out float laod);

                            resStr += pointParas.Points[pointIndex].PadLeft(10) + proportion.ToString("0.00").PadLeft(10) + laod.ToString("0.00").PadLeft(10);

                            resList.Add(new StruCalsPointLoad()
                            {
                                Name            = Convert.ToInt32(pointParas.Points[pointIndex]),
                                Wire            = wireType,
                                WorkConditionId = jIndex,
                                Orientation     = orientation,
                                Proportion      = proportion,
                                Load            = laod,
                                HPSettingName   = ratioParas.HangingPointSettingName,
                            });
                        }
                    }
                }
                else
                {
                    VStringParas vParas = ratioParas.VStrings.Where(item => item.Index == pointParas.StringType).First();

                    VStringCompose vStringCompose = new VStringCompose(vParas.L1, vParas.L2, vParas.H1, vParas.H2, vParas.StressLimit, xLineLoad[jIndex, iIndex], yLineLoad[jIndex, iIndex], zLineLoad[jIndex, iIndex]);

                    for (int kl = 0; kl < option.LeftPoints.Count(); kl++)
                    {
                        int pointIndex = Convert.ToInt32(option.LeftPoints[kl].Substring(1)) - 1;

                        GetPointProportionAndLoad(dicComposeInfo[pointIndex], lineLoad[jIndex, iIndex], out float proportion, out float laod);

                        if (orientation == "X")
                        {
                            laod = vStringCompose.VCX1 * proportion;
                        }
                        else if (orientation == "Y")
                        {
                            laod = vStringCompose.VCY1 * proportion;
                        }
                        else
                        {
                            laod = vStringCompose.VCZ1 * proportion;
                        }

                        resStr += pointParas.Points[pointIndex].PadLeft(10) + proportion.ToString("0.00").PadLeft(10) + laod.ToString("0.00").PadLeft(10);

                        resList.Add(new StruCalsPointLoad()
                        {
                            Name            = Convert.ToInt32(pointParas.Points[pointIndex]),
                            Wire            = wireType,
                            WorkConditionId = jIndex,
                            Orientation     = orientation,
                            Proportion      = proportion,
                            Load            = laod,
                            HPSettingName   = ratioParas.HangingPointSettingName,
                        });
                    }

                    for (int kr = 0; kr < option.RightPoints.Count(); kr++)
                    {
                        int pointIndex = Convert.ToInt32(option.RightPoints[kr].Substring(1)) - 1;

                        GetPointProportionAndLoad(dicComposeInfo[pointIndex], lineLoad[jIndex, iIndex], out float proportion, out float laod);

                        if (orientation == "X")
                        {
                            laod = vStringCompose.VCX2 * proportion;
                        }
                        else if (orientation == "Y")
                        {
                            laod = vStringCompose.VCY2 * proportion;
                        }
                        else
                        {
                            laod = vStringCompose.VCZ2 * proportion;
                        }

                        resStr += pointParas.Points[pointIndex].PadLeft(10) + proportion.ToString("0.00").PadLeft(10) + laod.ToString("0.00").PadLeft(10);

                        resList.Add(new StruCalsPointLoad()
                        {
                            Name            = Convert.ToInt32(pointParas.Points[pointIndex]),
                            Wire            = wireType,
                            WorkConditionId = jIndex,
                            Orientation     = orientation,
                            Proportion      = proportion,
                            Load            = laod,
                            HPSettingName   = ratioParas.HangingPointSettingName,
                        });
                    }

                    resStr = resStr + "     V串    左侧" + vStringCompose.VCX1.ToString("0.00").PadLeft(10) + vStringCompose.VCY1.ToString("0.00").PadLeft(10) + vStringCompose.VCZ1.ToString("0.00").PadLeft(10);
                    resStr = resStr + "    右侧" + vStringCompose.VCX2.ToString("0.00").PadLeft(10) + vStringCompose.VCY2.ToString("0.00").PadLeft(10) + vStringCompose.VCZ2.ToString("0.00").PadLeft(10);
                }
            }
            else
            // 针对地线(常规、悬臂); 导线-I串: 吊装
            {
                for (int k = 0; k < pointParas.PointNum; k++)
                {
                    GetPointProportionAndLoad(dicComposeInfo[k], lineLoad[jIndex, iIndex], out float proportion, out float laod);

                    resStr += pointParas.Points[k].PadLeft(10) + proportion.ToString("0.00").PadLeft(10) + laod.ToString("0.00").PadLeft(10);

                    resList.Add(new StruCalsPointLoad()
                    {
                        Name            = Convert.ToInt32(pointParas.Points[k]),
                        Wire            = wireType,
                        WorkConditionId = jIndex,
                        Orientation     = orientation,
                        Proportion      = proportion,
                        Load            = laod,
                        HPSettingName   = ratioParas.HangingPointSettingName,
                    });
                }
            }
        }
        public void ComposeHangingPointsLoad(float load, string orientation, out string resStr, out List <StruCalsPointLoad> resList, bool isTurningPoint = false)
        {
            resList = new List <StruCalsPointLoad>();

            resStr = "  " + wireType;
            if (orientation == "X" || orientation == "Y")
            {
                if (xyLink.Contains("跳线"))
                {
                    resStr += "跳线";
                }
            }
            else
            {
                if (zLink.Contains("跳线"))
                {
                    resStr += "跳线";
                }
            }

            if (position != null)
            {
                resStr += position;
            }

            if (isTurningPoint)
            {
                resStr += "转向荷载";
            }

            resStr += ("工况" + (jIndex + 1).ToString()).PadLeft(8);
            resStr  = resStr + orientation.PadLeft(6) + load.ToString("0.00").PadLeft(10);

            //导线V串
            if (pointParas.StringType != null && pointParas.StringType.Contains("V"))
            {
                //V串的跳跃冰工况,并且工况代号大于10000),不按照常规的V串规则分配荷载;
                //分配的规则是:
                //左边和中间的导线,荷载按照I串规则全部分配在V串左侧挂点;
                //右边的导线,荷载按照I串规则全部分配在V串右侧挂点;
                if (wd.WorkConditionCode == "T" && wd.WireIndexCodes[iIndex] > 1000)
                {
                    //悬垂塔根据导线的方向遍历这个线左边或者右边的所有点
                    if (!isTensionTower)
                    {
                        //左边和中间的导线,获取左侧挂点
                        if (!wireType.Contains("右"))
                        {
                            for (int kl = 0; kl < option.LeftPoints.Count(); kl++)
                            {
                                int pointIndex = Convert.ToInt32(option.LeftPoints[kl].Substring(1)) - 1;

                                GeneratePointsLoadNormal(pointIndex, load, orientation, out string loadStr, out StruCalsPointLoad pLoad);
                                resStr += loadStr;
                                resList.Add(pLoad);
                            }
                        }
                        //右边的导线,获取右侧挂点;
                        else
                        {
                            for (int kr = 0; kr < option.RightPoints.Count(); kr++)
                            {
                                int pointIndex = Convert.ToInt32(option.RightPoints[kr].Substring(1)) - 1;

                                GeneratePointsLoadNormal(pointIndex, load, orientation, out string loadStr, out StruCalsPointLoad pLoad);
                                resStr += loadStr;
                                resList.Add(pLoad);
                            }
                        }
                    }
                    //悬垂塔根据导线的方向遍历指定位置上左边或者右边的所有点
                    else
                    {
                        string[] points = GetPositionPointsInTensionTower();

                        //左边和中间的导线,获取左侧挂点
                        if (!wireType.Contains("右"))
                        {
                            for (int kl = 0; kl < points.Count(); kl++)
                            {
                                //不在指定位置上的点不用分配荷载
                                if (option.LeftPoints.Where(p => p == points[kl]).Count() == 0)
                                {
                                    continue;
                                }
                                int pointIndex = Convert.ToInt32(option.LeftPoints[kl].Substring(1)) - 1;

                                GeneratePointsLoadNormal(pointIndex, load, orientation, out string loadStr, out StruCalsPointLoad pLoad);
                                resStr += loadStr;
                                resList.Add(pLoad);
                            }
                        }
                        else
                        {
                            for (int kr = 0; kr < points.Count(); kr++)
                            {
                                //不在指定位置上的点不用分配荷载
                                if (option.RightPoints.Where(p => p == points[kr]).Count() == 0)
                                {
                                    continue;
                                }
                                int pointIndex = Convert.ToInt32(option.RightPoints[kr].Substring(1)) - 1;

                                GeneratePointsLoadNormal(pointIndex, load, orientation, out string loadStr, out StruCalsPointLoad pLoad);
                                resStr += loadStr;
                                resList.Add(pLoad);
                            }
                        }
                    }
                }
                else
                {
                    VStringParas vParas = hpPointsParas.VStrings.Where(item => item.Index == pointParas.StringType).First();

                    VStringCompose vStringCompose = new VStringCompose(vParas.L1, vParas.L2, vParas.H1, vParas.H2, vParas.StressLimit, xLineLoad[jIndex, iIndex], yLineLoad[jIndex, iIndex], zLineLoad[jIndex, iIndex]);

                    //悬垂塔先后遍历这个线左边和右边的所有点
                    if (!isTensionTower)
                    {
                        //左侧挂点
                        for (int kl = 0; kl < option.LeftPoints.Count(); kl++)
                        {
                            int pointIndex = Convert.ToInt32(option.LeftPoints[kl].Substring(1)) - 1;

                            //非跳跃冰工况的V串需要按照V串的的规则计算比例
                            GeneratePointsLoadVString(pointIndex, orientation, true, vStringCompose, out string loadStr, out StruCalsPointLoad pLoad);
                            resStr += loadStr;
                            resList.Add(pLoad);
                        }

                        //右侧挂点
                        for (int kr = 0; kr < option.RightPoints.Count(); kr++)
                        {
                            int pointIndex = Convert.ToInt32(option.RightPoints[kr].Substring(1)) - 1;

                            //非跳跃冰工况的V串需要按照V串的的规则计算比例
                            GeneratePointsLoadVString(pointIndex, orientation, false, vStringCompose, out string loadStr, out StruCalsPointLoad pLoad);
                            resStr += loadStr;
                            resList.Add(pLoad);
                        }
                    }
                    //耐张塔先后遍历这个线左边和右边的指定方向上的点
                    else
                    {
                        string[] points = GetPositionPointsInTensionTower();

                        //左侧挂点
                        for (int kl = 0; kl < points.Count(); kl++)
                        {
                            //不在指定位置上的点不用分配荷载
                            if (option.LeftPoints.Where(p => p == points[kl]).Count() == 0)
                            {
                                continue;
                            }
                            int pointIndex = Convert.ToInt32(points[kl].Substring(1)) - 1;

                            //非跳跃冰工况的V串需要按照V串的的规则计算比例
                            GeneratePointsLoadVString(pointIndex, orientation, false, vStringCompose, out string loadStr, out StruCalsPointLoad pLoad);
                            resStr += loadStr;
                            resList.Add(pLoad);
                        }

                        //右侧挂点
                        for (int kr = 0; kr < points.Count(); kr++)
                        {
                            //不在指定位置上的点不用分配荷载
                            if (option.RightPoints.Where(p => p == points[kr]).Count() == 0)
                            {
                                continue;
                            }
                            int pointIndex = Convert.ToInt32(points[kr].Substring(1)) - 1;

                            //非跳跃冰工况的V串需要按照V串的的规则计算比例
                            GeneratePointsLoadVString(pointIndex, orientation, false, vStringCompose, out string loadStr, out StruCalsPointLoad pLoad);
                            resStr += loadStr;
                            resList.Add(pLoad);
                        }
                    }

                    resStr = resStr + "     V串    左侧" + vStringCompose.VCX1.ToString("0.00").PadLeft(10) + vStringCompose.VCY1.ToString("0.00").PadLeft(10) + vStringCompose.VCZ1.ToString("0.00").PadLeft(10);
                    resStr = resStr + "    右侧" + vStringCompose.VCX2.ToString("0.00").PadLeft(10) + vStringCompose.VCY2.ToString("0.00").PadLeft(10) + vStringCompose.VCZ2.ToString("0.00").PadLeft(10);
                }
            }
            else
            // 针对地线(常规、悬臂); 导线-I串: 吊装
            {
                //悬垂塔遍历这个线条上面的所有点
                if (!isTensionTower)
                {
                    for (int k = 0; k < pointParas.PointNum; k++)
                    {
                        GeneratePointsLoadNormal(k, load, orientation, out string loadStr, out StruCalsPointLoad pLoad);
                        resStr += loadStr;
                        resList.Add(pLoad);
                    }
                }
                //耐张塔遍历指定位置上的所有点
                else
                {
                    string[] points = GetPositionPointsInTensionTower();

                    for (int k = 0; k < points.Count(); k++)
                    {
                        int pointIndex = Convert.ToInt32(points[k].Substring(1)) - 1;

                        GeneratePointsLoadNormal(pointIndex, load, orientation, out string loadStr, out StruCalsPointLoad pLoad);
                        resStr += loadStr;
                        resList.Add(pLoad);
                    }
                }
            }
        }