Example #1
0
        /// <summary>
        /// 平面布梁函数
        /// </summary>
        /// <param name="StStation">起点桩号</param>
        /// <param name="EdStation">终点桩号</param>
        /// <param name="StLines">起点布梁线组,从左到右</param>
        /// <param name="EdLines">终点布梁线组,从左到右</param>
        /// <param name="StartC2C">起点桩号-支座线偏移</param>
        /// <param name="EndC2C">终点点桩号-支座线偏移</param>
        /// <returns>该跨梁表</returns>
        public static List <BoxBeam> ArrangePlan2(double StStation, double EdStation, double StW, double EdW,
                                                  Line[] StLines, Line[] EdLines, double StartC2C, double EndC2C, double StartAng, double EndAng,
                                                  ref Align StAlign, ref Align EdAlign)
        {
            if (StStation == 402)
            {
                ;
            }

            List <BoxBeam> res = new List <BoxBeam>();

            int BeamNum = 0;

            int[]  BeamNums = null;
            double DeltSt = 0, DeltEd = 0;

            double[] DeltEds;
            double[] DeltSts;
            if (StLines.Count() == 1 && EdLines.Count() == 1)
            {
                // 普通起终点
                double SideNominal = NormalSide;
                double SideSt      = SideNominal;
                double SideEd      = SideNominal;
                double StartA      = Math.Abs(StartAng - 90.0);
                double EndA        = Math.Abs(EndAng - 90.0);
                Line   Stline      = StLines[0];
                Line   EdLine      = EdLines[0];
                if (StStation == 402)
                {
                    // MUB 调整加宽
                    Vector3 Vst = Stline.Direction;
                    Vector3 Ved = EdLine.Direction;
                    Vst.Normalize();
                    Ved.Normalize();
                    Stline.StartPoint = Stline.EndPoint + Vst * -8.9;
                    EdLine.StartPoint = EdLine.EndPoint + Ved * -8.9;
                }
                if (StStation == 432.5)
                {
                    // MUB 调整加宽
                    Vector3 Vst = Stline.Direction;
                    Vector3 Ved = EdLine.Direction;
                    Vst.Normalize();
                    Ved.Normalize();
                    Stline.StartPoint = Stline.EndPoint + Vst * -8.9;
                    EdLine.StartPoint = EdLine.EndPoint + Ved * -8.9;
                }
                bool   NoNumApp     = true;
                double StLineLength = StLines[0].Length();
                double EdLineLength = EdLines[0].Length();

                var Num1 = AvilibleBeamNum(StLineLength, StartA, 2.4, 0.35, 1, SideNominal, out SideSt);
                var Num2 = AvilibleBeamNum(EdLineLength, EndA, 2.4, 0.35, 1, SideNominal, out SideEd);
                var Num  = (from a in Num1 where Num2.Contains(a) select a).ToList();
                NoNumApp = Num.Count == 0;
                if (NoNumApp)
                {
                    SideNominal = NormalSide;
                    Num1        = AvilibleBeamNum(StLineLength, StartA, 2.4, 0.35, 1.1, SideNominal, out SideSt);
                    Num2        = AvilibleBeamNum(EdLineLength, EndA, 2.4, 0.35, 1.1, SideNominal, out SideEd);
                    Num         = (from a in Num1 where Num2.Contains(a) select a).ToList();
                    NoNumApp    = Num.Count == 0;
                }

                if (NoNumApp)
                {
                    SideNominal = NormalSide;
                    Num1        = AvilibleBeamNum(StLineLength, StartA, 2.4, 0.35, 1.2, SideNominal, out SideSt);
                    Num2        = AvilibleBeamNum(EdLineLength, EndA, 2.4, 0.35, 1.2, SideNominal, out SideEd);
                    Num         = (from a in Num1 where Num2.Contains(a) select a).ToList();
                    NoNumApp    = Num.Count == 0;
                }

                if (NoNumApp)
                {
                    SideNominal = SpecialSide;
                    Num1        = AvilibleBeamNum(StLineLength, StartA, 2.4, 0.4, 1, SideNominal, out SideSt);
                    Num2        = AvilibleBeamNum(EdLineLength, EndA, 2.4, 0.4, 1, SideNominal, out SideEd);
                    Num         = (from a in Num1 where Num2.Contains(a) select a).ToList();
                    NoNumApp    = Num.Count == 0;
                }

                if (NoNumApp)
                {
                    SideNominal = SpecialSide;
                    Num1        = AvilibleBeamNum(StLineLength, StartA, 2.4, 0.4, 1.1, SideNominal, out SideSt);
                    Num2        = AvilibleBeamNum(EdLineLength, EndA, 2.4, 0.4, 1.1, SideNominal, out SideEd);
                    Num         = (from a in Num1 where Num2.Contains(a) select a).ToList();
                    NoNumApp    = Num.Count == 0;
                }


                if (NoNumApp)
                {
                    SideNominal = SpecialSide;
                    Num1        = AvilibleBeamNum(StLineLength, StartA, 2.4, 0.3, 1.2, SideNominal, out SideSt);
                    Num2        = AvilibleBeamNum(EdLineLength, EndA, 2.4, 0.3, 1.2, SideNominal, out SideEd);
                    Num         = (from a in Num1 where Num2.Contains(a) select a).ToList();
                    NoNumApp    = Num.Count == 0;
                }

                if (NoNumApp)
                {
                    SideNominal = SpecialSide;
                    Num1        = AvilibleBeamNum(StLineLength, StartA, 2.4, 0.25, 1.2, SideNominal, out SideSt);
                    Num2        = AvilibleBeamNum(EdLineLength, EndA, 2.4, 0.25, 1.2, SideNominal, out SideEd);
                    Num         = (from a in Num1 where Num2.Contains(a) select a).ToList();
                    NoNumApp    = Num.Count == 0;
                }
                if (NoNumApp)
                {
                    SideNominal = NormalSide;
                    Num1        = AvilibleBeamNum(StLineLength, StartA, 2.4, 0.4, 1.4, SideNominal, out SideSt);
                    Num2        = AvilibleBeamNum(EdLineLength, EndA, 2.4, 0.4, 1.4, SideNominal, out SideEd);
                    Num         = (from a in Num1 where Num2.Contains(a) select a).ToList();
                    NoNumApp    = Num.Count == 0;
                }
                if (NoNumApp)
                {
                    SideNominal = NormalSide;
                    Num1        = AvilibleBeamNum(StLineLength, StartA, 2.4, 0.4, 1.45, SideNominal, out SideSt);
                    Num2        = AvilibleBeamNum(EdLineLength, EndA, 2.4, 0.4, 1.45, SideNominal, out SideEd);
                    Num         = (from a in Num1 where Num2.Contains(a) select a).ToList();
                    NoNumApp    = Num.Count == 0;
                }

                if (NoNumApp)
                {
                    SideNominal = NormalSide;
                    Num1        = AvilibleBeamNum(StLineLength, StartA, 2.4, 0.3, 1.45, SideNominal, out SideSt);
                    Num2        = AvilibleBeamNum(EdLineLength, EndA, 2.4, 0.3, 1.45, SideNominal, out SideEd);
                    Num         = (from a in Num1 where Num2.Contains(a) select a).ToList();
                    NoNumApp    = Num.Count == 0;
                }

                if (NoNumApp)
                {
                    SideNominal = NormalSide;
                    Num1        = AvilibleBeamNum(StLineLength, StartA, 2.4, 0.38, 1.7, SideNominal, out SideSt);
                    Num2        = AvilibleBeamNum(EdLineLength, EndA, 2.4, 0.38, 1.7, SideNominal, out SideEd);
                    Num         = (from a in Num1 where Num2.Contains(a) select a).ToList();
                    NoNumApp    = Num.Count == 0;
                }
                if (!NoNumApp)
                {
                    BeamNum = Num.Min();
                    DeltSt  = (StLineLength - 2 * SideSt) / (BeamNum - 1);
                    DeltEd  = (EdLineLength - 2 * SideEd) / (BeamNum - 1);

                    AppendBeam(ref res, Stline, EdLine, BeamNum, DeltSt, DeltEd, StartC2C, EndC2C, SideSt, SideEd, ref StAlign, ref EdAlign);
                }
            }
            else
            {
                // 错误
                throw new Exception("布置参数错误");
            }

            for (int i = 0; i < res.Count; i++)
            {
                BoxBeam bb = res[i];
                bb.ID = i + 1;
            }


            return(res);
        }
