-------------------------------------------
var,funct: write FreeSurfer binary surface
  set outsurf <surface>
  write_binary_surface
-------------------------------------------

Large Panel Only: [fn-]F3

The "W" button on the "outsurf:" line in the
large fn-F3 panel writes out the current surface
as file whose name is current value of $outsurf
(entry at left), in native freesurfer format.

Overwrite with button must be confirmed, or use
tcl/C functtion, write_binary_surface which
doesn't ask.

The type of binary file written depends on the
settings of several flags, shown here in pseudo
code:

  if (vertices_per_face == 4) {
    if (newquadoutputflag) {
      write float vertices
    }
    else {
      write 2byte vertices
    }
    write quadface corners w/3byte vertex nums
  }
  if (vertices_per_face == 3) {
    if (dividequadsdoneflag && undividequadsflag) {
      if (newquadoutputflag)
        write quads with float vertices
      else
        write quads with 2byte vertices
      write quadface corners w/3byte vertex nums
    }
    else {  /* default */
      write float vertices
      write triface corners w/4byte ints
    }
  }

These flags can be passed to tksurfer as options,
set in a tcl script, or controlled by the csurf
Preferences menu:

  Preferences -> Expert Preferences -> Surf tab
