mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 11:50:32 +05:00
0021014: EDF 1583 SMESH: Improvement of the Python Dump for the creation of groups
Pass the mesh of filter to predicate at setting a mesh and a predicate to avoid dump of predicate commands when a group is created from GUI
This commit is contained in:
parent
0cc83ae5e2
commit
fb68cb5a3d
@ -2294,6 +2294,8 @@ void Filter_i::SetPredicate( Predicate_ptr thePredicate )
|
|||||||
{
|
{
|
||||||
myFilter.SetPredicate( myPredicate->GetPredicate() );
|
myFilter.SetPredicate( myPredicate->GetPredicate() );
|
||||||
myPredicate->Register();
|
myPredicate->Register();
|
||||||
|
if ( const SMDS_Mesh* aMesh = MeshPtr2SMDSMesh(myMesh))
|
||||||
|
myPredicate->GetPredicate()->SetMesh( aMesh );
|
||||||
TPythonDump()<<this<<".SetPredicate("<<myPredicate<<")";
|
TPythonDump()<<this<<".SetPredicate("<<myPredicate<<")";
|
||||||
}
|
}
|
||||||
std::list<TPredicateChangeWaiter*>::iterator i = myWaiters.begin();
|
std::list<TPredicateChangeWaiter*>::iterator i = myWaiters.begin();
|
||||||
@ -2326,6 +2328,10 @@ SetMesh( SMESH_Mesh_ptr theMesh )
|
|||||||
|
|
||||||
myMesh = SMESH_Mesh::_duplicate( theMesh );
|
myMesh = SMESH_Mesh::_duplicate( theMesh );
|
||||||
TPythonDump()<<this<<".SetMesh("<<theMesh<<")";
|
TPythonDump()<<this<<".SetMesh("<<theMesh<<")";
|
||||||
|
|
||||||
|
if ( myPredicate )
|
||||||
|
if ( const SMDS_Mesh* aMesh = MeshPtr2SMDSMesh(theMesh))
|
||||||
|
myPredicate->GetPredicate()->SetMesh( aMesh );
|
||||||
}
|
}
|
||||||
|
|
||||||
SMESH::long_array*
|
SMESH::long_array*
|
||||||
@ -3100,6 +3106,8 @@ Predicate_ptr Filter_i::GetPredicate()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
SMESH::Predicate_var anObj = myPredicate->_this();
|
SMESH::Predicate_var anObj = myPredicate->_this();
|
||||||
|
// if ( SMESH::Functor_i* fun = SMESH::DownCast<SMESH::Functor_i*>( anObj ))
|
||||||
|
// TPythonDump() << fun << " = " << this << ".GetPredicate()";
|
||||||
return anObj._retn();
|
return anObj._retn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user