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

0032859: Modeling Algorithms - BRepLib_FindSurface not return an expect plane

BRepLib/BRepLib_FindSurface.cxx = removing very small values from coordinate of normal
bug32859 - test case added
This commit is contained in:
ifv
2022-09-08 14:08:00 +03:00
committed by smoskvin
parent 2949b238c1
commit 526c506cb0
2 changed files with 29 additions and 1 deletions

View File

@@ -506,7 +506,14 @@ void BRepLib_FindSurface::Init(const TopoDS_Shape& S,
if (!isSolved)
return;
//Removing very small values
Standard_Real aMaxV = Max(Abs(aVec(1)), Max(Abs(aVec(2)), Abs(aVec(3))));
Standard_Real eps = Epsilon(aMaxV);
for (i = 1; i <= 3; ++i)
{
if (Abs(aVec(i)) <= eps)
aVec(i) = 0.;
}
gp_Vec aN (aVec (1), aVec (2), aVec (3));
Handle(Geom_Plane) aPlane = new Geom_Plane (aBaryCenter, aN);
myTolReached = Controle (aPoints, aPlane);