1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-24 13:50:49 +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

@@ -33,8 +33,14 @@ void Intf::PlaneEquation (const gp_Pnt& P1,
gp_XYZ v2=P3.XYZ()-P2.XYZ();
gp_XYZ v3=P1.XYZ()-P3.XYZ();
NormalVector= (v1^v2)+(v2^v3)+(v3^v1);
NormalVector.Normalize();
PolarDistance = NormalVector * P1.XYZ();
Standard_Real aNormLen = NormalVector.Modulus();
if (aNormLen < gp::Resolution()) {
PolarDistance = 0.;
}
else {
NormalVector.Divide(aNormLen);
PolarDistance = NormalVector * P1.XYZ();
}
}