1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0030913: Invalid result of Fusing slices

Refactoring of the Line-Line intersection method strengthening the parallel and coincidence criteria to allow almost parallel lines have an intersection point.
This commit is contained in:
emv
2019-08-19 08:33:40 +03:00
committed by apn
parent 3dd193aa6d
commit 115d350e09
4 changed files with 205 additions and 135 deletions

View File

@@ -1395,7 +1395,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
if (aCT1==GeomAbs_Line && aCT2==GeomAbs_Line) {
// check for the two lines coincidence
Standard_Real aPAR_T, aT11, aT12, aT21, aT22, aT1m, aT2m;
Standard_Real aD2, aTolE1, aTolE2, aTol2, aDot;
Standard_Real aD2, aTolE1, aTolE2, aTol2;
gp_Lin2d aL1, aL2;
gp_Pnt2d aP1m;
//
@@ -1423,14 +1423,10 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
if (aT2m>aT21 && aT2m<aT22) {
const gp_Dir2d& aDir1=aL1.Direction();
const gp_Dir2d& aDir2=aL2.Direction();
aDot=aDir1*aDir2;
if (aDot<0.) {
aDot=-aDot;
}
//
if ((1.-aDot)<5.e-11){//0.00001 rad
localok = Standard_False;
break;// from for (k = 0; k < 2; ++k){...
if (aDir1.IsParallel (aDir2, Precision::Angular()))
{
localok = Standard_False;
break;// from for (k = 0; k < 2; ++k){...
}
}//if (aT2m>aT21 && aT2m<aT22) {
}//if (aD2<aTol2) {