if ( Type == "SMESH.FT_ElemGeomType" )
{
// set SMESH.GeometryType instead of a numerical Threshold
- const char* types[SMESH::Geom_BALL+1] = {
+ const int nbTypes = SMESH::Geom_BALL+1;
+ const char* types[nbTypes] = {
"Geom_POINT", "Geom_EDGE", "Geom_TRIANGLE", "Geom_QUADRANGLE", "Geom_POLYGON",
"Geom_TETRA", "Geom_PYRAMID", "Geom_HEXA", "Geom_PENTA", "Geom_HEXAGONAL_PRISM",
"Geom_POLYHEDRA", "Geom_BALL" };
- if ( -1 < iGeom && iGeom < SMESH::Geom_POLYHEDRA+1 )
+ if ( -1 < iGeom && iGeom < nbTypes )
Threshold = SMESH + types[ iGeom ];
}
if (Type == "SMESH.FT_EntityType")
{
// set SMESH.EntityType instead of a numerical Threshold
- const char* types[SMESH::Entity_Ball+1] = {
+ const int nbTypes = SMESH::Entity_Ball+1;
+ const char* types[nbTypes] = {
"Entity_Node", "Entity_0D", "Entity_Edge", "Entity_Quad_Edge",
"Entity_Triangle", "Entity_Quad_Triangle", "Entity_BiQuad_Triangle",
"Entity_Quadrangle", "Entity_Quad_Quadrangle", "Entity_BiQuad_Quadrangle",
"Entity_Hexa", "Entity_Quad_Hexa", "Entity_TriQuad_Hexa",
"Entity_Penta", "Entity_Quad_Penta", "Entity_Hexagonal_Prism",
"Entity_Polyhedra", "Entity_Quad_Polyhedra", "Entity_Ball" };
- if ( -1 < iGeom && iGeom < SMESH::Entity_Quad_Polyhedra+1 )
+ if ( -1 < iGeom && iGeom < nbTypes )
Threshold = SMESH + types[ iGeom ];
}
}