Create procedural curb with sharp corners, respecting the UV map

Seems like a good use-case for my Curve-Sweeper node-group:

Good luck.