chenn
2025-04-19 96095f8ac4b464540cd2c0bd7308916a137c5041
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
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace DPumpHydr.OpenFwUI.Volute
{
    public class OutflowParas
    {
        public OutflowParas()
        {
            ShapeStyle = eOutflowShapeStyle.未知;
            LinkStyle = eOutflowLinkStyle.曲线;
 
            this.Tangent_Top_Right = 1;
            this.Tangent_Btm_Right = 1;
            this.Tangent_Top_Left = 1;
            this.Tangent_Btm_Left = 1;
        }
        public OutflowParas(OutflowParas rhs)
        {
            this.ShapeStyle = rhs.ShapeStyle;
            this.LinkStyle = rhs.LinkStyle;
            this.Offset = rhs.Offset;
            this.Heigh = rhs.Heigh;
            this.Dia = rhs.Dia;
            this.Tangent_Top_Right = rhs.Tangent_Top_Right;
            this.Tangent_Btm_Right = rhs.Tangent_Btm_Right;
            this.Tangent_Top_Left = rhs.Tangent_Top_Left;
            this.Tangent_Btm_Left = rhs.Tangent_Btm_Left;
            this.H1 = rhs.H1;
            this.H2 = rhs.H2;
            this.R1 = rhs.R1;
            this.R2 = rhs.R2;
            this.Septalradius = rhs.Septalradius;
        }
        public eOutflowShapeStyle ShapeStyle { get; set; }   
        public eOutflowLinkStyle LinkStyle { get; set; }   
        /// <summary>
        /// 中心距离 图片中的A
        /// </summary>
        public double Offset { get; set; } //图片中的A  = 0.0;
        /// <summary>
        /// 出口长度 图片中L
        /// </summary>
        public double Heigh { get; set; } //图片中的L = 420.0;
        /// <summary>
        /// 出口宽度 图片中的D4
        /// </summary>
        public double Dia { get; set; } //图片中的D4 = 80.0;
        /// <summary>
        /// 右上曲线缩放量 
        /// </summary>
        public double Tangent_Top_Right { get; set; }   //切线缩放量 = m_dTopValue;
        /// <summary>
        /// 右下曲线缩放量
        /// </summary>
        public double Tangent_Btm_Right { get; set; }    //切线缩放量 = m_dBtmValue;
        /// <summary>
        /// 左上曲线缩放量
        /// </summary>
        public double Tangent_Top_Left { get; set; }    //切线缩放量 = m_dTopValue;
        /// <summary>
        /// 左下曲线缩放量
        /// </summary>
        public double Tangent_Btm_Left { get; set; }   //切线缩放量 = m_dBtmValue;
        /// <summary>
        /// 圆弧链接时R1
        /// </summary>
        public double R1 { get; set; }//圆弧连接时的R1
        /// <summary>
        /// 圆弧链接时R2
        /// </summary>
        public double R2 { get; set; }//圆弧连接时的R2
        /// <summary>
        /// 出口与曲线或圆弧之间的高度 左
        /// </summary>
        public double H1 { get; set; } //图片中的H1  = 10;
        /// <summary>
        /// 出口与曲线或圆弧之间的高度 右
        /// </summary>
        public double H2 { get; set; } //图片中的H2 = 10;
        /// <summary>
        /// 割舌半径
        /// </summary>
        public double Septalradius { get; set; } //隔舌半径r
 
 
    }
    public static class GeometryHelper
    {
        // 将角度从度转换为弧度
        public static double DegreesToRadians(double degrees)
        {
            return degrees * Math.PI / 180.0;
        }
 
        // 计算极坐标点
        public static PointD AdsPolar(PointD startPoint, double angleInRadians, double distance)
        {
            double newX = startPoint.X + distance * Math.Cos(angleInRadians);
            double newY = startPoint.Y + distance * Math.Sin(angleInRadians);
            return new PointD(newX, newY);
        }
    }
    public struct PointD
    {
        public double X { get; set; }
        public double Y { get; set; }
 
        public PointD(double x, double y)
        {
            X = x;
            Y = y;
        }
    }
    public class OutflowParasCalcReponse
    {
        public bool IsSuccess { get; set; }
        public double SectArea9 { get; set; } //9 截面面积
        public double SectArea10 { get; set; } //10 截面面积
    }
}