From 1ca6e4a68932757aa5bac6dd4d7d197465651203 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 30 Apr 2008 16:46:28 +0000 Subject: [PATCH] PAL19680 CEA 4.1.2: Meshers: BLSURF, GHS3D and holed shapes add debug test on nb of solids with assigned tetras --- src/GHS3DPlugin_GHS3D.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin_GHS3D.cxx index ec8738a..fafbdeb 100644 --- a/src/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin_GHS3D.cxx @@ -533,6 +533,9 @@ static bool readResultFile(const int fileOpen, SMDS_MeshNode * aNewNode; map ::iterator itOnNode; SMDS_MeshElement* aTet; +#ifdef _DEBUG_ + set shapeIDs; +#endif for (int i=0; iSetMeshElementOnShape( aTet, shapeID ); +#ifdef _DEBUG_ + shapeIDs.insert( shapeID ); +#endif } if ( nbElems ) cout << nbElems << " tetrahedrons have been associated to " << nbShape << " shapes" << endl; @@ -642,6 +648,17 @@ static bool readResultFile(const int fileOpen, delete [] node; delete [] nodeAssigne; +#ifdef _DEBUG_ + if ( shapeIDs.size() != nbShape ) { + cout << "Only " << shapeIDs.size() << " solids of " << nbShape << " found" << endl; + for (int i=0; iShapeToIndex( tabShape[i] ); + if ( shapeIDs.find( shapeID ) == shapeIDs.end() ) + cout << " Solid #" << shapeID << " not found" << endl; + } + } +#endif + return true; } -- 2.39.2