#!/bin/csh -f

# Very basic constructor routine: KP-cons-clbraid
# March 16, 1996
# Rob Scharein

# A closed braid constructor.

# Constructor arguments:
#    $0 Constructor executable file (this file).
#    $1 First file read by KnotPlot (the prefile).
#    $2 Second file read by KnotPlot (the postfile).
#    $3 Type of machine we're running on (sgi, ibm, etc...)
#    $4 A flag either 0 or 1.
#    $5 Name of constructor.
#       Anymore more arguments are the arguments to the contructor
#       from the KnotPlot command line.

# Uncomment the following line and set Debug = t in KnotPlot to see
# the sequence of events.

# echo KP-cons-clbraid command line arguments are: $*

# The best way to see what happens is to run KnotPlot in non-graphics mode:

#     knotplot -nog -par Debug t


# Only do something upon first call (when $4 is equal to 0)

  
switch ($4)
case 0:
  
  echo " "
  echo "" > $1
  echo "" > $2

  echo construct braid $argv[6-] >> $1
  echo about z 90 >> $1
  echo wrap y >> $1
  echo join all >> $1
  echo about x 90 >> $1
  
  breaksw
endsw



