# Filename: tri-get_vertices.py
# Purpose: Get the vertices of a triangulation as NumPy array.
# Returns: 2D NumPy array.

from maptek import vulcan
from NumPy import np

input_tri = 'cube.00t'

with vulcan.triangulation(input_tri) as tri: 
    vertices = tri.get_vertices()

    # do something with list...
    print(vertices) # output in scientific notation by default
    
    # format numbers to 2 decimal places
    for pt in vertices:
        print([ "{:0.2f}".format(x) for x in pt ])