X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FDriverMED%2FDriverMED_R_SMESHDS_Mesh.cxx;h=1433e3208a970c74ef6d00e1f498552e3100d94d;hp=25e517cf44d0da1b53a5d92e550b3ec1bb8805ae;hb=efdf984e40ba00513859a612721ebe25e711b851;hpb=090aff07266d376ae028ae43434bdea7c0a0f9bb diff --git a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx index 25e517cf4..1433e3208 100644 --- a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx @@ -38,6 +38,12 @@ #include +#ifdef _DEBUG_ +static int MYDEBUG = 0; +#else +static int MYDEBUG = 0; +#endif + #define _EDF_NODE_IDS_ using namespace MED; @@ -136,7 +142,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() Status aResult = DRS_FAIL; try{ myFamilies.clear(); - MESSAGE("Perform - myFile : "<GetName()); + if(MYDEBUG) MESSAGE("Perform - aMeshName : "<GetName()); if(aMeshName != aMeshInfo->GetName()) continue; aResult = DRS_OK; //TInt aMeshDim = aMeshInfo->GetDim(); // Reading MED families to the temporary structure //------------------------------------------------ - TInt aNbFams = aMed->GetNbFamilies(aMeshInfo); - MESSAGE("Read " << aNbFams << " families"); + TErr anErr; + TInt aNbFams = aMed->GetNbFamilies(aMeshInfo); + if(MYDEBUG) MESSAGE("Read " << aNbFams << " families"); for (TInt iFam = 0; iFam < aNbFams; iFam++) { - PFamilyInfo aFamilyInfo = aMed->GetPFamilyInfo(aMeshInfo, iFam+1); - TInt aFamId = aFamilyInfo->GetId(); - MESSAGE("Family " << aFamId << " :"); - + PFamilyInfo aFamilyInfo = aMed->GetPFamilyInfo(aMeshInfo,iFam+1,&anErr); + if(anErr >= 0){ + TInt aFamId = aFamilyInfo->GetId(); + if(MYDEBUG) MESSAGE("Family " << aFamId << " :"); + DriverMED_FamilyPtr aFamily (new DriverMED_Family); - + TInt aNbGrp = aFamilyInfo->GetNbGroup(); - MESSAGE("belong to " << aNbGrp << " groups"); + if(MYDEBUG) MESSAGE("belong to " << aNbGrp << " groups"); for (TInt iGr = 0; iGr < aNbGrp; iGr++) { string aGroupName = aFamilyInfo->GetGroupName(iGr); - MESSAGE(aGroupName); + if(MYDEBUG) MESSAGE(aGroupName); aFamily->AddGroupName(aGroupName); } myFamilies[aFamId] = aFamily; + } } // Reading MED nodes to the corresponding SMDS structure @@ -221,7 +230,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() EBooleen anIsNodeNum = aNodeInfo->IsElemNum(); TInt aNbElems = aNodeInfo->GetNbElem(); - MESSAGE("Perform - aNodeInfo->GetNbElem() = "<GetNbElem() = "< DriverMED_R_SMESHDS_Mesh::GetGroupNames() void DriverMED_R_SMESHDS_Mesh::GetGroup(SMESHDS_Group* theGroup) { string aGroupName (theGroup->GetStoreName()); - MESSAGE("Get Group " << aGroupName); + if(MYDEBUG) MESSAGE("Get Group " << aGroupName); map::iterator aFamsIter = myFamilies.begin(); for (; aFamsIter != myFamilies.end(); aFamsIter++)