! ANSYS $RCSfile: PLIMITS.MAC,v $
! Modified on $Date: 2010-11-14 13:40:31 -0500 (Sun, 14 Nov 2010) $ 
! Source ID = $Revision: 435640 $
!COM *********************************************************
!COM  PLIMITS.MAC   get limits for ANDATA.MAC                *
!COM *********************************************************

/NOPR
*if,_gar18,eq,1,then
   *GET,_SMN,COMMON,,D3COM,,REAL,291
   *GET,_SMX,COMMON,,D3COM,,REAL,292
   *IF,_SMN,LT,_SMIN,THEN
     _SMIN = _SMN
   *ENDIF
   *IF,_SMX,GT,_SMAX,THEN
     _SMAX = _SMX
   *ENDIF
*endif
*if,_bobox,eq,1,then
   !com  Store data for later processing
   *get,_foci(1,_i),graph,,focus,x
   *get,_foci(2,_i),graph,,focus,y
   *get,_foci(3,_i),graph,,focus,z
   *get,_disi(  _i),graph,,dist
   !com look for longer DIST
   *if,_disi(_i),gt,_fdist,then
      _fdist = _disi(_i)
   *endif
   !com  Find geometry ranges   --- This is crude logic!
   !com  This is better done by using something like PGrphLoc.F,
   !com     a boiled down version of PGrphScale.F
   _ccccc = _foci(1,_i) - _disi(_i)
   *if,_ccccc,lt,_xminf,then
      _xminf = _ccccc
   *endif
   _ccccc = _foci(2,_i) - _disi(_i)
   *if,_ccccc,lt,_yminf,then
      _yminf = _ccccc
   *endif
   _ccccc = _foci(3,_i) - _disi(_i)
   *if,_ccccc,lt,_zminf,then
      _zminf = _ccccc
   *endif
   _ccccc = _foci(1,_i) + _disi(_i)
   *if,_ccccc,gt,_xmaxf,then
      _xmaxf = _ccccc
   *endif
   _ccccc = _foci(2,_i) + _disi(_i)
   *if,_ccccc,gt,_ymaxf,then
      _ymaxf = _ccccc
   *endif
   _ccccc = _foci(3,_i) + _disi(_i)
   *if,_ccccc,gt,_zmaxf,then
      _zmaxf = _ccccc
   *endif
*endif
/GO
