//Sets strength values to the predefined cross section shape tab charts private void SetStrengthChartCurve(Chart chart, Moment m, Polyline strengthCurve) { chart.Series[chartSeriesName].Points.Clear(); foreach (Point3d point in strengthCurve) { chart.Series[chartSeriesName].Points.AddXY((m == Moment.Mz || m == Moment.MComb ? point.Z : point.Y) * Math.Pow(10, -3), point.X * Math.Pow(10, -3)); if (m == Moment.MComb) { chart.Series[chartSeriesName2].Points.AddXY(point.Y * Math.Pow(10, -3), point.X * Math.Pow(10, -3)); } } ChartManipulationTools.SetAxisIntervalAndMax(chart, strengthCurve, m); }
public void SetChartValues(ColLoadCase clc) { if (clc.NMCurve != null && clc.NMCurve.Count != 0) { ResultChart.Series["Strength"].Points.Clear(); foreach (Point3d pt in clc.NMCurve) { ResultChart.Series["Strength"].Points.AddXY(pt.Z * 0.001, pt.X * 0.001); } ChartManipulationTools.SetAxisIntervalAndMax(ResultChart, clc.NMCurve, Moment.Mz); if (ResultChart.Series.IndexOf("Loading") == -1) { ResultChart.Series.Add("Loading"); ResultChart.Series["Loading"].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; ResultChart.Series["Loading"].Color = Color.BlueViolet; ResultChart.Series["Loading"].BorderWidth = 2; } ResultChart.Series["Loading"].Points.Clear(); clc.LoadCurve.ForEach(o => ResultChart.Series["Loading"].Points.AddXY(o.Z * 0.001, o.X * 0.001)); if (ResultChart.Series.IndexOf(clc.Name) == -1) { ChartManipulationTools.CreateNewPointChart(clc.Name, ResultChart); ResultChart.Series[clc.Name].Points.AddXY(clc.M_EdComb * 0.001, clc.N_Ed * 0.001); } else { int index = ResultChart.Series.IndexOf(clc.Name); ResultChart.Series[index].Points.Clear(); ResultChart.Series[index].Points.AddXY(clc.M_EdComb * 0.001, clc.N_Ed * 0.001); } } }