]> SALOME platform Git repositories - plugins/hybridplugin.git/commitdiff
Salome HOME
0021238: EDF 1817 SMESH: GHS3D on quadratic meshes
authoreap <eap@opencascade.com>
Tue, 10 May 2011 13:30:19 +0000 (13:30 +0000)
committereap <eap@opencascade.com>
Tue, 10 May 2011 13:30:19 +0000 (13:30 +0000)
   not to create nodes inside already meshed domains of imported mesh

src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx

index 6ec26e4e05638a5bf5c3bba695e0f661b83f537c..6e438fe43c75f95d6ab84f18024237aea7e15207 100644 (file)
@@ -1046,7 +1046,7 @@ static bool readGMFFile(const char*                     theFile,
     else
       continue;
 
-    int id[nbElem*tabRef[token]]; // node ids
+    vector<int> 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;