chenn
2025-03-27 75263eb2d74528acf0086ddf2d8eab89fcecd8fb
直线圆弧修改
已修改9个文件
130 ■■■■ 文件已修改
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_ExportImport.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesignBaseCtrl.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/出水设计/ctrlSetOutflowParas.Designer.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/出水设计/ctrlSetOutflowParas.cs 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/出水设计/ctrlSetOutflowParas.resx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/断面设计/ViewModel/SectionBundleInfo.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/断面设计/ViewModel/SectionShapePara.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/断面设计/ctrlSectionBundleInfo.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_ExportImport.cs
@@ -135,7 +135,7 @@
                CreateOutflowStepCtrl();
                DockStepParaCtrl(_ctrlSetOutflowParas);
                _ctrlSetOutflowParas.Isxml = true;
                InitilOutflowStepCtrl(this._stepTreeDockPanel.Step_ID_Section18_Full);
                this._occDesign2dCtrl.SetAllSectionCurveVisible(false);
@@ -153,6 +153,7 @@
                DockStepParaCtrl(_ctrlThicknessParas);
                _stepTreeDockPanel.SetFocusedNode(this._stepTreeDockPanel.Step_ID_Thickness);
                GoNextStep();
                #endregion
            }
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs
@@ -97,7 +97,7 @@
            {
                if (!SaveParaStep4())
                    return false;
                if (next_step_id < current_step_id)
                if (next_step_id < current_step_id && next_step_id != 0)
                {//删除加厚体
                    this._occDesign3dCtrl.RemoveThicknessBody( );
                }
@@ -155,7 +155,19 @@
                this.Rbtn数据导出STP.Visible = true;
                this.Rbtn数据导出IGS.Visible = true;
            }
            else
            else if (current_step_id == this._stepTreeDockPanel.Step_ID_Thickness && next_step_id == 0)
            {
                this.RBtn后退.Enabled = true;
                this.Rbtn前进.Enabled = false;
                this.Rbtn上一步.Enabled = true;
                this.Rbtn下一步.Enabled = false;
                this.Rbtn完成.Enabled = true;
                this.Rbtn数据导出STP.Visible = true;
                this.Rbtn数据导出IGS.Visible = true;
            } else
            {
                this.RBtn后退.Enabled = true;
                this.Rbtn前进.Enabled = true;
WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesignBaseCtrl.cs
@@ -411,6 +411,7 @@
            }
            else
            {
                MessageBox.Show(theToolTips.GetToolTips(), "提示");
                return false;
            }
        }
@@ -439,6 +440,7 @@
            }
            else
            {
                MessageBox.Show(theToolTips.GetToolTips(), "提示");
                return false  ;
            }
        }
@@ -458,9 +460,11 @@
            if (pDisplayView.hasBuildThicknessBody())
                pDisplayView.ClearTopoShape(TopoTypeDisplay.EThicknessBody);
           var tt = pDisplayView.buildWaterBody(theHydrProperties, pHydrGeomCurve);
            if (tt.GetTipsId() != 1)
            {
            }
            Invalidate(true);
            pDisplayView.FitAll3DViews(true);
            return tt;
        }
        public HydrEngineCSharp.ToolTips Create3DWaterBody(HydrEngineCSharp.WaterBodyOuterArcParam pHydrGeomArcCurve)
@@ -478,9 +482,13 @@
            if (pDisplayView.hasBuildThicknessBody())
                pDisplayView.ClearTopoShape(TopoTypeDisplay.EThicknessBody);
            var tt = pDisplayView.buildWaterBody(theHydrProperties, pHydrGeomArcCurve);
            if (tt.GetTipsId() != 1)
            {
            }
            Invalidate(true);
            pDisplayView.FitAll3DViews(true);
            return tt;
        }
        public HydrEngineCSharp.ToolTips Edit3DWaterBody(HydrEngineCSharp.WaterBodyOuterSpParam pHydrGeomCurve)
@@ -495,7 +503,7 @@
                return null;
            if (tt.GetTipsId() != 1)
            {
                MessageBox.Show(tt.GetToolTips(), "提示");
            }
            Invalidate(true);
@@ -514,7 +522,7 @@
                return null;
            if (tt.GetTipsId() != 1)
            {
                MessageBox.Show(tt.GetToolTips(), "提示");
            }
            Invalidate(true);
