X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHexoticPlugin%2FHexoticPlugin_Hexotic.cxx;fp=src%2FHexoticPlugin%2FHexoticPlugin_Hexotic.cxx;h=887e868203299c65f360a84dd792bb3c6152b98f;hb=7a62de42e4a246dfeaade4ee0d420b0a5778c3f1;hp=8af68a4dede882731728113808f7bb9098e6cdeb;hpb=419211efc5d689fb349c8211c0805a194a4f29e5;p=plugins%2Fhexoticplugin.git diff --git a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx index 8af68a4..887e868 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx +++ b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx @@ -455,15 +455,17 @@ static bool readResult(MG_Hexotic_API* theHexaOutput, int ver, dim; int meshID = theHexaOutput->GmfOpenMesh( theFile, GmfRead, &ver, &dim ); + int nbVerticesInShape = countShape( theMesh, TopAbs_VERTEX ); int nbVertices = getNbShape(theHexaOutput, meshID, GmfVertices ); - int nbCorners = getNbShape(theHexaOutput, meshID, GmfCorners, countShape( theMesh, TopAbs_VERTEX )); + int nbCorners = getNbShape(theHexaOutput, meshID, GmfCorners, nbVerticesInShape); if ( nbVertices == 0 ) return false; tabCorner.resize( nbCorners ); HexoticNode.resize( nbVertices + 1 ); - if ( nbCorners > 0 ) + // get the shape vertices if the mesh lies on a shape (and this shape has corners) + if ( nbCorners > 0 && nbVerticesInShape > 0 ) getShape( theMeshDS, TopAbs_VERTEX, tabCorner.data() ); int nbNodes = theHexaOutput->GmfStatKwd( meshID, GmfVertices );