mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
0021338: EDF 1926 SMESH: New controls and filters
Return all nodes from sub-mesh and group
This commit is contained in:
parent
98460fb0dc
commit
601f8a87b5
@ -845,29 +845,7 @@ int SMESH_SubMeshObj::GetElemDimension( const int theObjId )
|
|||||||
|
|
||||||
void SMESH_SubMeshObj::UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunctor )
|
void SMESH_SubMeshObj::UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunctor )
|
||||||
{
|
{
|
||||||
if ( SMESH::Controls::CoincidentNodes* cn =
|
theFunctor->SetMesh( myMeshObj->GetMesh() );
|
||||||
dynamic_cast<SMESH::Controls::CoincidentNodes*>(theFunctor.get()) )
|
|
||||||
{
|
|
||||||
TEntityList theResList;
|
|
||||||
GetEntities( SMDSAbs_Node, theResList );
|
|
||||||
TIDSortedNodeSet nodeSet;
|
|
||||||
TEntityList::iterator e = theResList.begin();
|
|
||||||
for ( ; e != theResList.end(); ++e )
|
|
||||||
nodeSet.insert( nodeSet.end(), (const SMDS_MeshNode* ) *e );
|
|
||||||
cn->SetMesh( myMeshObj->GetMesh(), &nodeSet );
|
|
||||||
}
|
|
||||||
else if ( SMESH::Controls::CoincidentElements* ce =
|
|
||||||
dynamic_cast<SMESH::Controls::CoincidentElements*>(theFunctor.get()) )
|
|
||||||
{
|
|
||||||
TEntityList theResList;
|
|
||||||
GetEntities( ce->GetType(), theResList );
|
|
||||||
TIDSortedElemSet elemSet( theResList.begin(), theResList.end() );
|
|
||||||
ce->SetMesh( myMeshObj->GetMesh(), &elemSet );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
theFunctor->SetMesh( myMeshObj->GetMesh() );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -985,9 +963,12 @@ static int getPointers( const SMDSAbs_ElementType theRequestType,
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
int SMESH_GroupObj::GetNbEntities( const SMDSAbs_ElementType theType) const
|
int SMESH_GroupObj::GetNbEntities( const SMDSAbs_ElementType theType) const
|
||||||
{
|
{
|
||||||
if(SMDSAbs_ElementType(myGroupServer->GetType()) == theType){
|
if(SMDSAbs_ElementType(myGroupServer->GetType()) == theType) {
|
||||||
return myGroupServer->Size();
|
return myGroupServer->Size();
|
||||||
}
|
}
|
||||||
|
if ( theType == SMDSAbs_Node ) {
|
||||||
|
return myGroupServer->GetNumberOfNodes();
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1047,7 +1028,7 @@ int SMESH_subMeshObj::GetNbEntities( const SMDSAbs_ElementType theType) const
|
|||||||
{
|
{
|
||||||
case SMDSAbs_Node:
|
case SMDSAbs_Node:
|
||||||
{
|
{
|
||||||
return mySubMeshServer->GetNumberOfNodes( false );
|
return mySubMeshServer->GetNumberOfNodes( /*all=*/true );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SMDSAbs_0DElement:
|
case SMDSAbs_0DElement:
|
||||||
|
Loading…
Reference in New Issue
Block a user