# Filename: tri_delete_face.py
# Purpose: Delete facet of a triangulation and purge nodes no longer used.
# Returns: None.

from maptek import vulcan

input_tri = 'topo.00t' # input triangulation
face_index = 0 # index of facet to delete

with vulcan.triangulation(input_tri, 'w') as tri: # Open triangulation in write mode.
    tri.delete_face(face_index, True) # Delete facet and nodes no longer used.
    # To keep the nodes, change True -> False.