2 This page is in the table of contents.
3 Analyze is a script to access the plugins which analyze a gcode file.
5 The plugin buttons which are commonly used are bolded and the ones which are rarely used have normal font weight.
8 An explanation of the gcodes is at:
9 http://reprap.org/bin/view/Main/Arduino_GCode_Interpreter
12 http://reprap.org/bin/view/Main/MCodeReference
15 http://forums.reprap.org/file.php?12,file=565
19 from __future__ import absolute_import
20 #Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module.
23 from fabmetheus_utilities import archive
24 from fabmetheus_utilities import settings
25 from skeinforge_application.skeinforge_utilities import skeinforge_analyze
29 __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
30 __date__ = '$Date: 2008/21/04 $'
31 __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
34 def addToMenu(master, menu, repository, window):
35 "Add a tool plugin menu."
36 analyzeFilePath = archive.getSkeinforgePluginsPath('analyze.py')
37 pluginsDirectoryPath = skeinforge_analyze.getPluginsDirectoryPath()
38 settings.addPluginsParentToMenu(pluginsDirectoryPath, menu, analyzeFilePath, skeinforge_analyze.getPluginFileNames())
40 def getNewRepository():
42 return skeinforge_analyze.AnalyzeRepository()
44 def writeOutput(fileName):
45 "Analyze a gcode file."
46 repository = getNewRepository()
47 repository.fileNameInput.value = fileName
49 settings.startMainLoopFromConstructor(repository)
53 "Display the analyze dialog."
55 writeOutput(' '.join(sys.argv[1 :]))
57 settings.startMainLoopFromConstructor(getNewRepository())
59 if __name__ == "__main__":