+ double dot = n2p * faceNorm;
+ if ( Abs( dot ) > tol ) // not on face plane
+ {
+ bool isOut = true;
+ if ( nbNodes > 3 ) // maybe the face is not planar
+ {
+ double elemThick = 0;
+ for ( i = 1; i < nbNodes; ++i )
+ {
+ gp_Vec n2n( xyz[0], xyz[i] );
+ elemThick = Max( elemThick, Abs( n2n * faceNorm ));
+ }
+ isOut = Abs( dot ) > elemThick + tol;
+ }
+ if ( isOut )
+ return isOut;
+ }