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

Nozzle wipe is a script to wipe the nozzle.
 
At the beginning of a layer, depending on the preferences nozzle, wipe will move the nozzle with the extruder off to the arrival point,
then to the wipe point, then to the departure point, then back to the layer.
 
The default 'Activate Nozzle Wipe' checkbox is on.  When it is on, the functions described below will work, when it is off, the functions
will not be called.
 
The "Location Arrival X" preference, is the x coordinate of the arrival location.  The "Location Arrival Y" and "Location Arrival Z"
preferences are the y & z coordinates of the location.  The equivalent "Location Wipe.." and "Location Departure.." preferences are for
the wipe and departure locations.
 
The "Nozzle Wipe Period (layers)" preference is the number of layers between nozzle wipes.  Nozzle wipe will always wipe just before
the first layer, afterwards it will wipe every "Nozzle Wipe Period" layers.  With the default of three, nozzle wipe will wipe just before
the zeroth layer, the third layer, sixth layer and so on.
 
To run nozzle wipe, in a shell which nozzle wipe is in type:
> python nozzle_wipe.py
 
The following examples nozzle wipes the files Hollow Square.gcode & Hollow Square.gts.  The examples are run in a terminal in the
folder which contains Hollow Square.gcode, Hollow Square.gts and nozzle_wipe.py.  The nozzle wipe function will nozzle wipe if the
'Activate Nozzle Wipe' checkbox is on.  The functions writeOutput and getNozzleWipeChainGcode check to see if the text has been
nozzle wiped, if not they call the getHopChainGcode in hop.py to hop the text; once they have the hopped text, then they nozzle wipe.
 
 
> python nozzle_wipe.py
This brings up the dialog, after clicking 'Nozzle Wipe', the following is printed:
File Hollow Square.gts is being chain nozzle wiped.
The nozzle wiped file is saved as Hollow Square_nozzle_wipe.gcode
 
 
> python nozzle_wipe.py Hollow Square.gts
File Hollow Square.gts is being chain nozzle wiped.
The nozzle wiped file is saved as Hollow Square_nozzle_wipe.gcode
 
 
> 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 nozzle_wipe
>>> nozzle_wipe.main()
This brings up the nozzle wipe dialog.
 
 
>>> nozzle_wipe.writeOutput()
File Hollow Square.gts is being chain nozzle wiped.
The nozzle wiped file is saved as Hollow Square_nozzle_wipe.gcode
 
 
>>> nozzle_wipe.getNozzleWipeGcode("
( GCode generated by May 8, 2008 slice.py )
( Extruder Initialization )
..
many lines of gcode
..
")
Many line of nozzle wiped gcode.
 
>>> nozzle_wipe.getNozzleWipeChainGcode("
( GCode generated by May 8, 2008 slice.py )
( Extruder Initialization )
..
many lines of gcode
..
")
Many line of nozzle wiped gcode.

 
Modules
       
__init__
skeinforge_tools.analyze
cStringIO
skeinforge_tools.skeinforge_utilities.euclidean
skeinforge_tools.skeinforge_utilities.gcodec
skeinforge_tools.hop
skeinforge_tools.import_translator
math
skeinforge_tools.polyfile
skeinforge_tools.skeinforge_utilities.preferences
sys
time

 
Classes
       
NozzleWipePreferences
NozzleWipeSkein

 
class NozzleWipePreferences
    A class to handle the nozzle wipe preferences.
 
  Methods defined here:
__init__(self)
Set the default preferences, execute title & preferences filename.
execute(self)
Nozzle wipe button has been clicked.

 
class NozzleWipeSkein
    A class to nozzle wipe a skein of extrusions.
 
  Methods defined here:
__init__(self)
addHop(self, begin, end)
Add hop to highest point.
addLine(self, line)
Add a line of text and a newline to the output.
addWipeTravel(self, splitLine)
Add the wipe travel gcode.
getLinearMoveWithFeedrate(self, feedrate, location)
Get a linear move line with the feedrate.
getRounded(self, number)
Get number rounded to the number of carried decimal places as a string.
parseGcode(self, gcodeText, nozzleWipePreferences)
Parse gcode text and store the nozzle wipe gcode.
parseInitialization(self, nozzleWipePreferences)
Parse gcode initialization and store the parameters.
parseLine(self, line)
Parse a gcode line and add it to the bevel gcode.

 
Functions
       
getNozzleWipeChainGcode(filename, gcodeText, nozzleWipePreferences=None)
Nozzle wipe a gcode linear move text.  Chain nozzle wipe the gcode if it is not already nozzle wiped.
getNozzleWipeGcode(gcodeText, nozzleWipePreferences=None)
Nozzle wipe a gcode linear move text.
main(hashtable=None)
Display the nozzle wipe dialog.
writeOutput(filename='')
Nozzle wipe a gcode linear move file.  Chain nozzle wipe the gcode if it is not already nozzle wiped. If no filename is specified, nozzle wipe the first unmodified gcode file in this folder.

 
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)