DXF2DVD User's Manual			        JBL Professional, Inc.
------------------------------------------------------------------------

Revision History

	23 April 1991	Created by William Woody


------------------------------------------------------------------------
About This Document
------------------------------------------------------------------------

This document describes DXF2DVD, a file conversion utility to convert from
an ASCII .DXF file to the binary .DVD file format used by the mechanical
view portion of the JBL CADP2 program.

This document should be read by anyone who intends to create driver
drawing files for use by JBL's CADP2 program.


------------------------------------------------------------------------
Using DXF2DVD
------------------------------------------------------------------------

The program 'DXF2DVD' is a DOS program, to be run under DOS, or the DOS
shell of Windows.  In general, the command-line arguments to DXF2DVD are:

	DXF2DVD <input-file> [<output-file>] [-c]

    where

	<input-file>  is the name of the .DXF file that you intend
	to convert into a .DVD file.

	[<output-file>]  is the name of the .DVD file (including
	directory path) to call the resulting output.  This file
	name should be the same as the driver data file (.DEV)
	that the driver represents.  By default, the name of the
	input file, with '.DVD' attached, is used.

	[-c]  is an optional command-line utility which forces
	the conversion utility not to produce an output file.  This
	is useful for determining if there are any illegal objects
	in the .DXF file (objects which DXF2DVD is unable to convert).


For example, suppose you have a file called '2360_45I.DXF', an ASCII
.DXF file which shows the shape of the driver whose data is stored in
the file 'JBL2360.DEV' in the directory 'C:\jbl\devices'.  To convert
the .DXF file to a .DVD file so that mechanical view in CADP2 is able
to display a wireframe schematic of the speaker, type the following
command at the DOS prompt:


	C> DXF2DVD 2360_45I C:\JBL\DEVICES\JBL2360
	   --------------------------------------

If there were no problems with the .DXF file, this will silently read in
the .DXF file, and write out a new file, the .DVD file, to the directory
specified.

Note that the default extension for the input file is '.DXF', and for
the output file it is '.DVD'.


------------------------------------------------------------------------
How DXF2DVD Works
------------------------------------------------------------------------

The DXF2DVD file reads in an ASCII .DXF file (the format documented in
the AutoCAD release 10 manual), and generates the resulting .DVD file.
Though AutoCAD provides a great wealth of objects to choose from in doing
the files, DXF2DVD (and CADP2) currently only understands two types of
objects:  the 3D face, and the polygon mesh object.  All other objects
are simply ignored.

On the first pass DXF2DVD reads in the .DXF file, storing all the objects
it recognizes into internal memory, and discards the rest.  The DXF2DVD
reader also ignores Blocks, and strips off the header of the .DXF file.
Further, DXF2DVD reads in the points assuming they are drawn in 3D; thus,
you must use AutoCAD release 10 or greater to draw the devices.

