How to close offsetted curves?

You can use this

and script to project curve on mesh

road.gh (7.6 KB)