tangxu
2024-11-07 4546b652e6de456dcf040bf751047f7c06bc5675
WinFrmUI/DPumpHydr.WinFrmUI.Volute/Occ/OccDesignCtrl.cs
@@ -150,6 +150,11 @@
        private bool _is3D = true;
        string strTurbopumpTopoShapeName = "蜗壳设计1" ;
        public void ClearAll()
        {
            pDisplayView.DeleteObject(strTurbopumpTopoShapeName);
            pDisplayView.addTurbopumpTopoShape(strTurbopumpTopoShapeName);
        }
        public  void Initial(bool is3D)
        {        
            this._is3D = is3D;
@@ -170,6 +175,7 @@
            //OnBuildsolidbutton();
        }
 
        bool isFirst = true;
        /// <summary>
        /// 
        /// </summary>
@@ -177,8 +183,34 @@
        /// <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;
@@ -195,13 +227,21 @@
                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;
                string wstrShapeNameI = wstrName + i.ToString() + "(" + (m_nSectionNum++).ToString() + ")";
               
                HydrGeomSection pHydrGeomCurve = new HydrGeomSection();
                HydrProperties theHydrProperties = new HydrProperties();
                HydrGeomCurve theHydrGeomCurve = HydrDisplayEngineBridge.CreateGeomCurve(HydrCurveType.EHydrGeomSection);
                HydrGeomSection pHydrGeomCurve = theHydrGeomCurve as HydrGeomSection;
                if (pHydrGeomCurve == null)
                {
                    continue;
                }
                theHydrProperties.SetShapeName(wstrShapeNameI);
                pHydrGeomCurve.SetHydrProperties(theHydrProperties);
                pHydrGeomCurve.SetGeomSection(dGama_Left, dGama_Right, dH, dR_out, dR_Left, dR_Right, dBaseWidth, dBaseCircleRadius);
@@ -215,6 +255,10 @@
                }
            
                pDisplayView.addVoluteCurve(i, pHydrGeomCurve);
            }
@@ -227,6 +271,7 @@
                Invalidate(true);
                pDisplayView.FitAll3DViews(true);
            }
            isFirst = false;
        }
   
        //