WinFrmUI/DPumpHydr.WinFrmUI.Volute/³öË®Éè¼Æ/ctrlSetOutflowParas.Designer.cs
@@ -28,18 +28,18 @@
        /// </summary>
        private void InitializeComponent()
        {
            metroTile出口图片 = new RLT.Controls.MetroTile();
            thunderGroupBox1 = new RLT.Controls.ThunderGroupBox();
            metroTile出口图片 = new DPumpHydr.WinFrmUI.RLT.Controls.MetroTile();
            thunderGroupBox1 = new DPumpHydr.WinFrmUI.RLT.Controls.ThunderGroupBox();
            comboBoxType = new System.Windows.Forms.ComboBox();
            metroToolTip第六步提示 = new RLT.Controls.MetroToolTip();
            ribbonGroupBox1 = new RLT.Controls.RibbonGroupBox();
            metroToolTip第六步提示 = new DPumpHydr.WinFrmUI.RLT.Controls.MetroToolTip();
            ribbonGroupBox1 = new DPumpHydr.WinFrmUI.RLT.Controls.RibbonGroupBox();
            checkBox圆弧连接 = new System.Windows.Forms.CheckBox();
            btnNextStep = new RLT.Controls.ForeverButtonSticky();
            dungeonTabPage1 = new RLT.Controls.DungeonTabPage();
            btnNextStep = new DPumpHydr.WinFrmUI.RLT.Controls.ForeverButtonSticky();
            dungeonTabPage1 = new DPumpHydr.WinFrmUI.RLT.Controls.DungeonTabPage();
            tabPage1 = new System.Windows.Forms.TabPage();
            tabPage2 = new System.Windows.Forms.TabPage();
            ctrlSection910Posi1 = new ctrlSection910Posi();
            mBtn更新模型 = new RLT.Controls.ForeverButtonSticky();
            mBtn更新模型 = new DPumpHydr.WinFrmUI.RLT.Controls.ForeverButtonSticky();
            thunderGroupBox1.SuspendLayout();
            ribbonGroupBox1.SuspendLayout();
            dungeonTabPage1.SuspendLayout();
WinFrmUI/DPumpHydr.WinFrmUI.Volute/³öË®Éè¼Æ/ctrlSetOutflowParas.cs
@@ -107,6 +107,12 @@
                return _sharp_type;
            }
        }
        bool _isxml = false;
        public bool Isxml
        {
            get { return _isxml; }
            set { _isxml = value; }
        }
        private void InitialOutflowStyle()
        {
            if (_parasControlCenter == null)
@@ -172,11 +178,20 @@
            if(outflowParas != null)
            {
                _sharp_type = outflowParas.ShapeStyle;
                _link_type = outflowParas.LinkStyle;
            }
            //
            InitialCtrlDefaultParas(hdrBaseInfo, geomBaseInfo, sectionBundleInfo, outflowParas);
     
            if(_link_type == eOutflowLinkStyle.曲线)
            {
                checkBox圆弧连接.Checked = false;
            }
            else
            {
                checkBox圆弧连接.Checked = true;
            }
            if (_sharp_type == eOutflowShapeStyle.未知)
            {
@@ -185,9 +200,15 @@
            }
            else
            {
                comboBoxType.SelectedIndex = (int)_sharp_type;
                if (_isxml)
                {
                    _isxml = false;
                }
                InitialOutflowStyle();
                RefreshModel();
                    RefreshModel();
            }
            return 1;
@@ -622,8 +643,8 @@
            else if (comboBoxType.SelectedIndex == 1)
            {
                _sharp_type = DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle.侧面出口_曲线连接;
                checkBox圆弧连接.Enabled = false;
                checkBox圆弧连接.Visible = false;
                checkBox圆弧连接.Enabled = true;
                checkBox圆弧连接.Visible = true;
                _link_type = DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowLinkStyle.曲线;
                if (checkBox圆弧连接.Checked)
                {
@@ -641,10 +662,13 @@
                checkBox圆弧连接.Visible = false;
                _link_type = DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowLinkStyle.曲线;
            }
            if (_isxml)
            {
                return;
            }
            InitialOutflowStyle();
            RefreshModel();
                RefreshModel();
        }
        private void btnNextStep_Click(object sender, EventArgs e)
@@ -662,6 +686,10 @@
            {
                _link_type = DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowLinkStyle.直线圆弧;
            }
            if (_isxml)
            {
                return;
            }
            InitialOutflowStyle();
WinFrmUI/DPumpHydr.WinFrmUI.Volute/³öË®Éè¼Æ/ctrlSetOutflowParas.resx
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!--
    Microsoft ResX Schema
    Microsoft ResX Schema
    Version 2.0
@@ -48,7 +48,7 @@
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
WinFrmUI/DPumpHydr.WinFrmUI.Volute/¶ÏÃæÉè¼Æ/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);
         }
    }
