# Filename: tri_update_grid.py
# Purpose: Update a grid from a triangulation.
# Returns: Void.

from maptek import vulcan

input_tri = 'image_topo.00t'
input_grid = 'thortopo.00g'

# check grid
grid = vulcan.grid(input_grid)
assert(grid.ok)

with vulcan.triangulation(input_tri, 'w') as tri:
    tri.update_grid(grid)
    grid.save()