How to check if Civil3D PolyCurve has self intersection?

Hello everyone,

I have a script which errors on Civil3D PolyLines (PolyCurves in Dynamo) when they are self intersecting.
Is there a way to only filter out these PolyLines and then explode them? (Geometry.Explode on each line would create other errors so a filter before that would be neccessary).

I couldn’t find a node to check this property and i dont have the Python/ API knowledge to find out.

Thanks in advance!

PS: I also provided a Civil3D File with a selfintersecting PolyLine and a sample Dynamo file.

ErrorMessage.dyn (7.0 KB)
Selfintersecting PolyLine.dwg (886.2 KB)

1 Like

This might be a way, self crossing will generate an error resulting in null, don’t care if the crossing is the or false. null is the key. The PolyCurve at index 11 has a self intersection so Dynamo can not figure a solution due to multiple wires.