if ( myCuts[ iC1 ][ iP1 ].SquareDistance( myCuts[ iC2 ][ iP2 ]) < tol * tol )
{
nbShared += 2;
- isSharedPnt[ i1 ] = isSharedPnt[ i2 ] = true;
+ if ( myCuts[ iC1 ][ 0 ].SquareDistance( myCuts[ iC1 ][ 1 ]) < tol * tol )
+ isSharedPnt[ iC1 * 2 ] = isSharedPnt[ iC1 * 2 + 1 ] = true;
+ else if ( myCuts[ iC2 ][ 0 ].SquareDistance( myCuts[ iC2 ][ 1 ]) < tol * tol )
+ isSharedPnt[ iC2 * 2 ] = isSharedPnt[ iC2 * 2 + 1 ] = true;
+ else
+ isSharedPnt[ i1 ] = isSharedPnt[ i2 ] = true;
}
}
}
// ---------------------------------
const double tol = Precision::Confusion();
+ const double angularTol = 1e-5;
std::vector< gp_XYZ > faceNormals;
SMESH_MeshAlgos::Intersector meshIntersector( theMesh, tol, faceNormals );
std::unique_ptr< SMESH_ElementSearcher> faceSearcher;
if ( intPoints.size() == 2 )
toCut = true;
else if ( isCylinderOnFace )
- toCut = cylAxis.Direction().IsParallel( edegDir, tol );
+ toCut = cylAxis.Direction().IsParallel( edegDir, angularTol );
else
{
SMESH_NodeXYZ nBetween;
isOut( intPnt[1].myNode, planeNormal, intPnt[1].myIsOutPln, 1 );
const Segment * closeSeg[2] = { 0, 0 };
if ( intPnt[0].myIsOutPln[0] )
- closeSeg[0] = findTooCloseSegment( intPnt[0], 0.5 * theWidth - tol, tol,
+ closeSeg[0] = findTooCloseSegment( intPnt[0], 0.5 * theWidth - 1e-3*tol, tol,
segment, n1, segmentsOfNode );
if ( intPnt[1].myIsOutPln[0] )
- closeSeg[1] = findTooCloseSegment( intPnt[1], 0.5 * theWidth - tol, tol,
+ closeSeg[1] = findTooCloseSegment( intPnt[1], 0.5 * theWidth - 1e-3*tol, tol,
segment, n1, segmentsOfNode );
int nbCut = bool( closeSeg[0] ) + bool( closeSeg[1] );
if ( nbCut == 0 )