From 91105b77c916d06dd30380e20594e29f85eae3da Mon Sep 17 00:00:00 2001
From: tangxu <tangxu76880903>
Date: 星期二, 24 十二月 2024 11:39:34 +0800
Subject: [PATCH] 更换HydrEngineCSharp

---
 Library/HydrEngineCSharp.dll                                     |    0 
 WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesign3DCtrl.cs        |   67 +++++++++---
 WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesign2DCtrl.cs        |   51 ++++++----
 WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesignBaseCtrl.cs      |  101 ++++++++++++-------
 WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs      |   33 ++++-
 WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_Occ.cs           |    8 
 WinFrmUI/DPumpHydr.WinFrmUI.Volute/StepInfo/StepTreeDockPanel.cs |   18 ++
 7 files changed, 185 insertions(+), 93 deletions(-)

diff --git a/Library/HydrEngineCSharp.dll b/Library/HydrEngineCSharp.dll
index 9251fb8..be26704 100644
--- a/Library/HydrEngineCSharp.dll
+++ b/Library/HydrEngineCSharp.dll
Binary files differ
diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_Occ.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_Occ.cs
index 0255095..30d482e 100644
--- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_Occ.cs
+++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_Occ.cs
@@ -43,8 +43,8 @@
         /// <param name="bundle"></param>
         private void RefreshSectShapeWhole18(ViewModel.SectionBundleInfo bundle)
         {
-            _occDesign3dCtrl.RefreshAllSectShape18(bundle);
-            _occDesign2dCtrl.RefreshAllSectShape18(bundle);
+            this._occDesign3dCtrl.RefreshAllSectShape18(bundle);
+            this._occDesign2dCtrl.RefreshAllSectShape18(bundle);
 
             this._sectAreaDockPanel.SetBindingData(bundle);
 
@@ -54,9 +54,9 @@
         {
             this._sectionBundleInfo.FromSectionShapePara(para);
 
-            _occDesign3dCtrl.RefreshSingleSectShape18(para);
+            this._occDesign3dCtrl.RefreshSingleSectShape18(para);
 
-            _occDesign2dCtrl.RefreshSingleSectShape18(para);
+            this._occDesign2dCtrl.RefreshSingleSectShape18(para);
             this._sectAreaDockPanel.SetBindingData(para);
         }
     }
diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs
index 3198fa3..e13f2ca 100644
--- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs
+++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs
@@ -301,25 +301,40 @@
                     _ctrlSetOutflowStyle = new ctrlSetOutflowStyle();
                     _ctrlSetOutflowStyle.Name = "ctrlSetOutflowStyle";
 
-                    //var pt = _occDesign2dCtrl.CreateOutflowBody();
-                    //if(pt != null)
-                    //{
-                    //    _occDesign3dCtrl.CreateOutflowBody(pt);
-                    //}
+                    //HydrEngineCSharp.BcGePoint theMidCurveFilletPtOnBase = new HydrEngineCSharp.BcGePoint();
+                    //HydrEngineCSharp.BcGePoint theMidCurveFilletPtOnOuter = new HydrEngineCSharp.BcGePoint();
+                    //this._occDesign2dCtrl.CreateWaterBody(theMidCurveFilletPtOnBase, theMidCurveFilletPtOnOuter);
+                    //theMidCurveFilletPtOnBase = this._occDesign2dCtrl.get2DMidCurveFilletPtOnBase();
+                    //theMidCurveFilletPtOnOuter = this._occDesign2dCtrl.get2DMidCurveFilletPtOnOuter();
+                    //this._occDesign3dCtrl.CreateWaterBody(theMidCurveFilletPtOnBase, theMidCurveFilletPtOnOuter);
+
+                }
+                else
+                {//缂栬緫
+                    //this._occDesign2dCtrl.EditOutletFlow(   );
+                    //HydrEngineCSharp.BcGePoint theMidCurveFilletPtOnBase = new HydrEngineCSharp.BcGePoint();
+                    //HydrEngineCSharp.BcGePoint theMidCurveFilletPtOnOuter = new HydrEngineCSharp.BcGePoint();
+                    //theMidCurveFilletPtOnBase = this._occDesign2dCtrl.get2DMidCurveFilletPtOnBase();
+                    //theMidCurveFilletPtOnOuter = this._occDesign2dCtrl.get2DMidCurveFilletPtOnOuter();
+                    //this._occDesign3dCtrl.EditOutletFlow(  theMidCurveFilletPtOnBase, theMidCurveFilletPtOnOuter );
+
                 }
 
