-// 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
#include <cctype>
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
using namespace std;
//=============================================================================
bool SMESH_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
{
- if(MYDEBUG) MESSAGE("CanPublishInStudy - "<<!CORBA::is_nil(getStudyServant()));
+ MESSAGE("CanPublishInStudy - "<<!CORBA::is_nil(getStudyServant()));
if ( !myIsEnablePublish )
return false;
if( !aGroup->_is_nil() )
return true;
- if(MYDEBUG) MESSAGE("CanPublishInStudy--CANT");
+ MESSAGE("CanPublishInStudy--CANT");
return false;
}
return aSO._retn();
if ( CORBA::is_nil( theIOR ))
return aSO._retn();
- if(MYDEBUG) MESSAGE("PublishInStudy");
+ MESSAGE("PublishInStudy");
// Publishing a mesh
SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( theIOR );
aMesh = aGroup->GetMesh();
aSO = PublishGroup( aMesh, aGroup, aShapeObject, theName );
}
- if(MYDEBUG) MESSAGE("PublishInStudy_END");
+ MESSAGE("PublishInStudy_END");
return aSO._retn();
}
SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent()
{
- if(MYDEBUG) MESSAGE("PublishComponent");
+ MESSAGE("PublishComponent");
if ( !myIsEnablePublish )
return SALOMEDS::SComponent::_nil();
// (to support tree representation customization and drag-n-drop)
useCaseBuilder->SetRootCurrent();
useCaseBuilder->Append( father ); // component object is added as the top level item
- if(MYDEBUG) MESSAGE("PublishComponent--END");
+ MESSAGE("PublishComponent--END");
return father._retn();
}
return SALOMEDS::SObject::_nil();
if ( CORBA::is_nil( theMesh ))
return SALOMEDS::SObject::_nil();
- if(MYDEBUG) MESSAGE("PublishMesh--IN");
+ MESSAGE("PublishMesh--IN");
// find or publish a mesh
}
}
- if(MYDEBUG) MESSAGE("PublishMesh_END");
+ MESSAGE("PublishMesh_END");
return aMeshSO._retn();
}
SMESH_Gen_i::PublishHypothesis (SMESH::SMESH_Hypothesis_ptr theHyp,
const char* theName)
{
- if(MYDEBUG) MESSAGE("PublishHypothesis");
+ MESSAGE("PublishHypothesis");
if ( !myIsEnablePublish )
return SALOMEDS::SObject::_nil();
if (theHyp->_is_nil())
SetName( aHypSO, theName, hypType.in() );
- if(MYDEBUG) MESSAGE("PublishHypothesis--END")
+ MESSAGE("PublishHypothesis--END");
return aHypSO._retn();
}
SMESH_Gen_i::GetMeshOrSubmeshByShape (SMESH::SMESH_Mesh_ptr theMesh,
GEOM::GEOM_Object_ptr theShape)
{
- if(MYDEBUG) MESSAGE("GetMeshOrSubmeshByShape")
+ MESSAGE("GetMeshOrSubmeshByShape");
SALOMEDS::SObject_wrap aMeshOrSubMesh;
if (theMesh->_is_nil() || ( theShape->_is_nil() && theMesh->HasShapeToMesh()))
return aMeshOrSubMesh._retn();
aMeshOrSubMesh = ObjectToSObject( aSubMesh );
}
}
- if(MYDEBUG) MESSAGE("GetMeshOrSubmeshByShape--END")
+ MESSAGE("GetMeshOrSubmeshByShape--END");
return aMeshOrSubMesh._retn();
}
GEOM::GEOM_Object_ptr theShape,
SMESH::SMESH_Hypothesis_ptr theHyp)
{
- if(MYDEBUG) MESSAGE("AddHypothesisToShape")
+ MESSAGE("AddHypothesisToShape");
if (theMesh->_is_nil() ||
theHyp->_is_nil() || (theShape->_is_nil()
&& theMesh->HasShapeToMesh()) )
addReference( AHR, theHyp );
- if(MYDEBUG) MESSAGE("AddHypothesisToShape--END")
+ MESSAGE("AddHypothesisToShape--END");
return true;
}