Python: module skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.static_plugins.gcode_small

skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.static_plugins.gcode_small ($Date: 2008/21/04 $) | index /home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/static_plugins/gcode_small.py

Previous / Next / Contents

`
Gcode_small is an export plugin to remove the comments and the redundant z and feed rate parameters from a gcode file.
An export plugin is a script in the export_plugins folder which has the getOutput function, the globalIsReplaceable variable and if it's output is not replaceable, the writeOutput function. It is meant to be run from the export tool. To ensure that the plugin works on platforms which do not handle file capitalization properly, give the plugin a lower case name.
The getOutput function of this script takes a gcode text and returns that text without comments and redundant z and feed rate parameters. The writeOutput function of this script takes a gcode text and writes that text without comments and redundant z and feed rate parameters to a file.
Many of the functions in this script are copied from gcodec in skeinforge_utilities. They are copied rather than imported so developers making new plugins do not have to learn about gcodec, the code here is all they need to learn.`

Previous / Next / Contents

Modules

``

cStringIO | os |  |

Classes

``

GcodeSmallSkein

class GcodeSmallSkein
`` | `A class to remove redundant z and feed rate parameters from a skein of extrusions. `

Methods defined here:

__init__(self)

getCraftedGcode(self, gcodeText)
  `Parse gcode text and store the gcode.`

parseLine(self, line)
  `Parse a gcode line.`

Functions

``

getIndexOfStartingWithSecond(letter, splitLine)
  `Get index of the first occurence of the given letter in the split line, starting with the second word. Return - 1 if letter is not found`

getOutput(gcodeText)
  `Get the exported version of a gcode file.`

getSplitLineBeforeBracketSemicolon(line)
  `Get the split line before a bracket or semicolon.`

getStringFromCharacterSplitLine(character, splitLine)
  `Get the string after the first occurence of the character in the split line.`

getSummarizedFileName(fileName)
  `Get the fileName basename if the file is in the current working directory, otherwise return the original full name.`

getTextLines(text)
  `Get the all the lines of text of a text.`

Data

``

__author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
__date__ = '$Date: 2008/21/04 $'
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
absolute_import = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)
globalIsReplaceable = True

Author
`` |  | Enrique Perez (perez_enrique@yahoo.com)