-                
-                
-                
+
+
                 _ctrlSetOutflowStyle.SetBindingData(_type);
                 this._sectAreaDockPanel.RefreshControl();
                 this._sectAreaDockPanel.Visible = true;
                 AddStepParaCtrl(_ctrlSetOutflowStyle);
             }
 
+            if (step_id == this._stepTreeDockPanel.Step_ID_jiahout)
+            {
+                this._occDesign3dCtrl.CreateOutletBody3d();
+            }
 
         }
-      
+
 
 
         /// <summary>
diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesign2DCtrl.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesign2DCtrl.cs
index 9a753b8..5e271e2 100644
--- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesign2DCtrl.cs
+++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesign2DCtrl.cs
@@ -3,6 +3,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using HydrEngineCSharp;
 
 namespace DPumpHydr.WinFrmUI.Volute
 {
@@ -26,30 +27,40 @@
             bool bSucc = pDisplayView.BeginTurbopumpTopoShape(strTurbopumpTopoShapeName); 
         }
 
-        public HydrEngineCSharp.BcGePoint CreateWaterBody()
+
+
+        public void CreateWaterBody(HydrEngineCSharp.BcGePoint theMPlnBasePt, HydrEngineCSharp.BcGePoint theMPlnOuterPt)
         {
-            //double dOuterOffset = theOffset;
-            //double dOuterHigh = theHigh;
-            //double dOuterRad = theRad;
-            //if (CreateOutflowBodyConnect())
-            //{
-            //    //pDisplayView.build2DSegmentCurve(dOuterOffset, dOuterHigh, dOuterRad);// 75.660892, 283.1167
-            //    //Invalidate(true);
-            //    //pDisplayView.FitAll3DViews(true);
-            //    //HydrEngineCSharp.BcGePoint thePt = pDisplayView.get2DSegmentInterPt();
 
 
-            //    return thePt;
-            //}
-            //HydrEngineCSharp.BcGePoint theMidCurveFilletPtOnBase = new HydrEngineCSharp.BcGePoint();
-            //HydrEngineCSharp.BcGePoint theMidCurveFilletPtOnOuter = new HydrEngineCSharp.BcGePoint();
-            //this.pDisplayView.CreateWaterBody(theMidCurveFilletPtOnBase, theMidCurveFilletPtOnOuter);
-            //theMidCurveFilletPtOnBase = this.pDisplayView.get2DMidCurveFilletPtOnBase();
-            //theMidCurveFilletPtOnOuter = this.pDisplayView.get2DMidCurveFilletPtOnOuter();
-            ////this.pDisplayView3d.CreateWaterBody(theMidCurveFilletPtOnBase, theMidCurveFilletPtOnOuter);
-            return null;
+            //WaterBodyOuterParam theWaterBodyOuterParam = new WaterBodyOuterParam();
+            //theWaterBodyOuterParam.SetOuterOffset(theOffset);
+            //theWaterBodyOuterParam.SetOuterHigh(theHigh);
+            //theWaterBodyOuterParam.SetOuterRad(theRad);
+            //theWaterBodyOuterParam.SetTopValue(m_dTopValue);
+            //theWaterBodyOuterParam.SetBtmValue(m_dBtmValue);
 
-            //Invalidate(true);
+ 
+            
+            //    pDisplayView.build2DMidCurve(theWaterBodyOuterParam);
+           
+            //    pDisplayView.build2DMidCurveFillet(dAngle, m_dMPlnBasePtScaleValue, m_dMPlnOuterPtScaleValue);
+            //    Invalidate(true);
+            //    pDisplayView.FitAll3DViews(true);
+            
         }
+
+
+        public void EditOutletFlow()
+        {
+            //m_dTopValue += 0.1;
+            //m_dBtmValue += 0.1;
+            //pDisplayView.edit2DMidCurve(m_dTopValue, m_dBtmValue);
+    
+            //pDisplayView.build2DMidCurveFillet(dAngle, m_dMPlnBasePtScaleValue, m_dMPlnOuterPtScaleValue);
+            //Invalidate(true);
+            //pDisplayView.FitAll3DViews(true); 
+        }
+ 
     }
 }
diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesign3DCtrl.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesign3DCtrl.cs
index a814625..8cd2e51 100644
--- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesign3DCtrl.cs
+++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesign3DCtrl.cs
@@ -27,29 +27,60 @@
 
             bool bSucc = pDisplayView.BeginTurbopumpTopoShape(strTurbopumpTopoShapeName);
 
-
-            //OnSectiondesignbutton();
-
-            //OnBuildsolidbutton();
+ 
         }
 
-        public void CreateOutflowBody(HydrEngineCSharp.BcGePoint thePt)
+        public void CreateWaterBody(HydrEngineCSharp.BcGePoint theMPlnBasePt, HydrEngineCSharp.BcGePoint theMPlnOuterPt)
         {
-            //HydrEngineCSharp.BcGePoint thePt = new HydrEngineCSharp.BcGePoint(75.660892F, 283.1167F, 0.0F);
-            /*pDisplayView2d.build2DSegmentCurve(dOuterOffset, dOuterHigh, dOuterRad);75.660892, 283.1167
-            Invalidate(true);
-            pDisplayView2d.FitAll3DViews(true);
-            HydrEngineCSharp.BcGePoint thePt = pDisplayView2d.get2DSegmentInterPt();*/
-            //double dOuterOffset = theOffset;
-            //double dOuterHigh = theHigh;
-            //double dOuterRad = theRad;
-            //if (CreateOutflowBodyConnect())
-            //{
-            //    pDisplayView.buildVoluteOuterSolid(thePt, ShapeNameOutflowBody, m_dTopValue, m_dBtmValue);
+            //double theRad = 80.0;
+            //double theHigh = 520.0;
+            //double theOffset = 0.0;
+            //double dTopValue = 1.0;
+            //double dBtmValue = 1.0;
+            //double dMPlnBasePtScaleValue = 2.0;
+            //double dMPlnOuterPtScaleValue = 2.0;
+
+            //WaterBodyOuterParam theWaterBodyOuterParam = new WaterBodyOuterParam();
+            //theWaterBodyOuterParam.SetOuterOffset(theOffset);
+            //theWaterBodyOuterParam.SetOuterHigh(theHigh);
+            //theWaterBodyOuterParam.SetOuterRad(theRad);
+            //theWaterBodyOuterParam.SetTopValue(m_dTopValue);
+            //theWaterBodyOuterParam.SetBtmValue(m_dBtmValue);
+
+    
+            //    string wstrName = "姘翠綋";
+            //    string wstrShapeNameI = wstrName;
+            //    HydrGeomCurve theHydrGeomCurve = HydrDisplayEngineBridge.CreateGeomCurve(HydrCurveType.EHydrGeomCircle);
+            //    HydrProperties theHydrProperties = new HydrProperties();
+            //    theHydrProperties.SetShapeName(wstrShapeNameI);
+            //    theHydrGeomCurve.SetHydrProperties(theHydrProperties);
+            //    pDisplayView.buildWaterBody(wstrShapeNameI, m_dMPlnBasePtScaleValue, m_dMPlnOuterPtScaleValue, theMPlnBasePt, theMPlnOuterPt, theWaterBodyOuterParam);
             //    Invalidate(true);
             //    pDisplayView.FitAll3DViews(true);
-            //}
-
+ 
         }
+        public void EditOutletFlow(HydrEngineCSharp.BcGePoint theMPlnBasePt, HydrEngineCSharp.BcGePoint theMPlnOuterPt) 
+            //public void edit3DMidCurve(double dMPlnBasePtScaleValue, double dMPlnOuterPtScaleValue, HydrEngineCSharp.BcGePoint theMPlnBasePt, HydrEngineCSharp.BcGePoint theMPlnOuterPt, double dTopValue, double dBtmValue)
+        {
+       
+                //pDisplayView.rebuildWaterBody(m_dMPlnBasePtScaleValue, m_dMPlnOuterPtScaleValue, theMPlnBasePt, theMPlnOuterPt, m_dTopValue, m_dBtmValue);
+                //Invalidate(true);
+                //pDisplayView.FitAll3DViews(true);
+           
+        }
+        double dThickness = 10;
+        public void CreateOutletBody3d()
+        {
+            int nVoluteNum = 0;
+            string wstrVoluteName = "鍔犲帤浣�" + (nVoluteNum).ToString();
+          
+            bool bSucc = pDisplayView.buildThicknessBody(wstrVoluteName, dThickness);
+            if (bSucc)
+            {
+                Invalidate(true);
+                pDisplayView.FitAll3DViews(true);
+            }
+        }
+
     }
 }
diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesignBaseCtrl.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesignBaseCtrl.cs
index 21f2b8b..ac4bf61 100644
--- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesignBaseCtrl.cs
+++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesignBaseCtrl.cs
@@ -1,7 +1,6 @@
 using System;
 using System.Collections.Generic;
-using System.Windows.Forms;
-using DPumpHydr.WinFrmUI.RLT.Docking.Crown;
+using System.Windows.Forms; 
 using HydrEngineCSharp;
 
 namespace DPumpHydr.WinFrmUI.Volute
@@ -346,55 +345,81 @@
 
 
         #endregion
+
         protected double theRad = 70.0;
-        protected double theHigh = 350.0;
+        protected double theHigh = 300.0;
         protected double theOffset = 0.0;
         protected double m_dTopValue = 1.0;
         protected double m_dBtmValue = 1.0;
         protected string ShapeNameOutflowBody = "OutflowBody";
-        protected  bool CreateOutflowBodyConnect()
+        protected double dAngle = 70;
+
+        protected double m_dMPlnBasePtScaleValue = 2.0;
+        protected double m_dMPlnOuterPtScaleValue = 2.0;
+
+
+        protected  bool CreateWaterBody(HydrEngineCSharp.BcGePoint theMPlnBasePt, HydrEngineCSharp.BcGePoint theMPlnOuterPt)
         {
-            //int nConnectSectionId = 1;
-            //bool bSucc = pDisplayView.setConnectBaseCurve(nConnectSectionId);
-            //if (bSucc && this._is3D)
+ 
+
+            WaterBodyOuterParam m_theWaterBodyOuterParam = new WaterBodyOuterParam();
+            //theWaterBodyOuterParam.SetOuterOffset(theOffset);
+            //theWaterBodyOuterParam.SetOuterHigh(theHigh);
+            //theWaterBodyOuterParam.SetOuterRad(theRad);
+            //theWaterBodyOuterParam.SetTopValue(m_dTopValue);
+            //theWaterBodyOuterParam.SetBtmValue(m_dBtmValue);
+
+            double dOuterOffset = 0.0;
+            double dOuterHigh = 520.0;
+            double dOuterRad = 80.0;
+            double dOuterTopValue = m_dTopValue;
+            double dOuterBtmValue = m_dBtmValue;
+            double dH1 = 10;
+            double dH2 = 0;
+            double m_dRadConner = 8;
+            m_theWaterBodyOuterParam.SetOuterOffset(dOuterOffset);
+            m_theWaterBodyOuterParam.SetOuterHigh(dOuterHigh);
+            m_theWaterBodyOuterParam.SetOuterRad(dOuterRad);
+            m_theWaterBodyOuterParam.SetTopValue1(dOuterTopValue);
+            m_theWaterBodyOuterParam.SetBtmValue1(dOuterBtmValue);
+            m_theWaterBodyOuterParam.SetTopValue2(dOuterTopValue);
+            m_theWaterBodyOuterParam.SetBtmValue2(dOuterBtmValue);
+            m_theWaterBodyOuterParam.SetH1(dH1);
+            m_theWaterBodyOuterParam.SetH2(dH2);
+            m_theWaterBodyOuterParam.SetRadConner(m_dRadConner);
+            var m_theHydrGeomSplineParam = this.Create2DWaterBody(m_theWaterBodyOuterParam);
+            //if (this._is3D)
             //{
-            //    string wstrShapeName = "连接";
+            //    string wstrName = "水体";
+            //    string wstrShapeNameI = wstrName;
+            //    HydrGeomCurve theHydrGeomCurve = HydrDisplayEngineBridge.CreateGeomCurve(HydrCurveType.EHydrGeomCircle);
+            //    HydrProperties theHydrProperties = new HydrProperties();
+            //    theHydrProperties.SetShapeName(wstrShapeNameI);
+            //    theHydrGeomCurve.SetHydrProperties(theHydrProperties);
+            //    pDisplayView.buildWaterBody(wstrShapeNameI, m_dMPlnBasePtScaleValue, m_dMPlnOuterPtScaleValue, theMPlnBasePt, theMPlnOuterPt, m_theWaterBodyOuterParam);
             //    Invalidate(true);
             //    pDisplayView.FitAll3DViews(true);
-            //    pDisplayView.buildVoluteConnectShape(wstrShapeName);
             //}
-
-
-       
-            //double dAngle = 0.0;
-            //int nBtmSectionId = 8;
- 
-         
-
-            //HydrGeomCurve theHydrGeomCurve = HydrDisplayEngineBridge.CreateGeomCurve(HydrCurveType.EHydrGeomCircle);
-            //HydrProperties theHydrProperties = new HydrProperties();
-            //theHydrProperties.SetShapeName(ShapeNameOutflowBody);
-            //theHydrGeomCurve.SetHydrProperties(theHydrProperties);
-
-
-            //double dOuterTopValue = m_dTopValue;
-            //double dOuterBtmValue = m_dBtmValue;
-            //double dOuterOffset = theOffset;
-            //double dOuterHigh = theHigh;
-            //double dOuterRad = theRad;
-            //BcIfcGeomCircle pHydrGeomCurve = theHydrGeomCurve as BcIfcGeomCircle;
-            //if (pHydrGeomCurve != null)
+            //else
             //{
-            //    pHydrGeomCurve.SetIfcGeomCircle(theRad);
+            //    //pDisplayView.build2DMidCurve(theWaterBodyOuterParam);
 
-            //    BcGeMatrix theMatrix = BcGeMatrix.translate(0, theOffset, theHigh);
-            //    BcGeMatrix theMatrix1 = BcGeMatrix.rotate(-dAngle, 1.0, 0.0, 0.0);
-            //    theMatrix.postMult(theMatrix1);
-            //    pHydrGeomCurve.SetMatrix(theMatrix);
+            //    //pDisplayView.build2DMidCurveFillet(dAngle, m_dMPlnBasePtScaleValue, m_dMPlnOuterPtScaleValue);
+            //    //Invalidate(true);
+            //    //pDisplayView.FitAll3DViews(true);
             //}
-            //return  pDisplayView.setVoluteOuterCurve(nBtmSectionId, pHydrGeomCurve);
-             return false;
+            return true;
         }
