Design: 04.02.01.02/P12
This is an abstract, language-independent design. Grim
details may be found in the
corresponding source code.
You may return to the
documentation
for the module containing this program design, or to the
entire hierarchical table of
topics covered by the PVT.
PROGRAM 12: Network inheritance and initialization of polyline
index
CHARACTERISTICS: ynny
OPERATOR SCRIPT:
STRUCTURE NETWORK INHERITANCE FOR POLYLINE INDEX: This screen
displays several left-right pairs of polylines. Make sure that
all pairs except one have matching linestyles, linewidths, and
colors. Identify the non-matching pair.
DESIGN:
All test cases use same basic structure network for testing
inheritance. Five (distinct if possible) values for the
attribute to be tested are set up and propagated throughout the
network. The first value is the system default from the PDT.
Note that structure #104 is executed by both #103 and #101.
Actual results are displayed on the left, expected results
on the right, with the 14th deliberately made incorrect.
default = val#1
| 102
| / prim 2
| / attr = val#3 val#3
V val#1/ exec 103---------------103
101 / prim 8 prim 3
prim 1 / attr = val#4
exec 102/ prim 4
prim 9 exec 104\
attr = val#2 prim 7 \ val#4
prim 10 \
transform val#2 \
exec 104-----------------------------------------------------104
un-transform prim 5/11
prim 13 attr = val#5
prim 14 prim 6/12
exec 105---------->105
expected values
*** *** *** inheritance for polyline index *** *** ***
use <inquire polyline facilities> to determine:
numlt = number of linetypes
numlw = number of available line-widths
nomlw = nominal line-width (DC)
minlw,maxlw = minimum,maximum line-width (DC)
get 5 linetype values:
llntyp = list of 5 (possible repeated) selected linetypes
get alternative linewidth values:
altlw1 should not exceed .05 (WC) to avoid overlap - distance
between lines will be 1/15 = .06666
altlw1 = min(max scale factor, factor equivalent to .05 in WC)
altlw2 = min scale factor
if default (1.0) is near altlw1 or altlw2, set alternate so as to
maximize the smallest gap among altlw1, altlw2, and 1.0:
avg1 = (altlw1 + 1) / 2
avg2 = (altlw2 + 1) / 2
if (abs(altlw1-1) < abs(avg2-1)) then
altlw1 = avg2
elseif (abs(altlw2-1) < abs(avg1-1)) then
altlw2 = avg1
endif
call DISCOL to try to get 5 distinct foreground colors,
returning fcol = actual number of foreground colors
colind[1..5] = [1,2,3,4,5]
if (fcol < 5) then
copy 1st valid part of list to tail of list
endif
set up bundles 1-5
bundle
index linetype linewidth color index
------ -------- --------- -----------
1 llntyp(1) 1.0 colind(1)
2 llntyp(2) altlw1 colind(2)
3 llntyp(3) altlw2 colind(3)
4 llntyp(4) altlw1 colind(4)
5 llntyp(5) altlw2 colind(5)
randomize location of polylines
set up CSS as described above
set all ASFs to BUNDLED
display 14 pairs of polylines, using bundles 1-5
TEST: #SR 3 5 6 8 9
"The polyline index should be saved and restored by
<execute structure> during traversal."
OPQA/STRUCTURE NETWORK INHERITANCE FOR POLYLINE INDEX:
which pair of lines does NOT match?
pass/fail depending on response = position of polyline 14
END PROGRAM 12