small imp

This commit is contained in:
eap 2013-08-28 11:56:36 +00:00
parent 47da75254e
commit 059b9c819d

View File

@ -887,17 +887,19 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
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",
@ -906,7 +908,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
"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 ];
}
}