Correct for case of _EDF_NODE_IDS_

This commit is contained in:
jfa 2005-02-21 14:48:43 +00:00
parent a05b651f04
commit 52edf90f5a
2 changed files with 37 additions and 7 deletions

View 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;

View 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;
}