Multi segment grid intersection

I tried to use a a code for finding intersections in the grids.
( see in: Finding nearest Points to Grid Intersections )
Unfortunately, it seems that it counts multi segments grids in the code (each segment as a grid), so the code wont work for me.
Any ideas how to solve it?

Try using the group curves node from Archilab package which should be able to find and join them, and they can then each be converted to polycurve objects.

Just get each segment of the multi grid and reference them individually for any crossings. Remove the ones that don’t intersect.