]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
For IMP 16155: use BRep_Tool::IsClosed() instead of TopoDS_Shape::Closed().
authorjfa <jfa@opencascade.com>
Thu, 2 Oct 2008 06:43:10 +0000 (06:43 +0000)
committerjfa <jfa@opencascade.com>
Thu, 2 Oct 2008 06:43:10 +0000 (06:43 +0000)
src/SMESH/SMESH_subMesh.cxx
src/SMESHGUI/SMESHGUI_MeshOp.cxx

index 704703404d0e8003b4fa4a9d3645f75bcba37dc8..85a1bcda9e37114b81edbabfbfe692ae170e4d92 100644 (file)
@@ -513,7 +513,8 @@ bool SMESH_subMesh::CanAddHypothesis(const SMESH_Hypothesis* theHypothesis) cons
   int aShapeDim = SMESH_Gen::GetShapeDim(_subShape);
   if (aHypDim == 3 && aShapeDim == 3) {
     // check case of open shell
-    if (_subShape.ShapeType() == TopAbs_SHELL && !_subShape.Closed())
+    //if (_subShape.ShapeType() == TopAbs_SHELL && !_subShape.Closed())
+    if (_subShape.ShapeType() == TopAbs_SHELL && !BRep_Tool::IsClosed(_subShape))
       return false;
   }
   if ( aHypDim <= aShapeDim )
index 1aeacf8048ff43c29ddfbf33b49d2aeb66c00963..fbe5bae2707399a02c498bf6d83c0c34896f253e 100644 (file)
@@ -65,6 +65,7 @@
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Shell.hxx>
 #include <TopExp_Explorer.hxx>
+#include <BRep_Tool.hxx>
 
 // IDL includes
 #include <SALOMEconfig.h>
@@ -509,7 +510,7 @@ void SMESHGUI_MeshOp::selectionDone()
               shapeDim = (shapeDim < 2) ? 2 : shapeDim;
               TopoDS_Shape aShape;
               if (GEOMBase::GetShape(aGeomVar, aShape)) {
-                if (aShape.Closed())
+                if (/*aShape.Closed()*/BRep_Tool::IsClosed(aShape))
                   shapeDim = 3;
               }
             }
@@ -527,7 +528,7 @@ void SMESHGUI_MeshOp::selectionDone()
                   //shapeDim = 3; // Bug 0016155: EDF PAL 447: If the shape is a Shell, disable 3D tab
                   shapeDim = (shapeDim < 2) ? 2 : shapeDim;
                   for (; exp.More() && shapeDim == 2; exp.Next()) {
-                    if (exp.Current().Closed())
+                    if (/*exp.Current().Closed()*/BRep_Tool::IsClosed(exp.Current()))
                       shapeDim = 3;
                   }
                 }