tx
2025-04-15 0605dd45960c14fde5d785d0efcfbf4c7c9741e3
遗漏文件
已添加3个文件
181 ■■■■■ 文件已修改
OpenUI/DPumpHydr.OpenFwUI.Volute/ViewModel/OutflowParas.cs 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
OpenUI/DPumpHydr.OpenFwUI.Volute/ViewModel/OutflowStyleHelper.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
OpenUI/DPumpHydr.OpenFwUI.Volute/ViewModel/eOutflowStyle.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
OpenUI/DPumpHydr.OpenFwUI.Volute/ViewModel/OutflowParas.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,127 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DPumpHydr.WinFrmUI.Volute.ViewModel
{
    public class OutflowParas
    {
        public OutflowParas()
        {
            ShapeStyle   = ViewModel.eOutflowShapeStyle.未知;
            LinkStyle   = ViewModel.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 ViewModel.eOutflowShapeStyle ShapeStyle { get; set; }
        public ViewModel.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 æˆªé¢é¢ç§¯
    }
}
OpenUI/DPumpHydr.OpenFwUI.Volute/ViewModel/OutflowStyleHelper.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DPumpHydr.WinFrmUI.Volute
{
    internal class OutflowStyleHelper
    {
        /// <summary>
        /// æˆªé¢å¼€å§‹è§’度
        /// </summary>
        /// <param name="style"></param>
        /// <returns></returns>
        public static double GetSectStartAngle(DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle style)
        {
            if (style == DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle.侧面出口)
            {
                return  0;
            }
            else if (style == DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle.侧面对齐出口  )
            {
                return 0;
            }
            else
            {
                return  -HydrEngineCSharp.HydrDisplayEngineBridge.PI_4;
            }
        }
    }
}
OpenUI/DPumpHydr.OpenFwUI.Volute/ViewModel/eOutflowStyle.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DPumpHydr.WinFrmUI.Volute.ViewModel
{
    public enum eOutflowShapeStyle
    {
        æœªçŸ¥=-1,
        ä¸­å¿ƒå‡ºå£ = 0,
        ä¾§é¢å‡ºå£ = 1,
        ä¾§é¢å¯¹é½å‡ºå£ = 2
    }
    public enum eOutflowLinkStyle
    {
        æ›²çº¿ = 0,
        ç›´çº¿åœ†å¼§ = 1,
    }
}