# Python: module skeinforge_tools.export_plugins.gcode_step

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

`Gcode step is an export plugin to convert gcode from float position to number of steps.
An export plugin is a script in the export_plugins folder which has the functions getOuput, isArchivable and writeOutput. 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.
If the "Add Feedrate Even When Unchanging" checkbox is true, the feedrate will be added even when it did not change
from the previous line. If the "Add Space Between Words" checkbox is true, a space will be added between each gcode
word. If the "Add Z Even When Unchanging" checkbox is true, the z word will be added even when it did not change. The
defaults for these checkboxes are all true.
The "Feedrate Step Length" is the length of one feedrate increment. The "Radius Step Length" is the length of one radius
increment. The "X Step Length" is the length of one x step. The "Y Step Length" is the length of one y step. The "Z Step
Length" is the length of one z step.
The "X Offset " is the distance the x word in a gcode line will be offset. The "Y Offset " is the distance the y word will be
offset. The "Z Offset " is the distance the z word will be offset.
The getOutput function of this script takes a gcode text and returns it with the positions converted into number of steps.
The writeOutput function of this script takes a gcode text and writes that with the positions converted into number of steps.`

Modules

``

__init__ cStringIO | skeinforge_tools.skeinforge_utilities.gcodec skeinforge_tools.skeinforge_utilities.interpret | os skeinforge_tools.polyfile | skeinforge_tools.skeinforge_utilities.preferences sys

Classes

``

GcodeStepPreferences
GcodeStepSkein

class GcodeStepPreferences
`` | `A class to handle the export preferences.`

Methods defined here:

__init__(self)
  `Set the default preferences, execute title & preferences fileName.`

execute(self)
  `Convert to gcode step button has been clicked.`

class GcodeStepSkein
`` | `A class to convert gcode into 16 byte binary segments.`

Methods defined here:

__init__(self)

addCharacterInteger(self, character, lineStringIO, offset, splitLine, stepLength)
  `Add a character and integer to line string.`

addLine(self, line)
  `Add a line of text and a newline to the output.`

addStringToLine(self, lineStringIO, wordString)
  `Add a character and integer to line string.`

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

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

Functions

``

getCharacterIntegerString(character, offset, splitLine, stepLength)
  `Get a character and integer string.`

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

getOutput(gcodeText, gcodeStepPreferences=None)
  `Get the exported version of a gcode file. This function, isArchivable and writeOutput are the only necessary functions in a skeinforge export plugin.
  If this plugin writes an output than should not be printed, an empty string should be returned.`

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.`

indexOfStartingWithSecond(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`

isArchivable()
  `Return whether or not this plugin is archivable.`

isReplacable()
  `Return whether or not the output from this plugin is replacable. This should be true if the output is text and false if it is binary.`

main(hashtable=None)
  `Display the export dialog.`

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)