lixiaojun
2024-11-27 4a5989c23c468d376a8abe72abe1a534708dbfe2
WinFrmUI/Yw.WinFrmUI.Phart.Core/00-core/01-calculate/PumpCalcHelper.cs
@@ -1505,8 +1505,7 @@
        #endregion
        #endregion
        #region 曲线与H=K*Q^i的交点  
        /// <summary>
@@ -1539,8 +1538,8 @@
        {
            var sect_pt = new Yw.Geometry.Point2d(0, 0);
            if (cubic_spline == null)
                return sect_pt;
            var pt_list = cubic_spline.GetPointListByXRatioRange(1,1.2, 50);
                return sect_pt;
            var pt_list = cubic_spline.GetPointListByXRatioRange(1, 1.2, 50);
            return GetSectPointParabola(pt_list, simular_pt);
        }
@@ -1563,7 +1562,7 @@
            double x;
            for (int i = 0; i < CurvePoints.Count - 1; i++)
            {
                 LineHelper.GetKandB(CurvePoints[i], CurvePoints[i + 1], out b, out c);
                LineHelper.GetKandB(CurvePoints[i], CurvePoints[i + 1], out b, out c);
                /*解方程
                 * y=ax
@@ -1571,7 +1570,7 @@
                 */
                if (Math.Abs(a - b) < 0.001)
                    continue;
                x = c / (a - b);
                if (UtilsHelper.IsMiddle(CurvePoints[i].X, CurvePoints[i + 1].X, x))
                {
@@ -1590,7 +1589,7 @@
        {
            return ParabolaCurveHelper.GetSectPoint(pt_list, simular_pt, 0);
        }
        public static Yw.Geometry.Point2d GetSectPointLine(this Yw.Geometry.CubicSpline2d cubic_spline, Yw.Geometry.Point2d simular_pt)
        {
            Yw.Geometry.Point2d sect_pt = new Yw.Geometry.Point2d(0, 0);
@@ -1637,11 +1636,11 @@
                x = x + space;
                y = 0;
                var y_pt_list = pt_list.GetInterPointsY(x);
                if (y_pt_list==null|| !y_pt_list.Any())
                if (y_pt_list == null || !y_pt_list.Any())
                {
                    break;
                }
                y = y_pt_list.Last();
                y = y_pt_list.Last();
                k = y / Math.Pow(x, index);
            } while (k > fixK);
@@ -1650,7 +1649,7 @@
            return sect_pt;
        }
        //ratioIgnore:作用 当simular_pt超出范围时,扩大的倍数
        public static Yw.Geometry.Point2d GetSectPointGeneral(this Yw.Geometry.CubicSpline2d cubic_spline, Yw.Geometry.Point2d simular_pt, double index, double ratioIgnore)
        {