skeinforge_tools.import_translator ($Date: 2008/21/04 $)
index
/home/enrique/Desktop/backup/babbleold/script/reprap/pyRepRap/skeinforge_tools/import_translator.py

Import translator is a script to access and display the import plugins.
 
Import shows the client which import plugins are in the import_plugins folder.  If "Translate" is clicked, the chosen file will be
translated and saved as a GNU Triangulated Surface format file.
 
An import plugin is a script in the import_plugins folder which has the function getTriangleMesh.
 
The following examples import the files Hollow Square.stl.  The examples are run in a terminal in the folder which contains
Hollow Square.stl & import_translator.py.
 
 
> python import_translator.py
This brings up the dialog, after clicking 'Translate', the following is printed:
File Hollow Square.stl is being translated to the GNU Triangulated Surface format.'
The translated file is saved as Hollow Square.gts
It took 0 seconds to translate the file.
 
 
> python import_translator.py Hollow Square.stl
File Hollow Square.stl is being translated to the GNU Triangulated Surface format.
The translated file is saved as Hollow Square.gts
It took 0 seconds to translate the file.
 
 
> python
Python 2.5.1 (r251:54863, Sep 22 2007, 01:43:31)
[GCC 4.2.1 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import import
>>> import.writeOutput()
File Hollow Square.stl is being translated to the GNU Triangulated Surface format.
The translated file is saved as Hollow Square.gts
It took 0 seconds to translate the file.
 
 
>>> import.main()
This brings up the import dialog.

 
Modules
       
__init__
skeinforge_tools.skeinforge_utilities.gcodec
skeinforge_tools.polyfile
skeinforge_tools.skeinforge_utilities.preferences
sys
time

 
Classes
       
ImportPreferences

 
class ImportPreferences
    A class to handle the import preferences.
 
  Methods defined here:
__init__(self)
Set the default preferences, execute title & preferences filename.
execute(self)
Import button has been clicked.

 
Functions
       
getGNUTranslatorFileTypeTuples()
Get the file type tuples from the translators in the import plugins folder.
getGNUTranslatorFileTypes()
Get the file types from the translators in the import plugins folder.
getGNUTranslatorFilesUnmodified()
Get the file types from the translators in the import plugins folder.
getGNUTranslatorGcodeFileTypeTuples()
Get the file type tuples from the translators in the import plugins folder.
getImportPluginFilenames()
Get analyze plugin filenames.
getTranslatorFileTypeTuples()
Get the file types from the translators in the import plugins folder.
getTriangleMesh(filename)
Get a triangle mesh for the file using an import plugin.
main(hashtable=None)
Display the import dialog.
writeOutput(filename='')
Translate a file to the GNU Triangulated Surface format.  If no filename is specified, translate the first file for which there is an import plugin.

 
Data
        __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
__date__ = '$Date: 2008/21/04 $'
__license__ = 'GPL 3.0'
absolute_import = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)

 
Author
        Enrique Perez (perez_enrique@yahoo.com)