Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into pre/penta18
[modules/smesh.git]
/
src
/
SMESHClient
/
SMESH_Client.cxx
diff --git
a/src/SMESHClient/SMESH_Client.cxx
b/src/SMESHClient/SMESH_Client.cxx
index 4c9cac3534e341d87df515339a2e1079962cc1db..f556f1a9245d175477f2d6f2900fc7597f3d4f8b 100644
(file)
--- a/
src/SMESHClient/SMESH_Client.cxx
+++ b/
src/SMESHClient/SMESH_Client.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
5
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
6
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
//
// 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"
// Module : SMESH
#include "SMESH_Client.hxx"
-#include "SMESH_Mesh.hxx"
+
+#include "SMESHDS_Mesh.hxx"
#include "SMESHDS_Script.hxx"
#include "SMESHDS_Script.hxx"
+#include "SMESH_Mesh.hxx"
#include "SALOME_NamingService.hxx"
#include "SALOME_LifeCycleCORBA.hxx"
#include "SALOME_NamingService.hxx"
#include "SALOME_LifeCycleCORBA.hxx"
@@
-54,13
+56,14
@@
#endif
#ifdef _DEBUG_
#endif
#ifdef _DEBUG_
-static int MYDEBUG =
1
;
+static int MYDEBUG =
0
;
#else
static int MYDEBUG = 0;
#endif
namespace
{
#else
static int MYDEBUG = 0;
#endif
namespace
{
+ using std::runtime_error;
//=======================================================================
//function : FindNode
//=======================================================================
//function : FindNode
@@
-814,22
+817,19
@@
SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB,
mySMESHDSMesh(NULL),
mySMDSMesh(NULL)
{
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){
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<SMESH_Mesh*>(theMesh->GetMeshPtr());
CORBA::LongLong pointeur = theMesh->GetMeshPtr();
// just set client mesh pointer to server mesh pointer
//SMESH_Mesh* aMesh = reinterpret_cast<SMESH_Mesh*>(theMesh->GetMeshPtr());
CORBA::LongLong pointeur = theMesh->GetMeshPtr();
- if( MYDEBUG )
- MESSAGE("SMESH_Client::SMESH_Client pointeur "<<pointeur);
+ if( MYDEBUG ) MESSAGE("SMESH_Client::SMESH_Client pointeur "<<pointeur);
SMESH_Mesh* aMesh = reinterpret_cast<SMESH_Mesh*> (pointeur);
SMESH_Mesh* aMesh = reinterpret_cast<SMESH_Mesh*> (pointeur);
- if ( MYDEBUG )
- MESSAGE("SMESH_Client::SMESH_Client aMesh "<<aMesh);
+ if ( MYDEBUG ) MESSAGE("SMESH_Client::SMESH_Client aMesh "<<aMesh);
//if(aMesh->GetMeshDS()->IsEmbeddedMode()){
if(anIsEmbeddedMode){
mySMESHDSMesh = aMesh->GetMeshDS();
//if(aMesh->GetMeshDS()->IsEmbeddedMode()){
if(anIsEmbeddedMode){
mySMESHDSMesh = aMesh->GetMeshDS();
@@
-885,20
+885,22
@@
bool
SMESH_Client::Update(bool theIsClear)
{
bool anIsModified = true;
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);
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;
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 "<<aLength );
+ if ( MYDEBUG ) MESSAGE( "Update: length of the script is "<<aLength );
- if
(!anIsModified
)
+ if
( !anIsModified
)
return false;
// update client mesh structure by logged changes commands
return false;
// update client mesh structure by logged changes commands
@@
-972,7
+974,7
@@
SMESH_Client::Update(bool theIsClear)
int nbNodes = anIndexes[i++];
// nodes
//ASSERT( nbNodes < 9 );
int nbNodes = anIndexes[i++];
// nodes
//ASSERT( nbNodes < 9 );
- vector<const SMDS_MeshNode*> aNodes( nbNodes );
+
std::
vector<const SMDS_MeshNode*> aNodes( nbNodes );
for ( int iNode = 0; iNode < nbNodes; iNode++ )
aNodes[ iNode ] = FindNode( mySMDSMesh, anIndexes[i++] );
// change
for ( int iNode = 0; iNode < nbNodes; iNode++ )
aNodes[ iNode ] = FindNode( mySMDSMesh, anIndexes[i++] );
// change