I’m trying to get two arrays of wire frame curves for surfaces. First array would be set of curves in one direction, 2nd array would be set of curves in another direction. Do you have any ideas, how to make it possibly the best way? Unfortunately there is no direct way as far as I can see.

Maybe it’s close, but this is not what I’m looking for. Your code will return only two arrays containing two curves each (edge curves). While I don’t know how many curves in array could possibly be. I’m working with complex surfaces, and there can be nearly infinite number of curves in each direction. For this purpose my code is doing just what I want. I take first curve, put it to second array, and check which curves are intersecting this one. Those will be put to first array, remaining curves will be put to second array alongside first curve.