- SMESH_TNodeXYZ aPnt ( aNodeItr->next() );
- centerXYZ += aPnt;
-
- switch (myCurShapeType)
- {
- case TopAbs_SOLID:
- {
- myCurSC.Perform(aPnt, myToler);
- isSatisfy = (myCurSC.State() == TopAbs_IN || myCurSC.State() == TopAbs_ON);
- }
- break;
- case TopAbs_FACE:
- {
- myCurProjFace.Perform(aPnt);
- isSatisfy = (myCurProjFace.IsDone() && myCurProjFace.LowerDistance() <= myToler);
- if (isSatisfy)
- {
- // check relatively the face
- Quantity_Parameter u, v;
- myCurProjFace.LowerDistanceParameters(u, v);
- gp_Pnt2d aProjPnt (u, v);
- BRepClass_FaceClassifier aClsf (myCurFace, aProjPnt, myToler);
- isSatisfy = (aClsf.State() == TopAbs_IN || aClsf.State() == TopAbs_ON);
- }
- }
- break;
- case TopAbs_EDGE:
- {
- myCurProjEdge.Perform(aPnt);
- isSatisfy = (myCurProjEdge.NbPoints() > 0 && myCurProjEdge.LowerDistance() <= myToler);
- }
- break;
- case TopAbs_VERTEX:
- {
- isSatisfy = (myCurPnt.Distance(aPnt) <= myToler);
- }
- break;
- default:
- {
- isSatisfy = false;
- }
- }
+ // check relatively to the face
+ Quantity_Parameter u, v;
+ myProjFace.LowerDistanceParameters(u, v);
+ gp_Pnt2d aProjPnt (u, v);
+ BRepClass_FaceClassifier aClsf ( TopoDS::Face( myShape ), aProjPnt, myTol );
+ if ( aClsf.State() == TopAbs_IN || aClsf.State() == TopAbs_ON )
+ return false;