Handling slopes self-intersections

Greetings! I made some procedural track generation and since track has various heights I need to add edge slopes. Since I’m not good in geometry I need your advices about handling slopes intersections. What are my options here?

Thanks in advance :pray: