Fix of issue 0020379: EDF SMESH 1047: Impossible to select pentahedrons when creating mesh volume groups

This commit is contained in:
ouv 2009-06-09 08:27:02 +00:00
parent 8bdfcf6b27
commit e28884f9e3
2 changed files with 7 additions and 7 deletions

View File

@ -1955,22 +1955,22 @@ bool ElemGeomType::IsSatisfy( long theId )
case SMDSAbs_Face: case SMDSAbs_Face:
if ( myGeomType == SMDSGeom_TRIANGLE ) if ( myGeomType == SMDSGeom_TRIANGLE )
isOk = (!anElem->IsPoly() && aNbNode == 3); isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 6 : aNbNode == 3));
else if ( myGeomType == SMDSGeom_QUADRANGLE ) else if ( myGeomType == SMDSGeom_QUADRANGLE )
isOk = (!anElem->IsPoly() && aNbNode == 4); isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 8 : aNbNode == 4));
else if ( myGeomType == SMDSGeom_POLYGON ) else if ( myGeomType == SMDSGeom_POLYGON )
isOk = anElem->IsPoly(); isOk = anElem->IsPoly();
break; break;
case SMDSAbs_Volume: case SMDSAbs_Volume:
if ( myGeomType == SMDSGeom_TETRA ) if ( myGeomType == SMDSGeom_TETRA )
isOk = (!anElem->IsPoly() && aNbNode == 4); isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 10 : aNbNode == 4));
else if ( myGeomType == SMDSGeom_PYRAMID ) else if ( myGeomType == SMDSGeom_PYRAMID )
isOk = (!anElem->IsPoly() && aNbNode == 5); isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 13 : aNbNode == 5));
else if ( myGeomType == SMDSGeom_PENTA ) else if ( myGeomType == SMDSGeom_PENTA )
isOk = (!anElem->IsPoly() && aNbNode == 6); isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 15 : aNbNode == 6));
else if ( myGeomType == SMDSGeom_HEXA ) else if ( myGeomType == SMDSGeom_HEXA )
isOk = (!anElem->IsPoly() && aNbNode == 8); isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 20 : aNbNode == 8));
else if ( myGeomType == SMDSGeom_POLYHEDRA ) else if ( myGeomType == SMDSGeom_POLYHEDRA )
isOk = anElem->IsPoly(); isOk = anElem->IsPoly();
break; break;

View File

@ -53,8 +53,8 @@ enum SMDSAbs_GeometryType
// 3D element // 3D element
SMDSGeom_TETRA, SMDSGeom_TETRA,
SMDSGeom_PYRAMID, SMDSGeom_PYRAMID,
SMDSGeom_PENTA,
SMDSGeom_HEXA, SMDSGeom_HEXA,
SMDSGeom_PENTA,
SMDSGeom_POLYHEDRA, SMDSGeom_POLYHEDRA,
}; };