using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using HydrEngineCSharp; namespace DPumpHydr.WinFrmUI.Volute { public partial class OccDesign3DCtrl: OccDesignBaseCtrl { public OccDesign3DCtrl() { this._is3D = true ; } public override void Initial() { // 创建时的代码 pDisplayView = new HydrEngineCSharp.CDisplayView(); pDisplayView.InitOCCDraw(); IntPtr hwnd = this.Handle; //IntPtr hwnd = splitContainer1.Handle; // 初始化更新代码 pDisplayView.InitialUpdateOCC((uint)hwnd, this._is3D); bool bSucc = pDisplayView.BeginTurbopumpTopoShape(strTurbopumpTopoShapeName); } public void CreateWaterBody(HydrEngineCSharp.BcGePoint theMPlnBasePt, HydrEngineCSharp.BcGePoint theMPlnOuterPt) { //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); } } } }