1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0028844: Regression vs 7.1.0: Exception is raised by the solid classification algorithm

Protection from normalization of the null vector.

Test cases for the issue.
This commit is contained in:
emv
2017-06-16 08:59:21 +03:00
committed by bugmaster
parent f24f542856
commit df119b4ed9
8 changed files with 106 additions and 17 deletions

View File

@@ -603,17 +603,20 @@ Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P,
{
gp_Vec Norm = aVecD1U.Crossed (aVecD1V);
Standard_Real tt = Norm.Magnitude();
tt = Abs (Norm.Dot (V)) / (tt * Par);
if (tt > maxscal)
if (tt > gp::Resolution())
{
maxscal = tt;
L = gp_Lin (P, V);
_Par = Par;
ptfound = Standard_True;
if (maxscal>0.2)
tt = Abs (Norm.Dot (V)) / (tt * Par);
if (tt > maxscal)
{
myParamOnEdge=svmyparam;
return 0;
maxscal = tt;
L = gp_Lin (P, V);
_Par = Par;
ptfound = Standard_True;
if (maxscal>0.2)
{
myParamOnEdge=svmyparam;
return 0;
}
}
}
}