# Filename: tri_set_properties_contour.py
# Purpose: Add contour lines to a triangulation.
# Returns: Void.

from maptek import vulcan

input_tri = 'toes_and_crests.00t' # input triangulation

# property list
# SHADED: True = 1; False = 0
# WIREFRAME: True = 1; False = 0
# USE_CONTOUR: True = 1; False = 0
# CONTOUR: Distance interval
# PATTERN: 1 = solid fill with contour lines; 0 = just contour lines

with vulcan.triangulation(input_tri,'w') as tri: # Open triangulation in write mode
    props = tri.get_properties()
    props["SHADED"] = 0
    props["WIREFRAME"] = 1
    props["USE_CONTOUR"] = 1
    props["CONTOUR"] = 10
    props["PATTERN"] = 1
    tri.set_properties(props)