ekumenlabs / terminus

Library to create cities and terrains
Apache License 2.0
56 stars 29 forks source link

Avoid extra segments on lane start / end #247

Closed basicNew closed 7 years ago

basicNew commented 7 years ago

When we generate an intersection in the lane start (or end) we need to prune the extra segment(s) that may be before (or after) the intersection. We are already doing something to prevent this in https://github.com/ekumenlabs/terminus/blob/master/terminus/generators/monolane_generator.py#L105-L110, but we need to generalize it for an arbitrary set of waypoints as long as they belong to the same road node. As an example below is a capture where two segments exist before the junction connection:

screenshot from 2017-05-12 14 59 48