Bug in BRepClass_FaceClassifier::Perform

void BRepClass_FaceClassifier::Perform(const TopoDS_Face& face, const gp_Pnt& P, const Standard_Real Tol)
{
//-- Voir BRepExtrema_ExtPF.cxx
BRepAdaptor_Surface Surf(face);
//-- Handle(BRepAdaptor_HSurface) HS = new BRepAdaptor_HSurface(Surf);
Standard_Real U1, U2, V1, V2;
BRepTools::UVBounds(face, U1, U2, V1, V2);
Extrema_ExtPS myExtrem;
//-- myExtrem.Initialize(HS, U1, U2, V1, V2, Tol, Tol);
myExtrem.Initialize(Surf, U1, U2, V1, V2, Tol, Tol);
//----------------------------------------------------------
//-- On cherche le point le plus proche , PUIS
//-- On le classifie.
// Standard_Integer nbv = myExtrem.NbExt();
Standard_Integer nbv = 0; // xpu
Standard_Real MaxDist = RealLast();
Standard_Integer indice = 0;
if(myExtrem.IsDone()) {
....

I think that before the line with if (...) there should be:
myExtrem.Perform(P);

Roman Lygin's picture

Hi Marco,

You're correct. Another approach (though less obvious) is to use a constructor with the same parameters. A constructor calls Initialize() and Perform() then.

Roman
---
opencascade.blogspot.com - the Open CASCADE blog
www.cadexchanger.com - CAD Exchanger, your 3D data translator