From: jfa Date: Thu, 2 Oct 2008 06:43:10 +0000 (+0000) Subject: For IMP 16155: use BRep_Tool::IsClosed() instead of TopoDS_Shape::Closed(). X-Git-Tag: V5_1_0a3~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=27ea448bbb3868b259879734bf4791be85467747;p=modules%2Fsmesh.git For IMP 16155: use BRep_Tool::IsClosed() instead of TopoDS_Shape::Closed(). --- diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 704703404..85a1bcda9 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -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 ) diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 1aeacf804..fbe5bae27 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -65,6 +65,7 @@ #include #include #include +#include // IDL includes #include @@ -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; } }