home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 38 / af038a.adf / Advanced_Util / Translate / translate.doc < prev    next >
Text File  |  1992-07-09  |  3KB  |  72 lines

  1.    Intro-CAD saves drawings in binary files.  This allows drawing
  2. coordinates to be written and read very quickly and with full accuracy.
  3. It also yields very much smaller drawing files.
  4.    But the binary format is likely to be inconvenient for the purposes
  5. of those knowledgeable users who might want to, say, automatically
  6. generate "drawings" with a computer program for display by Intro-CAD, or
  7. use Intro-CAD to plot data, etc.  Intro-CAD does a good job of "drawing"
  8. on dot-matrix printers, for example, and some users may want to use
  9. this capability by itself.
  10.  
  11.    The programs txt_2_icad and icad_2_txt translate between Intro-CAD's
  12. binary file format and an ascii (text) file format.  These programs
  13. must be run from the CLI.
  14.  
  15.    The program txt_2_icad reads a text file with an extremely simple and
  16. forgiving structure and generates a binary file that Intro-CAD will
  17. treat as one of its own files.  Thus, all users get the benefit of a
  18. binary file format for loading and saving, while the few users with
  19. special needs can work their magic without the hassle of an inconvenient
  20. and non-standard file format.  To use this program, type
  21.    TXT_2_ICAD TXTFILENAME CADFILENAME
  22. where TXTFILENAME is the name of an existing text file, in the format
  23. described below, which is to be translated.  CADFILENAME is the name
  24. you want the new Intro-CAD drawing file to be called.
  25.  
  26.    The program icad_2_txt does the reverse translation.  To use this
  27. program, type
  28.    ICAD_2_TXT CADFILENAME TXTFILENAME
  29. where CADFILENAME is the name of an existing Intro-CAD drawing file and
  30. TXTFILENAME is the name you want the new file to be called.
  31.  
  32.    Here is the file format:
  33.  
  34. x1 y1
  35. x2 y2
  36.  .
  37.  .
  38.  .
  39. xn yn
  40. (optional flags)
  41.  
  42.    x1, y1, etc., are horizontal and vertical coordinates of points
  43. to be connected by lines when displayed.  These may be integers, real
  44. numbers, or a mixture of the two.  Lines containing the optional flags
  45. (one per line) begin with a '*'.  The flags are completely described in
  46. comments to the following sample file.
  47.    
  48.  
  49.    Here is a sample text file suitable for input to txt_2_icad.
  50. (In fact, this entire file is suitable because txt_2_icad ignores lines
  51. which don't begin with two numbers or an asterisk.  More correctly, it
  52. treats such a line as the separator between two "lists" of coordinates
  53. which make up an Intro-CAD "primitive object".  A blank line is the
  54. usual separator.)
  55.  
  56. *D 4        This sets the default color for objects which follow.  (It's ok
  57.             to redefine the default color later in the file.)
  58.  
  59. 100 100     This is a box..
  60. 100 200
  61. 200 200
  62. 200 100
  63. 100 100
  64. *>          The object above this mark is in a group with the object below it.
  65. *C 4        The object above is in color 4 (whatever color that may be)
  66. *L 2        The object above is to be rendered in Intro-CAD line type 2
  67.  
  68. 125 150     This is a line..
  69. 175 150
  70. *C 5        ..in color 5 and line type 0 (solid) since no "*L"
  71.  
  72.