thread-safe NURBS surface evaluation

I have been using OCCT for several years now. I started with version 6.5. In that version I discovered that I could not simultaneously evaluate a NURBS surface from different threads without encountering errors. With help from the OCCT team and this forum I learned that there were caching data structures used by the evaluation code that were incorrectly shared by each thread. The solution I came up with was to duplicate all the surfaces for each thread so that I didn't need to mutex the evaluation operations.

I just saw that OCCT 6.5.3 has been released and I saw bug 22550 in the release notes. This sounds very promising and that it might fix the issues I had encountered in the past. But I am not sure if it addresses everything.

Could someone give me more info about this fix, and whether it is now possible to safely evaluate a NURBS surface from multiple threads?

ps. I am very supportive of the improvements I have seen for OCCT in the recent past. Having multiple forums should make it easier to browse for different categories of posts. Having the git repository should help get patches and build issues resolved more quickly. I hope we can all find ways to help with improving OCCT.

Forum supervisor's picture

Dear Tod,

issue #22550 provided sveral corrections for thread safety in modelling algorithms like approximation, intersection, etc. It did not address the issue of non-safety of parallel evaluation of NURBS (when the same BSpline curve or surface is evaluated from different threads simultaneously). That problem has been addressed in another issue, #22939. The fix is checked and integrated but unfortunately after the 6.5.3 release. You are welcome to try it, just build OCCT using the last version from the Git repository (master).

Regards,
Forum Supervisor