chenn
2025-03-27 75263eb2d74528acf0086ddf2d8eab89fcecd8fb
WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesignBaseCtrl.cs
@@ -155,8 +155,7 @@
            else
            {
                return EditSectShape18(bundle);
            }
            }
        }
        protected double _sectStartAngle = -HydrDisplayEngineBridge.PI_4;
        public double SectStartAngle
@@ -187,13 +186,18 @@
            {
                var theSectionParam = bundle.ToSectionShapePara(i);
                double dGama_Left, dGama_Right, dH, dR_out, dR_Left, dR_Right, dBaseWidth, dBaseCircleRadius;
                double dGama_Left, dGama_Right, dH, dR_out,   dBaseWidth, dBaseCircleRadius;
                dGama_Left = theSectionParam.Gama_Left;
                dGama_Right = theSectionParam.Gama_Right;
                dH = theSectionParam.H;
                dR_out = theSectionParam.R_out;
                dR_Left = theSectionParam.R_Left;
                dR_Right = theSectionParam.R_Right;
                double dR_Left = theSectionParam.R_Left;
                double dR_Right = theSectionParam.R_Right;
                if (dR_Left < 1)
                    dR_Left = 1;
                if (dR_Right < 1)
                    dR_Right = 1;
                dBaseWidth = theSectionParam.BaseWidth;
                dBaseCircleRadius = theSectionParam.BaseCircleRadius;
@@ -245,15 +249,19 @@
            {
                var theSectionParam = bundle.ToSectionShapePara(i);
                double dGama_Left, dGama_Right, dH, dR_out, dR_Left, dR_Right, dBaseWidth, dBaseCircleRadius;
                double dGama_Left, dGama_Right, dH, dR_out,   dBaseWidth, dBaseCircleRadius;
                dGama_Left = theSectionParam.Gama_Left;
                dGama_Right = theSectionParam.Gama_Right;
                dH = theSectionParam.H;
                dR_out = theSectionParam.R_out;
                dR_Left = theSectionParam.R_Left;
                dR_Right = theSectionParam.R_Right;
                double dR_Left = theSectionParam.R_Left;
                double dR_Right = theSectionParam.R_Right;
                dBaseWidth = theSectionParam.BaseWidth;
                dBaseCircleRadius = theSectionParam.BaseCircleRadius;
                if (dR_Left < 1)
                    dR_Left = 1;
                if (dR_Right < 1)
                    dR_Right = 1;
                string wstrShapeNameI = string.Format("SectShape_{0}", theSectionParam.Index);
@@ -377,7 +385,36 @@
        #region 水体
        public bool Create2DWaterBody(HydrEngineCSharp.WaterBodyOuterArcParam pHydrGeomArcCurve)
        {
            if (this._is3D)
                return false;
            ToolTips theToolTips = this.pDisplayView.build2DMidCurve(pHydrGeomArcCurve);
            if (theToolTips == null)
                return false;
            Invalidate(true);
            pDisplayView.FitAll3DViews(true);
            pDisplayView.set2DMidCurveClr(
 DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBoudaryColor.R,
 DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBoudaryColor.G,
 DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBoudaryColor.B);
            if (theToolTips.GetTipsId() == 1)
            {
                return true;
            }
            else
            {
                MessageBox.Show(theToolTips.GetToolTips(), "提示");
                return false;
            }
        }
        public bool Create2DWaterBody(HydrEngineCSharp.WaterBodyOuterSpParam pHydrGeomCurve)
        {
            if (this._is3D)
@@ -403,6 +440,7 @@
            }
            else
            {
                MessageBox.Show(theToolTips.GetToolTips(), "提示");
                return false  ;
            }
        }
@@ -411,7 +449,7 @@
        {
            if (!this._is3D)
                return null;
            HydrProperties theHydrProperties = new HydrProperties();
            theHydrProperties.SetShapeGuid(DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBodyShapeName);
            theHydrProperties.SetShapeColor(
@@ -422,14 +460,37 @@
            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)
        {
            if (!this._is3D)
                return null;
            HydrProperties theHydrProperties = new HydrProperties();
            theHydrProperties.SetShapeGuid(DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBodyShapeName);
            theHydrProperties.SetShapeColor(
             DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBodyColor.R,
             DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBodyColor.G,
             DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBodyColor.B, 256);
            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)
        {
            if (!this._is3D)
@@ -442,7 +503,26 @@
                return null;
            if (tt.GetTipsId() != 1)
            {
                MessageBox.Show(tt.GetToolTips(), "提示");
            }
            Invalidate(true);
            return tt;
        }
        public HydrEngineCSharp.ToolTips Edit3DWaterBody(HydrEngineCSharp.WaterBodyOuterArcParam pHydrGeomArcCurve)
        {
            if (!this._is3D)
                return null;
            if (pDisplayView.hasBuildThicknessBody())
                pDisplayView.ClearTopoShape(TopoTypeDisplay.EThicknessBody);
            var tt = pDisplayView.rebuildWaterBody(pHydrGeomArcCurve);
            if (tt == null)
                return null;
            if (tt.GetTipsId() != 1)
            {
                MessageBox.Show(tt.GetToolTips(), "提示");
            }
            Invalidate(true);