mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-06 03:54:16 +05:00
For IMP 16155: use BRep_Tool::IsClosed() instead of TopoDS_Shape::Closed().
This commit is contained in:
parent
591c0c3f5c
commit
27ea448bbb
@ -513,7 +513,8 @@ bool SMESH_subMesh::CanAddHypothesis(const SMESH_Hypothesis* theHypothesis) cons
|
|||||||
int aShapeDim = SMESH_Gen::GetShapeDim(_subShape);
|
int aShapeDim = SMESH_Gen::GetShapeDim(_subShape);
|
||||||
if (aHypDim == 3 && aShapeDim == 3) {
|
if (aHypDim == 3 && aShapeDim == 3) {
|
||||||
// check case of open shell
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
if ( aHypDim <= aShapeDim )
|
if ( aHypDim <= aShapeDim )
|
||||||
|
@ -65,6 +65,7 @@
|
|||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopoDS_Shell.hxx>
|
#include <TopoDS_Shell.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
|
#include <BRep_Tool.hxx>
|
||||||
|
|
||||||
// IDL includes
|
// IDL includes
|
||||||
#include <SALOMEconfig.h>
|
#include <SALOMEconfig.h>
|
||||||
@ -509,7 +510,7 @@ void SMESHGUI_MeshOp::selectionDone()
|
|||||||
shapeDim = (shapeDim < 2) ? 2 : shapeDim;
|
shapeDim = (shapeDim < 2) ? 2 : shapeDim;
|
||||||
TopoDS_Shape aShape;
|
TopoDS_Shape aShape;
|
||||||
if (GEOMBase::GetShape(aGeomVar, aShape)) {
|
if (GEOMBase::GetShape(aGeomVar, aShape)) {
|
||||||
if (aShape.Closed())
|
if (/*aShape.Closed()*/BRep_Tool::IsClosed(aShape))
|
||||||
shapeDim = 3;
|
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 = 3; // Bug 0016155: EDF PAL 447: If the shape is a Shell, disable 3D tab
|
||||||
shapeDim = (shapeDim < 2) ? 2 : shapeDim;
|
shapeDim = (shapeDim < 2) ? 2 : shapeDim;
|
||||||
for (; exp.More() && shapeDim == 2; exp.Next()) {
|
for (; exp.More() && shapeDim == 2; exp.Next()) {
|
||||||
if (exp.Current().Closed())
|
if (/*exp.Current().Closed()*/BRep_Tool::IsClosed(exp.Current()))
|
||||||
shapeDim = 3;
|
shapeDim = 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user