Salome HOME
0021197: EDF 1772 SMESH: Automatic meshing hypothesis
authoreap <eap@opencascade.com>
Fri, 11 Mar 2011 13:17:33 +0000 (13:17 +0000)
committereap <eap@opencascade.com>
Fri, 11 Mar 2011 13:17:33 +0000 (13:17 +0000)
-  myDlg->setHypoSets( SMESH::GetHypothesesSets() );
+  myDlg->setHypoSets( SMESH::GetHypothesesSets( shapeDim ));

src/SMESHGUI/SMESHGUI_MeshOp.cxx

index 70334610ee8b33277cc73cd6ccd6ea3408dc6a23..5409b8fae78ad62e4ae5dbe5755cce36fee3398a 100644 (file)
@@ -240,8 +240,6 @@ void SMESHGUI_MeshOp::startOperation()
   else
     myDlg->activateObject( SMESHGUI_MeshDlg::Obj );
 
-  myDlg->setHypoSets( SMESH::GetHypothesesSets() );
-
   myDlg->setCurrentTab( SMESH::DIM_3D );
   myDlg->show();
 
@@ -513,7 +511,7 @@ void SMESHGUI_MeshOp::selectionDone()
             {
               //shapeDim = 3; // Bug 0016155: EDF PAL 447: If the shape is a Shell, disable 3D tab
               TopoDS_Shape aShape;
-             bool isClosed = GEOMBase::GetShape(aGeomVar, aShape) && /*aShape.Closed()*/BRep_Tool::IsClosed(aShape);
+              bool isClosed = GEOMBase::GetShape(aGeomVar, aShape) && /*aShape.Closed()*/BRep_Tool::IsClosed(aShape);
               shapeDim = qMax(isClosed ? 3 : 2, shapeDim);
             }
             break;
@@ -550,7 +548,7 @@ void SMESHGUI_MeshOp::selectionDone()
         onAlgoSelected(-1, i);
       }
       myDlg->setMaxHypoDim( shapeDim );
-
+      myDlg->setHypoSets( SMESH::GetHypothesesSets( shapeDim ));
 
       if (!myToCreate) // edition: read hypotheses
       {
@@ -620,7 +618,7 @@ void SMESHGUI_MeshOp::selectionDone()
         myDlg->setGeomPopupEnabled( enable );
       }
     }
-    else {
+    else { // no geometry defined
       myDlg->enableTab( SMESH::DIM_3D );
       QStringList hypList;
       availableHyps( SMESH::DIM_3D, Algo, hypList,
@@ -1882,7 +1880,6 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
       {
         // Get hypotheses creator client (GUI)
         // BUG 0020378
-        //SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHypName);
         SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHypName);
 
         // Create algorithm