Design: 04.03.04.01/P04
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 4: Network inheritance and initialization
CHARACTERISTICS: ynny
OPERATOR SCRIPT:
STRUCTURE NETWORK INHERITANCE FOR NAMESET: Fourteen pairs of
primitives are displayed, either normally, highlighted, or
invisible. Identify the non-matching pair.
DESIGN:
Five distinct values for nameset 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 = null
| 102 {3,
| / prim 2 4,
| / nmset = {3,4,5} 5}
V null/ exec 103---------------103
101 / prim 8 prim 3
prim 1 / nmset = {1,6}
exec 102/ prim 4
prim 9 exec 104\
nmset = {2,3} prim 7 \ {1,6}
prim 10 \
transform {2,3} \
exec 104-----------------------------------------------------104
un-transform prim 5/11
prim 13 nmset = {5,6}/{2,3,5}
prim 14 prim 6/12
exec 105---------->105
expected values
nameset feature
------- -------
null normal
{2,3} invisible
{3,4,5} highlighted
{1,6} invisible
{5,6} normal
{2,3,5} highlighted
{7} normal
set highlighting filter:
inclusion set = {2,3,5}
exclusion set = {6}
set invisibility filter:
inclusion set = {3,6}
exclusion set = {5}
randomize location of primitives
structure #101
polyline 1 (order within traversal)
execute 102
polymarker 9
add names to set: 2,3
fill area 10
set local transformation to make primitives 11,12 distinguishable
from 5,6
execute 104
re-set local transformation to identity
text 13
text 14
execute 105
structure #102
cell array 2
add names to set: 3,4,5
execute 103
annotation text 8
structure #103
polyline 3
add names to set: 1,6; remove names from set: 3,4,5
polymarker 4
execute 104
polyline 7
structure #104
fill area 5 / 11
remove names from set: 1; add names to set: 5
fill area set 6 / 12
Expected attributes (except #14, whose actual nameset should be {2,3}
structure #105
sequence # primitive nameset feature
---------- --------- ------- -------
01 polyline null normal
02 cell array null normal
03 polyline {3,4,5} highlighted
04 polymarker {1,6} invisible
05 fill area {1,6} invisible
06 fill area set {5,6} normal
07 polyline {1,6} invisible
08 annotation text {3,4,5} highlighted
09 polymarker null normal
10 fill area {2,3} invisible
11 fill area {2,3} invisible
12 fill area set {2,3,5} highlighted
13 text {2,3} invisible
14 text {7} normal
TEST: #SR 1 4 11 12 13 14 15
"The nameset attribute for the all primitives should be
saved and restored by <execute structure> during
traversal."
OPQA/STRUCTURE NETWORK INHERITANCE FOR NAMESET: Which pair
of primitives does NOT match?
pass/fail depending on (location of 14th primitive selected)
END PROGRAM 4