| | |
| | | CreateOutflowStepCtrl(); |
| | | |
| | | this._occDesign2dCtrl.SetAllSectionCurveVisible(false); |
| | | this._occDesign3dCtrl.SetAllSectionCurveVisible(false); |
| | | this._occDesign3dCtrl.SetAllSectionCurveVisible(RbtnChk鎴潰18.Checked); |
| | | if (last_step_id >= this._stepTreeDockPanel.Step_ID_Thickness) |
| | | { |
| | | this._occDesign3dCtrl.setWaterBodyOpacity( |
| | |
| | | /// <param name="last_step_id"></param> |
| | | private void InitilOutflowStepCtrl(long last_step_id) |
| | | { |
| | | var ret = _ctrlSetOutflowParas.InitialParas(_hdrBaseInfo, _geomBaseInfo, _sectionBundleInfo); |
| | | var ret = _ctrlSetOutflowParas.InitialParas( |
| | | _hdrBaseInfo, |
| | | _geomBaseInfo, |
| | | _sectionBundleInfo, |
| | | _outflowParas); |
| | | if(ret == 0 && _outflowParas != null) |
| | | {//鍩虹鍙傛暟娌℃湁浠讳綍鍙樺寲 |
| | | RefreshWaterBody3D(_outflowParas); |
| | |
| | | double dBtmValue2 = outflowParas.Tangent_Btm_Right; |
| | | double dRadConner = outflowParas.Septalradius; |
| | | double dRadConnerAngle = this._geomBaseInfo.FAI0; |
| | | double R1 = outflowParas.R1; |
| | | double R2 = outflowParas.R2; |
| | | dRadConnerAngle = dRadConnerAngle * HydrDisplayEngineBridge.PI / 180.0; |
| | | |
| | | if (m_theWaterBodyOuterParam == null) |
| | | m_theWaterBodyOuterParam = HydrDisplayEngineBridge.CreateWaterBodyOuter(WaterBodyOuterType.EWaterBodyOuterSp); |
| | | if (outflowParas.LinkStyle == ViewModel.eOutflowLinkStyle.鐩寸嚎鍦嗗姬 && outflowParas.ShapeStyle != ViewModel.eOutflowShapeStyle.渚ч潰瀵归綈鍑哄彛) |
| | | { |
| | | if (m_theWaterBodyOuterParam == null || !(m_theWaterBodyOuterParam is HydrEngineCSharp.WaterBodyOuterArcParam)) |
| | | m_theWaterBodyOuterParam = HydrDisplayEngineBridge.CreateWaterBodyOuter(WaterBodyOuterType.EWaterBodyOuterArc); |
| | | } |
| | | else |
| | | { |
| | | if (m_theWaterBodyOuterParam == null || !(m_theWaterBodyOuterParam is HydrEngineCSharp.WaterBodyOuterSpParam)) |
| | | m_theWaterBodyOuterParam = HydrDisplayEngineBridge.CreateWaterBodyOuter(WaterBodyOuterType.EWaterBodyOuterSp); |
| | | } |
| | | |
| | | HydrEngineCSharp.WaterBodyOuterSpParam pHydrGeomCurve = m_theWaterBodyOuterParam as HydrEngineCSharp.WaterBodyOuterSpParam; |
| | | pHydrGeomCurve.SetOuterOffset(dOuterOffset); |
| | | pHydrGeomCurve.SetOuterHigh(dOuterHigh); |
| | | pHydrGeomCurve.SetOuterRad(dOuterRad); |
| | | pHydrGeomCurve.SetH1(dH1); |
| | | pHydrGeomCurve.SetH2(dH2); |
| | | pHydrGeomCurve.SetRadConner(dRadConner); |
| | | pHydrGeomCurve.SetRadConnerAngle(dRadConnerAngle); |
| | | pHydrGeomCurve.SetTopValue1(dTopValue1); |
| | | pHydrGeomCurve.SetBtmValue1(dBtmValue1); |
| | | pHydrGeomCurve.SetTopValue2(dTopValue2); |
| | | pHydrGeomCurve.SetBtmValue2(dBtmValue2); |
| | | // HydrEngineCSharp.WaterBodyOuterArcParam pHydrGeomCurve = m_theWaterBodyOuterParam as HydrEngineCSharp.WaterBodyOuterArcParam; |
| | | if (outflowParas.LinkStyle == ViewModel.eOutflowLinkStyle.鐩寸嚎鍦嗗姬 && outflowParas.ShapeStyle != ViewModel.eOutflowShapeStyle.渚ч潰瀵归綈鍑哄彛) |
| | | { |
| | | HydrEngineCSharp.WaterBodyOuterArcParam pHydrGeomCurveArc = m_theWaterBodyOuterParam as HydrEngineCSharp.WaterBodyOuterArcParam; |
| | | pHydrGeomCurveArc.SetOuterOffset(dOuterOffset); |
| | | pHydrGeomCurveArc.SetOuterHigh(dOuterHigh); |
| | | pHydrGeomCurveArc.SetOuterRad(dOuterRad); |
| | | pHydrGeomCurveArc.SetH1(dH1); |
| | | pHydrGeomCurveArc.SetH2(dH2); |
| | | pHydrGeomCurveArc.SetRadConner(dRadConner); |
| | | pHydrGeomCurveArc.SetRadConnerAngle(dRadConnerAngle); |
| | | pHydrGeomCurveArc.SetR1(R1); |
| | | pHydrGeomCurveArc.SetR2(R2); |
| | | } |
| | | else |
| | | { |
| | | |
| | | HydrEngineCSharp.WaterBodyOuterSpParam pHydrGeomCurve = m_theWaterBodyOuterParam as HydrEngineCSharp.WaterBodyOuterSpParam; |
| | | pHydrGeomCurve.SetOuterOffset(dOuterOffset); |
| | | pHydrGeomCurve.SetOuterHigh(dOuterHigh); |
| | | pHydrGeomCurve.SetOuterRad(dOuterRad); |
| | | pHydrGeomCurve.SetH1(dH1); |
| | | pHydrGeomCurve.SetH2(dH2); |
| | | pHydrGeomCurve.SetRadConner(dRadConner); |
| | | pHydrGeomCurve.SetRadConnerAngle(dRadConnerAngle); |
| | | pHydrGeomCurve.SetTopValue1(dTopValue1); |
| | | pHydrGeomCurve.SetBtmValue1(dBtmValue1); |
| | | pHydrGeomCurve.SetTopValue2(dTopValue2); |
| | | pHydrGeomCurve.SetBtmValue2(dBtmValue2); |
| | | } |
| | | } |
| | | |
| | | private bool RefreshWaterBody2D(DPumpHydr.WinFrmUI.Volute.ViewModel.OutflowParas outflowParas) |
| | | { |
| | | if (outflowParas == null || outflowParas.Tangent_Top_Right <= 0 || outflowParas.Tangent_Btm_Right <= 0 || |
| | | outflowParas.Tangent_Top_Left <= 0 || outflowParas.Tangent_Btm_Left <= 0) |
| | | if (outflowParas == null) |
| | | return false; |
| | | if (outflowParas.LinkStyle != ViewModel.eOutflowLinkStyle.鐩寸嚎鍦嗗姬 || outflowParas.ShapeStyle == ViewModel.eOutflowShapeStyle.渚ч潰瀵归綈鍑哄彛) |
| | | { |
| | | if (outflowParas.Tangent_Top_Right <= 0 || outflowParas.Tangent_Btm_Right <= 0 || |
| | | outflowParas.Tangent_Top_Left <= 0 || outflowParas.Tangent_Btm_Left <= 0) |
| | | return false; |
| | | } |
| | | if (outflowParas.LinkStyle == ViewModel.eOutflowLinkStyle.鐩寸嚎鍦嗗姬 && outflowParas.ShapeStyle != ViewModel.eOutflowShapeStyle.渚ч潰瀵归綈鍑哄彛) |
| | | { |
| | | if (outflowParas.R1 <= 0 || outflowParas.R2 <= 0) |
| | | return false; |
| | | } |
| | | |
| | | RefreshOuterParam(outflowParas); |
| | | HydrEngineCSharp.WaterBodyOuterSpParam pHydrGeomCurve = m_theWaterBodyOuterParam as HydrEngineCSharp.WaterBodyOuterSpParam; |
| | | RefreshOuterParam(outflowParas); //WaterBodyOuterParam |
| | | if (outflowParas.LinkStyle == ViewModel.eOutflowLinkStyle.鐩寸嚎鍦嗗姬 && outflowParas.ShapeStyle != ViewModel.eOutflowShapeStyle.渚ч潰瀵归綈鍑哄彛) |
| | | { |
| | | HydrEngineCSharp.WaterBodyOuterArcParam pHydrGeomCurveArc = m_theWaterBodyOuterParam as HydrEngineCSharp.WaterBodyOuterArcParam; |
| | | this._occDesign2dCtrl.Create2DWaterBody(pHydrGeomCurveArc); |
| | | } |
| | | else |
| | | { |
| | | HydrEngineCSharp.WaterBodyOuterSpParam pHydrGeomCurve = m_theWaterBodyOuterParam as HydrEngineCSharp.WaterBodyOuterSpParam; |
| | | this._occDesign2dCtrl.Create2DWaterBody(pHydrGeomCurve); |
| | | } |
| | | |
| | | //if (_isHaveCreateWaterBody2d == true) |
| | | //{ |
| | | // this._occDesign2dCtrl.Create2DWaterBody(pHydrGeomCurve); |
| | | //} |
| | | |
| | | this._occDesign2dCtrl.Create2DWaterBody(pHydrGeomCurve); |
| | | |
| | | |
| | | |
| | |
| | | this._occDesign3dCtrl.SectStartAngle = start_angle; |
| | | this._occDesign3dCtrl.ClearAll(); |
| | | this._occDesign3dCtrl.RefreshAllSectShape18(this._sectionBundleInfo); |
| | | this._occDesign3dCtrl.SetAllSectionCurveVisible(RbtnChk鎴潰18.Checked); |
| | | |
| | | this._sectAreaDockPanel.SetArea18(_sectionBundleInfo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | this._sectAreaDockPanel.SetAreaOutletDia(outflowParas.Dia); |
| | | this._outflowParas = outflowParas; |
| | | RefreshOuterParam(outflowParas); |
| | | HydrEngineCSharp.WaterBodyOuterArcParam pHydrGeomArcCurve = m_theWaterBodyOuterParam as HydrEngineCSharp.WaterBodyOuterArcParam; |
| | | HydrEngineCSharp.WaterBodyOuterSpParam pHydrGeomCurve = m_theWaterBodyOuterParam as HydrEngineCSharp.WaterBodyOuterSpParam; |
| | | |
| | | try |
| | | { |
| | | if (_isHaveCreateWaterBody3d == true) |
| | | { |
| | | this._occDesign2dCtrl.Create2DWaterBody(pHydrGeomCurve); |
| | | this._occDesign3dCtrl.Edit3DWaterBody(pHydrGeomCurve); |
| | | this._occDesign3dCtrl.SetWaterBodyVisible(true); |
| | | if(_outflowParas.LinkStyle == ViewModel.eOutflowLinkStyle.鐩寸嚎鍦嗗姬 && _outflowParas.ShapeStyle != ViewModel.eOutflowShapeStyle.渚ч潰瀵归綈鍑哄彛) |
| | | { |
| | | if (!this._occDesign2dCtrl.Create2DWaterBody(pHydrGeomArcCurve)) |
| | | { |
| | | _isHaveCreateWaterBody3d = false; |
| | | } |
| | | if (this._occDesign3dCtrl.Edit3DWaterBody(pHydrGeomArcCurve).GetTipsId() != 1) |
| | | { |
| | | _isHaveCreateWaterBody3d = false; |
| | | } |
| | | this._occDesign3dCtrl.SetWaterBodyVisible(true); |
| | | } |
| | | else |
| | | { |
| | | if (!this._occDesign2dCtrl.Create2DWaterBody(pHydrGeomCurve)) |
| | | { |
| | | _isHaveCreateWaterBody3d = false; |
| | | } |
| | | if (this._occDesign3dCtrl.Edit3DWaterBody(pHydrGeomCurve).GetTipsId() != 1) |
| | | { |
| | | _isHaveCreateWaterBody3d = false; |
| | | } |
| | | this._occDesign3dCtrl.SetWaterBodyVisible(true); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | _isHaveCreateWaterBody3d = true; |
| | | |
| | | this._occDesign2dCtrl.Create2DWaterBody(pHydrGeomCurve); |
| | | this._occDesign3dCtrl.Create3DWaterBody(pHydrGeomCurve); |
| | | this._occDesign3dCtrl.SetWaterBodyVisible(true); |
| | | if (_outflowParas.LinkStyle == ViewModel.eOutflowLinkStyle.鐩寸嚎鍦嗗姬 && _outflowParas.ShapeStyle != ViewModel.eOutflowShapeStyle.渚ч潰瀵归綈鍑哄彛) |
| | | { |
| | | if (!this._occDesign2dCtrl.Create2DWaterBody(pHydrGeomArcCurve)) |
| | | { |
| | | _isHaveCreateWaterBody3d = false; |
| | | } |
| | | if (this._occDesign3dCtrl.Create3DWaterBody(pHydrGeomArcCurve).GetTipsId() != 1) |
| | | { |
| | | _isHaveCreateWaterBody3d = false; |
| | | } |
| | | this._occDesign3dCtrl.SetWaterBodyVisible(true); |
| | | } |
| | | else |
| | | { |
| | | if (!this._occDesign2dCtrl.Create2DWaterBody(pHydrGeomCurve)) |
| | | { |
| | | _isHaveCreateWaterBody3d = false; |
| | | } |
| | | if (this._occDesign3dCtrl.Create3DWaterBody(pHydrGeomCurve).GetTipsId() != 1) |
| | | { |
| | | _isHaveCreateWaterBody3d = false; |
| | | } |
| | | this._occDesign3dCtrl.SetWaterBodyVisible(true); |
| | | } |
| | | } |
| | | return BuildRefreshWaterBodyReponse(); |
| | | } |