mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027896: Prm-Prm intersection algo returns wrong result if it is called with start intersection point, which lies in the domain boundary
Purger has been disabled (in IntPatch_PrmPrmIntersection algorithm) if some points have been added in the Walking line (it is stupidly, first, to insert some points in the line and, after that, to delete points from this line). Some improvements in IntWalk_PWalking::SeekPointOnBoundary(...) method have been made (see comments in the code for detail information). Some test cases have been adjusted according to their new behavior.
This commit is contained in:
@@ -1574,10 +1574,22 @@ void Draft_Modification::Perform ()
|
||||
anIntCurv->D1(aParF, aPf, aDirNF);
|
||||
anIntCurv->D1(aParL, aPl, aDirNL);
|
||||
|
||||
aDirNF.Normalize();
|
||||
aDirNL.Normalize();
|
||||
aDirOF.Normalize();
|
||||
aDirOL.Normalize();
|
||||
Standard_Real aSqMagn = aDirNF.SquareMagnitude();
|
||||
|
||||
if (aSqMagn > Precision::SquareConfusion())
|
||||
aDirNF.Divide(sqrt(aSqMagn));
|
||||
|
||||
aSqMagn = aDirNL.SquareMagnitude();
|
||||
if (aSqMagn > Precision::SquareConfusion())
|
||||
aDirNL.Divide(sqrt(aSqMagn));
|
||||
|
||||
aSqMagn = aDirOF.SquareMagnitude();
|
||||
if (aSqMagn > Precision::SquareConfusion())
|
||||
aDirOF.Divide(sqrt(aSqMagn));
|
||||
|
||||
aSqMagn = aDirOL.SquareMagnitude();
|
||||
if (aSqMagn > Precision::SquareConfusion())
|
||||
aDirOL.Divide(sqrt(aSqMagn));
|
||||
|
||||
const Standard_Real aCosF = aDirNF.Dot(aDirOF), aCosL = aDirNL.Dot(aDirOL);
|
||||
const Standard_Real aCosMax = Abs(aCosF) > Abs(aCosL) ? aCosF : aCosL;
|
||||
|
Reference in New Issue
Block a user