WinFrmUI/DPumpHydr.WinFrmUI.Volute/¶ÏÃæÉè¼Æ/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
WinFrmUI/DPumpHydr.WinFrmUI.Volute/¶ÏÃæÉè¼Æ/ctrlSectionBundleInfo.cs
@@ -472,9 +472,9 @@
                }
                else
                {
                    var initialR = _sectionBundleInfo.CalInitialR(_hdrBaseInfo, _geomBaseInfo);
                    var height = _sectionBundleInfo.CalcHeight(_geomBaseInfo, index, result, initialR[index]);
                    var R = _sectionBundleInfo.CheckChamferR(height, index, result, initialR[index]);
                    //var initialR = _sectionBundleInfo.CalInitialR(_hdrBaseInfo, _geomBaseInfo);
                    var height = _sectionBundleInfo.CalcHeight(_geomBaseInfo, index, result, _sectionBundleInfo.R_Left[index]);
                    var R = _sectionBundleInfo.CheckChamferR(height, index, result, _sectionBundleInfo.R_Left[index]);
                    SkyTextBox controlh1 = this.Controls.Find($"skyTextBox断面H1{index}", true).FirstOrDefault() as SkyTextBox;
                    SkyTextBox controlr1 = this.Controls.Find($"skyTextBox断面r1{index}", true).FirstOrDefault() as SkyTextBox;
                    controlh1.Text = height.ToString();
@@ -493,7 +493,7 @@
                {
                    skytextBox.Text = _sectionBundleInfo.GaMa_Right[index].ToString();
                }
                if (string.IsNullOrEmpty(skytextBox.Text))
                if (string.IsNullOrEmpty(skytextBox.Text) || Convert.ToDouble(skytextBox.Text) == 0)
                {
                    MessageBox.Show("r不合理!请重新输入");
                }
@@ -549,7 +549,7 @@
                var c = _sectionBundleInfo.R_out / 1000;
                var TopWidth = _sectionBundleInfo.BaseWidth + (2 * x);
                var Slash = (Convert.ToDouble(controlh1.Text) - Convert.ToDouble(controlr1.Text) - (Math.Sin(Convert.ToDouble(controlGaMa1.Text) * Math.PI / 180) * Convert.ToDouble(controlr1.Text))) / Math.Cos(Convert.ToDouble(controlGaMa1.Text) * Math.PI / 180);
                if ((!RBtn矩形.Checked && (TopWidth < c || Slash < c)) || Convert.ToDouble(controlr1.Text) == 0)
                if ((!RBtn矩形.Checked && (TopWidth < c || Slash < c - 0.1))) //
                {
                    controlr1.BackColor = Color.OrangeRed;
                    MessageBox.Show("r不合理!请重新输入");
@@ -718,14 +718,14 @@
                SkyTextBox controH1 = this.Controls.Find(controlnameHeight, true).FirstOrDefault() as SkyTextBox;
                controly1.Enabled = true;
                if (controly1 != null)
                    controly1.Text = Math.Round(_sectionBundleInfo.GaMa_Left[sect_index], 1).ToString();
                if (controly2 != null)
                    controly2.Text = Math.Round(_sectionBundleInfo.R_Left[sect_index], 1).ToString();
                if (control断面面积 != null)
                    control断面面积.Text = Math.Round(_sectionBundleInfo.Area[sect_index], 1).ToString();
                if (controH1 != null)
                    controH1.Text = Math.Round(_sectionBundleInfo.H[sect_index], 1).ToString();
                if (controly2 != null)
                    controly2.Text = Math.Round(_sectionBundleInfo.R_Left[sect_index], 1).ToString();
                if (controly1 != null)
                    controly1.Text = Math.Round(_sectionBundleInfo.GaMa_Left[sect_index], 1).ToString();
            }
        }