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