we have an application that uses parts of OpenCASCADE to perform point membership classification (inside-outside tests) on STEP geometries. The IO test is done using BRepClass3d_SClassifier, however its performance gets extremely low especially when we have a lot of query points and very complicated geometries (for example, a lot of B-Spline surfaces). I have been digging in the sources a little bit and profiled the class, and it turns out that for every test, the most expensive call stack looks as follows:
BrepClass3d_SCLassifier::Perform -> BRepClass3d_SolidExplorer::OtherSegment -> Extrema_ExtPS::Extrema_ExtPS -> Extrema_ExtPS::Perform -> Extrema_GenExtPS::Perform->Extrema_GenExtPS::BuildGrid
When we have a lot of query points, about 80% of the time is spent in BuildGrid function (according to the profiler output). Now, I am not experienced with this part of the code, but as I understand from the sources, the function builds a parametric grid for B-Spline surfaces, and according to my profiling, most of the time is spent on evaluating the surface at given parameters.
Question: is it possible/is it already planned that the result of "BuildGrid" will not be thrown away? I see that that in the function itself there is a check if the grid was already built, and if yes, just returns that. But if we use it through the other pipeline, basically for every inside-outside query, this grid has to be rebuilt.
Is it the intended behavior, or a potential feature request for the next release?
Sorry if the question was too long. I hope it makes sense.