Sort mesh UV faces

Hi to all,
I am having a hard time trying to sort by UV the mesh faces. Ideally, I would like to select faces along the mesh by its UV component and sort them by branches. See example below:


Sort mesh by UV.gh (25.5 KB)
I have tried the definition in this post but nothing works, it might be because of how the surface is created? Any idea about how to solve this?
Any help is greatly appreciated.

For those who are interested I managed to do it by simply using isotrim instead of quadremesh, for some reason quadremesh shuffles the faces order and it is tough to sort them afterwards.

Sort surface UV.gh (33.2 KB)