Fix up dump3d output parsing in prospecting-guide script to recognise new 3d types in survex >= 1.2.7

This commit is contained in:
expoonserver 2014-08-05 13:08:03 +01:00
parent c98ed6a3c1
commit 9446c5600c

View File

@ -343,7 +343,7 @@ for fnm in ("../all.3d", "../alltracks.3d"):
for l in file3d:
match = re.match(r'''
^ #start
(MOVE|LINE|NODE) #one of three command types
(MOVE|LINE|NODE|XSECT|XSECT_END|STOP) #one of six data types
\s+(-?[0-9.]+) #X-co-ord
\s+(-?[0-9.]+) #Y-co-ord
\s+(-?[0-9.]+) #altitude
@ -386,10 +386,10 @@ for fnm in ("../all.3d", "../alltracks.3d"):
else:
draw.line([lastx, lasty, x, y], fill="#800080")
lastx,lasty = x,y
if not file3d.close():
# FIXME: If dump3d can't gives an error and exits with non-zero status, this
#if not file3d.close():
# FIXME: If dump3d can't give an error and exits with non-zero status, this
# doesn't get triggered...
print "Running command: %s %s failed: %s" % (dump3d_binary, fnm, file3d)
#print "Running command: %s %s failed: %s" % (dump3d_binary, fnm, file3d)
surfacecolour = "#008000"
repath = re.compile(r'^')
print "Done"