#! /usr/bin/python # import sys import string # def min_max_get_proc (min_max,pos): for it in range (3): if (pos[it] < min_max[it][0]): min_max[it][0] = pos[it] if (min_max[it][1] < pos[it]): min_max[it][1] = pos[it] # def parser (min_max): pos = [0.0,0.0,0.0] while (1): line = sys.stdin.readline () if (line == ""): break cols = string.split (line) if (cols[0] == "endloop"): break if (cols[0] == "vertex"): pos[0] = string.atof (cols[1]) pos[1] = string.atof (cols[2]) pos[2] = string.atof (cols[3]) min_max_get_proc (min_max,pos) # # min_max = [[10000.0,-10000.0],[10000.0,-10000.0],[10000.0,-10000.0]] # while (1): line = sys.stdin.readline () if (line == ""): break cols = string.split (line) length = len (cols) if ((1 < length) and (cols[0] == "facet")): parser (min_max) # print "xmin,xmax\tymin,ymax\tzmin,zmax" print min_max #