SMESH_GroupObj::~SMESH_GroupObj()
{
if ( MYDEBUG ) MESSAGE("~SMESH_GroupObj");
- myGroupServer->Destroy();
+ myGroupServer->UnRegister();
}
//=================================================================================
SMESH_subMeshObj::~SMESH_subMeshObj()
{
if ( MYDEBUG ) MESSAGE( "~SMESH_subMeshObj" );
- mySubMeshServer->Destroy();
+ mySubMeshServer->UnRegister();
}
//=================================================================================
//=================================================================================
SMESH_Client::~SMESH_Client()
{
- myMeshServer->Destroy();
+ myMeshServer->UnRegister();
if(!mySMESHDSMesh)
delete mySMDSMesh;
}
// obj has been published in study. Its refcount has been incremented.
// It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed
- aMeshes[i]->Destroy();
+ aMeshes[i]->UnRegister();
#endif
}
else {
SMESHGUI::~SMESHGUI()
{
#ifdef WITHGENERICOBJ
- SMESH::GetFilterManager()->Destroy();
- SMESH::GetMeasurements()->Destroy();
+ SMESH::GetFilterManager()->UnRegister();
+ SMESH::GetMeasurements()->UnRegister();
#endif
SMESH::GetFilterManager() = SMESH::FilterManager::_nil();
SMESH::GetMeasurements() = SMESH::Measurements::_nil();
// It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed
if (!CORBA::is_nil(aCompoundMesh))
- aCompoundMesh->Destroy();
+ aCompoundMesh->UnRegister();
#endif
return true;
// obj has been published in study. Its refcount has been incremented.
// It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed
- newMesh->Destroy();
+ newMesh->UnRegister();
#endif
} catch (...) {
}
SMESH::CreateHypothesis( hypType(), theHypName, isAlgo );
#ifdef WITHGENERICOBJ
if (!CORBA::is_nil(anAlgo))
- anAlgo->Destroy();
+ anAlgo->UnRegister();
#endif
}
else {
editHypothesis( aHypothesis.in(), theHypName, theParent, obj, slot );
#ifdef WITHGENERICOBJ
if (!CORBA::is_nil(aHypothesis))
- aHypothesis->Destroy();
+ aHypothesis->UnRegister();
#endif
}
}
}
SMESHGUI::GetSMESHGUI()->updateObjBrowser( true, 0 );
#ifdef WITHGENERICOBJ
- myHypo->Destroy();
+ myHypo->UnRegister();
#endif
myHypo = SMESH::SMESH_Hypothesis::_nil();
myInitParamsHypo = SMESH::SMESH_Hypothesis::_nil();
newGrp.out() );
if ( !mesh->_is_nil() ) {
#ifdef WITHGENERICOBJ
- mesh->Destroy();
+ mesh->UnRegister();
#endif
}
if ( !newGrp->_is_nil() ) {
#ifdef WITHGENERICOBJ
- newGrp->Destroy();
+ newGrp->UnRegister();
#endif
}
ok = true;
int precision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 );
SMESH::Measurements_var measure = SMESHGUI::GetSMESHGen()->CreateMeasurements();
SMESH::Measure result = measure->MinDistance( s1.in(), s2.in() );
- measure->Destroy();
+ measure->UnRegister();
myDX->setText( QString::number( result.minX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
myDY->setText( QString::number( result.minY, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
myDZ->setText( QString::number( result.minZ, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
int precision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 );
SMESH::Measurements_var measure = SMESHGUI::GetSMESHGen()->CreateMeasurements();
SMESH::Measure result = measure->BoundingBox( srcList.in() );
- measure->Destroy();
+ measure->UnRegister();
myXmin->setText( QString::number( result.minX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
myXmax->setText( QString::number( result.maxX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
myDX->setText( QString::number( result.maxX-result.minX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
SMESH::CreateHypothesis(theTypeName, aHypName, false);
#ifdef WITHGENERICOBJ
if (!CORBA::is_nil(aHyp))
- aHyp->Destroy();
+ aHyp->UnRegister();
#endif
} else {
// Get hypotheses creator client (GUI)
SMESH::CreateHypothesis(theTypeName, aHypName, false);
#ifdef WITHGENERICOBJ
if (!CORBA::is_nil(aHyp))
- aHyp->Destroy();
+ aHyp->UnRegister();
#endif
}
}
// It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed
if (aMeshSO)
- aMeshVar->Destroy();
+ aMeshVar->UnRegister();
#endif
}
return true;
SMESH::CreateHypothesis(aHypName, aHypName, true);
#ifdef WITHGENERICOBJ
if (!CORBA::is_nil(aHyp))
- aHyp->Destroy();
+ aHyp->UnRegister();
#endif
}
else
SMESH::CreateHypothesis(aHypName, aHypName, true);
#ifdef WITHGENERICOBJ
if (!CORBA::is_nil(aHyp))
- aHyp->Destroy();
+ aHyp->UnRegister();
#endif
}
}
// obj has been published in study. Its refcount has been incremented.
// It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed
- mesh->Destroy();
+ mesh->UnRegister();
#endif
}
break;
// obj has been published in study. Its refcount has been incremented.
// It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed
- mesh->Destroy();
+ mesh->UnRegister();
#endif
}
break;
// obj has been published in study. Its refcount has been incremented.
// It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed
- mesh->Destroy();
+ mesh->UnRegister();
#endif
}
break;
// obj has been published in study. Its refcount has been incremented.
// It is safe to decrement its refcount
// so that it will be destroyed when the entry in study will be removed
- mesh->Destroy();
+ mesh->UnRegister();
#endif
}
}
Functor_i::~Functor_i()
{
- //TPythonDump()<<this<<".Destroy()";
+ //TPythonDump()<<this<<".UnRegister()";
}
void Functor_i::SetMesh( SMESH_Mesh_ptr theMesh )
Comparator_i::~Comparator_i()
{
if ( myNumericalFunctor )
- myNumericalFunctor->Destroy();
+ myNumericalFunctor->UnRegister();
}
void Comparator_i::SetMargin( CORBA::Double theValue )
void Comparator_i::SetNumFunctor( NumericalFunctor_ptr theFunct )
{
if ( myNumericalFunctor )
- myNumericalFunctor->Destroy();
+ myNumericalFunctor->UnRegister();
myNumericalFunctor = DownCast<NumericalFunctor_i*>(theFunct);
LogicalNOT_i::~LogicalNOT_i()
{
if ( myPredicate )
- myPredicate->Destroy();
+ myPredicate->UnRegister();
}
void LogicalNOT_i::SetPredicate( Predicate_ptr thePredicate )
{
if ( myPredicate )
- myPredicate->Destroy();
+ myPredicate->UnRegister();
myPredicate = SMESH::GetPredicate(thePredicate);
LogicalBinary_i::~LogicalBinary_i()
{
if ( myPredicate1 )
- myPredicate1->Destroy();
+ myPredicate1->UnRegister();
if ( myPredicate2 )
- myPredicate2->Destroy();
+ myPredicate2->UnRegister();
}
void LogicalBinary_i::SetMesh( SMESH_Mesh_ptr theMesh )
void LogicalBinary_i::SetPredicate1( Predicate_ptr thePredicate )
{
if ( myPredicate1 )
- myPredicate1->Destroy();
+ myPredicate1->UnRegister();
myPredicate1 = SMESH::GetPredicate(thePredicate);
void LogicalBinary_i::SetPredicate2( Predicate_ptr thePredicate )
{
if ( myPredicate2 )
- myPredicate2->Destroy();
+ myPredicate2->UnRegister();
myPredicate2 = SMESH::GetPredicate(thePredicate);
FilterManager_i::~FilterManager_i()
{
- //TPythonDump()<<this<<".Destroy()";
+ //TPythonDump()<<this<<".UnRegister()";
}
Filter_i::~Filter_i()
{
if ( myPredicate )
- myPredicate->Destroy();
+ myPredicate->UnRegister();
if(!CORBA::is_nil(myMesh))
- myMesh->Destroy();
+ myMesh->UnRegister();
- //TPythonDump()<<this<<".Destroy()";
+ //TPythonDump()<<this<<".UnRegister()";
}
//=======================================================================
void Filter_i::SetPredicate( Predicate_ptr thePredicate )
{
if ( myPredicate )
- myPredicate->Destroy();
+ myPredicate->UnRegister();
myPredicate = SMESH::GetPredicate(thePredicate);
theMesh->Register();
if(!CORBA::is_nil(myMesh))
- myMesh->Destroy();
+ myMesh->UnRegister();
myMesh = SMESH_Mesh::_duplicate( theMesh );
TPythonDump()<<this<<".SetMesh("<<theMesh<<")";
CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria )
{
if ( myPredicate != 0 )
- myPredicate->Destroy();
+ myPredicate->UnRegister();
SMESH::FilterManager_i* aFilter = new SMESH::FilterManager_i();
FilterManager_ptr aFilterMgr = aFilter->_this();
FilterLibrary_i::~FilterLibrary_i()
{
delete myFileName;
- //TPythonDump()<<this<<".Destroy()";
+ //TPythonDump()<<this<<".UnRegister()";
}
//=======================================================================
//=======================================================================
Measurements_i::~Measurements_i()
{
- //TPythonDump()<<this<<".Destroy()";
+ //TPythonDump()<<this<<".UnRegister()";
}
static bool getNodeNodeDistance (SMESH::Measure& theMeasure,
// this method is called from destructor of group (PAL6331)
//_impl->RemoveGroup( aGroup->GetLocalID() );
aGroup->myMeshServant = 0;
- aGroup->Destroy();
+ aGroup->UnRegister();
}
}
_mapGroups.clear();
continue;
SMESH_subMesh_i* aSubMesh = dynamic_cast<SMESH_subMesh_i*>(SMESH_Gen_i::GetServant(itSM->second).in());
if (aSubMesh) {
- aSubMesh->Destroy();
+ aSubMesh->UnRegister();
}
}
_mapSubMeshIor.clear();
continue;
SMESH_Hypothesis_i* aHypo = dynamic_cast<SMESH_Hypothesis_i*>(SMESH_Gen_i::GetServant(itH->second).in());
if (aHypo) {
- aHypo->Destroy();
+ aHypo->UnRegister();
}
}
_mapHypo.clear();
aBelongToGeom.SetElementType(theElemType)
aFilter.SetPredicate(aBelongToGeom)
- aFilterMgr.Destroy()
+ aFilterMgr.UnRegister()
return aFilter.GetElementsId(theMesh)
## Current style
aFilter.SetPredicate(aLyingOnGeom)
anIds = aFilter.GetElementsId(theMesh)
- aFilterMgr.Destroy()
+ aFilterMgr.UnRegister()
aGroup = theMesh.CreateGroup(theElemType, theName)
aGroup.Add(anIds)
aCriteria = []
aCriteria.append(aCriterion)
aFilter.SetCriteria(aCriteria)
- aFilterMgr.Destroy()
+ aFilterMgr.UnRegister()
return aFilter
## Creates a numerical functor by its type
pass
aMeasurements = self.CreateMeasurements()
result = aMeasurements.MinDistance(src1, src2)
- aMeasurements.Destroy()
+ aMeasurements.UnRegister()
return result
## Get bounding box of the specified object(s)
pass
aMeasurements = self.CreateMeasurements()
result = aMeasurements.BoundingBox(srclist)
- aMeasurements.Destroy()
+ aMeasurements.UnRegister()
return result
import omniORB
aCriteria.append(Criterion)
aFilter.SetCriteria(aCriteria)
group = self.MakeGroupByFilter(groupName, aFilter)
- aFilterMgr.Destroy()
+ aFilterMgr.UnRegister()
return group
## Creates a mesh group by the given criteria (list of criteria)
aFilter = aFilterMgr.CreateFilter()
aFilter.SetCriteria(theCriteria)
group = self.MakeGroupByFilter(groupName, aFilter)
- aFilterMgr.Destroy()
+ aFilterMgr.UnRegister()
return group
## Creates a mesh group by the given filter
aPredicate = aFilterMgr.CreateFreeEdges()
aPredicate.SetMesh(self.mesh)
aBorders = aPredicate.GetBorders()
- aFilterMgr.Destroy()
+ aFilterMgr.UnRegister()
return aBorders
## Removes a group
aMeasurements = self.smeshpyD.CreateMeasurements()
aMeasure = aMeasurements.MinDistance(id1, id2)
- aMeasurements.Destroy()
+ aMeasurements.UnRegister()
return aMeasure
## Get bounding box of the specified object(s)
pass
aMeasurements = self.smeshpyD.CreateMeasurements()
aMeasure = aMeasurements.BoundingBox(srclist)
- aMeasurements.Destroy()
+ aMeasurements.UnRegister()
return aMeasure
# Mesh edition (SMESH_MeshEditor functionality):