I am writing to ask for advice, if anyone has got any, regarding my usage of the BRepMesh_Incremental class. I have built a small working example I am trying to use to debug my code but I cannot get my head around it. Basically, my problem is the following: given a std::vector<TopoDS_Face> mesh them running a parallel for loop using the BRepMesh_IncrementalMesh in parallel. The small code I have written is posted hereafter:
Standard_Real tolerance = 0.25;
Standard_Real angular_tolerance = 0.5;
Standard_Real minTriangleSize = Precision::Confusion();
Concurrency::parallel_for_each(facesToTessellate.begin(), facesToTessellate.end(), [&](TopoDS_Face pFace)
The thing that puzzles me is that this the for loop does not always hangs but sometimes it works and I get through it but some others, the application hangs and I do not get out of the for loop. I have checked and all the faces I am working with are valid shapes with no errors. Does it look to you I am doing something clearly wrong?
I have been reading some threads about BRepMesh_IncrementalMesh and it might hangs sometimes. This is why I set SetControlSurfaceDeflection to false and I have tried using a much higher minTriangleSize.
I would deeply appreciate any help.
Thank you in advance for any help,