| | |
| | | private bool _is3D = true; |
| | | |
| | | string strTurbopumpTopoShapeName = "蜗壳设计1" ; |
| | | public void ClearAll() |
| | | { |
| | | pDisplayView.DeleteObject(strTurbopumpTopoShapeName); |
| | | pDisplayView.addTurbopumpTopoShape(strTurbopumpTopoShapeName); |
| | | } |
| | | public void Initial(bool is3D) |
| | | { |
| | | this._is3D = is3D; |
| | |
| | | |
| | | //OnBuildsolidbutton(); |
| | | } |
| | | |
| | | |
| | | bool isFirst = true; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | |
| | | /// <param name="e"></param> |
| | | public void RefreshAllSectShape18(ViewModel.SectionBundleInfo bundle) |
| | | { |
| | | |
| | | string wstrName = "断面"; |
| | | if (!isFirst) |
| | | { |
| | | //string wstrVoluteName = "泵体" + (m_nVoluteNum++).ToString(); |
| | | // pDisplayView.DeleteObject(wstrVoluteName);//删除掉老的 |
| | | ClearAll(); |
| | | //for (int i = 1; i <= 8; i++) |
| | | //{ |
| | | // //var theSectionParam = bundle.ToSectionShapePara(i); |
| | | |
| | | // //double dGama_Left, dGama_Right, dH, dR_out, dR_Left, dR_Right, 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; |
| | | // //dBaseWidth = theSectionParam.BaseWidth; |
| | | // //dBaseCircleRadius = theSectionParam.BaseCircleRadius; |
| | | // int nIndex = i; |
| | | |
| | | // string wstrShapeNameI = wstrName + nIndex.ToString() + "(" + (m_nSectionNum++).ToString() + ")"; |
| | | // pDisplayView.DeleteObject(wstrShapeNameI);//删除掉老的 |
| | | //} |
| | | } |
| | | |
| | | pDisplayView.Update3DViews(_is3D); |
| | | |
| | | double dStartAngle = -HydrDisplayEngineBridge.PI_4; |
| | | |
| | | double dDetAngle = 2 * HydrDisplayEngineBridge.PI / 8; |
| | |
| | | dR_Right = theSectionParam.R_Right; |
| | | dBaseWidth = theSectionParam.BaseWidth; |
| | | dBaseCircleRadius = theSectionParam.BaseCircleRadius; |
| | | int nIndex = theSectionParam.Index; |
| | | string wstrShapeNameI = wstrName + nIndex.ToString() + "(" + (m_nSectionNum++).ToString() + ")"; |
| | | pDisplayView.DeleteObject(wstrShapeNameI);//删除掉老的 |
| | | |
| | | //int nIndex = theSectionParam.Index; |
| | | |
| | | HydrGeomSection pHydrGeomCurve = new HydrGeomSection(); |
| | | string wstrShapeNameI = wstrName + i.ToString() + "(" + (m_nSectionNum++).ToString() + ")"; |
| | | |
| | | |
| | | HydrProperties theHydrProperties = new HydrProperties(); |
| | | theHydrProperties.SetShapeName(wstrShapeNameI); |
| | | pHydrGeomCurve.SetHydrProperties(theHydrProperties); |
| | | pHydrGeomCurve.SetGeomSection(dGama_Left, dGama_Right, dH, dR_out, dR_Left, dR_Right, dBaseWidth, dBaseCircleRadius); |
| | | if (_is3D) |
| | | HydrGeomCurve theHydrGeomCurve = HydrDisplayEngineBridge.CreateGeomCurve(HydrCurveType.EHydrGeomSection); |
| | | HydrGeomSection pHydrGeomCurve = theHydrGeomCurve as HydrGeomSection; |
| | | if (pHydrGeomCurve == null) |
| | | { |
| | | double dAngle = i * dDetAngle + dStartAngle; |
| | | BcGeMatrix theMatrix = BcGeMatrix.translate(0, dBaseCircleRadius, 0); |
| | | BcGeMatrix theMatrix1 = BcGeMatrix.rotate(-dAngle, 1.0, 0.0, 0.0); |
| | | theMatrix.postMult(theMatrix1); |
| | | pHydrGeomCurve.SetMatrix(theMatrix); |
| | | continue; |
| | | } |
| | | |
| | | pDisplayView.addVoluteCurve(i, pHydrGeomCurve); |
| | | |
| | | |
| | | |
| | | theHydrProperties.SetShapeName(wstrShapeNameI); |
| | | pHydrGeomCurve.SetHydrProperties(theHydrProperties); |
| | | pHydrGeomCurve.SetGeomSection(dGama_Left, dGama_Right, dH, dR_out, dR_Left, dR_Right, dBaseWidth, dBaseCircleRadius); |
| | | if (_is3D) |
| | | { |
| | | double dAngle = i * dDetAngle + dStartAngle; |
| | | BcGeMatrix theMatrix = BcGeMatrix.translate(0, dBaseCircleRadius, 0); |
| | | BcGeMatrix theMatrix1 = BcGeMatrix.rotate(-dAngle, 1.0, 0.0, 0.0); |
| | | theMatrix.postMult(theMatrix1); |
| | | pHydrGeomCurve.SetMatrix(theMatrix); |
| | | } |
| | | |
| | | pDisplayView.addVoluteCurve(i, pHydrGeomCurve); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | Invalidate(true); |
| | | pDisplayView.FitAll3DViews(true); |
| | | } |
| | | isFirst = false; |
| | | } |
| | | |
| | | // |