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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user