analyze ($Date: 2008/21/04 $)
index
/home/enrique/Desktop/backup/babbleold/script/reprap/pyRepRap_v0.1/analyze.py

Analyze is a script to analyze and comment a gcode file.
 
To run analyze, install python 2.x on your machine, which is avaliable from http://www.python.org/download/
 
Then in the folder which analyze is in, type 'python' in a shell to run the python interpreter.  Finally type
'from analyze import *' to import this program.
To get documentation for this program, open a shell in the fill.py directory, then type 'pydoc fill.py'.
 
 
This example analyzes and comments the gcode file Hollow Square.gcode.  This example is run in a terminal in the folder which contains Hollow Square.gcode and analyze.py.
 
>>> import fillet
Fillet has been imported.
The gcode files in this directory that are not already beveled or filleted are the following:
['Hollow Square.gcode']
 
 
>>> fillet.arcPoint()
File Hollow Square.gcode is being filleted into arc points.
( GCode generated by March 29,2007 Skeinforge )
( Extruder Initialization )
..
many lines of gcode
..
The arc point file is saved as Hollow Square_arc_point.gcode
 
 
>>> fillet.arcPointFile("Hollow Square.gcode")
File Hollow Square.gcode is being filleted into arc points.
..
The arc point file is saved as Hollow Square_arc_point.gcode
 
 
>>> fillet.arcPointFiles(["Hollow Square.gcode"])
File Hollow Square.gcode is being filleted into arc points.
..
The arc point file is saved as Hollow Square_arc_point.gcode
 
 
>>> fillet.arcRadius()
File Hollow Square.gcode is being filleted into arc radiuses.
..
The arc radius file is saved as Hollow Square_arc_radius.gcode
 
 
>>> fillet.arcRadiusFile("Hollow Square.gcode")
File Hollow Square.gcode is being filleted into arc radiuses.
..
The arc radius file is saved as Hollow Square_arc_radius.gcode
 
 
>>> fillet.arcRadiusFiles(["Hollow Square.gcode"])
File Hollow Square.gcode is being filleted into arc radiuses.
..
The arc radius file is saved as Hollow Square_arc_radius.gcode
 
 
>>> fillet.arcSegment()
File Hollow Square.gcode is being arc segmented.
..
The arc segment file is saved as Hollow Square_arc_segment.gcode
 
 
>>> fillet.arcSegmentFile("Hollow Square.gcode")
File Hollow Square.gcode is being arc segmented.
..
The arc segment file is saved as Hollow Square_arc_segment.gcode
 
 
>>> fillet.arcSegmentFiles(["Hollow Square.gcode"])
File Hollow Square.gcode is being arc segmented.
..
The arc segment file is saved as Hollow Square_arc_segment.gcode

 
Modules
       
cStringIO
euclidean
gcodec
math
os

 
Classes
       
commentSkein
statisticSkein

 
class commentSkein
    A class to comment a gcode skein.
 
  Methods defined here:
__init__(self)
addComment(self, comment)
Add a gcode comment and a newline to the output.
linearMove(self, splitLine)
Comment a linear move.
parseGcode(self, gcodeText)
Parse gcode text and store the commented gcode.
parseLine(self, line)
Parse a gcode line and add it to the commented gcode.
setHelicalMoveEndpoint(self, splitLine)
Get the endpoint of a helical move.

 
class statisticSkein(commentSkein)
    A class to get statistics for a gcode skein.
 
  Methods defined here:
addLine(self, line)
Add a line of text and a newline to the output.
addToPath(self, location)
Add a point to travel and maybe extrusion.
extruderSet(self, active)
Maybe increment the number of times the extruder was toggled.
getLocationSetFeedrateToSplitLine(self, splitLine)
helicalMove(self, isCounterclockwise, splitLine)
Get statistics for a helical move.
linearMove(self, splitLine)
Get statistics for a linear move.
parseGcode(self, gcodeText)
Parse gcode text and store the commented gcode.
parseLine(self, line)
Parse a gcode line and add it to the commented gcode.

Methods inherited from commentSkein:
__init__(self)
addComment(self, comment)
Add a gcode comment and a newline to the output.
setHelicalMoveEndpoint(self, splitLine)
Get the endpoint of a helical move.

 
Functions
       
commentFile(filename='')
Comment a gcode file.  If no filename is specified, comment the first gcode file in this folder that is not a comment or log file.
getCommentGcode(gcodeText)
Get gcode text with added comments.
getStatisticGcode(gcodeText)
Get statistics for a gcode text.
getUnmodifiedGCodeFiles()
Get gcode files which are not generated by this script or extrude.
statisticFile(filename='')
Write statistics for a gcode file.  If no filename is specified, write statistics for the first gcode file in this folder that is not a comment or log file.

 
Data
        __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
__date__ = '$Date: 2008/21/04 $'
__license__ = 'GPL 3.0'

 
Author
        Enrique Perez (perez_enrique@yahoo.com)