Packinon Home > Python programs > off2eig.py

off2eig.py

off2eig.py is a basic program which converts OFF format geometry files into EIG format for use by the SpringDance program.

Only the vertices and edges are included in the EIG file. The faces are not converted to "skins".

As a test of the program I converted the 80 uniform polyhedra to EIG format: uni_polys.zip. The example below shows the conversion of a small stellated dodecahedron from OFF to POV.

OFF file viewed with
Polyform and Povray
off2eig.py
converted to EIG and
viewed in SpringDance

Program Help


usage: off2eig.py [options] [input_file [output_file]] 

This program converts an OFF file to EIG format.

input_file
   The OFF file. The program reads from standard input if no file given.

output_file
   The EIG file. The program writes to standard output if no file given.

options
   -h       this help message
   -n name  base name for naming eig elements
   -d decs  number of decimal places at which line lengths will be converted
            to the same spring length (default 6)




SourceForge.net Logo Adrian Rossiter - adrian_r@teleline.es