!    NAME
!	wt2thick.pen
!
!    DESCRIPTION
!	This pen table demonstrates how you can achieve consistent line
!	thickness among devices with differing resolutions.  For example,
!	without a pen table, a 400 dot/inch output device generates a
!	thinner line than a 200 dot/inch device.  Using the thickness
!	keyword, you can map line weight to a physical width on your plot.
!
!    HISTORY
!	08/09/93 (INGR) Initial creation.

    units = inches

if (weight == 0) then
    thickness = .005
else if (weight == 1) then
    thickness = .010
else if (weight == 2) then
    thickness = .015
else if (weight == 3) then
    thickness = .020
else if (weight == 4) then
    thickness = .025
else if (weight > 4) then
    thickness = .030
endif


!   The following statements demonstrate the same functionality as the above
!   statements, but make use of the switch statement and arithmetic
!   expressions to achieve the mapping of line weights to plot thickness.

switch (weight)
    case 0-4 ?		    !Test for element weights 0, 1, 2, 3, and 4.
	thickness = (weight + 1) * .005

    default ?		    !Any elements that have a weight greater than 4.
	thickness = .030    !Default element thickness to .030 inches.
endswitch
