Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
682a0b6
)
0020168: EDF SMESH 953: uncomplete selection with filter 'belong on geom'
author
dmv
<dmv@opencascade.com>
Fri, 20 Feb 2009 11:39:09 +0000
(11:39 +0000)
committer
dmv
<dmv@opencascade.com>
Fri, 20 Feb 2009 11:39:09 +0000
(11:39 +0000)
src/Controls/SMESH_Controls.cxx
patch
|
blob
|
history
diff --git
a/src/Controls/SMESH_Controls.cxx
b/src/Controls/SMESH_Controls.cxx
index 8ba13a8f1f4e0727d548282be267cb69b4fbe571..d007834226ada28b4db9ce96c1c3cd24b168d0ae 100644
(file)
--- a/
src/Controls/SMESH_Controls.cxx
+++ b/
src/Controls/SMESH_Controls.cxx
@@
-3190,10
+3190,13
@@
void ElementsOnShape::process (const SMDS_MeshElement* theElemPtr)
SMDS_ElemIteratorPtr aNodeItr = theElemPtr->nodesIterator();
bool isSatisfy = myAllNodesFlag;
SMDS_ElemIteratorPtr aNodeItr = theElemPtr->nodesIterator();
bool isSatisfy = myAllNodesFlag;
+ gp_XYZ centerXYZ (0, 0, 0);
+
while (aNodeItr->more() && (isSatisfy == myAllNodesFlag))
{
SMDS_MeshNode* aNode = (SMDS_MeshNode*)aNodeItr->next();
gp_Pnt aPnt (aNode->X(), aNode->Y(), aNode->Z());
while (aNodeItr->more() && (isSatisfy == myAllNodesFlag))
{
SMDS_MeshNode* aNode = (SMDS_MeshNode*)aNodeItr->next();
gp_Pnt aPnt (aNode->X(), aNode->Y(), aNode->Z());
+ centerXYZ += aPnt.XYZ();
switch (myCurShapeType)
{
switch (myCurShapeType)
{
@@
-3236,6
+3239,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)
myIds.Add(theElemPtr->GetID());
}
if (isSatisfy)
myIds.Add(theElemPtr->GetID());
}