From: eap Date: Tue, 1 Feb 2011 15:18:58 +0000 (+0000) Subject: make proxy mesh die before reading wrong input elements to avoid X-Git-Tag: Start_BR_19998_21191~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e54d7565b6d2a5eda6b865f089b9cfca4998b722;p=plugins%2Fghs3dplugin.git make proxy mesh die before reading wrong input elements to avoid finding temporary faces --- diff --git a/src/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin_GHS3D.cxx index 0c8b8da..8743388 100644 --- a/src/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin_GHS3D.cxx @@ -1486,18 +1486,18 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh& theMesh, } vector aNodeByGhs3dId; - - SMESH_ProxyMesh::Ptr proxyMesh( new SMESH_ProxyMesh( theMesh )); - if ( theMesh.NbQuadrangles() > 0 ) { - StdMeshers_QuadToTriaAdaptor* aQuad2Trias = new StdMeshers_QuadToTriaAdaptor; - aQuad2Trias->Compute( theMesh ); - proxyMesh.reset( aQuad2Trias ); - } + SMESH_ProxyMesh::Ptr proxyMesh( new SMESH_ProxyMesh( theMesh )); + if ( theMesh.NbQuadrangles() > 0 ) + { + StdMeshers_QuadToTriaAdaptor* aQuad2Trias = new StdMeshers_QuadToTriaAdaptor; + aQuad2Trias->Compute( theMesh ); + proxyMesh.reset( aQuad2Trias ); + } - Ok = (writeFaces ( aFacesFile, *proxyMesh, aNodeByGhs3dId ) && - writePoints( aPointsFile, &theMesh, aNodeByGhs3dId,enforcedVertices)); - + Ok = (writeFaces ( aFacesFile, *proxyMesh, aNodeByGhs3dId ) && + writePoints( aPointsFile, &theMesh, aNodeByGhs3dId,enforcedVertices)); + } aFacesFile.close(); aPointsFile.close();