tx
2025-04-22 e0b138b3e057de6f57021e6c8963868f5c5acc5a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
 
namespace TProduct.PumpGraph.Picture
{
    public partial class LxpFeatChart : FeatChart
    {
        protected RectangleF _chartDiagramQH;
        protected RectangleF _chartDiagramQE;
        protected RectangleF _chartDiagramQP;
        protected RectangleF _chartDiagramNPSH;
        #region 坐标
        protected Eventech.Model.LxpCoordinateParas _coordinateParas = null;
        public void SetCoordinate(Eventech.Model.LxpCoordinateParas coordinateParas)
        {
            _coordinateParas = coordinateParas;
        }
        //检查坐标
        protected virtual bool CheckCoordinate()
        {
            if (_coordinateParas == null)
                return false;
 
            CheckPressCoord();
 
            CheckNpshCoord();
 
            CheckPowerCoord();
 
            return true;
        }
 
        protected void CheckPowerCoord()
        {
            if (this._curveInfoQP == null) return;
            Eventech.Model.FeatPoint lastPt = this._curveInfoQP.LastOrDefault();
            if (lastPt == null)
                return;
 
            if (this._coordinateParas.DispMaxP() < lastPt.Y)
            {
                this._coordinateParas.EndLineNoP++;
                if (this._coordinateParas.DispMaxP() < lastPt.Y)
                {
                    this._coordinateParas.EndLineNoP++;
                    if (this._coordinateParas.DispMaxP() < lastPt.Y)
                    {
                        this._coordinateParas.EndLineNoP++;
                    }
                }
            }
        }
 
        //检查扬程线的坐标有没有超出
        protected void CheckPressCoord()
        {
            if (this._curveInfoQH == null) return;
            Eventech.Model.FeatPoint lastPt = this._curveInfoQH.LastOrDefault();
            if (lastPt == null)
                return;
            if (lastPt == null)
                return;
 
 
            if (this._coordinateParas.DispMinH() < lastPt.Y)
            {
                if (this._coordinateParas.DispMinH() - this._coordinateParas.CoordSpaceH >= 0)
                    this._coordinateParas.StartLineNoH--;
 
                if (this._coordinateParas.DispMinH() < lastPt.Y)
                {
                    if (this._coordinateParas.DispMinH() - this._coordinateParas.CoordSpaceH >= 0)
                        this._coordinateParas.StartLineNoH--;
 
                    if (this._coordinateParas.DispMinH() < lastPt.Y)
                    {
                        if (this._coordinateParas.DispMinH() - this._coordinateParas.CoordSpaceH >= 0)
                            this._coordinateParas.StartLineNoH--;
                    }
                }
            }
            var max_h = (from x in this._curveInfoQH select x.Y).Max();
 
 
            if (_coordinateParas.DispMaxH() < max_h)
            {
                _coordinateParas.GridNumberY = _coordinateParas.GridNumberY + 1;
                _coordinateParas.EndLineNoH = _coordinateParas.EndLineNoH + 1;
 
                if (_coordinateParas.DispMaxH() < max_h)
                {
                    _coordinateParas.GridNumberY = _coordinateParas.GridNumberY + 1;
                    _coordinateParas.EndLineNoH = _coordinateParas.EndLineNoH + 1;
                }
            }
 
        }
 
 
        protected void CheckNpshCoord()
        {
            if (this._points_CurveNPSH == null || _points_CurveNPSH.Count < 3) return;
            List<Eventech.Model.FeatPoint> points = _points_CurveNPSH;
 
 
 
            if (this._coordinateParas.DispMinNPSH() > points.First().Y)
            {
                this._coordinateParas.CoordMinNPSH = this._coordinateParas.CoordMinNPSH - this._coordinateParas.CoordSpaceNPSH;
                this._coordinateParas.EndLineNoNPSH = this._coordinateParas.EndLineNoNPSH + 1;
            }
 
            var lastPt = points.LastOrDefault();
            if (this._coordinateParas.DispMaxNPSH() < lastPt.Y)
            {
                this._coordinateParas.EndLineNoNPSH++;
 
                if (this._coordinateParas.DispMaxNPSH() < lastPt.Y)
                {
                    this._coordinateParas.EndLineNoNPSH++;
 
                    if (this._coordinateParas.DispMaxNPSH() < lastPt.Y)
                    {
                        this._coordinateParas.EndLineNoNPSH++;
                    }
                }
            }
        }
        #endregion
 
