Thank you, Pierre, for sharing the Mouse function, and I find it is interesting. However, Mouse only calculates the shortest distances between points and points, rather than points to curves.
The difficulty of my task lies in an uncertain destination, unlike the route algorithms in google map. Trying to imagine the green line in my diagram as a seashore, we need to find the shortest travel to the coastline, regardless of which point on that coastline. The destination on the curve will move once redirected by the building corners.
Some people suggest me to combine the ‘curve closest point’ battery with the ‘shortest path’ battery. The first step is to pull all points of building corners to the targeted curve. The second step is to generate all the route options by linking all the points of building corners. The last step is to find the shortest path between the starting point to the first turning point around the building corner. The three steps will provide the route network. Before running the shortest path battery, many routes hitting the building need to be filtered out.
I consider their suggestion, but still, worry about the huge computation tasks if there are thousands of hundreds of input of starting points, building corner points and curves.
Desperately looking for fast computation algorithms, I’d appreciate it as fast as ‘curve closest point’!