From 75263eb2d74528acf0086ddf2d8eab89fcecd8fb Mon Sep 17 00:00:00 2001 From: chenn <gu.beic@qq.com> Date: 星期四, 27 三月 2025 18:31:57 +0800 Subject: [PATCH] 直线圆弧修改 --- WinFrmUI/DPumpHydr.WinFrmUI.Volute/断面设计/ViewModel/SectionShapePara.cs | 154 +++++---------------------------------------------- 1 files changed, 15 insertions(+), 139 deletions(-) diff --git "a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\346\226\255\351\235\242\350\256\276\350\256\241/ViewModel/SectionShapePara.cs" "b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\346\226\255\351\235\242\350\256\276\350\256\241/ViewModel/SectionShapePara.cs" index 8dc49c6..a8967bb 100644 --- "a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\346\226\255\351\235\242\350\256\276\350\256\241/ViewModel/SectionShapePara.cs" +++ "b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\346\226\255\351\235\242\350\256\276\350\256\241/ViewModel/SectionShapePara.cs" @@ -14,6 +14,9 @@ /// </summary> public class SectionShapePara { + /// <summary> + /// + /// </summary> public int Index { get; set; }//鏂潰搴忓彿 绗�8鏂潰灏辨槸8 绗竴鏂潰灏辨槸1 public double Gama_Left { get; set; }//瑙掑害1 public double Gama_Right { get; set; }//瑙掑害2 @@ -26,37 +29,7 @@ public double BaseCircleRadius { get; set; }//搴曢儴鍦嗗崐寰� 灏辨槸D3/2 public eSectionShapeType ShapeType { get; set; } - - - public string DeriveArgument(ViewModel.SectionBundleInfo sectionBaseInfo) - { - var jsonArray = new StringBuilder("[\n"); - //for (int i = 1; i < sectionBaseInfo.GaMa1.Count - 1; i++) - //{ - // Initialparameters(i, sectionBaseInfo); - // jsonArray.Append(" {\n"); - // jsonArray.AppendFormat(" \"Index\":{0},\n", this.Index); - // jsonArray.AppendFormat(" \"Gama_Left\":{0:F2},\n", this.Gama_Left); - // jsonArray.AppendFormat(" \"Gama_Right\":{0:F2},\n", this.Gama_Right); - // jsonArray.AppendFormat(" \"H\":{0:F2},\n", this.H); - // jsonArray.AppendFormat(" \"R_out\":{0:F2},\n", this.R_out); - // jsonArray.AppendFormat(" \"R_Left\":{0:F2},\n", this.R_Left); - // jsonArray.AppendFormat(" \"R_Right\":{0:F2},\n", this.R_Right); - // jsonArray.AppendFormat(" \"SectionArea\":{0:F2},\n", this.SectionArea); - // jsonArray.AppendFormat(" \"BaseWidth\":{0:F2},\n", this.BaseWidth); - // jsonArray.AppendFormat(" \"BaseCircleRadius\":{0:F2}\n", this.BaseCircleRadius); - // jsonArray.Append(" },\n"); // 缁撴潫瀵硅薄 - //} - //jsonArray.Length -= 2; - //jsonArray.Append("\n"); - //jsonArray.Append("]"); // 缁撴潫鏁扮粍 - return jsonArray.ToString(); - } - - //public static void WriteToFile(string json, string filePath) - //{ - // File.WriteAllText(filePath, json); - //} + /// <summary> /// 鏍规嵁闈㈢Н璁$畻楂樺害 @@ -87,119 +60,22 @@ /// </summary> /// <param name="sectionShapePara"></param> /// <param name="index"></param>銆� - public bool Verify(out string error) - { - error = ""; - bool isverify = true; - if ((this.H - this.R_Left) * Math.Tan(this.Gama_Left)+(this.H - this.R_Right) * Math.Tan(this.R_Right)+this.BaseWidth >= this.R_Right + this.R_Left) - { - error = "杈撳叆鐨勭洿寰勯潪娉曪紒"; - isverify = false; - } - if(this.Gama_Left > 45 || this.Gama_Right > 45) - { - error = "杈撳叆鐨勮搴﹂潪娉曪紒"; - isverify = false; - } - return isverify; - } - //private double DecreaseR = 0.5; - //public bool CalculateR(HdrBaseInfo BaseInfo, SectionBaseInfo sectionBaseInfo, GeomBaseInfo geomBaseInfo, bool isFirst) + //public bool Verify(out string error) //{ - // if (!isFirst) + // error = ""; + // bool isverify = true; + // if ((this.H - this.R_Left) * Math.Tan(this.Gama_Left)+(this.H - this.R_Right) * Math.Tan(this.R_Right)+this.BaseWidth >= this.R_Right + this.R_Left) // { - // R_Left = R_Left - DecreaseR; - // R_Right = R_Right - DecreaseR; - - // if (R_Left > (H - 1)) - // R_Left = Math.Round(H * 0.85 - 1,0); - // if (R_Right > (H - 1)) - // R_Right = Math.Round(H * 0.85 - 1,0); - - // if (R_Left < 2) - // R_Left = 2; - // if (R_Right < 2) - // R_Right = 2; + // error = "杈撳叆鐨勭洿寰勯潪娉曪紒"; + // isverify = false; // } - // else//鏄涓�娆¤绠� + // if(this.Gama_Left > 45 || this.Gama_Right > 45) // { - - // //璧嬪�硷細R1 R2 R3 R4 - // if (sectionBaseInfo.ShapeType == eSectionShapeType.瀵圭О) //type锛�0锛氬绉版褰� - // R_Left = Math.Round(BaseWidth * 0.55 + 0.5 - 4,0); - // else if (sectionBaseInfo.ShapeType == eSectionShapeType.涓嶅绉�)//type锛�1锛氫笉瀵圭О姊舰 - // R_Left = Math.Round(BaseWidth * 0.55 + 0.5 - 4,0); - // else if (sectionBaseInfo.ShapeType == eSectionShapeType.鐭╁舰)//type锛�2锛氱煩褰� - // R_Left = Math.Round(BaseWidth * 0.4 + 0.5 - 2,0); - - - // if (BaseInfo.IsSXB) - // R_Left = Math.Round(R_Left / 2,0); - // //if (DesignMode == YSSnxOpen::DesignMode::AssPawuQnshQw1) - // //{ - // // R_Left = int(R_Left * 0.7); - // //} - // double m_R3 = 0; - // double t = 0; - // if (BaseWidth <= 35) - // m_R3 = 5; - // else if (BaseWidth <= 60 && BaseWidth > 35) - // { - // t = Math.Round(BaseWidth * 0.6, 0) - Math.Round(BaseWidth * 0.6 / 10.0, 0) * 10; - // if (t <= 2) - // m_R3 = Math.Round(BaseWidth * 0.6 / 10.0, 0) * 10; - // else if (t > 2 && t <= 7) - // m_R3 = Math.Round(BaseWidth * 0.6 / 10.0, 0) * 10 + 5; - // else if (t > 7) - // m_R3 = Math.Round(BaseWidth * 0.6 / 10.0, 0) * 10 + 10; - // } - // else if (BaseWidth > 60 && BaseWidth <= 90) - // { - // t = Math.Round(BaseWidth * 0.9, 0) - Math.Round(BaseWidth * 0.9 / 10.0, 0) * 10; - // if (t <= 2) - // m_R3 = Math.Round(BaseWidth * 0.9 / 10.0, 0) * 10; - // else if (t > 2 && t <= 7) - // m_R3 = Math.Round(BaseWidth * 0.9 / 10.0, 0) * 10 + 5; - // else if (t > 7) - // m_R3 = Math.Round(BaseWidth * 0.9 / 10.0, 0) * 10 + 10; - // } - // else if (BaseWidth > 90) - // { - // t = Math.Round(BaseWidth * 0.3, 0) - Math.Round(BaseWidth * 0.3 / 10.0, 0) * 10; - // if (t <= 2) - // m_R3 = Math.Round(BaseWidth * 0.3 / 10.0, 0) * 10; - // else if (t > 2 && t <= 7) - // m_R3 = Math.Round(BaseWidth * 0.3 / 10.0, 0) * 10 + 5; - // else if (t > 7) - // m_R3 = Math.Round(BaseWidth * 0.3 / 10.0, 0) * 10 + 10; - // } - - // R_Right = R_Left; - // R_out = 1000.0; - - // //鎴潰R1 鍜� R4鐨勫噺灏戣搴� DecreaseR - // if (BaseWidth < 15) - // { - // DecreaseR = 0.5; - // } - // else if (BaseWidth >= 15 && BaseWidth < 25) - // { - // DecreaseR = 1; - // } - // else if (BaseWidth >= 25 && BaseWidth < 45) - // { - // DecreaseR = 1.5; - // } - // else if (BaseWidth >= 45) - // { - // DecreaseR = 2; - // } - - // if (BaseInfo.IsSXB) - // DecreaseR = 1; + // error = "杈撳叆鐨勮搴﹂潪娉曪紒"; + // isverify = false; // } - - // return true; + // return isverify; //} + } } -- Gitblit v1.9.3