File indexing completed on 2026-04-09 07:49:02
0001
0002 usage(){ cat << EOU
0003 openline.sh
0004 ============
0005
0006 ::
0007
0008 ./openline.sh 0
0009 ./openline.sh 1
0010 ./openline.sh 63
0011
0012
0013 ./openline.sh 137
0014
0015 Open path specified by a line of a file, for example
0016 create the list of path using grabsnap.sh.
0017 See also image_grid.sh
0018
0019 If the path is a standard geocache path then the meshname
0020 is looked up by this script.
0021
0022 EOU
0023 }
0024
0025 msg="=== $BASH_SOURCE :"
0026 idx0=${1:-0}
0027 idx1=$(( $idx0 + 1 ))
0028
0029
0030 pathlist=/tmp/elv_jpg.txt
0031 PATHLIST=${PATHLIST:-$pathlist}
0032 line=$(sed "${idx1}q;d" $PATHLIST)
0033
0034 if [ -f "$line" ]; then
0035 echo $msg line idx0 $idx0 idx1 $idx1 of file $PATHLIST is $line
0036 open $line
0037
0038 aftgeom=${line
0039 geom=${aftgeom/\/*}
0040 meshname=$HOME/.opticks/GEOM/$geom/CSGFoundry/meshname.txt
0041
0042 if [ -f "$meshname" ]; then
0043
0044 tline=${line/_moi*}
0045 midx0=${tline
0046 [ "${midx0:0:1}" == "t" ] && midx0=${midx0:1}
0047 midx1=$(( $midx0 + 1 ))
0048
0049 echo meshname $meshname
0050 mn=$(sed "${midx1}q;d" $meshname)
0051 echo $msg midx0 $midx0 midx1 $midx1 mn $mn
0052 else
0053 echo dint match base
0054 fi
0055 else
0056 echo $msg error line idx0 $idx0 idx1 $idx1 of PATHLIST $PATHLIST is line $line : BUT that is not an existing path
0057 fi
0058
0059