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

Loop tailor is a script to loop tailor the extrusion hair of a gcode file.
 
The default 'Activate Loop Tailor' checkbox is on.  When it is on, the functions described below will work, when it is off, the functions
will not be called.
 
Loop tailor clips the ends of loops and jitters position to a different place on each layer to prevent the a ridge from forming.  The
"Clip Over Extrusion Width (ratio)" is the ratio of the amount the loops are clipped over the extrusion width.  If the ratio is too high
loops will have a gap, if the ratio is too low there will be a bulge at the loop ends.  The "Jitter Over Extrusion Width (ratio)" is the
ratio of the amount the loop ends will be jittered.  A high value means the loops will start all over the place and a low value means
loops will start at roughly the same place on each layer.  To run loop tailor, in a shell type:
> python loop_tailor.py
 
The following examples loop tailor 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 loop_tailor.py.  The loop_tailor function will loop_tailor if
'Activate Loop Tailor' is true, which can be set in the dialog or by changing the preferences file 'loop_tailor.csv' in the '.skeinforge' folder
in your home directory with a text editor or a spreadsheet program set to separate tabs.  The functions writeOutput and
getLoopTailorChainGcode check to see if the text has been loop_tailored, if not they call getTowerChainGcode in tower.py to tower the
text; once they have the towered text, then they loop_tailor.
 
 
> python loop_tailor.py
This brings up the dialog, after clicking 'Loop Tailor', the following is printed:
File Hollow Square.gts is being chain loop tailored.
The loop tailored file is saved as Hollow Square_loop_tailor.gcode
 
 
> python oozebane.py Hollow Square.gts
File Hollow Square.gts is being chain loop tailored.
The loop tailored file is saved as Hollow Square_loop_tailor.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 loop_tailor
>>> loop_tailor.main()
This brings up the loop tailor dialog.
 
 
>>> loop_tailor.writeOutput()
Hollow Square.gts
File Hollow Square.gts is being chain loop tailored.
The loop tailored file is saved as Hollow Square_loop_tailor.gcode
 
 
>>> loop_tailor.getLoopTailorGcode("
( GCode generated by May 8, 2008 slice.py )
( Extruder Initialization )
..
many lines of gcode
..
")
 
 
>>> loop_tailor.getLoopTailorChainGcode("
( 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
skeinforge_tools.skeinforge_utilities.intercircle
math
skeinforge_tools.polyfile
skeinforge_tools.skeinforge_utilities.preferences
sys
time
skeinforge_tools.tower

 
Classes
       
LoopTailorPreferences
LoopTailorSkein

 
class LoopTailorPreferences
    A class to handle the loop tailor preferences.
 
  Methods defined here:
__init__(self)
Set the default preferences, execute title & preferences filename.
execute(self)
Loop tailor button has been clicked.

 
class LoopTailorSkein
    A class to loop tailor a skein of extrusions.
 
  Methods defined here:
__init__(self)
addGcodeFromThread(self, thread)
Add a gcode thread to the output.
addGcodeMovement(self, point)
Add a movement to the output.
addLine(self, line)
Add a line of text and a newline to the output.
addTailoredLoopPath(self)
Add a clipped and jittered loop path.
getClippedLoopPath(self, loopPath)
Get a clipped loop path.
getJitteredLoopPath(self, loopPath)
Get a jittered loop path.
getRounded(self, number)
Get number rounded to the number of carried decimal places as a string.
isNextExtruderOn(self)
Determine if there is an extruder on command before a move command.
linearMove(self, splitLine)
Add travel move around loop paths if this the extruder is off.
parseGcode(self, gcodeText, loopTailorPreferences)
Parse gcode text and store the loop tailor gcode.
parseInitialization(self, loopTailorPreferences)
Parse gcode initialization and store the parameters.
parseLine(self, line)
Parse a gcode line and add it to the loop tailor skein.

 
Functions
       
getLoopTailorChainGcode(filename, gcodeText, loopTailorPreferences=None)
Loop tailor a gcode linear move text.  Chain loop tailor the gcode if it is not already loop tailored.
getLoopTailorGcode(gcodeText, loopTailorPreferences=None)
Loop tailor a gcode linear move text.
main(hashtable=None)
Display the loop tailor dialog.
writeOutput(filename='')
Loop tailor a gcode linear move file.  Chain loop tailor the gcode if it is not already loop tailored.  If no filename is specified, loop tailor 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)