Example #2
0
        public static List <BoxBeam> ArrangePlan(double StartStation, double EndStation,
                                                 Line Left0, Line Right0, Line Left1, Line Right1, ref Align StAlign, ref Align EdAlign, double StartC2C, double EndC2C,
                                                 bool isStPub, bool isEdPub, double Side = 1.65)
        {
            if (StartStation == 19645)
            {
                ;
            }
            List <BoxBeam> res = new List <BoxBeam>();

            if (isStPub || isEdPub)
            {
                return(res);
            }
            Line LineStart = new Line(Left0.EndPoint, Right0.EndPoint);
            Line LineEnd   = new Line(Left1.EndPoint, Right1.EndPoint);
            var  xx        = LineEnd.Length();

            if ((StAlign.Name.StartsWith("R1K") || StAlign.Name.StartsWith("L1K")) || (EdAlign.Name.StartsWith("R1K") || EdAlign.Name.StartsWith("L1K")))
            {
                Side = 1.2;
            }

            var Num1 = AvilibleBeamNum(LineStart.Length(), 2.4, 0.4, 1, Side);
            var Num2 = AvilibleBeamNum(LineEnd.Length(), 2.4, 0.4, 1, Side);
            var tmp  = (from a in Num1 where Num2.Contains(a) select a).ToList();

            if (tmp.Count == 0)
            {
                Num1 = AvilibleBeamNum(LineStart.Length(), 2.4, 0.3, 1.1, Side);
                Num2 = AvilibleBeamNum(LineEnd.Length(), 2.4, 0.3, 1.1, Side);
                tmp  = (from a in Num1 where Num2.Contains(a) select a).ToList();
            }


            if (tmp.Count == 0)
            {
                Num1 = AvilibleBeamNum(LineStart.Length(), 2.4, 0.3, 1.35, Side);
                Num2 = AvilibleBeamNum(LineEnd.Length(), 2.4, 0.3, 1.35, Side);
                tmp  = (from a in Num1 where Num2.Contains(a) select a).ToList();
            }

            int aa;

            double delt0 = 0; // = (LineStart.Length() - 2 * Side) / (Num1.Max() - 1);
            double delt1 = 0; // = (LineEnd.Length() - 2 * Side) / (Num2.Max() - 1);

            if (Num1.Count == 0 || Num2.Count == 0)
            {
                return(res);
            }
            if (tmp.Count == 0)
            {
                if (Num1.Max() > Num2.Max())
                {
                    // 匝道分出
                    if ((Left0.Length() - Left1.Length()) > (Right0.Length() - Right1.Length()))
                    {
                        // 左侧分出
                        LineStart = new Line(Right0.EndPoint, Left0.EndPoint);
                        LineEnd   = new Line(Right1.EndPoint, Left1.EndPoint);
                    }
                    aa = Num2.Max();

                    delt0 = (LineStart.Length() - 2 * Side) / (aa + 2);
                    delt1 = (LineEnd.Length() - 2 * Side) / (aa - 1);
                }
                else
                {
                    // 匝道汇入
                    if ((Left1.Length() - Left0.Length()) > (Right1.Length() - Right0.Length()))
                    {
                        // 左侧匝道汇入
                        LineStart = new Line(Right0.EndPoint, Left0.EndPoint);
                        LineEnd   = new Line(Right1.EndPoint, Left1.EndPoint);
                    }
                    aa = Num1.Max();


                    delt0 = (LineStart.Length() - 2 * Side) / (aa - 1);
                    delt1 = (LineEnd.Length() - 2 * Side) / (aa + 2);
                }
            }
            else
            {
                aa    = tmp.Max();
                delt0 = (LineStart.Length() - 2 * Side) / (aa - 1);
                delt1 = (LineEnd.Length() - 2 * Side) / (aa - 1);
            }

            BoxBeam cc;
            Vector2 stend, edend;
            Vector2 stpin, edpin;

            for (int i = 0; i < aa; i++)
            {
                Vector2 Cdir0 = LineStart.Direction.Convert2D();
                Cdir0.Normalize();
                Vector2 Cdir1 = LineEnd.Direction.Convert2D();
                Cdir1.Normalize();

                stend = LineStart.StartPoint.Convert2D() + Cdir0 * Side + Cdir0 * (i) * delt0;
                edend = LineEnd.StartPoint.Convert2D() + Cdir1 * Side + Cdir1 * (i) * delt1;

                Vector2 BeamDir = edend - stend;
                BeamDir.Normalize();

                stpin = stend + BeamDir * StartC2C;
                edpin = edend - BeamDir * EndC2C;



                var VecSt = (stpin.Convert2DS() - new Vector2D(Left0.StartPoint.X, Left0.StartPoint.Y));
                var VecEd = (edpin.Convert2DS() - new Vector2D(Left1.StartPoint.X, Left1.StartPoint.Y));


                Vector2D BeamAxis = (edpin - stpin).Convert2DS();

                double startA = 90 - Cdir0.Convert2DS().SignedAngleTo(BeamAxis).Degrees;
                double endA   = 90 - Cdir1.Convert2DS().SignedAngleTo(BeamAxis).Degrees;

                cc    = new BoxBeam(stpin.Convert3D().Convert3DS(0, 0, 0), edpin.Convert3D().Convert3DS(0, 0, 0), 0, 0, 0.5, 0.5, startA, endA, false, 0);
                cc.ID = i;
                res.Add(cc);
            }
            return(res);
        }
