mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
0021106: EDF 1691 SMESH: MEsh.Group(SubShape) fails on Shells
Forbid 3D mesh on the SHELL
This commit is contained in:
parent
cf76763e47
commit
f95be2abe0
@ -931,7 +931,7 @@ int SMESH_Gen::GetShapeDim(const TopAbs_ShapeEnum & aShapeType)
|
||||
dim[ TopAbs_COMPOUND ] = MeshDim_3D;
|
||||
dim[ TopAbs_COMPSOLID ] = MeshDim_3D;
|
||||
dim[ TopAbs_SOLID ] = MeshDim_3D;
|
||||
dim[ TopAbs_SHELL ] = MeshDim_3D;
|
||||
dim[ TopAbs_SHELL ] = MeshDim_2D;
|
||||
dim[ TopAbs_FACE ] = MeshDim_2D;
|
||||
dim[ TopAbs_WIRE ] = MeshDim_1D;
|
||||
dim[ TopAbs_EDGE ] = MeshDim_1D;
|
||||
|
@ -510,12 +510,13 @@ 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())
|
||||
if (_subShape.ShapeType() == TopAbs_SHELL && !BRep_Tool::IsClosed(_subShape))
|
||||
return false;
|
||||
}
|
||||
// issue 21106. Forbid 3D mesh on the SHELL
|
||||
// if (aHypDim == 3 && aShapeDim == 3) {
|
||||
// // check case of open shell
|
||||
// //if (_subShape.ShapeType() == TopAbs_SHELL && !_subShape.Closed())
|
||||
// if (_subShape.ShapeType() == TopAbs_SHELL && !BRep_Tool::IsClosed(_subShape))
|
||||
// return false;
|
||||
// }
|
||||
if ( aHypDim <= aShapeDim )
|
||||
return true;
|
||||
|
||||
@ -531,8 +532,14 @@ bool SMESH_subMesh::IsApplicableHypotesis(const SMESH_Hypothesis* theHypothesis,
|
||||
const TopAbs_ShapeEnum theShapeType)
|
||||
{
|
||||
if ( theHypothesis->GetType() > SMESHDS_Hypothesis::PARAM_ALGO)
|
||||
{
|
||||
// algorithm
|
||||
return ( theHypothesis->GetShapeType() & (1<< theShapeType));
|
||||
if ( theHypothesis->GetShapeType() & (1<< theShapeType))
|
||||
// issue 21106. Forbid 3D mesh on the SHELL
|
||||
return !( theHypothesis->GetDim() == 3 && theShapeType == TopAbs_SHELL );
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
// hypothesis
|
||||
switch ( theShapeType ) {
|
||||
|
Loading…
Reference in New Issue
Block a user