Design: 04.02.05.03/P10

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 10: Appearance of predefined edge bundles

CHARACTERISTICS: ynny

OPERATOR SCRIPT:

WORKSTATION DESCRIPTION AND STATE LIST TABLES, INDICES 1-5: This
screen displays 6 pairs (consisting of the first 5, with one
repeated) of predefined edge bundles and individual edges.
Identify the pair of edges (of the triangles) that is different.

WORKSTATION DESCRIPTION AND STATE LIST TABLES, INDICES > 5: This
screen displays several pairs (at most 8) of predefined edge
bundles and individual edges.  Identify the pair of edges (of the
triangles) that is different.

PREDEFINED EDGE BUNDLES: This screen displays a sample (at most
8) of predefined edge bundles and their bundle values for edge
flag, edgetype, edgewidth scale factor, and color index, as
reported by <inquire predefined edge representation>. For each
displayed bundle, verify that 1) the actual appearance of the
edge agrees with the aspect values reported on the screen and 2)
these both agree with any external documentation provided by the
implementor.

DESIGN:

set all ASFs to BUNDLED
set interior style attribute ASFs to INDIVIDUAL
   set interior style = EMPTY, interior color index = 1

use <inquire edge facilities> to determine:
  nprei  = number of predefined bundles
  numet  = number of edge types

*** *** ***   predefined edge bundles 1-5   *** *** ***

numbun = 6
bundis = bundles to be displayed (1 to 5, with one repeated)
bundif = location of repeated bundle identifier (so that all 5
         may be verified)

TEST: #SR 3 6 20 24
      "Immediately after <open workstation>, the first five
       defined edge bundles of the WSL should appear as
       specified in the corresponding predefined edge
       bundles of the WDT."

The actual results (edges drawn from initial state of WSL)
are drawn on the left side of the picture. The corresponding
expected results (edge with individual attributes taken
from WDT) are drawn on the right side, except for one
edge which will be different.

display and label actual results from bundis.

set edge flag, edgetype, edgewidth and color index ASF to individual

for ix = 1, numbun
   <inquire predefined edge representation> on index
        bundis(ix), determine:
      pdef = predefined edge flag
      pdet = predefined edgetype
      pdew = predefined edgewidth scale factor
      pdci = predefined edge color index
    if (ix = bundif) then
       if (numet = 1) then
          if (pdef = ON) then
             pdef = OFF
          else
             pdef = ON
          endif
       endif
       pdet = (pdet mod numet) + 1
       pdew = pdew * 1.25
       pdci = (pdci mod 5) + 1
    endif
    draw edge with pdef, pdet, pdew, pdci
next ix

OPQA/WORKSTATION DESCRIPTION AND STATE LIST TABLES, INDICES 1-5:
   Which pair of edges does NOT match?
pass/fail depending on (operator selects bundif)

*** *** ***   predefined edge bundles > 5   *** *** ***

if nprei <= 5 then
   skip to end_comp_tables
endif

numbun = min (8, nprei-5)
bundis = distinct bundles to be displayed - randomly chosen
         from [6,nprei] predefined bundles

TEST: #SR 3 6 20 24
      "Immediately after <open workstation>, the defined
       edge bundles > 5 of the WSL should appear as
       specified in the corresponding predefined edge
       bundles of the WDT."

The actual results (edges drawn from initial state of WSL)
are drawn on the left side of the picture. The corresponding
expected results (edge with individual attributes copied
from WDT) are drawn on the right side, except for one
edge which will be different.

display and label bundis

bundif = randomly selected bundle from bundis
set edge flag, edgetype, edgewidth and color index ASF to individual

for ix = 1, numbun
   <inquire predefined edge representation> on index
        bundis(ix), determine
      pdef = predefined edge flag
      pdet = predefined edgetype
      pdew = predefined edgewidth scale factor
      pdci = predefined edge color index
    if (ix = bundif) then
       if (numet = 1) then
          if (pdef = ON) then
             pdef = OFF
          else
             pdef = ON
          endif
       endif
       pdet = (pdet mod numet) + 1
       pdew = pdew * 1.25
       pdci = (pdci mod 5) + 1
    endif
    draw edge with pdef, pdet, pdew, pdci
next ix

OPQA/WORKSTATION DESCRIPTION AND STATE LIST TABLES, INDICES > 5:
   Which pair of edges does NOT match?
pass/fail depending on (operator selects bundif)

end_comp_tables:

*** ***  predefined bundle descriptions   *** ***

TEST: #SR 3 6 20
      "The appearance of predefined edge bundles should agree
       with the descriptions supplied by the implementor."

numbun = min(8, nprei)
bundis = distinct bundles to be displayed, sorted

for ix = 1 to numbun
   <inquire predefined edge representation> for index ix, determine
      pdef = edge flag
      pdet = edgetype
      pdew = edgewidth scale factor
      pdci = edge color index
   display and label ixth entry in bundis and its pdef,pdet,pdew,pdci
next ix

OPQA/PREDEFINED EDGE BUNDLES: Does the appearance of each
  edge agree with the displayed aspect values for that bundle?
if (operator responds "yes") then
   OPQA/PREDEFINED EDGE BUNDLES: If the implementor provides
      external documentation, is it consistent with the edge
      appearance and displayed aspect values for every bundle
      identifier?
   pass/fail depending on (operator responds "yes")
else
   fail
endif

END PROGRAM 10