| 6 |
|
# Oct. 2002 Greg Ward |
| 7 |
|
# Aug. 2004 GW (added -f option to read glazings from file) |
| 8 |
|
# Funding for this development generously provided by Visarc, Inc. |
| 9 |
< |
# (http://www.vizarc.com) |
| 9 |
> |
# (http://www.visarc.com) |
| 10 |
|
# |
| 11 |
|
|
| 12 |
|
################################################################# |
| 13 |
|
# |
| 14 |
+ |
# The general assumption is that one surface is uncoated, and |
| 15 |
+ |
# reflectances and transmittances are computed from this fact. |
| 16 |
+ |
# If the user tries to enter two coated surfaces on the same |
| 17 |
+ |
# pane, the script complains and exits. |
| 18 |
+ |
# |
| 19 |
|
# Supported surface types: |
| 20 |
|
# |
| 21 |
|
set sn_arr=("clear glass" "VE1-2M low-E coating" "PVB laminated" "V-175 white frit" "V-933 warm gray frit") |
| 35 |
|
set part_arr=(0 0 0 1 1) |
| 36 |
|
|
| 37 |
|
while ($#argv > 0) |
| 38 |
< |
set header="Surface Tr Tg Tb Rcr Rcg Rcb Rgr Rgg Rgb" |
| 38 |
> |
set header="Surface Tr Tg Tb Rcr Rcg Rcb Rgr Rgg Rgb Part" |
| 39 |
|
if ($#argv < 2 || "$argv[1]" != '-f') then |
| 40 |
|
echo "Usage: $0 [-f glazing.dat ..]" |
| 41 |
|
exit 1 |
| 52 |
|
@ i=2 |
| 53 |
|
while ($i <= $nl) |
| 54 |
|
set ln=(`sed -n ${i}p $gf:q`) |
| 55 |
< |
if ($#ln != 10) then |
| 56 |
< |
echo "Expected 10 words in line: $ln" |
| 55 |
> |
if ($#ln != 11) then |
| 56 |
> |
echo "Expected 11 words in line: $ln" |
| 57 |
|
exit 1 |
| 58 |
|
endif |
| 59 |
|
echo $ln[1] |
| 64 |
|
set rc_r_arr=($rc_r_arr $ln[5]) |
| 65 |
|
set rc_g_arr=($rc_g_arr $ln[6]) |
| 66 |
|
set rc_b_arr=($rc_b_arr $ln[7]) |
| 67 |
< |
set rg_r_arr=($rc_r_arr $ln[8]) |
| 68 |
< |
set rg_g_arr=($rc_g_arr $ln[9]) |
| 69 |
< |
set rg_b_arr=($rc_b_arr $ln[10]) |
| 67 |
> |
set rg_r_arr=($rg_r_arr $ln[8]) |
| 68 |
> |
set rg_g_arr=($rg_g_arr $ln[9]) |
| 69 |
> |
set rg_b_arr=($rg_b_arr $ln[10]) |
| 70 |
> |
set part_arr=($part_arr $ln[11]) |
| 71 |
|
@ i++ |
| 72 |
|
end |
| 73 |
|
end |