-
+        public HydrGeomSplineParam Create2DWaterBody(WaterBodyOuterParam theWaterBodyOuterParam)
+        {
+            if (!this._is3D)
+            {
+                pDisplayView.build2DMidCurve(theWaterBodyOuterParam);
+                Invalidate(true);
+                pDisplayView.FitAll3DViews(true);
+                return pDisplayView.getHydrGeomSplineParam();
+            }
+            return new HydrGeomSplineParam();
+        }
     }
 }
diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/StepInfo/StepTreeDockPanel.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/StepInfo/StepTreeDockPanel.cs
index 5c22780..f25b03e 100644
--- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/StepInfo/StepTreeDockPanel.cs
+++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/StepInfo/StepTreeDockPanel.cs
@@ -32,7 +32,7 @@
         private readonly int Group_ID_Outflow = -3;
         public readonly long Step_ID_Outflow_Style = 32;
         public readonly long Step_ID_Outflow_Type = 31;
-
+        public readonly long Step_ID_jiahout = 33;
 
         //
         private List<DPumpHydr.WinFrmUI.Base.StepTreeNodePara> _allStepNodes = null;
@@ -271,12 +271,22 @@
             step鍑烘按浣撶被鍨�.ParentID = Group_ID_Outflow;
             _allStepNodes.Add(step鍑烘按浣撶被鍨�);
 
-
-
+            
+            var step鍔犲帤 = new DPumpHydr.WinFrmUI.Base.StepTreeNodePara()
+            {
+                ProgressState = WinFrmUI.Base.StepTreeNodePara.eProgressState.鏈畬鎴�,
+                DataState = WinFrmUI.Base.StepTreeNodePara.eDataState.鏈煡
+            };
+            step鍔犲帤.AllowSelect = true;
+            step鍔犲帤.Caption = "绗竷姝�:姘翠綋鍔犲帤";
+            step鍔犲帤.Name = "TreeStepNode" + Step_ID_jiahout;
+            step鍔犲帤.ID = Step_ID_jiahout;
+            step鍔犲帤.ParentID = Group_ID_Outflow;
+            _allStepNodes.Add(step鍔犲帤);
 
 
             #endregion
- 
+
 
             //
             this._currentStepID = Step_ID_Hdr_Base_Info;

--
Gitblit v1.9.3