Part: Improve TopoShape::findPlane

Since OCC 7.7 using GeomLib_IsPlanarSurface without a custom tolerance may fail because the default value is too strict.
To fix this problem forward the passed tolerance value to GeomLib_IsPlanarSurface.

This fixes issue 20633
This commit is contained in:
wmayer
2025-04-05 22:06:08 +02:00
committed by Max Wilfinger
parent 9d806694ff
commit 6500a872eb

View File

@@ -3970,7 +3970,7 @@ bool TopoShape::findPlane(gp_Pln& pln, double tol, double atol) const
else {
TopLoc_Location loc;
Handle(Geom_Surface) surf = BRep_Tool::Surface(face, loc);
GeomLib_IsPlanarSurface check(surf);
GeomLib_IsPlanarSurface check(surf, tol);
if (check.IsPlanar()) {
plane = check.Plan();
}