Contour Brep

Hello everyone,

I am trying to create contours for breps with Brep.CreateContourCurves(brep, plane)
in a parallel forloop, but it often gives me errors, completely skipping some planes.
The c# script is inside a cluster: I am saying that because if I go inside and outside this cluster, different sections will disappear. Somtimes using Recompute works, others it doesn’t.

Thank you in advance for your help,
Eleni

As I said N times … I would strongly suggest to study in depth what // computing is (and most notably thread safety : the big thing on that matter).

Start from here:

https://www.albahari.com/threading/

When you think that you are ready (hope dies last) is - maybe - time to deal with the dining philosophers famous puzzle (any N of persons - not just 5).

1 Like

Starting from Rhino 6 Grasshopper there is multithreading component for contour.

If you really want C# code you can check this:

Storing objects in Arrays solves here threadsafe problem.

1 Like

Thank you!