]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESH/SMESH_subMesh.cxx
Salome HOME
Bug 0016155: EDF PAL 447: If the shape is a Shell, disable 3D tab.
[modules/smesh.git] / src / SMESH / SMESH_subMesh.cxx
index 756a76899cc464a304d03afbd5044c47e9ccd0d9..644c6fbfae139e2f8cb2e12ed229c66eac3fe762 100644 (file)
@@ -498,6 +498,11 @@ bool SMESH_subMesh::CanAddHypothesis(const SMESH_Hypothesis* theHypothesis) cons
 {
   int aHypDim   = theHypothesis->GetDim();
   int aShapeDim = SMESH_Gen::GetShapeDim(_subShape);
+  if (aHypDim == 3 && aShapeDim == 3) {
+    // check case of open shell
+    if (_subShape.ShapeType() == TopAbs_SHELL && !_subShape.Closed())
+      return false;
+  }
   if ( aHypDim <= aShapeDim )
     return true;