From: eap Date: Tue, 10 May 2011 13:30:19 +0000 (+0000) Subject: 0021238: EDF 1817 SMESH: GHS3D on quadratic meshes X-Git-Tag: V6_3_0~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f6da709a6f7f475cf69dc174bfdb688b2de353db;p=plugins%2Fhybridplugin.git 0021238: EDF 1817 SMESH: GHS3D on quadratic meshes not to create nodes inside already meshed domains of imported mesh --- diff --git a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx index 6ec26e4..6e438fe 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx @@ -1046,7 +1046,7 @@ static bool readGMFFile(const char* theFile, else continue; - int id[nbElem*tabRef[token]]; // node ids + vector id (nbElem*tabRef[token]); // node ids if (token == GmfVertices) { std::cout << " vertices" << std::endl; @@ -1086,12 +1086,34 @@ static bool readGMFFile(const char* theFile, if (ver == GmfFloat) { GmfGetLin(InpMsh, token, &VerTab_f[nbElem][0], &VerTab_f[nbElem][1], &VerTab_f[nbElem][2], &dummy); if (iElem >= nbInitialNodes) - aGMFNode = theMeshDS->AddNode(VerTab_f[nbElem][0], VerTab_f[nbElem][1], VerTab_f[nbElem][2]); + { + if ( elemSearcher && + elemSearcher->FindElementsByPoint( gp_Pnt(VerTab_f[nbElem][0], + VerTab_f[nbElem][1], + VerTab_f[nbElem][2]), + SMDSAbs_Volume, foundVolumes )) + aGMFNode = 0; + else + aGMFNode = theMeshDS->AddNode(VerTab_f[nbElem][0], + VerTab_f[nbElem][1], + VerTab_f[nbElem][2]); + } } else { GmfGetLin(InpMsh, token, &VerTab_d[nbElem][0], &VerTab_d[nbElem][1], &VerTab_d[nbElem][2], &dummy); if (iElem >= nbInitialNodes) - aGMFNode = theMeshDS->AddNode(VerTab_d[nbElem][0], VerTab_d[nbElem][1], VerTab_d[nbElem][2]); + { + if ( elemSearcher && + elemSearcher->FindElementsByPoint( gp_Pnt(VerTab_d[nbElem][0], + VerTab_d[nbElem][1], + VerTab_d[nbElem][2]), + SMDSAbs_Volume, foundVolumes )) + aGMFNode = 0; + else + aGMFNode = theMeshDS->AddNode(VerTab_d[nbElem][0], + VerTab_d[nbElem][1], + VerTab_d[nbElem][2]); + } } if (iElem >= nbInitialNodes) { GMFNode[ aGMFID ] = aGMFNode;