Geometry nodes: How to delete specific edges from mesh, with Modulo?

I work on a complex node tree of that supports large amount of customized roads. I simplified it down to my problem, which is that I’d like to create path ways from road mesh. However, I haven’t figured out how to use index selection properly. The result should roughly look the those 3 blue lines, but for every individual and unique spline and inside each road cell, not on their edges.

Grey is road mesh. White illustrates edges/points from which I want to preserve only those that will become blue path ways.

Top spline should have 5 path ways
Left spline shoud have 4 path ways
Right spline shoud have 2 path ways

If someone could explain and show me what I’m missing here, I’d appreciate it!

P.S. I thought about other ways how to create these path ways, but I’m also trying to stress the performance of the original node tree, so this is what I think will be least taxing way for path way generation, since I can simply use already generated road mesh, instead of initiating another run for dozens (maybe even lower hundreds) of splines in my projects.

traffic paths.blend (1.3 MB)

If it is at all possible to go upstream from the road meshes to their source splines (as is simple enough to do here) I recommend you do that, instead:


traffic paths - lane center paths - Geometry Nodes - 5.1 - 2025-11-06.blend (1.8 MB)

This creates a profile curve like the one you used to generate the road meshes, with two important differences:

  1. Each one has one point less than the road mesh’s, and it is also narrower by a factor of (lane count - 1)/(lane count). These points are in the centers of the lanes.
  2. The “curve to points → points to curves” trick produces “curves” that are only single points, which are digestible by the curve-to-mesh node to produce separated edge lines rather than grids.

However, if you can’t go upstream, I recommend playing with the “dual mesh” node, as applied to your road grids: this produces a new mesh that has a vertex where every face used to be. These new grids will then have edge loops running down the centers of each lane, which might get you one step closer to what you wanted.

This was my back up plan, although I didn’t know about the trick with “curves to points” part. That’s very handy! Originally, I though that in this case, I’d have to generate tiny tubes out of curve circles and then merge them instead. That would be very inefficient…

Thank you!