skeinforge_tools.craft_plugins.oozebane ($Date: 2008/21/04 $)
index
/home/enrique/Desktop/backup/babbleold/script/reprap/pyRepRap/skeinforge_tools/craft_plugins/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" which is the distance before the end of the thread
that the extruder will be turned off, the default is 1.2.  A higher distance 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 three.
 
Oozebane also turns the extruder on just before the start of a thread.  The "Early Startup Maximum Distance" preference is the
maximum distance before the thread starts that the extruder will be turned off, the default is 1.2.  The longer the extruder has been
off, the earlier 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".  The 'First Early Startup Distance' preference is the distance before the first thread
starts that the extruder will be turned off.  This value should be high because, according to Marius, the extruder takes a second or
two to extrude when starting for the first time, the default is twenty five.
 
When oozebane reaches the point where the extruder would of turned on, it slows down so that the thread will be thick at that point.
Afterwards it speeds the extruder back up to operating speed.  The speed up distance is the "After Startup Distance".
 
The "Minimum Distance for Early Startup" is the minimum distance that the extruder has to be off before the thread begins for the
early start up feature to activate.  The "Minimum Distance for Early Shutdown" is the minimum distance that the extruder has to be
off after the thread end for the early shutdown feature to activate.
 
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 Screw Holder Bottom.gcode & Screw Holder Bottom.stl.  The examples are run in a terminal in the
folder which contains Screw Holder Bottom.gcode, Screw Holder Bottom.stl and oozebane.py.  The oozebane function will oozebane if the
'Activate Oozebane' checkbox is on.  The functions writeOutput and getChainGcode check to see if the text has been
oozebaned, if not they call the getChainGcode in 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 Screw Holder Bottom.stl is being chain oozebaned.
The oozebaned file is saved as Screw Holder Bottom_oozebane.gcode
 
 
> python oozebane.py Screw Holder Bottom.stl
File Screw Holder Bottom.stl is being chain oozebaned.
The oozebaned file is saved as Screw Holder Bottom_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 Screw Holder Bottom.stl is being chain oozebaned.
The oozebaned file is saved as Screw Holder Bottom_oozebane.gcode

 
Modules
       
__init__
skeinforge_tools.skeinforge_utilities.consecution
skeinforge_tools.skeinforge_utilities.euclidean
skeinforge_tools.skeinforge_utilities.gcodec
skeinforge_tools.skeinforge_utilities.interpret
math
skeinforge_tools.polyfile
skeinforge_tools.skeinforge_utilities.preferences
sys

 
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.
addLineSetShutdowns(self, line)
Add a line and set the shutdown variables.
getActiveFeedrateRatio(self)
Get the feedrate of the first active move over the operating feedrate.
getAddAfterStartupLines(self, line)
Get and / or add after the startup lines.
getAddBeforeStartupLines(self, line)
Get and / or add before the startup lines.
getAddShutSlowDownLine(self, line)
Add the shutdown and slowdown lines.
getAddShutSlowDownLines(self, line)
Get and / or add the shutdown and slowdown lines.
getCraftedGcode(self, gcodeText, oozebanePreferences)
Parse gcode text and store the oozebane gcode.
getDistanceAfterThreadBeginning(self)
Get the distance after the beginning of the thread.
getDistanceToExtruderOffCommand(self, remainingDistance)
Get the distance to the word.
getDistanceToThreadBeginning(self)
Get the distance to the beginning of the thread.
getDistanceToThreadBeginningAfterThreadEnd(self, remainingDistance)
Get the distance to the thread beginning after the end of this thread.
getDistanceToThreadEnd(self)
Get the distance to the end of the thread.
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.
getShutdownFlowRateMultiplier(self, along, numberOfDistances)
Get the shut down flow rate multipler.
getStartupFlowRateMultiplier(self, along, numberOfDistances)
Get the startup flow rate multipler.
isClose(self, location, otherLocation)
Determine if the location is close to the other location.
isCloseToEither(self, location, otherLocationFirst, otherLocationSecond)
Determine if the location is close to the other locations.
isDistanceAfterThreadBeginningGreater(self)
Determine if the distance after the thread beginning is greater than the step index after startup distance.
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.
setEarlyShutdown(self)
Set the early shutdown variables.
setEarlyShutdownFlowRates(self, earlyShutdownRatio)
Set the extrusion width.
setEarlyStartupDistance(self, splitLine)
Set the early startup distance.
setExtrusionWidth(self, oozebanePreferences)
Set the extrusion width.

 
Functions
       
getCraftedText(fileName, text, oozebanePreferences=None)
Oozebane a gcode linear move file or text.
getCraftedTextFromText(gcodeText, oozebanePreferences=None)
Oozebane a gcode linear move text.
getDisplayedPreferences()
Get the displayed preferences.
main()
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)