| | |
| | | |
| | | private Series _series_cubic_spline_qh, _series_cubic_spline_qe, _series_cubic_spline_qp, _series_cubic_spline_eq; |
| | | private Series _series_pt_qh, _series_pt_qe, _series_pt_qp; |
| | | private List<Series> _series_custom_list; |
| | | private List<Series> _series_eq_pt_list; |
| | | |
| | | private TextAnnotation _work_pt_txt_annot; |
| | | |
| | | |
| | | |
| | | private Yw.Geometry.CubicSpline2d _cubic_spline_qh; |
| | | private Yw.Geometry.CubicSpline2d _cubic_spline_qe; |
| | | private Yw.Geometry.CubicSpline2d _cubic_spline_qp; |
| | |
| | | private List<Yw.Geometry.Point2d> _def_pt_qp_list; |
| | | |
| | | |
| | | private PumpGroupPt _action_spot = new(0, 0, 0, 0, 0); |
| | | private PumpGroupPt _design_pt = new(0, 0, 0, 0, 0); |
| | | private PumpGroupPt _work_point = new(0, 0, 0, 0, 0); |
| | | |
| | | private PumpCoordinate _coordinate_paras; |
| | |
| | | |
| | | _coordinate_paras = null; |
| | | _work_point = new PumpGroupPt(0, 0, 0, 0, 0); |
| | | _action_spot = new PumpGroupPt(0, 0, 0, 0, 0); |
| | | _design_pt = new PumpGroupPt(0, 0, 0, 0, 0); |
| | | |
| | | UpdateChart(false); |
| | | } |
| | |
| | | |
| | | CalcWorkPointByQ(); |
| | | |
| | | CalcActionSpotByQ(); |
| | | CalcDesignPointByQ(); |
| | | |
| | | CalcTextAnchorPoint(); |
| | | } |
| | |
| | | _bottom_panel.Visibility = splitPanel ? ChartElementVisibility.Visible : ChartElementVisibility.Hidden; |
| | | |
| | | |
| | | PointSeriesView series_eq_p_pt_view = null; |
| | | if (_series_eq_pt_list != null && _series_eq_pt_list.Any()) |
| | | { |
| | | var series = _series_eq_pt_list.Find(x => (Yw.Pump.eCurveType)x.Tag == Yw.Pump.eCurveType.QP); |
| | | if (series != null) |
| | | { |
| | | series_eq_p_pt_view = (PointSeriesView)series.View; |
| | | } |
| | | } |
| | | |
| | | //流量 |
| | | if (_pt_qh_list != null) |
| | |
| | | |
| | | ((PointSeriesView)_series_pt_qp.View).Pane = _bottom_panel; |
| | | ((SplineSeriesView)_series_cubic_spline_qp.View).Pane = _bottom_panel; |
| | | if (series_eq_p_pt_view!=null) |
| | | { |
| | | series_eq_p_pt_view.Pane = _bottom_panel; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | ((PointSeriesView)_series_pt_qp.View).Pane = _main_chart_diagram.DefaultPane; |
| | | ((SplineSeriesView)_series_cubic_spline_qp.View).Pane = _main_chart_diagram.DefaultPane; |
| | | |
| | | |
| | | if (series_eq_p_pt_view != null) |
| | | { |
| | | series_eq_p_pt_view.Pane = _main_chart_diagram.DefaultPane; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 计算作用点 |
| | | /// 计算设计点 |
| | | /// </summary> |
| | | /// <param name="action_spot_q"></param> |
| | | public void CalcActionSpotByQ(double? action_spot_q = null) |
| | | /// <param name="design_pt_q"></param> |
| | | public void CalcDesignPointByQ(double? design_pt_q = null) |
| | | { |
| | | _series_cubic_spline_eq.Visible = true; |
| | | _series_cubic_spline_eq.Points.Clear(); |
| | | if (_series_custom_list != null && _series_custom_list.Any()) |
| | | if (_series_eq_pt_list != null && _series_eq_pt_list.Any()) |
| | | { |
| | | this.chartControl1.BeginInit(); |
| | | foreach (var series in _series_custom_list) |
| | | foreach (var series in _series_eq_pt_list) |
| | | { |
| | | var exist_series = this.chartControl1.GetSeriesByName(series.Name); |
| | | if (exist_series != null) |
| | |
| | | this.chartControl1.EndInit(); |
| | | } |
| | | |
| | | _series_custom_list = new List<Series>(); |
| | | _series_eq_pt_list = new List<Series>(); |
| | | if (_pt_qh_list == null || !_pt_qh_list.Any()) |
| | | return; |
| | | if (action_spot_q == null) |
| | | if (design_pt_q == null) |
| | | return; |
| | | |
| | | |
| | | var minQ = _pt_qh_list.Min(x => x.X); |
| | | var maxQ = _pt_qh_list.Max(x => x.X); |
| | | |
| | | if (action_spot_q < minQ || action_spot_q > maxQ) |
| | | if (design_pt_q < minQ || design_pt_q > maxQ) |
| | | return; |
| | | |
| | | |
| | | _action_spot.Q = action_spot_q.Value; |
| | | _action_spot.H = _cubic_spline_qh.GetPointY(_action_spot.Q); |
| | | _design_pt.Q = design_pt_q.Value; |
| | | _design_pt.H = _cubic_spline_qh.GetPointY(_design_pt.Q); |
| | | |
| | | |
| | | _series_cubic_spline_eq.Visible = true; |
| | | var action_spot = new Yw.Geometry.Point2d(_action_spot.Q, _action_spot.H); |
| | | var eq_paras = EquipCurveHelper.CalcEquipCurve(_cubic_spline_qh, action_spot, out Yw.Geometry.Point2d sect_pt); |
| | | _series_cubic_spline_eq.Visible = true; |
| | | var design_pt = new Yw.Geometry.Point2d(_design_pt.Q, _design_pt.H); |
| | | var eq_paras = EquipCurveHelper.CalcEquipCurve(_cubic_spline_qh, design_pt, out Yw.Geometry.Point2d sect_pt); |
| | | if (eq_paras != null && eq_paras.EquipCurve != null) |
| | | { |
| | | var eq_pt_list = eq_paras.EquipCurve.GetPointList(); |
| | |
| | | } |
| | | |
| | | |
| | | var action_spot_qh = CreatePointSeries(Pump.eCurveType.QH, _action_spot.Q, _action_spot.H); |
| | | _series_custom_list.Add(action_spot_qh); |
| | | this.chartControl1.Series.Add(action_spot_qh); |
| | | var design_pt_qh = CreatePointSeries(Pump.eCurveType.QH, _design_pt.Q, _design_pt.H); |
| | | _series_eq_pt_list.Add(design_pt_qh); |
| | | this.chartControl1.Series.Add(design_pt_qh); |
| | | if (_cubic_spline_qe != null) |
| | | { |
| | | _action_spot.E = _cubic_spline_qe.GetPointY(_action_spot.Q); |
| | | var action_spot_qe = CreatePointSeries(Pump.eCurveType.QE, _action_spot.Q, _action_spot.E); |
| | | _series_custom_list.Add(action_spot_qe); |
| | | this.chartControl1.Series.Add(action_spot_qe); |
| | | _design_pt.E = _cubic_spline_qe.GetPointY(_design_pt.Q); |
| | | var design_pt_qe = CreatePointSeries(Pump.eCurveType.QE, _design_pt.Q, _design_pt.E); |
| | | _series_eq_pt_list.Add(design_pt_qe); |
| | | this.chartControl1.Series.Add(design_pt_qe); |
| | | |
| | | } |
| | | |
| | | if (_cubic_spline_qp != null) |
| | | { |
| | | _action_spot.P = _cubic_spline_qp.GetPointY(_action_spot.Q); |
| | | var action_spot_qp = CreatePointSeries(Pump.eCurveType.QP, _action_spot.Q, _action_spot.P); |
| | | _series_custom_list.Add(action_spot_qp); |
| | | this.chartControl1.Series.Add(action_spot_qp); |
| | | _design_pt.P = _cubic_spline_qp.GetPointY(_design_pt.Q); |
| | | var design_pt_qp = CreatePointSeries(Pump.eCurveType.QP, _design_pt.Q, _design_pt.P); |
| | | _series_eq_pt_list.Add(design_pt_qp); |
| | | this.chartControl1.Series.Add(design_pt_qp); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | var series_point = new DevExpress.XtraCharts.Series(); |
| | | series_point.Tag = curve_type; |
| | | series_point.View = series_point_view; |
| | | series_point.ArgumentScaleType = DevExpress.XtraCharts.ScaleType.Numerical; |
| | | series_point.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False; |