Mercurial > hg > python
comparison util.py @ 34:668d788cac47
handle unbounded Y, landing below target elevation
author | Henry Thompson <ht@markup.co.uk> |
---|---|
date | Sat, 12 Jun 2021 17:25:13 +0100 |
parents | 5488b5d3ba10 |
children |
comparison
equal
deleted
inserted
replaced
26:5488b5d3ba10 | 34:668d788cac47 |
---|---|
15 l=infile.readline().rstrip() | 15 l=infile.readline().rstrip() |
16 ff=PPAT.split(l) | 16 ff=PPAT.split(l) |
17 (host.nr,host.ox,host.oy,host.oz)=intsMaybe(ff) | 17 (host.nr,host.ox,host.oy,host.oz)=intsMaybe(ff) |
18 host.et=ff[9] | 18 host.et=ff[9] |
19 l=infile.readline().rstrip() | 19 l=infile.readline().rstrip() |
20 (host.orad,host.ymin,host.ymax)=intsMaybe(PPAT.split(l)) | 20 l2=PPAT.split(l) |
21 if l2[-1]=='bounded': | |
22 host.orad=int(l2[1]) | |
23 host.ymin=host.ymax=-1 | |
24 else: | |
25 (host.orad,host.ymin,host.ymax)=intsMaybe(PPAT.split(l)) | |
21 if skipColHdrs: | 26 if skipColHdrs: |
22 _=infile.readline() | 27 _=infile.readline() |
23 | 28 |
24 def d(p1,p2): | 29 def d(p1,p2): |
25 dx=p1[0]-p2[0] | 30 dx=p1[0]-p2[0] |