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

Oozebane is a script to turn off the extruder before the end of a thread and turn it on before the beginning.
 
The default 'Activate Oozebane' checkbox is on.  When it is on, the functions described below will work, when it is off, the functions
will not be called.
 
The important value for the oozebane preferences is "Early Shutdown Distance Over Extrusion Width (ratio)" which is the ratio of the
distance before the end of the thread that the extruder will be turned off over the extrusion width, the default is 2.0.  A higher ratio
means the extruder will turn off sooner and the end of the line will be thinner.
 
When oozebane turns the extruder off, it slows the feedrate down in steps so in theory the thread will remain at roughly the same
thickness until the end.  The "Turn Off Steps" preference is the number of steps, the more steps the smaller the size of the step that
the feedrate will be decreased and the larger the size of the resulting gcode file, the default is 5.
 
Oozebane also turns the extruder on just before the start of a thread.  The "Early Startup Maximum Distance Over Extrusion Width"
preference is the ratio of the maximum distance before the thread starts that the extruder will be turned off over the extrusion width,
the default is 2.0.  The longer the extruder has been off, the sooner the extruder will turn back on, the ratio is one minus one over e
to the power of the distance the extruder has been off over the "Early Startup Distance Constant Over Extrusion Width".
 
After oozebane turns the extruder on, it slows the feedrate down where the thread starts.  Then it speeds it up in steps so in theory
the thread will remain at roughly the same thickness from the beginning.
 
To run oozebane, in a shell which oozebane is in type:
> python oozebane.py
 
The following examples oozebane 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 oozebane.py.  The oozebane function will oozebane if the
'Activate Oozebane' checkbox is on.  The functions writeOutput and getOozebaneChainGcode check to see if the text has been
oozebaned, if not they call the getNozzleWipeChainGcode in nozzle_wipe.py to nozzle wipe the text; once they have the nozzle
wiped text, then they oozebane.
 
 
> python oozebane.py
This brings up the dialog, after clicking 'Oozebane', the following is printed:
File Hollow Square.gts is being chain oozebaned.
The oozebaned file is saved as Hollow Square_oozebane.gcode
 
 
> python oozebane.py Hollow Square.gts
File Hollow Square.gts is being chain oozebaned.
The oozebaned file is saved as Hollow Square_oozebane.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 oozebane
>>> oozebane.main()
This brings up the oozebane dialog.
 
 
>>> oozebane.writeOutput()
File Hollow Square.gts is being chain oozebaned.
The oozebaned file is saved as Hollow Square_oozebane.gcode
 
 
>>> oozebane.getOozebaneGcode("
( GCode generated by May 8, 2008 slice.py )
( Extruder Initialization )
..
many lines of gcode
..
")
 
 
>>> oozebane.getOozebaneChainGcode("
( GCode generated by May 8, 2008 slice.py )
( Extruder Initialization )
..
many lines of gcode
..
")

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

 
Classes
       
OozebanePreferences
OozebaneSkein

 
class OozebanePreferences
    A class to handle the oozebane preferences.
 
  Methods defined here:
__init__(self)
Set the default preferences, execute title & preferences filename.
execute(self)
Oozebane button has been clicked.

 
class OozebaneSkein
    A class to oozebane a skein of extrusions.
 
  Methods defined here:
__init__(self)
addAfterStartupLine(self, splitLine)
Add the after startup lines.
addLine(self, line)
Add a line of text and a newline to the output.
addLineSetShutdowns(self, line)
Add a line and set the shutdown variables.
addShutSlowDownLine(self, splitLine)
Add the shutdown and slowdown lines.
getAddAfterStartupLines(self, line)
Get and / or add after the startup lines.
getAddBeforeStartupLines(self, line)
Get and / or add before the startup lines.
getAddShutSlowDownLines(self, line)
Get and / or add the shutdown and slowdown lines.
getDistanceAfterThreadBeginning(self)
Get the distance after the beginning of the thread.
getDistanceThreadBeginning(self)
Get the distance to the beginning of the thread.
getDistanceThreadEnd(self)
Get the distance to the end of the thread.
getDistanceToWord(self, remainingDistance, word)
Get the distance to the word.
getLinearMoveWithFeedrate(self, feedrate, location)
Get a linear move line with the feedrate.
getLinearMoveWithFeedrateSplitLine(self, feedrate, splitLine)
Get a linear move line with the feedrate and split line.
getOozebaneLine(self, line)
Get oozebaned gcode line.
getRounded(self, number)
Get number rounded to the number of carried decimal places as a string.
getShutdownFlowRateMultiplier(self, along)
Get the shut down flow rate multipler.
getStartupFlowRateMultiplier(self, along, numberOfDistances)
Get the startup flow rate multipler.
isAddStartupLine(self, distanceThreadBeginning, splitLine)
Add the startup line.
isClose(self, locationFirst, locationSecond)
Determine if the first location is close to the second location.
isDistanceAfterThreadBeginningGreater(self)
Determine if the distance after the thread beginning is greater than the step index after startup distance.
isJustBeforeStart(self)
Determine if the extruder is just before the thread start.
isNextExtruderOn(self)
Determine if there is an extruder on command before a move command.
parseGcode(self, gcodeText, oozebanePreferences)
Parse gcode text and store the oozebane gcode.
parseInitialization(self, oozebanePreferences)
Parse gcode initialization and store the parameters.
parseLine(self, line)
Parse a gcode line and add it to the bevel gcode.
setAfterStartupFlowRates(self, afterStartupRatio)
Set the after startup flow rates.
setEarlyStartupDistance(self, splitLine)
Set the early startup distance.
setExtrusionWidth(self, oozebanePreferences)
Set the extrusion width.

 
Functions
       
getOozebaneChainGcode(filename, gcodeText, oozebanePreferences=None)
Oozebane a gcode linear move text.  Chain oozebane the gcode if it is not already oozebaned.
getOozebaneGcode(gcodeText, oozebanePreferences=None)
Oozebane a gcode linear move text.
main(hashtable=None)
Display the oozebane dialog.
writeOutput(filename='')
Oozebane a gcode linear move file.  Chain oozebane the gcode if it is not already oozebaned. If no filename is specified, oozebane 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)