From 504a7540001f5805938c83ed67a28d86d68b8808 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期三, 30 十月 2024 01:00:25 +0800 Subject: [PATCH] 修改泵匹配选择逻辑 --- WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/PumpPerform2dMultiViewDlg.cs | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/PumpPerform2dMultiViewDlg.cs b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/PumpPerform2dMultiViewDlg.cs index 63693b0..76530ab 100644 --- a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/PumpPerform2dMultiViewDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/PumpPerform2dMultiViewDlg.cs @@ -11,7 +11,6 @@ - public string SetBindingData(List<Perform2dMultiViewModel> list, PerformPoint2dViewModel design_pt, bool only_line, bool is_parallel = true) { if (list == null || !list.Any()) @@ -29,7 +28,7 @@ var point_list_qe = item.PointsQE; var point_list_qp = item.PointsQP; - if (point_list_qh==null) + if (point_list_qh == null) { continue; } @@ -38,7 +37,7 @@ pt_qh_list = point_list_qh?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); pt_qe_list = point_list_qe?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); pt_qp_list = point_list_qp?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); - + Yw.Geometry.CubicSpline2d cubic_spline_qh = null, cubic_spline_qe = null, cubic_spline_qp = null; cubic_spline_qh = new Yw.Geometry.CubicSpline2d(pt_qh_list); @@ -56,7 +55,6 @@ var color = ColorHelper.GetRandomColor(); var vm = new Yw.WinFrmUI.Phart.PumpSerialParallelViewModel(); vm.Id = id; - vm.Color = color; vm.Name = name; vm.Qh = cubic_spline_qh; vm.Qe = cubic_spline_qe; @@ -108,20 +106,22 @@ { var design_q = calc_pt_qh_list.Max(x => x.X) / 2; var design_h = calc_pt_qh_list.GetInterPointsY(design_q).Last(); - design_pt = new PerformPoint2dViewModel(design_q, design_q); + design_pt = new PerformPoint2dViewModel(design_q, design_h); } - var vm_sp = new Yw.WinFrmUI.Phart.PumpSerialParallelViewModel(); + var vm_sp = new Yw.WinFrmUI.Phart.PumpSerialParallelInfoViewModel(); vm_sp.Id = "-1"; - vm_sp.Color = System.Drawing.Color.Black; vm_sp.Name = line_name; - vm_sp.IsSerialParallel = true; vm_sp.Qh = new Yw.Geometry.CubicSpline2d(calc_pt_qh_list); vm_sp.Qe = new Yw.Geometry.CubicSpline2d(calc_pt_qe_list); - vm_sp.Qp = new Yw.Geometry.CubicSpline2d(calc_pt_qp_list); + vm_sp.Qp = new Yw.Geometry.CubicSpline2d(calc_pt_qp_list); + vm_sp.QhCalc= vm_sp.Qh; + vm_sp.QeCalc= vm_sp.Qe; + vm_sp.QpCalc= vm_sp.Qp; + vm_sp.IsBp = true; vm_list.Add(vm_sp); - this.xtrPerform2dMultiChart1.Add(vm_list, new Yw.Geometry.Point2d(design_pt.X, design_pt.Y)); + this.xtrPerform2dMultiChart1.Add(vm_sp, new Yw.Geometry.Point2d(design_pt.X, design_pt.Y)); return string.Empty; } -- Gitblit v1.9.3