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 'V9_9_BR'
[modules/smesh.git]
/
src
/
StdMeshers_I
/
StdMeshers_LayerDistribution_i.cxx
diff --git
a/src/StdMeshers_I/StdMeshers_LayerDistribution_i.cxx
b/src/StdMeshers_I/StdMeshers_LayerDistribution_i.cxx
index a979f4715e68549cf13766d81662de55f73e0d4a..b222673db9ad82312c03ba61f683d37361b6ed83 100644
(file)
--- a/
src/StdMeshers_I/StdMeshers_LayerDistribution_i.cxx
+++ b/
src/StdMeshers_I/StdMeshers_LayerDistribution_i.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
15
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
22
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
@@
-45,14
+45,11
@@
using namespace std;
//=============================================================================
StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i( PortableServer::POA_ptr thePOA,
//=============================================================================
StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i( PortableServer::POA_ptr thePOA,
- int theStudyId,
::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA )
{
::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA )
{
- MESSAGE( "StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i" );
myBaseImpl = new ::StdMeshers_LayerDistribution( theGenImpl->GetANewId(),
myBaseImpl = new ::StdMeshers_LayerDistribution( theGenImpl->GetANewId(),
- theStudyId,
theGenImpl );
}
theGenImpl );
}
@@
-66,7
+63,6
@@
StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i( PortableServer::
StdMeshers_LayerDistribution_i::~StdMeshers_LayerDistribution_i()
{
StdMeshers_LayerDistribution_i::~StdMeshers_LayerDistribution_i()
{
- MESSAGE( "StdMeshers_LayerDistribution_i::~StdMeshers_LayerDistribution_i" );
if ( !myHyp->_is_nil() )
myHyp->UnRegister();
}
if ( !myHyp->_is_nil() )
myHyp->UnRegister();
}
@@
-80,7
+76,6
@@
StdMeshers_LayerDistribution_i::~StdMeshers_LayerDistribution_i()
//=============================================================================
void StdMeshers_LayerDistribution_i::SetLayerDistribution(SMESH::SMESH_Hypothesis_ptr hyp1D)
//=============================================================================
void StdMeshers_LayerDistribution_i::SetLayerDistribution(SMESH::SMESH_Hypothesis_ptr hyp1D)
- throw ( SALOME::SALOME_Exception )
{
ASSERT( myBaseImpl );
try {
{
ASSERT( myBaseImpl );
try {
@@
-92,11
+87,10
@@
void StdMeshers_LayerDistribution_i::SetLayerDistribution(SMESH::SMESH_Hypothesi
// Remove SO of 1D hypothesis if it was published
if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen())
{
// Remove SO of 1D hypothesis if it was published
if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen())
{
- SALOMEDS::Study_var study = gen->GetCurrentStudy();
- SALOMEDS::SObject_var SO = gen->ObjectToSObject( study, hyp1D );
+ SALOMEDS::SObject_var SO = gen->ObjectToSObject( hyp1D );
if ( ! SO->_is_nil() )
{
if ( ! SO->_is_nil() )
{
- SALOMEDS::StudyBuilder_var builder =
study
->NewBuilder();
+ SALOMEDS::StudyBuilder_var builder =
SMESH_Gen_i::GetSMESHGen()->getStudyServant()
->NewBuilder();
builder->RemoveObjectWithChildren( SO );
SO->UnRegister();
}
builder->RemoveObjectWithChildren( SO );
SO->UnRegister();
}
@@
-200,8
+194,7
@@
void StdMeshers_LayerDistribution_i::LoadFrom( const char* theStream )
is >> libName )
{
SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen();
is >> libName )
{
SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::Study_var curStudy = gen->GetCurrentStudy();
- gen->SetCurrentStudy( SALOMEDS::Study::_nil() ); // prevent hypo publishing
+ gen->SetEnablePublish( false ); // prevent hypo publishing
try {
SMESH::SMESH_Hypothesis_var hyp1D =
try {
SMESH::SMESH_Hypothesis_var hyp1D =
@@
-223,7
+216,7
@@
void StdMeshers_LayerDistribution_i::LoadFrom( const char* theStream )
}
catch (...) {
}
}
catch (...) {
}
- gen->Set
CurrentStudy( curStudy
); // enable hypo publishing
+ gen->Set
EnablePublish( true
); // enable hypo publishing
}
}
}
}