//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"; } } } }