mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
0020168: EDF SMESH 953: uncomplete selection with filter 'belong on geom'
This commit is contained in:
parent
dface3a3cb
commit
eb35bdd99a
@ -2882,10 +2882,13 @@ void ElementsOnShape::process (const SMDS_MeshElement* theElemPtr)
|
|||||||
SMDS_ElemIteratorPtr aNodeItr = theElemPtr->nodesIterator();
|
SMDS_ElemIteratorPtr aNodeItr = theElemPtr->nodesIterator();
|
||||||
bool isSatisfy = myAllNodesFlag;
|
bool isSatisfy = myAllNodesFlag;
|
||||||
|
|
||||||
|
gp_XYZ centerXYZ (0, 0, 0);
|
||||||
|
|
||||||
while (aNodeItr->more() && (isSatisfy == myAllNodesFlag))
|
while (aNodeItr->more() && (isSatisfy == myAllNodesFlag))
|
||||||
{
|
{
|
||||||
SMDS_MeshNode* aNode = (SMDS_MeshNode*)aNodeItr->next();
|
SMDS_MeshNode* aNode = (SMDS_MeshNode*)aNodeItr->next();
|
||||||
gp_Pnt aPnt (aNode->X(), aNode->Y(), aNode->Z());
|
gp_Pnt aPnt (aNode->X(), aNode->Y(), aNode->Z());
|
||||||
|
centerXYZ += aPnt.XYZ();
|
||||||
|
|
||||||
switch (myCurShapeType)
|
switch (myCurShapeType)
|
||||||
{
|
{
|
||||||
@ -2928,6 +2931,14 @@ void ElementsOnShape::process (const SMDS_MeshElement* theElemPtr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isSatisfy && myCurShapeType == TopAbs_SOLID) { // Check the center point for volumes MantisBug 0020168
|
||||||
|
centerXYZ /= theElemPtr->NbNodes();
|
||||||
|
gp_Pnt aCenterPnt (centerXYZ);
|
||||||
|
myCurSC.Perform(aCenterPnt, myToler);
|
||||||
|
if ( !(myCurSC.State() == TopAbs_IN || myCurSC.State() == TopAbs_ON))
|
||||||
|
isSatisfy = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (isSatisfy)
|
if (isSatisfy)
|
||||||
myIds.Add(theElemPtr->GetID());
|
myIds.Add(theElemPtr->GetID());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user