public void SingleFigure(IReadOnlyList <object> figures, IReadOnlyList <Point3d> sectionPoints, ICollection <Curve> curveList, Vector3d[] localAxis) { var straight = figures[0] as StbSecSteelBeam_S_Straight; string center = straight.shape; curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[0], Utils.SectionType.Beam, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[3], Utils.SectionType.Beam, localAxis)); }
private void TwoFigureTaper(IReadOnlyList <object> figures, IReadOnlyList <Point3d> sectionPoints, ICollection <Curve> curveList, Vector3d[] localAxis) { var tapers = new[] { figures[0] as StbSecSteelBeam_S_Taper, figures[1] as StbSecSteelBeam_S_Taper }; string start = tapers.First(sec => sec.pos == StbSecSteelBeam_S_TaperPos.START).shape; string end = tapers.First(sec => sec.pos == StbSecSteelBeam_S_TaperPos.END).shape; curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[0], Utils.SectionType.Beam, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[1], Utils.SectionType.Beam, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[2], Utils.SectionType.Beam, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[3], Utils.SectionType.Beam, localAxis)); }
private void ThreeFigureJoint(IReadOnlyList <object> figures, IReadOnlyList <Point3d> sectionPoints, ICollection <Curve> curveList, Vector3d[] localAxis) { var joint = new[] { figures[0] as StbSecSteelBeam_S_Joint, figures[1] as StbSecSteelBeam_S_Joint, figures[2] as StbSecSteelBeam_S_Joint }; string start = joint.First(sec => sec.pos == StbSecSteelBeam_S_JointPos.START).shape; string center = joint.First(sec => sec.pos == StbSecSteelBeam_S_JointPos.CENTER).shape; string end = joint.First(sec => sec.pos == StbSecSteelBeam_S_JointPos.END).shape; curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[0], Utils.SectionType.Beam, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[1], Utils.SectionType.Beam, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[2], Utils.SectionType.Beam, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[3], Utils.SectionType.Beam, localAxis)); }
private List <Curve> SecSteelColumnToCurves(IReadOnlyList <object> figures, IReadOnlyList <Point3d> sectionPoints) { var curveList = new List <Curve>(); Vector3d[] localAxis = Utils.CreateLocalAxis(sectionPoints); string bottom, center, top; switch (figures.Count) { case 1: var same = figures[0] as StbSecSteelColumn_S_Same; center = same.shape; curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[0], Utils.SectionType.Column, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[3], Utils.SectionType.Column, localAxis)); break; case 2: var notSames = new[] { figures[0] as StbSecSteelColumn_S_NotSame, figures[1] as StbSecSteelColumn_S_NotSame }; bottom = notSames.First(item => item.pos == StbSecSteelColumn_S_NotSamePos.BOTTOM).shape; top = notSames.First(item => item.pos == StbSecSteelColumn_S_NotSamePos.TOP).shape; curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[0], Utils.SectionType.Column, localAxis)); if (sectionPoints[1].Z > sectionPoints[0].Z) { curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[1], Utils.SectionType.Column, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[1], Utils.SectionType.Column, localAxis)); } else { curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[2], Utils.SectionType.Column, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[2], Utils.SectionType.Column, localAxis)); } curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[3], Utils.SectionType.Column, localAxis)); break; case 3: var three = new[] { figures[0] as StbSecSteelColumn_S_ThreeTypes, figures[1] as StbSecSteelColumn_S_ThreeTypes, figures[2] as StbSecSteelColumn_S_ThreeTypes }; bottom = three.First(item => item.pos == StbSecSteelColumn_S_ThreeTypesPos.BOTTOM).shape; center = three.First(item => item.pos == StbSecSteelColumn_S_ThreeTypesPos.CENTER).shape; top = three.First(item => item.pos == StbSecSteelColumn_S_ThreeTypesPos.TOP).shape; curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, bottom, sectionPoints[0], Utils.SectionType.Column, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[1], Utils.SectionType.Column, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[2], Utils.SectionType.Column, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, top, sectionPoints[3], Utils.SectionType.Column, localAxis)); break; default: throw new ArgumentException("Unmatched StbSecSteelColumn_S"); } return(curveList); }
private List <Curve> SecSteelBraceToCurves(IReadOnlyList <object> figures, IReadOnlyList <Point3d> sectionPoints) { var curveList = new List <Curve>(); string start, center, end; Vector3d[] localAxis = Utils.CreateLocalAxis(sectionPoints); switch (figures.Count) { case 1: var same = figures[0] as StbSecSteelBrace_S_Same; center = same.shape; curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[0], Utils.SectionType.Brace, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[3], Utils.SectionType.Brace, localAxis)); break; case 2: var notSames = new[] { figures[0] as StbSecSteelBrace_S_NotSame, figures[1] as StbSecSteelBrace_S_NotSame }; start = notSames.First(sec => sec.pos == StbSecSteelBrace_S_NotSamePos.BOTTOM).shape; end = notSames.First(sec => sec.pos == StbSecSteelBrace_S_NotSamePos.TOP).shape; curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[0], Utils.SectionType.Brace, localAxis)); curveList.Add(sectionPoints[0] == sectionPoints[1] ? SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[2], Utils.SectionType.Brace, localAxis) : SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[1], Utils.SectionType.Brace, localAxis)); curveList.Add(sectionPoints[0] == sectionPoints[1] ? SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[2], Utils.SectionType.Brace, localAxis) : SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[1], Utils.SectionType.Brace, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[3], Utils.SectionType.Brace, localAxis)); break; case 3: var three = new[] { figures[0] as StbSecSteelBrace_S_ThreeTypes, figures[1] as StbSecSteelBrace_S_ThreeTypes, figures[2] as StbSecSteelBrace_S_ThreeTypes }; start = three.First(sec => sec.pos == StbSecSteelBrace_S_ThreeTypesPos.BOTTOM).shape; center = three.First(sec => sec.pos == StbSecSteelBrace_S_ThreeTypesPos.CENTER).shape; end = three.First(sec => sec.pos == StbSecSteelBrace_S_ThreeTypesPos.TOP).shape; curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[0], Utils.SectionType.Brace, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[1], Utils.SectionType.Brace, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[2], Utils.SectionType.Brace, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[3], Utils.SectionType.Brace, localAxis)); break; default: throw new ArgumentException("Unmatched StbSecSteelBrace_S"); } return(curveList); }
private void TwoFigureHaunch(IReadOnlyList <object> figures, IReadOnlyList <Point3d> sectionPoints, ICollection <Curve> curveList, Vector3d[] localAxis) { var joint = new[] { figures[0] as StbSecSteelBeam_S_Haunch, figures[1] as StbSecSteelBeam_S_Haunch }; string center; if (joint.FirstOrDefault(sec => sec.pos == StbSecSteelBeam_S_HaunchPos.START) != null) { string start = joint.First(sec => sec.pos == StbSecSteelBeam_S_HaunchPos.START).shape; center = joint.First(sec => sec.pos == StbSecSteelBeam_S_HaunchPos.CENTER).shape; curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, start, sectionPoints[0], Utils.SectionType.Beam, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[1], Utils.SectionType.Beam, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[2], Utils.SectionType.Beam, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[3], Utils.SectionType.Beam, localAxis)); } else { center = joint.First(sec => sec.pos == StbSecSteelBeam_S_HaunchPos.CENTER).shape; string end = joint.First(sec => sec.pos == StbSecSteelBeam_S_HaunchPos.END).shape; curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[0], Utils.SectionType.Beam, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[1], Utils.SectionType.Beam, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, center, sectionPoints[2], Utils.SectionType.Beam, localAxis)); curveList.Add(SteelSections.GetCurve(_sections.StbSecSteel, end, sectionPoints[3], Utils.SectionType.Beam, localAxis)); } }