# Filename: tri_shortest_path.py
# Purpose: Find the shortest path between two points.
# Returns: Vulcan object.

from maptek import vulcan
from maptek import vulcan_gui

input_tri = 'topo.00t' # input triangulation
pt1 = vulcan.point(77495.53, 4410.50, 173.37, 0.0, 0, '')
pt2 = vulcan.point(78399.41, 4539.64, 188.24, 0.0, 0, '')

with vulcan.triangulation(input_tri) as tri: # Open triangulation in read mode
    path = tri.shortest_path(pt1, pt2)

vulcan_gui.temp_object(path) # display the line