-// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022 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
}
#endif
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
static int MYDEBUGWITHFILES = 0;//1;
-#else
-static int MYDEBUG = 0;
-static int MYDEBUGWITHFILES = 0;
-#endif
-
/*
Class : SMESH_VisualObjDef
//=================================================================================
SMESH_VisualObjDef::SMESH_VisualObjDef()
{
- if ( MYDEBUG ) MESSAGE("-------------------------------SMESH_VisualObjDef::SMESH_VisualObjDef");
+ MESSAGE("-------------------------------SMESH_VisualObjDef::SMESH_VisualObjDef");
myGrid = vtkUnstructuredGrid::New();
myLocalGrid = false;
ClearEntitiesFlags();
}
SMESH_VisualObjDef::~SMESH_VisualObjDef()
{
- if ( MYDEBUG ) MESSAGE("--------------------------------SMESH_VisualObjDef::~SMESH_VisualObjDef");
- if ( MYDEBUG ) MESSAGE( "myGrid->GetReferenceCount() = " << myGrid->GetReferenceCount() );
+ MESSAGE("--------------------------------SMESH_VisualObjDef::~SMESH_VisualObjDef");
+ MESSAGE( "myGrid->GetReferenceCount() = " << myGrid->GetReferenceCount() );
myGrid->Delete();
}
//=================================================================================
void SMESH_VisualObjDef::buildPrs(bool buildGrid)
{
- if ( MYDEBUG ) MESSAGE("---------------------------SMESH_VisualObjDef::buildPrs " << buildGrid);
+ MESSAGE("---------------------------SMESH_VisualObjDef::buildPrs " << buildGrid);
if (buildGrid)
{
myLocalGrid = true;
if (!GetMesh()->IsCompacted())
{
NulData(); // detach from the SMDS grid to allow immediate memory de-allocation in compactMesh()
- if ( MYDEBUG ) MESSAGE("*** buildPrs ==> compactMesh!");
+ MESSAGE("*** buildPrs ==> compactMesh!");
GetMesh()->CompactMesh();
if ( SMESHDS_Mesh* m = dynamic_cast<SMESHDS_Mesh*>( GetMesh() )) // IPAL53915
m->GetScript()->SetModified(false); // drop IsModified set in compactMesh()
myGrid->SetPoints( aPoints );
aPoints->Delete();
- if ( MYDEBUG )
- MESSAGE("Update - myGrid->GetNumberOfPoints() = "<<myGrid->GetNumberOfPoints());
+ MESSAGE("Update - myGrid->GetNumberOfPoints() = "<<myGrid->GetNumberOfPoints());
// Calculate cells size
}
}
}
- if ( MYDEBUG )
- MESSAGE( "Update - aNbCells = "<<aNbCells<<"; aCellsSize = "<<aCellsSize );
+
+ MESSAGE( "Update - aNbCells = "<<aNbCells<<"; aCellsSize = "<<aCellsSize );
// Create cells
unsigned int tmp = myEntitiesState;
ClearEntitiesFlags();
- map<SMDSAbs_ElementType,smIdType> entities = SMESH::GetEntitiesFromObject(this);
+ map<SMDSAbs_ElementType,::smIdType> entities = SMESH::GetEntitiesFromObject(this);
if( myEntitiesCache[SMDSAbs_0DElement] != 0 ||
myClient(SalomeApp_Application::orb(),theMesh)
{
myEmptyGrid = 0;
- if ( MYDEBUG )
- MESSAGE("SMESH_MeshObj - this = "<<this<<"; theMesh->_is_nil() = "<<theMesh->_is_nil());
+
+ MESSAGE("SMESH_MeshObj - this = "<<this<<"; theMesh->_is_nil() = "<<theMesh->_is_nil());
}
//=================================================================================
//=================================================================================
SMESH_MeshObj::~SMESH_MeshObj()
{
- if ( MYDEBUG )
- MESSAGE("SMESH_MeshObj - this = "<<this<<"\n");
+ MESSAGE("SMESH_MeshObj - this = "<<this<<"\n");
if ( myEmptyGrid )
myEmptyGrid->Delete();
}
bool SMESH_MeshObj::Update( int theIsClear )
{
// Update SMDS_Mesh on client part
- if ( MYDEBUG ) MESSAGE("SMESH_MeshObj::Update " << this);
+ MESSAGE("SMESH_MeshObj::Update " << this);
if ( myClient.Update(theIsClear) || GetUnstructuredGrid()->GetNumberOfPoints()==0) {
- if ( MYDEBUG ) MESSAGE("buildPrs");
+ MESSAGE("buildPrs");
buildPrs(); // Fill unstructured grid
return true;
}
bool SMESH_MeshObj::NulData()
{
- if ( MYDEBUG ) MESSAGE ("SMESH_MeshObj::NulData() =============================================");
+ MESSAGE ("SMESH_MeshObj::NulData() =============================================");
if (!myEmptyGrid)
{
myEmptyGrid = SMDS_UnstructuredGrid::New();
//=================================================================================
SMESH_SubMeshObj::SMESH_SubMeshObj( SMESH_MeshObj* theMeshObj )
{
- if ( MYDEBUG ) MESSAGE( "SMESH_SubMeshObj - theMeshObj = " << theMeshObj );
+ MESSAGE( "SMESH_SubMeshObj - theMeshObj = " << theMeshObj );
myMeshObj = theMeshObj;
}
//=================================================================================
bool SMESH_SubMeshObj::Update( int theIsClear )
{
- if ( MYDEBUG ) MESSAGE("SMESH_SubMeshObj::Update " << this)
+ MESSAGE("SMESH_SubMeshObj::Update " << this);
bool changed = myMeshObj->Update( theIsClear );
buildPrs(true);
return changed;
: SMESH_SubMeshObj( theMeshObj ),
myGroupServer( SMESH::SMESH_GroupBase::_duplicate(theGroup) )
{
- if ( MYDEBUG ) MESSAGE("SMESH_GroupObj - theGroup->_is_nil() = "<<theGroup->_is_nil());
+ MESSAGE("SMESH_GroupObj - theGroup->_is_nil() = "<<theGroup->_is_nil());
myGroupServer->Register();
}
SMESH_GroupObj::~SMESH_GroupObj()
{
- if ( MYDEBUG ) MESSAGE("~SMESH_GroupObj");
+ MESSAGE("~SMESH_GroupObj");
myGroupServer->UnRegister();
}
: SMESH_SubMeshObj( theMeshObj ),
mySubMeshServer( SMESH::SMESH_subMesh::_duplicate( theSubMesh ) )
{
- if ( MYDEBUG ) MESSAGE( "SMESH_subMeshObj - theSubMesh->_is_nil() = " << theSubMesh->_is_nil() );
+ MESSAGE( "SMESH_subMeshObj - theSubMesh->_is_nil() = " << theSubMesh->_is_nil() );
mySubMeshServer->Register();
}
SMESH_subMeshObj::~SMESH_subMeshObj()
{
- if ( MYDEBUG ) MESSAGE( "~SMESH_subMeshObj" );
+ MESSAGE( "~SMESH_subMeshObj" );
mySubMeshServer->UnRegister();
}