        #region 坐标颜色
        //是否显示坐标说明
        bool _isDispCurveTitle = true;
        public bool IsDispCurveTitle
        {
            get { return _isDispCurveTitle; }
            set { _isDispCurveTitle = value; }
        }
 
        protected Color _axisLabelColorE = Color.BlueViolet;
        public Color AxisLabelColorE
        {
            get { return _axisLabelColorE; }
            set { _axisLabelColorE = value; }
        }
        protected Color _axisLabelColorP = Color.Black;
        public Color AxisLabelColorP
        {
            get { return _axisLabelColorP; }
            set { _axisLabelColorP = value; }
        }
        protected Color _axisLabelColorNPSH = Color.BlueViolet;
        public Color AxisLabelColorNPSH
        {
            get { return _axisLabelColorNPSH; }
            set { _axisLabelColorNPSH = value; }
        }
 
 
        protected Color _axisTitleColorE = Color.Black;
        public Color AxisTitleTextColorE
        {
            get { return _axisTitleColorE; }
            set { _axisTitleColorE = value; }
        }
 
        protected Color _axisTitleColorP = Color.Black;
        public Color AxisTitleTextColorP
        {
            get { return _axisTitleColorP; }
            set { _axisTitleColorP = value; }
        }
 
        protected Color _axisTitleColorNPSH = Color.Black;
        public Color AxisTitleTextColorNPSH
        {
            get { return _axisTitleColorNPSH; }
            set { _axisTitleColorNPSH = value; }
        }
 
 
        //是否显示汽蚀曲线X的网格线
        protected bool _isDispGridLineNPSHX = true;
        public bool IsDispGridLineNPSHX
        {
            get { return _isDispGridLineNPSHX; }
            set { _isDispGridLineNPSHX = value; }
        }
 
 
        protected int _blankGridNumberUpBottom = 2;//扬程下面预留2个格子
        protected int _blankGridNumberUpTop = 1;//扬程上面预留1个格子
 
        protected int _blankGridNumberDownBottom = 1;//功率下面预留2个格子
        protected int _blankGridNumberDownTop = 1;//功率上面预留 格子数( 毅飞要求不要留间隙 其他客户为1)
        public int BlankGridNumberDownTop
        {
            get { return _blankGridNumberDownTop; }
            set { _blankGridNumberDownTop = value; }
        }
 
        //是否显示功率曲线
        protected bool _isDispCurveQP = true;
        public bool IsDispCurveQP
        {
            get { return _isDispCurveQP; }
            set { _isDispCurveQP = value; }
        }
 
        //是否显示功率曲线
        protected bool _isDispCurveQE = true;
        public bool IsDispCurveQE
        {
            get { return _isDispCurveQE; }
            set { _isDispCurveQE = value; }
        }
 
        //是否有汽蚀曲线
        protected bool _isHaveNPSHCurve = true;
 
        //是否显示汽蚀曲线
        protected bool _isDispCurveNPSH = true;
        public bool IsDispCurveNPSH
        {
            get { return _isDispCurveNPSH; }
            set { _isDispCurveNPSH = value; }
        }
        #endregion
        public override void SetColorQE(Color color)
        {
            _axisTitleColorE = color;
            _axisLabelColorE = color;
            _curveColorQE = color;
        }
        public override void SetColorQP(Color color)
        {
            _axisTitleColorP = color;
            _axisLabelColorP = color;
            _curveColorQP = color;
        }
    }
}