Salome HOME
PAL21717: default values of hypothesis for sub-mesh
authoreap <eap@opencascade.com>
Tue, 27 Apr 2010 09:42:53 +0000 (09:42 +0000)
committereap <eap@opencascade.com>
Tue, 27 Apr 2010 09:42:53 +0000 (09:42 +0000)
   Use default hyp value if submesh is not meshed

src/SMESHGUI/SMESHGUI_MeshOp.cxx

index ab3fb061162c08f0a25732788bba9a7eaefe8e40..1739b419c7dcab07e1efe08b281f8210985cec5f 100644 (file)
@@ -946,12 +946,19 @@ SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType,
     }
   }
 
-  return SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(),
-                                                                aServerLib.toLatin1().data(),
-                                                                aMeshVar,
-                                                                aGeomVar,
-                                                                /*byMesh = */isSubMesh);
-
+  SMESH::SMESH_Hypothesis_var hyp =
+    SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(),
+                                                           aServerLib.toLatin1().data(),
+                                                           aMeshVar,
+                                                           aGeomVar,
+                                                           /*byMesh = */isSubMesh);
+  if ( hyp->_is_nil() && isSubMesh )
+    hyp = SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(),
+                                                                 aServerLib.toLatin1().data(),
+                                                                 aMeshVar,
+                                                                 aGeomVar,
+                                                                 /*byMesh = */false);
+  return hyp;
 }
 
 //================================================================================