+ }
+ else if ( intersected[0] && intersected[1] ) // check if one of pyramids is in a hole
+ {
+ gp_Pnt P ( PC.XYZ() + tmpDir.XYZ() * 0.5 * PC.Distance( intPnt[0] ));
+ if ( searcher->GetPointState( P ) == TopAbs_OUT )
+ intersected[0] = false;
+ else
+ {
+ P = ( PC.XYZ() - tmpDir.XYZ() * 0.5 * PC.Distance( intPnt[1] ));
+ if ( searcher->GetPointState( P ) == TopAbs_OUT )
+ intersected[1] = false;
+ }
+ }