From e28884f9e3cbdc653b16d8e68ded170b68203efb Mon Sep 17 00:00:00 2001 From: ouv Date: Tue, 9 Jun 2009 08:27:02 +0000 Subject: [PATCH] Fix of issue 0020379: EDF SMESH 1047: Impossible to select pentahedrons when creating mesh volume groups --- src/Controls/SMESH_Controls.cxx | 12 ++++++------ src/SMDS/SMDSAbs_ElementType.hxx | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index e6946a84a..2ae7f399b 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -1955,22 +1955,22 @@ bool ElemGeomType::IsSatisfy( long theId ) case SMDSAbs_Face: if ( myGeomType == SMDSGeom_TRIANGLE ) - isOk = (!anElem->IsPoly() && aNbNode == 3); + isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 6 : aNbNode == 3)); else if ( myGeomType == SMDSGeom_QUADRANGLE ) - isOk = (!anElem->IsPoly() && aNbNode == 4); + isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 8 : aNbNode == 4)); else if ( myGeomType == SMDSGeom_POLYGON ) isOk = anElem->IsPoly(); break; case SMDSAbs_Volume: if ( myGeomType == SMDSGeom_TETRA ) - isOk = (!anElem->IsPoly() && aNbNode == 4); + isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 10 : aNbNode == 4)); else if ( myGeomType == SMDSGeom_PYRAMID ) - isOk = (!anElem->IsPoly() && aNbNode == 5); + isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 13 : aNbNode == 5)); else if ( myGeomType == SMDSGeom_PENTA ) - isOk = (!anElem->IsPoly() && aNbNode == 6); + isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 15 : aNbNode == 6)); else if ( myGeomType == SMDSGeom_HEXA ) - isOk = (!anElem->IsPoly() && aNbNode == 8); + isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 20 : aNbNode == 8)); else if ( myGeomType == SMDSGeom_POLYHEDRA ) isOk = anElem->IsPoly(); break; diff --git a/src/SMDS/SMDSAbs_ElementType.hxx b/src/SMDS/SMDSAbs_ElementType.hxx index a76772e3f..2a5d8e3ba 100644 --- a/src/SMDS/SMDSAbs_ElementType.hxx +++ b/src/SMDS/SMDSAbs_ElementType.hxx @@ -53,8 +53,8 @@ enum SMDSAbs_GeometryType // 3D element SMDSGeom_TETRA, SMDSGeom_PYRAMID, - SMDSGeom_PENTA, SMDSGeom_HEXA, + SMDSGeom_PENTA, SMDSGeom_POLYHEDRA, }; -- 2.39.2