]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Correct for case of _EDF_NODE_IDS_
authorjfa <jfa@opencascade.com>
Mon, 21 Feb 2005 14:48:43 +0000 (14:48 +0000)
committerjfa <jfa@opencascade.com>
Mon, 21 Feb 2005 14:48:43 +0000 (14:48 +0000)
src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx
src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx

index 89a1a7bd41d5272bd0aad4826a3b4117ef70093e..1a00746042374f9401e848c6196d5c0c1f2c0e43 100644 (file)
@@ -286,9 +286,24 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
                 TInt aCurrPG_FirstNodeIndex = aIndex[iPG] - 1;
                 int nbNodes = aPolygoneInfo->GetNbConn(iPG);
                 std::vector<int> nodes_ids (nbNodes);
-                for (TInt inode = 0; inode < nbNodes; inode++) {
-                  nodes_ids[inode] = aConn[aCurrPG_FirstNodeIndex + inode];
-                }
+                //for (TInt inode = 0; inode < nbNodes; inode++) {
+                //  nodes_ids[inode] = aConn[aCurrPG_FirstNodeIndex + inode];
+                //}
+#ifdef _EDF_NODE_IDS_
+               if (anIsNodeNum) {
+                 for (TInt inode = 0; inode < nbNodes; inode++) {
+                   nodes_ids[inode] = aNodeInfo->GetElemNum(aConn[aCurrPG_FirstNodeIndex + inode] - 1);
+                 }
+               } else {
+                 for (TInt inode = 0; inode < nbNodes; inode++) {
+                   nodes_ids[inode] = aConn[aCurrPG_FirstNodeIndex + inode];
+                 }
+               }
+#else
+               for (TInt inode = 0; inode < nbNodes; inode++) {
+                 nodes_ids[inode] = aConn[aCurrPG_FirstNodeIndex + inode];
+               }
+#endif
 
                 bool isRenum = false;
                 SMDS_MeshElement* anElement = NULL;
@@ -359,9 +374,24 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
                 int aCurrPE_FirstNodeIndex = aFacesIndex[aCurrPE_FirstFaceIndex] - 1;
                 int nbPENodes = aPolyedreInfo->GetNbConn(iPE);
                 std::vector<int> nodes_ids (nbPENodes);
-                for (int inode = 0; inode < nbPENodes; inode++) {
-                  nodes_ids[inode] = aConn[aCurrPE_FirstNodeIndex + inode];
-                }
+                //for (int inode = 0; inode < nbPENodes; inode++) {
+                //  nodes_ids[inode] = aConn[aCurrPE_FirstNodeIndex + inode];
+                //}
+#ifdef _EDF_NODE_IDS_
+               if (anIsNodeNum) {
+                 for (int inode = 0; inode < nbPENodes; inode++) {
+                   nodes_ids[inode] = aNodeInfo->GetElemNum(aConn[aCurrPE_FirstNodeIndex + inode] - 1);
+                 }
+               } else {
+                 for (int inode = 0; inode < nbPENodes; inode++) {
+                   nodes_ids[inode] = aConn[aCurrPE_FirstNodeIndex + inode];
+                 }
+               }
+#else
+               for (int inode = 0; inode < nbPENodes; inode++) {
+                 nodes_ids[inode] = aConn[aCurrPE_FirstNodeIndex + inode];
+               }
+#endif
 
                 bool isRenum = false;
                 SMDS_MeshElement* anElement = NULL;
index 9d8e62f883b0c00f187bb955badeb105488f21e3..dfae6f824ec11645bf905d6360a9a8116f51457c 100644 (file)
@@ -620,7 +620,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
         if (anElem->IsPoly()) {
           const SMDS_PolyhedralVolumeOfNodes* aPolyedre =
             (const SMDS_PolyhedralVolumeOfNodes*) anElem;
-          if (!anElem) {
+          if (!aPolyedre) {
             MESSAGE("Warning: bad volumic element");
             continue;
           }