Example #3
0
        public static List <BoxBeam> Arrange(double StartStation, double EndStation,
                                             Line Left0, Line Right0, Line Left1, Line Right1, ref Align StAlign, ref Align EdAlign, double StartC2C, double EndC2C,
                                             double Side = 1.65, double BearingH = 0.3, double BeamH = 1.6, double SurfaceH = 0.170)
        {
            if (StartStation == 19645)
            {
                ;
            }
            List <BoxBeam> res = new List <BoxBeam>();

            Line LineStart = new Line(Left0.EndPoint, Right0.EndPoint);
            Line LineEnd   = new Line(Left1.EndPoint, Right1.EndPoint);

            if ((StAlign.Name.StartsWith("R1K") || StAlign.Name.StartsWith("L1K")) || (EdAlign.Name.StartsWith("R1K") || EdAlign.Name.StartsWith("L1K")))
            {
                Side = 1.2;
            }

            var Num1 = AvilibleBeamNum(LineStart.Length(), 2.4, 0.4, 1, Side);
            var Num2 = AvilibleBeamNum(LineEnd.Length(), 2.4, 0.4, 1, Side);
            var tmp  = (from a in Num1 where Num2.Contains(a) select a).ToList();

            if (tmp.Count == 0)
            {
                Num1 = AvilibleBeamNum(LineStart.Length(), 2.4, 0.3, 1.1, Side);
                Num2 = AvilibleBeamNum(LineEnd.Length(), 2.4, 0.3, 1.1, Side);
                tmp  = (from a in Num1 where Num2.Contains(a) select a).ToList();
            }


            if (tmp.Count == 0)
            {
                Num1 = AvilibleBeamNum(LineStart.Length(), 2.4, 0.3, 1.35, Side);
                Num2 = AvilibleBeamNum(LineEnd.Length(), 2.4, 0.3, 1.35, Side);
                tmp  = (from a in Num1 where Num2.Contains(a) select a).ToList();
            }

            int aa;

            double delt0 = 0; // = (LineStart.Length() - 2 * Side) / (Num1.Max() - 1);
            double delt1 = 0; // = (LineEnd.Length() - 2 * Side) / (Num2.Max() - 1);

            if (Num1.Count == 0 || Num2.Count == 0)
            {
                return(res);
            }
            if (tmp.Count == 0)
            {
                if (Num1.Max() > Num2.Max())
                {
                    // 匝道分出
                    if ((Left0.Length() - Left1.Length()) > (Right0.Length() - Right1.Length()))
                    {
                        // 左侧分出
                        LineStart = new Line(Right0.EndPoint, Left0.EndPoint);
                        LineEnd   = new Line(Right1.EndPoint, Left1.EndPoint);
                    }
                    aa = Num2.Max();

                    delt0 = (LineStart.Length() - 2 * Side) / (aa + 2);
                    delt1 = (LineEnd.Length() - 2 * Side) / (aa - 1);
                }
                else
                {
                    // 匝道汇入
                    if ((Left1.Length() - Left0.Length()) > (Right1.Length() - Right0.Length()))
                    {
                        // 左侧匝道汇入
                        LineStart = new Line(Right0.EndPoint, Left0.EndPoint);
                        LineEnd   = new Line(Right1.EndPoint, Left1.EndPoint);
                    }
                    aa = Num1.Max();


                    delt0 = (LineStart.Length() - 2 * Side) / (aa - 1);
                    delt1 = (LineEnd.Length() - 2 * Side) / (aa + 2);
                }
            }
            else
            {
                aa    = tmp.Max();
                delt0 = (LineStart.Length() - 2 * Side) / (aa - 1);
                delt1 = (LineEnd.Length() - 2 * Side) / (aa - 1);
            }

            BoxBeam cc;
            Vector2 stend, edend;
            Vector2 stpin, edpin;

            double          StandardH = SurfaceH + BeamH + BearingH;
            double          H0_St     = StAlign.curSQX.GetBG(StartStation) - StandardH;
            double          H0_Ed     = EdAlign.curSQX.GetBG(EndStation) - StandardH;
            List <double[]> HPListCB  = new List <double[]>()
            {
                StAlign.curCG.GetHP(StartStation), EdAlign.curCG.GetHP(EndStation)
            };
            double HLeftSt = H0_St - HPListCB[0][0] * Left0.Length() * 0.01;
            double HLeftEd = H0_Ed - HPListCB[1][0] * Left1.Length() * 0.01;
            double slop;

            for (int i = 0; i < aa; i++)
            {
                bool    isSide = i == 0 || i == aa - 1;
                Vector2 Cdir0  = LineStart.Direction.Convert2D();
                Cdir0.Normalize();
                Vector2 Cdir1 = LineEnd.Direction.Convert2D();
                Cdir1.Normalize();

                stend = LineStart.StartPoint.Convert2D() + Cdir0 * Side + Cdir0 * (i) * delt0;
                edend = LineEnd.StartPoint.Convert2D() + Cdir1 * Side + Cdir1 * (i) * delt1;

                Vector2 BeamDir = edend - stend;
                BeamDir.Normalize();

                stpin = stend + BeamDir * StartC2C;
                edpin = edend - BeamDir * EndC2C;

                double Hbot_st = StAlign.GetSurfaceBG(stpin.X, stpin.Y) - SurfaceH - BeamH;
                double Hbot_ed = EdAlign.GetSurfaceBG(edpin.X, edpin.Y) - SurfaceH - BeamH;
                double HCB_st  = 0;
                double HCB_ed  = 0;

                var      VecSt       = (stpin.Convert2DS() - new Vector2D(Left0.StartPoint.X, Left0.StartPoint.Y));
                var      VecEd       = (edpin.Convert2DS() - new Vector2D(Left1.StartPoint.X, Left1.StartPoint.Y));
                Vector2D dirForwoard = new Vector2D(StAlign.curPQX.GetDir(StartStation)[0], StAlign.curPQX.GetDir(StartStation)[1]);
                if (VecSt.SignedAngleTo(dirForwoard).Degrees <= 180)
                {
                    // 使用右坡
                    HCB_st = H0_St + HPListCB[0][1] * 0.01 * VecSt.Length;
                    slop   = -2.5;
                }
                else
                {
                    // 左坡
                    HCB_st = H0_St - HPListCB[0][0] * 0.01 * VecSt.Length;
                    slop   = 2.5;
                }
                if (aa % 2 == 1 && i == (int)(0.5 * aa))
                {
                    slop = 0;
                }
                dirForwoard = new Vector2D(EdAlign.curPQX.GetDir(EndStation)[0], EdAlign.curPQX.GetDir(EndStation)[1]);
                if (VecEd.SignedAngleTo(dirForwoard).Degrees <= 180)
                {
                    HCB_ed = H0_Ed + HPListCB[1][1] * 0.01 * VecEd.Length;
                }
                else
                {
                    HCB_ed = H0_Ed - HPListCB[1][0] * 0.01 * VecEd.Length;
                }
                Vector2D BeamAxis = (edpin - stpin).Convert2DS();

                double startA = 90 - Cdir0.Convert2DS().SignedAngleTo(BeamAxis).Degrees;
                double endA   = 90 - Cdir1.Convert2DS().SignedAngleTo(BeamAxis).Degrees;

                cc = new BoxBeam(stpin.Convert3D().Convert3DS(0, 0, Hbot_st), edpin.Convert3D().Convert3DS(0, 0, Hbot_ed),
                                 (Hbot_st - HCB_st), (Hbot_ed - HCB_ed), 0.5, 0.5, startA, endA, isSide, slop);

                //(int)(StartStation*100)+i
                cc.ID = (int)(StartStation * 100) + i;
                res.Add(cc);
            }



            return(res);
        }
