]> SALOME platform Git repositories - plugins/hybridplugin.git/commitdiff
Salome HOME
PAL19680 Meshers: BLSURF, GHS3D and holed shapes
authoreap <eap@opencascade.com>
Thu, 8 May 2008 12:36:17 +0000 (12:36 +0000)
committereap <eap@opencascade.com>
Thu, 8 May 2008 12:36:17 +0000 (12:36 +0000)
     do not call findShapeID() if nb subdomains == 1

src/GHS3DPlugin_GHS3D.cxx

index 176d2476ee352344a80dc559f0165741266a5ac9..cea8df114a305f56c11cc3277ec2aca5e5adf4c6 100644 (file)
@@ -690,17 +690,19 @@ static bool readResultFile(const int                       fileOpen,
     int nodeId1 = strtol(ptr, &ptr, 10);
     int nodeId2 = strtol(ptr, &ptr, 10);
     int nodeId3 = strtol(ptr, &ptr, 10);
-    const SMDS_MeshNode* n1 = theGhs3dIdToNodeMap[ nodeId1 ];
-    const SMDS_MeshNode* n2 = theGhs3dIdToNodeMap[ nodeId2 ];
-    const SMDS_MeshNode* n3 = theGhs3dIdToNodeMap[ nodeId3 ];
-    try {
-      OCC_CATCH_SIGNALS;
-      tabID[i] = findShapeID( theMesh, n1, n2, n3 );
+    if ( nbTriangle > 1 ) {
+      const SMDS_MeshNode* n1 = theGhs3dIdToNodeMap[ nodeId1 ];
+      const SMDS_MeshNode* n2 = theGhs3dIdToNodeMap[ nodeId2 ];
+      const SMDS_MeshNode* n3 = theGhs3dIdToNodeMap[ nodeId3 ];
+      try {
+        OCC_CATCH_SIGNALS;
+        tabID[i] = findShapeID( theMesh, n1, n2, n3 );
 #ifdef _DEBUG_
-      cout << i+1 << " subdomain: findShapeID() returns " << tabID[i] << endl;
+        cout << i+1 << " subdomain: findShapeID() returns " << tabID[i] << endl;
 #endif
-    } catch ( Standard_Failure ) {
-    } catch (...) {}
+      } catch ( Standard_Failure ) {
+      } catch (...) {}
+    }
   }
 
   shapePtr = ptr;