mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 11:00:36 +05:00
0021339: EDF 1928 SMESH: Create group of 0D elements
Use TMeshModifTracer in ElementsOnSurface
This commit is contained in:
parent
6d1ea10cad
commit
c128018070
@ -3529,7 +3529,6 @@ void ManifoldPart::getFacesByLink( const ManifoldPart::Link& theLink,
|
||||
|
||||
ElementsOnSurface::ElementsOnSurface()
|
||||
{
|
||||
myMesh = 0;
|
||||
myIds.Clear();
|
||||
myType = SMDSAbs_All;
|
||||
mySurf.Nullify();
|
||||
@ -3539,15 +3538,13 @@ ElementsOnSurface::ElementsOnSurface()
|
||||
|
||||
ElementsOnSurface::~ElementsOnSurface()
|
||||
{
|
||||
myMesh = 0;
|
||||
}
|
||||
|
||||
void ElementsOnSurface::SetMesh( const SMDS_Mesh* theMesh )
|
||||
{
|
||||
if ( myMesh == theMesh )
|
||||
return;
|
||||
myMesh = theMesh;
|
||||
process();
|
||||
myMeshModifTracer.SetMesh( theMesh );
|
||||
if ( myMeshModifTracer.IsMeshModified())
|
||||
process();
|
||||
}
|
||||
|
||||
bool ElementsOnSurface::IsSatisfy( long theElementId )
|
||||
@ -3602,32 +3599,14 @@ void ElementsOnSurface::process()
|
||||
if ( mySurf.IsNull() )
|
||||
return;
|
||||
|
||||
if ( myMesh == 0 )
|
||||
if ( !myMeshModifTracer.GetMesh() )
|
||||
return;
|
||||
|
||||
if ( myType == SMDSAbs_Face || myType == SMDSAbs_All )
|
||||
{
|
||||
myIds.ReSize( myMesh->NbFaces() );
|
||||
SMDS_FaceIteratorPtr anIter = myMesh->facesIterator();
|
||||
for(; anIter->more(); )
|
||||
process( anIter->next() );
|
||||
}
|
||||
myIds.ReSize( myMeshModifTracer.GetMesh()->GetMeshInfo().NbElements( myType ));
|
||||
|
||||
if ( myType == SMDSAbs_Edge || myType == SMDSAbs_All )
|
||||
{
|
||||
myIds.ReSize( myIds.Extent() + myMesh->NbEdges() );
|
||||
SMDS_EdgeIteratorPtr anIter = myMesh->edgesIterator();
|
||||
for(; anIter->more(); )
|
||||
process( anIter->next() );
|
||||
}
|
||||
|
||||
if ( myType == SMDSAbs_Node )
|
||||
{
|
||||
myIds.ReSize( myMesh->NbNodes() );
|
||||
SMDS_NodeIteratorPtr anIter = myMesh->nodesIterator();
|
||||
for(; anIter->more(); )
|
||||
process( anIter->next() );
|
||||
}
|
||||
SMDS_ElemIteratorPtr anIter = myMeshModifTracer.GetMesh()->elementsIterator( myType );
|
||||
for(; anIter->more(); )
|
||||
process( anIter->next() );
|
||||
}
|
||||
|
||||
void ElementsOnSurface::process( const SMDS_MeshElement* theElemPtr )
|
||||
|
@ -783,7 +783,7 @@ namespace SMESH{
|
||||
bool isOnSurface( const SMDS_MeshNode* theNode );
|
||||
|
||||
private:
|
||||
const SMDS_Mesh* myMesh;
|
||||
TMeshModifTracer myMeshModifTracer;
|
||||
TColStd_MapOfInteger myIds;
|
||||
SMDSAbs_ElementType myType;
|
||||
//Handle(Geom_Surface) mySurf;
|
||||
|
Loading…
Reference in New Issue
Block a user