# Geometry library table for handling external file conversion.
#
#   Each line must contain 3 strings seperated by white space:
#	file_extension read_command write_command
#   The read_command must be able to read from a named file and write
#	prisms format to stdout
#   The write_command must be able to read prisms format on stdin and write
#	to a named file
#   Use %s in the command strings to designate the named file.
#
#   When converting from an internal geometry format, the application must
#	be able to read .bgeo format (since that's what is sent down to it)
#
#   It is very easy to write a converter which will convert any format to
#	.poly/.bpoly (please see source in source/public).  This converter
#	can be placed in the GeoIO table so that any PRISMS program can
#	read the format.  For example, gdxf reads a .dxf file and creates
#	a .bpoly on output.  This is then read into the geometry library.
#	Files with the given extension should then appear in the requesters
#	for geometry files (i.e. viewdata2.x)
#
#   When converting from .geo format to a target format using .poly/.bpoly
#	you can use a shell script to help with the conversion.  Simply
#	convert stdin.bgeo to a temp file /tmp/xxxxx.bpoly.  Then do
#	the conversion of the file to the target format.  For example
#
#		#!/bin/csh -f
#		#  First, convert from geo to .bpoly
#		gconvert stdin.bgeo /tmp/__dxf__.bpoly
#		#  Now, use pdxf to convert from .bpoly to .dxf
#		pdxf /tmp/__dxf__.bpoly $1
#		#  Clean up by removing tmp file
#		rm /tmp/__dxf__.bpoly
#

#
#  Internal formats supported
#	Format		Magic Number	Default Extension
#	------		------------	-----------------
#	Binary Geo	0x4267656f	.bgeo
#	Ascii Geo	"PGEOMETRY"	.geo
#	Binary Poly	0x62706f6c	.bpoly
#	Ascii Poly	"POINTS"	.poly
#	Ascii Draw	- none -	.d
#

#
#  When the new geometry tools become available, the following lines will
#	be switched.
#

.DXF "gdxf %s stdout.bgeo" "gdxf stdin.bgeo %s"
.dxf "gdxf %s stdout.bgeo" "gdxf stdin.bgeo %s"
.eps "geps %s stdout.bgeo" ""
.iv  "ginventor %s stdout.bgeo" "ginventor stdin.bgeo %s"
.lw  "glightwave %s stdout.geo" ""
.med "gmed %s stdout.bgeo" ""
.obj "gwavefront %s stdout.bgeo" "gwavefront stdin.bgeo %s"
.sdl "gsdl %s stdout.bgeo" ""
