mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-11 16:19:16 +05:00
Fix for PAL7758(Incorrect work of "Lying on Geom" filter for faces).
LyingOnGeom::Contains(...) improved.
This commit is contained in:
parent
090aff0726
commit
3fa31cc01e
@ -268,28 +268,17 @@ bool Controls::LyingOnGeom::Contains( SMESHDS_Mesh* theMeshDS,
|
||||
if (IsContains(theMeshDS, theShape, theElem, theFindShapeEnum, theAvoidShapeEnum))
|
||||
return true;
|
||||
|
||||
if ( SMESHDS_SubMesh* aSubMesh = theMeshDS->MeshElements( theShape ) )
|
||||
{
|
||||
SMDS_NodeIteratorPtr aNodeIt = aSubMesh->GetNodes();
|
||||
while ( aNodeIt->more() )
|
||||
{
|
||||
const SMDS_MeshNode* aNode = static_cast<const SMDS_MeshNode*>(aNodeIt->next());
|
||||
SMDS_ElemIteratorPtr anElemIt = aNode->GetInverseElementIterator();
|
||||
while ( anElemIt->more() )
|
||||
{
|
||||
const SMDS_MeshElement* anElement = static_cast<const SMDS_MeshElement*>(anElemIt->next());
|
||||
if (anElement == theElem)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
TopTools_IndexedMapOfShape aSubShapes;
|
||||
TopExp::MapShapes( theShape, aSubShapes );
|
||||
|
||||
TopExp_Explorer anExp( theShape,TopAbs_VERTEX,theAvoidShapeEnum );
|
||||
|
||||
while( anExp.More() )
|
||||
for (int i = 1; i <= aSubShapes.Extent(); i++)
|
||||
{
|
||||
const TopoDS_Shape& aShape = anExp.Current();
|
||||
const TopoDS_Shape& aShape = aSubShapes.FindKey(i);
|
||||
|
||||
if( SMESHDS_SubMesh* aSubMesh = theMeshDS->MeshElements( aShape ) ){
|
||||
if( aSubMesh->Contains( theElem ) )
|
||||
return true;
|
||||
|
||||
SMDS_NodeIteratorPtr aNodeIt = aSubMesh->GetNodes();
|
||||
while ( aNodeIt->more() )
|
||||
{
|
||||
@ -303,7 +292,6 @@ bool Controls::LyingOnGeom::Contains( SMESHDS_Mesh* theMeshDS,
|
||||
}
|
||||
}
|
||||
}
|
||||
anExp.Next();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user