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/SectionBundleInfo.cs | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git "a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\346\226\255\351\235\242\350\256\276\350\256\241/ViewModel/SectionBundleInfo.cs" "b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\346\226\255\351\235\242\350\256\276\350\256\241/ViewModel/SectionBundleInfo.cs" index b890bac..e5270d8 100644 --- "a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\346\226\255\351\235\242\350\256\276\350\256\241/ViewModel/SectionBundleInfo.cs" +++ "b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\346\226\255\351\235\242\350\256\276\350\256\241/ViewModel/SectionBundleInfo.cs" @@ -630,6 +630,7 @@ { return -1; } + var bb = (-b + Math.Sqrt(delta)) / (2 * a); return Math.Round((-b + Math.Sqrt(delta)) / (2 * a), 1); } } @@ -653,11 +654,15 @@ var R_Left = R; if (R_Left > (Height + 1)) R_Left = Math.Round(Height * 0.85 - 1, 0); + var conditionHeight = Height; + if (R_out !=1500) + { + conditionHeight = conditionHeight-3; + } - - if (R_Left * (1 + Math.Sin(Gama * Math.PI / 180)) > Height - 3) + if (R_Left * (1 + Math.Sin(Gama * Math.PI / 180)) > conditionHeight) { - R_Left = (Height - 3) / (1 + Math.Sin(Gama * Math.PI / 180)); + R_Left = conditionHeight / (1 + Math.Sin(Gama * Math.PI / 180)); } @@ -673,9 +678,9 @@ var c = this.R_out / 1000; var TopWidth = this.BaseWidth + (2 * x); var Slash = (Height - R_Left - (Math.Sin(Gama * Math.PI / 180) * R_Left)) / Math.Cos(Gama * Math.PI / 180); - if ((this.ShapeType != eSectionShapeType.鐭╁舰 && (TopWidth < c || Slash < c)) || R_Left == 0) + if ((this.ShapeType != eSectionShapeType.鐭╁舰 && (TopWidth < c || Slash < c)) || R_Left == 0 ) { - R_Left = R_Left - 1; + R_Left = R_Left - 1; } else { @@ -686,6 +691,11 @@ break; } } + + if (R_Left<=0) + { + R_Left = 1; + } return Math.Round(R_Left,1); } } -- Gitblit v1.9.3