!
!  Macro to test plots ability to remove hidden lines.
!  BUG 1223 LayerT5: Hidden line behind globe.
!
!
startmacro
  switch INTERACTIVE interAct GET DEF=TRUE

  call setDatDir

  if interAct then
    pipe init
      panel/setup/controls=gc
      plot/id=plot1/msgid=main/win=pane1 ^{datDir}.world.prm|^{datDir}.sv3.prm ZOOMTO={x1=-39.5912794,x2=-39.5912789,y1=20.704825,y2=20.704826}      ! start a plot
      
      gcontrol label macro "MACRO"
      gcontrol menu main "Exit with Status = " "PASS,FAIL" /tleft
      set gc.main.itemColors {PASS=GREEN,FAIL=RED}
      gcontrol text info "INSTRUCTIONS" &
        "RMB and rotate globe to the right. State vector plot should not show &
         through globe.         &
         KNOWN ISSUE: State vector plot should intersect globe perimeter. &
         The plot line currently truncates at the last data point before &
         globe intersection." 24 10 /title

    pipe off
  endif
endmacro


!******************************************************************************!
procedure processMessage
  !say "Msg ^msg.name = ^msg.data from ^msg.fid"

  if msg.name eqs "MAIN" then
    assert/text="Test LayerT5 Line" msg.data eqss "PASS"
    pipe stop
  endif
return

!******************************************************************************!
! Set the dat directory
!******************************************************************************!
procedure setDatDir
  invoke nxmMajor env.nmversion.subString(0,1)
  invoke major java.lang.Integer.valueOf(nxmMajor)
  if major GE 4 then
    invoke s:datDir           nxm.sys.test.DatLocator.getDatDirLocation()
    invoke s:datDirSlash      nxm.sys.test.DatLocator.getDatDirSlashLocation()
    invoke z:sysDatFull       nxm.sys.test.DatLocator.sysDatFull()
    invoke z:sysTestDatExists nxm.sys.test.DatLocator.sysTestDatExists()
  else
    set s:datDir           "nxm.sys.dat"
    set s:datDirSlash      "nxm/sys/dat"
    set z:sysDatFull       true
    set z:sysTestDatExists false
  endif
return