Example #4
0
        //private static void AppendBeam(ref List<BoxBeam> res, Line LineStart, Line[] LinesEnd,int[] bmNums, double deltSt, double[] deltEd, double StartC2C, double EndC2C,
        //    double[] Side)
        //{
        //    BoxBeam cc;
        //    Vector2 stend=new Vector2(), edend=new Vector2();
        //    Vector2 stpin, edpin;
        //    Vector2 Cdir0 = LineStart.Direction.Convert2D();
        //    Cdir0.Normalize();
        //    Vector2 Cdir1 = LinesEnd[0].Direction.Convert2D();
        //    Cdir1.Normalize();
        //    Vector2 BeamDir;
        //    Vector2D BeamAxis;
        //    for (int i = 0; i < bmNums[0]; i++)
        //    {
        //        stend = LineStart.StartPoint.Convert2D() + Cdir0 * Side[0] + Cdir0 * (i) * deltSt;
        //        edend = LinesEnd[0].StartPoint.Convert2D() + Cdir1 * Side[0] + Cdir1 * (i) * deltEd[0];

        //        BeamDir = edend - stend;
        //        BeamDir.Normalize();

        //        stpin = stend + BeamDir * StartC2C;
        //        edpin = edend - BeamDir * EndC2C;

        //        BeamAxis = (edpin - stpin).Convert2DS();

        //        double startA = 90 - Cdir0.Convert2DS().SignedAngleTo(BeamAxis).Degrees;
        //        double endA = 90 - Cdir1.Convert2DS().SignedAngleTo(BeamAxis).Degrees;

        //        cc = new BoxBeam(stpin.Convert3D().Convert3DS(0, 0, 0), edpin.Convert3D().Convert3DS(0, 0, 0), 0, 0, 0.5, 0.5, startA, endA, false, 0);
        //        cc.ID = i;
        //        res.Add(cc);
        //    }
        //    for (int i = 0; i < bmNums[1]; i++)
        //    {

        //        stend = stend + Cdir0 * deltSt;
        //        edend = LinesEnd[1].StartPoint.Convert2D() + Cdir1 * Side[2] + Cdir1 * (i) * deltEd[1];

        //        BeamDir = edend - stend;
        //        BeamDir.Normalize();

        //        stpin = stend + BeamDir * StartC2C;
        //        edpin = edend - BeamDir * EndC2C;

        //        BeamAxis = (edpin - stpin).Convert2DS();

        //        double startA = 90 - Cdir0.Convert2DS().SignedAngleTo(BeamAxis).Degrees;
        //        double endA = 90 - Cdir1.Convert2DS().SignedAngleTo(BeamAxis).Degrees;

        //        cc = new BoxBeam(stpin.Convert3D().Convert3DS(0, 0, 0), edpin.Convert3D().Convert3DS(0, 0, 0), 0, 0, 0.5, 0.5, startA, endA, false, 0);
        //        cc.ID = i;
        //        res.Add(cc);
        //    }

        //}

        /// <summary>
        /// 向列表添加一孔梁
        /// </summary>
        /// <param name="res">列表</param>
        /// <param name="LineStart">起点线</param>
        /// <param name="LineEnd">终点线</param>
        /// <param name="beamNum">梁片数</param>
        /// <param name="deltSt">起点间距</param>
        /// <param name="deltEd">终点间距</param>
        /// <param name="StartC2C">起点支座跨径距</param>
        /// <param name="EndC2C">终点支座跨径距</param>
        /// <param name="Side">边梁边距</param>
        /// <param name="StartCL">起点设计线</param>
        /// <param name="EndCL">终点设计线</param>
        private static void AppendBeam(ref List <BoxBeam> res, Line LineStart, Line LineEnd,
                                       int beamNum, double deltSt, double deltEd, double StartC2C, double EndC2C, double SideSt, double SideEd,
                                       ref Align StartCL, ref Align EndCL
                                       )
        {
            BoxBeam cc;
            Vector2 stend, edend;
            Vector2 stpin, edpin;

            for (int i = 0; i < beamNum; i++)
            {
                Vector2 Cdir0 = LineStart.Direction.Convert2D();
                Cdir0.Normalize();
                Vector2 Cdir1 = LineEnd.Direction.Convert2D();
                Cdir1.Normalize();

                stend = LineStart.StartPoint.Convert2D() + Cdir0 * SideSt + Cdir0 * (i) * deltSt;
                edend = LineEnd.StartPoint.Convert2D() + Cdir1 * SideEd + Cdir1 * (i) * deltEd;

                Vector2 BeamDir = edend - stend;
                BeamDir.Normalize();

                Vector2D BeamAxis = (edend - stend).Convert2DS();
                double   startA   = 90 - Cdir0.Convert2DS().SignedAngleTo(BeamAxis).Degrees;
                double   endA     = 90 - Cdir1.Convert2DS().SignedAngleTo(BeamAxis).Degrees;

                stpin = stend + BeamDir * StartC2C / Math.Cos((startA) / 180.0 * Math.PI);
                edpin = edend - BeamDir * EndC2C / Math.Cos((endA) / 180.0 * Math.PI);

                //var VecSt = (stpin.Convert2DS() - new Vector2D(Left0.StartPoint.X, Left0.StartPoint.Y));
                //var VecEd = (edpin.Convert2DS() - new Vector2D(Left1.StartPoint.X, Left1.StartPoint.Y));

                //增加桥面横坡值
                double StartDeckHp = StartCL.GetSurfaceHP(stend.X, stend.Y);
                double EndDeckHp   = EndCL.GetSurfaceHP(edend.X, edend.Y);

                double StPK = StartCL.curPQX.GetStationNew(stend.X, stend.Y);
                double EdPK = EndCL.curPQX.GetStationNew(edend.X, edend.Y);

                if (StartCL.curCG.GetHP(StPK)[0] == 2.5 && StartCL.curCG.GetHP(StPK)[1] == -2.5)
                {
                    if (StartCL.GetSurfaceDist(stend.X, stend.Y) <= 0.5)
                    {
                        StartDeckHp = 0.0;
                    }
                }
                if (EndCL.curCG.GetHP(EdPK)[0] == 2.5 && EndCL.curCG.GetHP(EdPK)[1] == -2.5)
                {
                    if (EndCL.GetSurfaceDist(edend.X, edend.Y) <= 0.5)
                    {
                        EndDeckHp = 0.0;
                    }
                }
                double NominalHP = 0.5 * (StartDeckHp + EndDeckHp);

                //

                cc = new BoxBeam(stpin.Convert3D().Convert3DS(0, 0, 0), edpin.Convert3D().Convert3DS(0, 0, 0),
                                 0, 0, 0.5, 0.5, startA, endA, false, NominalHP);
                cc.ID = i;

                #region 判断梁类别编号
                string typestr = "BE";
                if (cc.Length2D <= 20)
                {
                    typestr += "05";
                }
                else if (cc.Length2D <= 27.0)
                {
                    typestr += "01";
                }
                else if (cc.Length2D <= 31.5)
                {
                    if (Math.Abs(startA) >= 29)
                    {
                        typestr += "03";
                    }
                    else
                    {
                        typestr += "02";
                    }
                }
                else if (cc.Length2D <= 38.0)
                {
                    typestr += "04";
                }
                else
                {
                    typestr += "99";
                }
                if (i == 0 || i == beamNum - 1)
                {
                    if (Math.Max(SideSt, SideEd) < NormalSide)
                    {
                        typestr += "D";
                    }
                    else
                    {
                        typestr += "A";
                    }
                }
                else
                {
                    if (beamNum >= 7)
                    {
                        if (Math.Abs(NominalHP) <= 1.0)
                        {
                            typestr += "C";
                        }
                        else
                        {
                            typestr += "B";
                        }
                    }
                    else
                    {
                        typestr += "B";
                    }
                }
                cc.BeamType = typestr;
                #endregion
                res.Add(cc);
            }
            var tst = (from a in res select a.BeamType.Substring(0, 4)).ToList().Distinct().ToList();
            if (tst.Count != 1 && tst.Contains("BE04"))
            {
                for (int i = 0; i < res.Count; i++)
                {
                    string part = res[i].BeamType.Substring(2, 2);
                    res[i].BeamType = res[i].BeamType.Replace(part, "04");
                }
            }


            // 增加s型加强02梁
            if (res[0].BeamType[3] == '2')
            {
                if (res.Count == 3)
                {
                    res[1].BeamType = "BE02Bs";
                }
                else if (res.Count >= 4)
                {
                    if (Math.Max(deltEd, deltSt) > 2.4 + 0.85)
                    {
                        res[1].BeamType             = "BE02Bs";
                        res[res.Count - 2].BeamType = "BE02Bs";
                    }
                }
            }
            // 增加s型加强01梁
            else if (res[0].BeamType[3] == '1')
            {
                if (res.Count == 3)
                {
                    res[1].BeamType = "BE01Bs";
                }
                else if (res.Count >= 4)
                {
                    if (Math.Max(deltEd, deltSt) > 2.4 + 0.85)
                    {
                        res[1].BeamType             = "BE01Bs";
                        res[res.Count - 2].BeamType = "BE01Bs";
                    }
                }
            }
        }