¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 æªé¢é¢ç§¯ |
| | | } |
| | | } |
| | | |
| | | |