]> SALOME platform Git repositories - plugins/hybridplugin.git/commitdiff
Salome HOME
make proxy mesh die before reading wrong input elements to avoid
authoreap <eap@opencascade.com>
Tue, 1 Feb 2011 15:18:58 +0000 (15:18 +0000)
committereap <eap@opencascade.com>
Tue, 1 Feb 2011 15:18:58 +0000 (15:18 +0000)
finding temporary faces

src/GHS3DPlugin_GHS3D.cxx

index 0c8b8da4589d606911fc576eb40f534d6792c480..87433884af13fc1f4cc5426f6f205f81702aae19 100644 (file)
@@ -1486,18 +1486,18 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh&         theMesh,
   }
 
   vector <const SMDS_MeshNode*> 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();