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

Comb is a script to comb the extrusion hair of a gcode file.
 
Comb bends the extruder travel paths around holes in the slice, to avoid stringers.  The default 'Activate Comb' checkbox is on.
When it's on the paths are bent.  When it is off, this script does nothing, the gcode text is handed over the next tool in the
skeinforge chain.  To run comb, in a shell type:
> python comb.py
 
The following examples comb 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 comb.py.  The comb function will comb if 'Activate Comb' is true, which
can be set in the dialog or by changing the preferences file 'comb.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 getCombChainGcode check to see if the
text has been combed, if not they call getTowerChainGcode in tower.py to tower the text; once they have the towered text, then
they comb.
 
 
> python comb.py
This brings up the dialog, after clicking 'Comb', the following is printed:
File Hollow Square.gts is being chain combed.
The combed file is saved as Hollow Square_comb.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 comb
>>> comb.main()
This brings up the comb dialog.
 
 
>>> comb.writeOutput()
Hollow Square.gts
File Hollow Square.gts is being chain combed.
The combed file is saved as Hollow Square_comb.gcode
 
 
>>> comb.getCombGcode("
( GCode generated by May 8, 2008 slice.py )
( Extruder Initialization )
..
many lines of gcode
..
")
 
 
>>> comb.getCombChainGcode("
( 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
skeinforge_tools.polyfile
skeinforge_tools.skeinforge_utilities.preferences
sys
time
skeinforge_tools.tower

 
Classes
       
CombPreferences
CombSkein

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

 
class CombSkein
    A class to comb a skein of extrusions.
 
  Methods defined here:
__init__(self)
addGcodeMovement(self, point)
Add a movement to the output.
addIfTravel(self, splitLine)
Add travel move around loops if this the extruder is off.
addLine(self, line)
Add a line of text and a newline to the output.
addPathBetween(self, betweenFirst, betweenSecond, loopFirst)
Add a path between the perimeter and the fill.
addToLoop(self, location)
Add a location to loop.
getBetweens(self)
Set betweens for the layer.
getOutloopLocation(self, point)
Get location outside of loop.
getRounded(self, number)
Get number rounded to the number of carried decimal places as a string.
insertPathsBetween(self, nextBeginning, pathEnd)
Insert paths between the perimeter and the fill.
parseAddTravel(self, line)
Parse a gcode line and add it to the comb skein.
parseGcode(self, gcodeText)
Parse gcode text and store the comb gcode.
parseLine(self, line)
Parse a gcode line.

 
Functions
       
getCombChainGcode(filename, gcodeText, combPreferences=None)
Comb a gcode linear move text.  Chain comb the gcode if it is not already combed.
getCombGcode(gcodeText, combPreferences=None)
Comb a gcode linear move text.
isLoopNumberEqual(betweenX, betweenXIndex, loopNumber)
Determine if the loop number is equal.
main(hashtable=None)
Display the comb dialog.
writeOutput(filename='')
Comb a gcode linear move file.  Chain comb the gcode if it is not already combed.  If no filename is specified, comb 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)