Data race with BRepOffsetAPI_NormalProjection in parallel for loop

Dear all,

I am experiences issue when using the BRepOffsetAPI_NormalProjection  class in a parallel for loop. For the parallel for loop I create a vector of independent objects. Each object contains the face and the wire for the projection I am interesting in performing and the object also contains the proper container for the result of the operation.

When running my code, I get the 0xFFFFFFFFFFF error at the line  proj.Build(); which is the line that should perform the normal projection.

Has any of you experienced something similar? If Yes, may I kindly ask you a hint on how to solve this issue?

I sincerely appreciate all your help,

Kind regards,

Paolo 

qa qa's picture

Hello Paolo,

Usually, OCCT classes don't support thread-safety. So, please make instance  of the BRepOffsetAPI_NormalProjection class private to eliminate possible data-races.

qa qa