	# ESP zone geometry file builder: version 1.0a of November 1988

	# Script to build ESP zone geometry input files
	# from data supplied by the IFE building model.

"imp << EOI"
"-6"
"a"

% nz = curr_zone	user_set	nokey

%  zshta = geom_type	user_set	$nz
   if test X${zshta} = Xrec
   then
      "c"
      "rec"
%      zox = x_origin	user_set	$nz
%      zoy = y_origin	user_set	$nz
%      zoz = z_origin	user_set	$nz
      "${zox}  ${zoy}  ${zoz}"
%      zl = z_length	user_set	$nz
%      zw = z_width	user_set	$nz
%      zh = z_height	user_set	$nz
      "${zl}  ${zw}  ${zh}"
%      zor = z_orientation	user_set	$nz
      "${zor:='0'}"
      nsur=6
   elif test X${zshta} = Xreg
   then
      "c"
      "reg"
%      nsur = no_surfaces	$nz
      nw=` expr $nsur - 2 `
      "${nw:=0}"
%      f_ch = zone_height	$nz
      "${f_ch}"
%      angrot = zone_orientation	$nz
      "${angrot:=0}"
      forall j upto ${nw}
      do
         jj=' expr $j + $j '
%         xyz = vertex	$nz	$jj
         set `echo $xyz`
         "$1 $2"
      done
   elif test X${zshta} = Xgen
   then
      "c"
      "gen"
%      nver = no_vertices	$nz
      "${nver:=0}"
%      nsur = no_surfaces	$nz
      "${nsur:=0}"
%      angrot = zone_orientation	$nz
      "${angrot:=0}"

      forall j upto ${nver}
      do
%         xyz = vertex	$nz	$j
         "${xyz}"
      done

      forall j upto ${nsur}
      do
%         ver_order = surface	$nz	$j
         set `echo $ver_order`
         "$# ${ver_listr}"
      done
   fi
   "n"
   "n"
   "d"
   "/tmp/ife_z.geo"
"-"
"f"
"EOI"
