38 |
|
echo "" |
39 |
|
echo "In what scene file is the gensky command located?" |
40 |
|
readvar genskyf |
41 |
< |
if ( "$genskyf" == "$none" || ! -r "$genskyf" ) then |
41 |
> |
if ( "$genskyf" == "$nofile" || ! -r "$genskyf" ) then |
42 |
|
echo "You will not be able to compute" |
43 |
|
echo "daylight factors without a gensky file" |
44 |
|
else |
45 |
|
set extamb=`xform -e $genskyf|sed -n 's/^# Ground ambient level: //p'` |
46 |
+ |
echo extamb = $extamb |
47 |
|
endif |
48 |
< |
echo "Is the z-axis your zenith direction?" |
49 |
< |
if ( "$ans" !~ [yY]* ) then |
48 |
> |
echo -n "Is the z-axis your zenith direction? " |
49 |
> |
if ( "$<" !~ [yY]* ) then |
50 |
|
echo "I'm sorry, you cannot use this script" |
51 |
|
exit 1 |
52 |
|
endif |
54 |
|
readvar wporig |
55 |
|
set wporig=($wporig) |
56 |
|
echo "What is the x and y size (width and length) of the workplane?" |
57 |
< |
read wpsize |
57 |
> |
readvar wpsize |
58 |
|
set wpsize=($wpsize) |
59 |
|
set wpres=(`rcalc -n -e '$1=if(l,'"floor($maxres*$wpsize[1]/$wpsize[2]),$maxres);"'$2=if(l,'"$maxres,floor($maxres*$wpsize[2]/$wpsize[1]));l=$wpsize[2]-$wpsize[1]"`) |
60 |
|
set rtargs=($rtargs -ar `getinfo -d<$octree|rcalc -e '$1=floor(16*$4/'"($wpsize[1]+$wpsize[2]))"`) |
72 |
|
exit 0 |
73 |
|
endif |
74 |
|
echo "Starting rtrace calculation -- this will take some time..." |
75 |
< |
cnt $wpres | rcalc -e '$1=($1+.5)/'"$wpres[1]*$wpsize[1]+$wporig[1]" \ |
76 |
< |
-e '$2=(1-($2+.5)/$wpres[2])*$wpsize[2]+$wporig[2]" \ |
77 |
< |
-e '$3='"$wporig[3]" -e "$4=0;$5=0;$6=1" \ |
75 |
> |
cnt $wpres[2] $wpres[1] \ |
76 |
> |
| rcalc -e '$1=($2+.5)/'"$wpres[1]*$wpsize[1]+$wporig[1]" \ |
77 |
> |
-e '$2=(1-($1+.5)/'"$wpres[2])*$wpsize[2]+$wporig[2]" \ |
78 |
> |
-e '$3='"$wporig[3]" -e '$4=0;$5=0;$6=1' \ |
79 |
|
| rtrace $rtargs -I -ov -faf $octree \ |
80 |
|
| pvalue -r -x $wpres[1] -y $wpres[2] -df \ |
81 |
< |
| pfilt -h 20 -n 0 -x 512 -y 512 -p 1 -r .7 > $iltemp |
81 |
> |
| pfilt -h 20 -n 0 -x 256 -y 256 -p 1 -r 1 > $iltemp |
82 |
|
set maxval=`getinfo < $iltemp | rcalc -i 'EXPOSURE=${e}' -e '$1=3/e'` |
83 |
|
if ( "$ilpict" != "$nofile" ) then |
84 |
|
echo "Making illuminance contour picture $ilpict..." |