C# script - find intersection of two polylines

Hi, I have two closes polylines and would like to find the polyline that shows the area where they intersect.

Is there an existing api call for this?


Region Intersection (RInt) - There must be a C# equivalent?

There is CurveBooleanIntersection function in RhinoCommon.


1 Like

Thanks mikity_kogekoge this is what I was looking for

I see that you are somehow in the C# path. So I would suggest the approach in the attached for matters like these:

SplitPlanarBreps_V2.3dm (385.9 KB) SplitPlanarBreps_V2.gh (129.1 KB)

BTW: For the other issue of yours try to implement first a thread unsafe way like this (not related with closestPoints but the concept should be rather clear - always use options [modes] for // or not as well):

HI, I think this is a different topic to this thread, but I assume making the degreeOfParalelism 10 to 100x larger than the processor count will help the performance. If you split the tasks by the exact number of processors, some of them finish the computation before others finish. If you split the tasks more, then a processor finished earlier can take more tasks.

It will negate any benefit. Study what a locker is (and why to use it).

BTW: Proper thread safe // can speed things (up to a point) … so this talking although on first sight appears off-topic for this thread … is spot on. As a good tutorial challenge try to implement // stuff in the above SplitPlanarBreps def (using 1-5 K closed curves).

1 Like