Cut down on noise from parsing dump3d output

This commit is contained in:
olly 2015-06-20 11:43:34 +12:00
parent 486ef4a633
commit c01591872d

View File

@ -335,9 +335,13 @@ for fnm in ("../all.3d", "../alltracks.3d"):
draw = draws[mapcode] draw = draws[mapcode]
lastx, lasty = 0, 0 lastx, lasty = 0, 0
for l in file3d: for l in file3d:
# Quickly skip data we aren't interested in
if l.startswith("ERROR_INFO"): continue
if l.startswith("XSECT"): continue
match = re.match(r''' match = re.match(r'''
^ #start ^ #start
(MOVE|LINE|NODE|XSECT|XSECT_END|STOP) #one of six data types (MOVE|LINE|NODE) #data type
\s+(-?[0-9.]+) #X-co-ord \s+(-?[0-9.]+) #X-co-ord
\s+(-?[0-9.]+) #Y-co-ord \s+(-?[0-9.]+) #Y-co-ord
\s+(-?[0-9.]+) #altitude \s+(-?[0-9.]+) #altitude