X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHClient%2FSMESH_Client.cxx;h=73ad16111c6d62fc1f33011195dc58f3ffa54dc4;hb=ad3cb4c93852dbc834d7075c087bbc749197454b;hp=a1cee8e4e3a9cdb31030114d1c614a763dc69546;hpb=920fe932b10ce5e9da132f0fce3be2bbef95fa3a;p=modules%2Fsmesh.git diff --git a/src/SMESHClient/SMESH_Client.cxx b/src/SMESHClient/SMESH_Client.cxx index a1cee8e4e..73ad16111 100644 --- a/src/SMESHClient/SMESH_Client.cxx +++ b/src/SMESHClient/SMESH_Client.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -24,8 +24,10 @@ // Module : SMESH #include "SMESH_Client.hxx" -#include "SMESH_Mesh.hxx" + +#include "SMESHDS_Mesh.hxx" #include "SMESHDS_Script.hxx" +#include "SMESH_Mesh.hxx" #include "SALOME_NamingService.hxx" #include "SALOME_LifeCycleCORBA.hxx" @@ -54,7 +56,7 @@ #endif #ifdef _DEBUG_ -static int MYDEBUG = 1; +static int MYDEBUG = 0; #else static int MYDEBUG = 0; #endif @@ -747,30 +749,30 @@ namespace SMESH::log_array_var& theSeq, CORBA::Long theId) { - const SMESH::long_array& anIndexes = theSeq[theId].indexes; - CORBA::Long iind = 0, aNbElems = theSeq[theId].number; - - for (CORBA::Long anElemId = 0; anElemId < aNbElems; anElemId++) - { - // find element - const SMDS_MeshElement* elem = FindElement(theMesh, anIndexes[iind++]); - // nb nodes - int nbNodes = anIndexes[iind++]; - // nodes - std::vector aNodes (nbNodes); - for (int iNode = 0; iNode < nbNodes; iNode++) { - aNodes[iNode] = FindNode(theMesh, anIndexes[iind++]); - } - // nb faces - int nbFaces = anIndexes[iind++]; - // quantities - std::vector quantities (nbFaces); - for (int iFace = 0; iFace < nbFaces; iFace++) { - quantities[iFace] = anIndexes[iind++]; - } - // change - theMesh->ChangePolyhedronNodes(elem, aNodes, quantities); - } + // const SMESH::long_array& anIndexes = theSeq[theId].indexes; + // CORBA::Long iind = 0, aNbElems = theSeq[theId].number; + + // for (CORBA::Long anElemId = 0; anElemId < aNbElems; anElemId++) + // { + // // find element + // const SMDS_MeshElement* elem = FindElement(theMesh, anIndexes[iind++]); + // // nb nodes + // int nbNodes = anIndexes[iind++]; + // // nodes + // std::vector aNodes (nbNodes); + // for (int iNode = 0; iNode < nbNodes; iNode++) { + // aNodes[iNode] = FindNode(theMesh, anIndexes[iind++]); + // } + // // nb faces + // int nbFaces = anIndexes[iind++]; + // // quantities + // std::vector quantities (nbFaces); + // for (int iFace = 0; iFace < nbFaces; iFace++) { + // quantities[iFace] = anIndexes[iind++]; + // } + // // change + // theMesh->ChangePolyhedronNodes(elem, aNodes, quantities); + // } } } @@ -815,22 +817,19 @@ SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB, mySMESHDSMesh(NULL), mySMDSMesh(NULL) { - MESSAGE("SMESH_Client::SMESH_Client"); + if ( MYDEBUG ) MESSAGE("SMESH_Client::SMESH_Client"); myMeshServer->Register(); CORBA::Boolean anIsEmbeddedMode; GetSMESHGen(theORB,anIsEmbeddedMode); if(anIsEmbeddedMode){ - if ( MYDEBUG ) - MESSAGE("Info: The same process, update mesh by pointer "); + if ( MYDEBUG ) MESSAGE("Info: The same process, update mesh by pointer "); // just set client mesh pointer to server mesh pointer //SMESH_Mesh* aMesh = reinterpret_cast(theMesh->GetMeshPtr()); CORBA::LongLong pointeur = theMesh->GetMeshPtr(); - if( MYDEBUG ) - MESSAGE("SMESH_Client::SMESH_Client pointeur "< (pointeur); - if ( MYDEBUG ) - MESSAGE("SMESH_Client::SMESH_Client aMesh "<GetMeshDS()->IsEmbeddedMode()){ if(anIsEmbeddedMode){ mySMESHDSMesh = aMesh->GetMeshDS(); @@ -886,20 +885,22 @@ bool SMESH_Client::Update(bool theIsClear) { bool anIsModified = true; - if(mySMESHDSMesh){ - MESSAGE("Update mySMESHDSMesh"); + if(mySMESHDSMesh) + { + if ( MYDEBUG ) MESSAGE("Update mySMESHDSMesh"); SMESHDS_Script* aScript = mySMESHDSMesh->GetScript(); anIsModified = aScript->IsModified(); aScript->SetModified(false); - }else{ - MESSAGE("Update CORBA"); + } + else + { + if ( MYDEBUG ) MESSAGE("Update CORBA"); SMESH::log_array_var aSeq = myMeshServer->GetLog( theIsClear ); CORBA::Long aLength = aSeq->length(); anIsModified = aLength > 0; - if( MYDEBUG ) - MESSAGE( "Update: length of the script is "<Renumber( anIndexes[i], anIndexes[i+1], anIndexes[i+2] ); - } + // for(CORBA::Long i=0; anElemId < aNbElems; anElemId++, i+=3) + // { + // mySMDSMesh->Renumber( anIndexes[i], anIndexes[i+1], anIndexes[i+2] ); + // } break; default:;