| 1 |
greg |
2.1 |
# SCCSid "$SunId$ LBL"
|
| 2 |
|
|
#
|
| 3 |
|
|
# Create ZONE screen
|
| 4 |
|
|
#
|
| 5 |
|
|
|
| 6 |
|
|
proc zonechange {nm el op} { # record change in ZONE
|
| 7 |
|
|
global radvar zonevar
|
| 8 |
|
|
if {"$nm" == "radvar"} {
|
| 9 |
|
|
if {"$op" == "u"} {
|
| 10 |
|
|
set radvar(ZONE) {}
|
| 11 |
|
|
trace variable radvar(ZONE) wu zonechange
|
| 12 |
|
|
}
|
| 13 |
|
|
trace vdelete zonevar w zonechange
|
| 14 |
|
|
if {"$radvar(ZONE)" == {}} {
|
| 15 |
|
|
set zonevar(IE) Interior
|
| 16 |
|
|
set zonevar(xmin) {}
|
| 17 |
|
|
set zonevar(xmax) {}
|
| 18 |
|
|
set zonevar(ymin) {}
|
| 19 |
|
|
set zonevar(ymax) {}
|
| 20 |
|
|
set zonevar(zmin) {}
|
| 21 |
|
|
set zonevar(zmax) {}
|
| 22 |
|
|
} elseif {[llength $radvar(ZONE)] == 7} {
|
| 23 |
|
|
if [string match {[Ii]*} $radvar(ZONE)] {
|
| 24 |
|
|
set zonevar(IE) Interior
|
| 25 |
|
|
} else {
|
| 26 |
|
|
set zonevar(IE) Exterior
|
| 27 |
|
|
}
|
| 28 |
|
|
set zonevar(xmin) [lindex $radvar(ZONE) 1]
|
| 29 |
|
|
set zonevar(xmax) [lindex $radvar(ZONE) 2]
|
| 30 |
|
|
set zonevar(ymin) [lindex $radvar(ZONE) 3]
|
| 31 |
|
|
set zonevar(ymax) [lindex $radvar(ZONE) 4]
|
| 32 |
|
|
set zonevar(zmin) [lindex $radvar(ZONE) 5]
|
| 33 |
|
|
set zonevar(zmax) [lindex $radvar(ZONE) 6]
|
| 34 |
|
|
}
|
| 35 |
|
|
trace variable zonevar w zonechange
|
| 36 |
|
|
return
|
| 37 |
|
|
}
|
| 38 |
|
|
trace vdelete radvar(ZONE) wu zonechange
|
| 39 |
greg |
2.4 |
set radvar(ZONE) "$zonevar(IE) $zonevar(xmin) $zonevar(xmax) $zonevar(ymin) $zonevar(ymax) $zonevar(zmin) $zonevar(zmax)"
|
| 40 |
greg |
2.1 |
trace variable radvar(ZONE) wu zonechange
|
| 41 |
|
|
}
|
| 42 |
|
|
|
| 43 |
|
|
proc indscale v { # set indirect value
|
| 44 |
|
|
global radvar
|
| 45 |
|
|
set radvar(INDIRECT) $v
|
| 46 |
|
|
}
|
| 47 |
|
|
|
| 48 |
|
|
proc copyzone rf { # copy ZONE settings from another RIF
|
| 49 |
|
|
load_vars [file tail $rf] {ZONE DETAIL INDIRECT VARIABILITY EXPOSURE}
|
| 50 |
|
|
}
|
| 51 |
|
|
|
| 52 |
|
|
proc do_zone w { # set up ZONE screen
|
| 53 |
|
|
global radvar zonevar rifname rif_glob
|
| 54 |
|
|
if {"$w" == "done"} {
|
| 55 |
|
|
trace vdelete radvar(ZONE) wu zonechange
|
| 56 |
|
|
trace vdelete zonevar w zonechange
|
| 57 |
|
|
unset zonevar
|
| 58 |
|
|
return
|
| 59 |
|
|
}
|
| 60 |
|
|
frame $w
|
| 61 |
|
|
# Zone fields
|
| 62 |
|
|
label $w.zol -text ZONE
|
| 63 |
|
|
place $w.zol -relx .0714 -rely .0610
|
| 64 |
|
|
radiobutton $w.zi -text Interior -anchor w -relief flat \
|
| 65 |
|
|
-variable zonevar(IE) -value Interior
|
| 66 |
|
|
place $w.zi -relx .2857 -rely .0610
|
| 67 |
|
|
radiobutton $w.ze -text Exterior -anchor w -relief flat \
|
| 68 |
|
|
-variable zonevar(IE) -value Exterior
|
| 69 |
|
|
place $w.ze -relx .5714 -rely .0610
|
| 70 |
|
|
helplink "$w.zi $w.ze" trad zone type
|
| 71 |
|
|
label $w.maxl -text Maximum
|
| 72 |
|
|
place $w.maxl -relx .0714 -rely .1829
|
| 73 |
|
|
label $w.minl -text Minimum
|
| 74 |
|
|
place $w.minl -relx .0714 -rely .3049
|
| 75 |
|
|
label $w.xl -text X:
|
| 76 |
|
|
place $w.xl -relx .2500 -rely .2439
|
| 77 |
|
|
entry $w.xmax -textvariable zonevar(xmax) -relief sunken
|
| 78 |
|
|
place $w.xmax -relwidth .1786 -relheight .0610 -relx .2857 -rely .1829
|
| 79 |
|
|
entry $w.xmin -textvariable zonevar(xmin) -relief sunken
|
| 80 |
|
|
place $w.xmin -relwidth .1786 -relheight .0610 -relx .2857 -rely .3049
|
| 81 |
|
|
label $w.yl -text Y:
|
| 82 |
|
|
place $w.yl -relx .5000 -rely .2439
|
| 83 |
|
|
entry $w.ymax -textvariable zonevar(ymax) -relief sunken
|
| 84 |
|
|
place $w.ymax -relwidth .1786 -relheight .0610 -relx .5357 -rely .1829
|
| 85 |
|
|
entry $w.ymin -textvariable zonevar(ymin) -relief sunken
|
| 86 |
|
|
place $w.ymin -relwidth .1786 -relheight .0610 -relx .5357 -rely .3049
|
| 87 |
|
|
label $w.zl -text Z:
|
| 88 |
|
|
place $w.zl -relx .7500 -rely .2439
|
| 89 |
|
|
entry $w.zmax -textvariable zonevar(zmax) -relief sunken
|
| 90 |
|
|
place $w.zmax -relwidth .1786 -relheight .0610 -relx .7857 -rely .1829
|
| 91 |
|
|
entry $w.zmin -textvariable zonevar(zmin) -relief sunken
|
| 92 |
|
|
place $w.zmin -relwidth .1786 -relheight .0610 -relx .7857 -rely .3049
|
| 93 |
|
|
helplink "$w.xmin $w.xmax $w.ymin $w.ymax $w.zmin $w.zmax" \
|
| 94 |
|
|
trad zone zone
|
| 95 |
|
|
# Detail
|
| 96 |
|
|
label $w.detl -text Detail:
|
| 97 |
|
|
place $w.detl -relx .0714 -rely .4268
|
| 98 |
|
|
radiobutton $w.detH -text High -anchor w -relief flat \
|
| 99 |
|
|
-variable radvar(DETAIL) -value High
|
| 100 |
|
|
place $w.detH -relx .2857 -rely .4268
|
| 101 |
|
|
radiobutton $w.detM -text Medium -anchor w -relief flat \
|
| 102 |
|
|
-variable radvar(DETAIL) -value Medium
|
| 103 |
|
|
place $w.detM -relx .5357 -rely .4268
|
| 104 |
|
|
radiobutton $w.detL -text Low -anchor w -relief flat \
|
| 105 |
|
|
-variable radvar(DETAIL) -value Low
|
| 106 |
|
|
place $w.detL -relx .7857 -rely .4268
|
| 107 |
|
|
helplink "$w.detH $w.detM $w.detL" trad zone detail
|
| 108 |
|
|
# Indirect
|
| 109 |
|
|
label $w.indl -text Indirect:
|
| 110 |
|
|
place $w.indl -relx .0714 -rely .5488
|
| 111 |
|
|
scale $w.inds -showvalue yes -from 0 -to 5 \
|
| 112 |
greg |
2.2 |
-orient horizontal -command indscale
|
| 113 |
greg |
2.1 |
$w.inds set $radvar(INDIRECT)
|
| 114 |
greg |
2.2 |
place $w.inds -relx .2857 -rely .5488 -relwidth .6500 -relheight .1200
|
| 115 |
greg |
2.1 |
helplink $w.inds trad zone indirect
|
| 116 |
|
|
# Variability
|
| 117 |
|
|
label $w.varl -text Variability:
|
| 118 |
|
|
place $w.varl -relx .0714 -rely .7317
|
| 119 |
|
|
radiobutton $w.varH -text High -anchor w -relief flat \
|
| 120 |
|
|
-variable radvar(VARIABILITY) -value High
|
| 121 |
|
|
place $w.varH -relx .2857 -rely .7317
|
| 122 |
|
|
radiobutton $w.varM -text Medium -anchor w -relief flat \
|
| 123 |
|
|
-variable radvar(VARIABILITY) -value Medium
|
| 124 |
|
|
place $w.varM -relx .5357 -rely .7317
|
| 125 |
|
|
radiobutton $w.varL -text Low -anchor w -relief flat \
|
| 126 |
|
|
-variable radvar(VARIABILITY) -value Low
|
| 127 |
|
|
place $w.varL -relx .7857 -rely .7317
|
| 128 |
|
|
helplink "$w.varH $w.varM $w.varL" trad zone variability
|
| 129 |
|
|
# Exposure
|
| 130 |
|
|
label $w.expl -text Exposure:
|
| 131 |
|
|
place $w.expl -relx .0714 -rely .8537
|
| 132 |
|
|
entry $w.expe -textvariable radvar(EXPOSURE) -relief sunken
|
| 133 |
|
|
place $w.expe -relwidth .1786 -relheight .0610 -relx .2857 -rely .8537
|
| 134 |
|
|
helplink $w.expe trad zone exposure
|
| 135 |
|
|
# Revert and Copy buttons
|
| 136 |
|
|
button $w.revert -text Revert -relief raised \
|
| 137 |
|
|
-command "copyzone $rifname"
|
| 138 |
|
|
place $w.revert -relwidth .1071 -relheight .0610 -relx .98 -rely .98 \
|
| 139 |
|
|
-anchor se
|
| 140 |
|
|
helplink $w.revert trad zone revert
|
| 141 |
greg |
2.3 |
button $w.copy -text Copy -relief raised -command {getfile -grab \
|
| 142 |
greg |
2.1 |
-send copyzone -view view_txt -glob $rif_glob}
|
| 143 |
|
|
place $w.copy -relwidth .1071 -relheight .0610 -relx .98 -rely .90 \
|
| 144 |
|
|
-anchor se
|
| 145 |
|
|
helplink $w.copy trad zone copy
|
| 146 |
|
|
# Focusing
|
| 147 |
|
|
focus $w.xmin
|
| 148 |
|
|
bind $w.xmin <Return> "focus $w.xmax"
|
| 149 |
|
|
bind $w.xmax <Return> "focus $w.ymin"
|
| 150 |
|
|
bind $w.ymin <Return> "focus $w.ymax"
|
| 151 |
|
|
bind $w.ymax <Return> "focus $w.zmin"
|
| 152 |
|
|
bind $w.zmin <Return> "focus $w.zmax"
|
| 153 |
|
|
bind $w.zmax <Return> "focus $w.expe"
|
| 154 |
|
|
bind $w.expe <Return> {}
|
| 155 |
|
|
# Track ZONE variable
|
| 156 |
|
|
if [info exists radvar(ZONE)] {
|
| 157 |
|
|
zonechange radvar ZONE w
|
| 158 |
|
|
trace variable radvar(ZONE) wu zonechange
|
| 159 |
|
|
} else {
|
| 160 |
|
|
zonechange radvar ZONE u
|
| 161 |
|
|
}
|
| 162 |
|
|
}
|