@@ -1694,7 +1694,7 @@ local function dumpseq (seq, filnam_, info_)
1694
1694
-- header
1695
1695
res[1] = 'sequence: ' .. seq.name .. ', ' ..
1696
1696
'l=' .. (seq.l == uninitialized and 'uninitialized' or seq.l)
1697
- res[2] = 'idx kind flg name l dl \z
1697
+ res[2] = 'idx kind flg name l dl \z
1698
1698
spos upos uds'
1699
1699
if info_ then
1700
1700
eal0 = {dx=0, dy=0, ds=0, dtheta=0, dphi=0, dpsi=0}
@@ -1704,17 +1704,24 @@ local function dumpseq (seq, filnam_, info_)
1704
1704
1705
1705
-- elements
1706
1706
seq:foreach \e,i =>
1707
- local ds, uds = seq:ds(i), seq:upos(i)- seq:spos(i)
1708
- local dl = ds-e.l
1709
- res[#res+1] = string.format('%04d %-14s %-3d %-20s%9.3f%8 .3g%s %11.3f%11.3f%8.3f%s',
1710
- i, e.kind, e:get_flags(), e.name, e.l, dl, abs(dl) > eps and '*' or ' ' ,
1711
- seq:spos(i), seq:upos(i), uds, (uds<0 or uds>ds) and '*' or '')
1707
+ local ds, up, sp = seq:ds(i), seq:upos(i), seq:spos(i)
1708
+ local dl, uds = ds-e.l, up-sp
1709
+ res[#res+1] = string.format('%04d %-14s %-3d %-20s%9.3f%9 .3g%11.3f%11.3f%8.3f%s',
1710
+ i, e.kind, e:get_flags(), e.name, e.l, dl, sp, up, uds ,
1711
+ (uds<0 or uds>ds) and '*' or '')
1712
1712
if info_ then
1713
1713
local eal = seq:align(i) or eal0
1714
1714
res[#res] = res[#res] ..
1715
1715
string.format('%11.4f%11.4f%11.4f%11.4f%11.4f%11.4f',
1716
1716
eal.dx, eal.dy, eal.ds, eal.dtheta, eal.dphi, eal.dpsi)
1717
1717
end
1718
+ for is=1,#e do
1719
+ local es = e[is]
1720
+ local el = es.sat*e.l
1721
+ local sp = sp+el
1722
+ res[#res+1] = string.format(' >%02d %-14s %-3d %-18s%9.3f%9s%11.3f%11s%8s',
1723
+ is, es.kind, es:get_flags(), es.name, es.l, '-', sp, '-', '-')
1724
+ end
1718
1725
end
1719
1726
1720
1727
-- return result as a string
0 commit comments