Get a list of MeshEdgeLines using a Linq statement

Hi everyone,

is above said possible?
I tried but getting this error:

Thanks everybody and have a nice weekend!

Since MeshTopologyEdgeList Class does not implement IEnumerable interface you cannot loop through that collection by Linq. But since we know the length of the collection and we have method to get particular item from collection we can write something like this:
var edgeLines = Enumerable.Range(0, m.TopologyEdges.Count).Select(i => m.TopologyEdges.EdgeLine(i));

3 Likes

Thanks a lot for the explication @RadovanG !