From 5b54cf448fe4d044f4e8548df0151c9278e133d7 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 8 May 2008 12:36:17 +0000 Subject: [PATCH] PAL19680 Meshers: BLSURF, GHS3D and holed shapes do not call findShapeID() if nb subdomains == 1 --- src/GHS3DPlugin_GHS3D.cxx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin_GHS3D.cxx index 176d247..cea8df1 100644 --- a/src/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin_GHS3D.cxx @@ -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; -- 2.39.2