On the second pass, if there were no errors, the .DVD file is written out
based on the information read from the .DXF file.  This includes the
size of the speaker (it's extent cube) in order to calculate and draw
the appearance of the 'abbreviated' device used by CADP2's mechanical view.


------------------------------------------------------------------------
Error Messages
------------------------------------------------------------------------

In the course of reading in a DXF file, CADP2 can encounter several types
of errors.  This is a complete alphabetical list of all the warnings and
errors which CADP2 can currently generate.


Warnings
--------

Warnings are conditions which have occured which you need to be aware of,
but which do not sabotage the resulting .DVD file.  These conditions include
things like encountering objects in the .DXF file which are illegal.

o	Ignoring improper token type ^0

The .DXF file contained an object which seemed to be 'ill-defined'.  This
can be indicitive of line noise or other garbage in the .DXF file.  This
can also be indicitive of AutoDesk releasing a newer version of AutoCAD
than DXF2DVD is able to cope with.

My bet is it's the former problem.


o	Skipping past section ^0

In a .DXF file, there are several 'sections'.  These sections are called
'HEADER' (for the header or preferences section of the .DXF file), 'BLOCKS'
(for the blocks section of the .DXF file), 'TABLES' (for the definitions of
named objects), and 'ENTITIES' (containing the actual drawing itself).

DXF2DVD only copes with the drawing itself.  This warning is to let you
know that the .DXF file contained more information than was needed, and
the other information was being discarded.


o	Skipping unknown or unusable objects  [^0]
o	Skipped ^0 objects in this file

These two warnings usually occure in pairs.  The first warning indicates
that there were objects other than a polygon mesh or a 3D face in this
.DXF file.  The second gives a count of roughly the number of objects
which were encountered which were discarded.

The resulting count is not accurate, as several classes of 'objects'
(such as a polygon line) is actually stored as a set of descrete 'objects'
in the DXF file.  This count, however, is to give a rough estimate of
the number of objects which were not used.


Errors
------

Errors indicate a problem or situation which prevents DXF2DVD from writing
an output file.  These problems include an ill-formed DXF file, or internal
errors (internal to CADP2).


o	DXF Internal Error:  Missing ^0 points [^1]
o	DXF Internal Error:  Read ^0 too many [^1]

Both of these errors indicate that for some reason there were either too
few or too many points in this polygon mesh.  The header of a polygon mesh
contains a count of the number of points which follow, and that number
was not found.

If this is not a result of an 'Unexpected end of file reached', please
send the DXF file in error to Cheshire Engineering for further debugging.


o	DXF Internal Error:  Unexpected object [^0]

This error results from seeing an object other than a point while reading
in a polygon mesh object.

If this is not a result of an 'Unexpected end of file reached', please
send the DXF file in error to Cheshire Engineering for further debugging.


o	Errors occured while writing file ^0

While writing the .DVD file out to disk, a file error occured.  This may
have been a result of the drive being locked, or out of disk space.


o	Expected 0:SECTION keyword: ignoring extra lines [^0]

While reading in the .DXF file, the section keyword (indicating the start
of a new section in the .DXF file) couldn't be found.  The reader started
reading from that point to determine where the start of the section really
is.

If this is not a result of an 'Unexpected end of file reached', please
send the DXF file in error to Cheshire Engineering for further debugging.



o	Expected a section label: ignoring extra lines [^0]

The section name always immediately follows the section header.  This
error occures when the section header couldn't be found.

If this is not a result of an 'Unexpected end of file reached', please
send the DXF file in error to Cheshire Engineering for further debugging.


o	Expected object definition [^0]

Immediately after reading in the 'ENTITIES' section (where the drawing
for a .DXF file is stored), the reader looks for the first object immediately
following the header.  This error occures when the object header wasn't
found.

If this is not a result of an 'Unexpected end of file reached', please
send the DXF file in error to Cheshire Engineering for further debugging.


o	Internal error [^0]

This error should never happen.  Please contact Cheshire Engineering with
a copy of the DXF file in error for further debugging.


o	There is no data in this DXF file

After reading in a .DXF file, and discarding the objects which weren't
allowed for the .DVD file, the parser discovered there were no objects left.
You should probably redraw your drawing file to use only 3D faces and
polygon meshes.


o	Unable to open file ^0

The file specified for the input .DXF file couldn't be opened for reading.


o	Unexpected end of file reached

For some reason the .DXF file was truncated, and the end of the .DXF file
couldn't be found.  Immediately after this error other errors could
occur, as the 'EOF' marker is passed up, causing other sections of the
code to fail.  Though this shouldn't happen, errors which immediately
follow the 'Unexpected end of file reached' error message should be ignored.

Further, as your .DXF file was truncated, you should investiage as to
'why'; either AutoCAD ran out of disk space while writing the .DXF file,
or it was damaged while being sent or copied.


o	Unknown section type: ^0

There are only four currently defined sections:  the 'HEADER' section, the
'BLOCKS' section, the 'TABLE' section, and the 'ENTITIES' section.  The
reader encountered something which was not a valid section name.

If this is not a result of an 'Unexpected end of file reached', please
send the DXF file in error to Cheshire Engineering for further debugging.


Aborts
------

Aborts are conditions which force DXF2DVD to halt immediately.


o	Out of memory!

DXF2DVD ran out of memory storing the .DXF data away.  If you are using
a DOS window under Windows 3.0 or under Deskview, you may wish to allocate
more memory to the DOS window before trying DXF2DVD again.


