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

Cool is a script to cool the shape.
 
The default 'Activate Cool' 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 cool preferences is "Minimum Layer Time (seconds)" which is the minimum amount of time the
extruder will spend on a layer.  If it takes less time to extrude the layer than the minimum layer time, cool adds orbits with the
extruder off to give the layer time to cool, so that the next layer is not extruded on a molten base.
 
If the 'Turn Fan On at Beginning' preference is true, cool will turn the fan on at the beginning of the fabrication.  If the
'Turn Fan Off at Ending' preference is true, cool will turn the fan off at the ending of the fabrication.
 
To run cool, in a shell which cool is in type:
> python cool.py
 
The following examples cool 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 cool.py.  The cool function will cool if the 'Activate Cool'
checkbox is on.  The functions writeOutput and getCoolChainGcode check to see if the text has been cooled, if not they
call the getClipChainGcode in clip.py to clip the text; once they have the clipped text, then they cool.
 
 
> python cool.py
This brings up the dialog, after clicking 'Cool', the following is printed:
File Screw Holder Bottom.stl is being chain cooled.
The extrusion fill density ratio is 0.853
The cooled file is saved as Screw Holder Bottom.gcode
The scalable vector graphics file is saved as Hollow_Square_cool.svg
It took 34 seconds to cool the file.
 
 
> python cool.py Screw Holder Bottom.stl
File Screw Holder Bottom.stl is being chain cooled.
The extrusion fill density ratio is 0.853
The cooled file is saved as Screw Holder Bottom.gcode
The scalable vector graphics file is saved as Hollow_Square_cool.svg
It took 34 seconds to cool the file.
 
 
> 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 cool
>>> cool.main()
This brings up the cool dialog.
 
 
>>> cool.writeOutput()
File Screw Holder Bottom.stl is being chain cooled.
The extrusion fill density ratio is 0.853
The cooled file is saved as Screw Holder Bottom.gcode
The scalable vector graphics file is saved as Hollow_Square_cool.svg
It took 34 seconds to cool the file.
 
 
>>> cool.getCoolGcode("
( GCode generated by May 8, 2008 carve.py )
( Extruder Initialization )
..
many lines of gcode
..
")
 
 
>>> cool.getCoolChainGcode("
( GCode generated by May 8, 2008 carve.py )
( Extruder Initialization )
..
many lines of gcode
..
")

 
Modules
       
__init__
skeinforge_tools.analyze
cStringIO
skeinforge_tools.clip
skeinforge_tools.skeinforge_utilities.euclidean
skeinforge_tools.skeinforge_utilities.gcodec
skeinforge_tools.skeinforge_utilities.intercircle
skeinforge_tools.skeinforge_utilities.interpret
math
skeinforge_tools.polyfile
skeinforge_tools.skeinforge_utilities.preferences
sys
time

 
Classes
       
CoolPreferences
CoolSkein

 
class CoolPreferences
    A class to handle the cool preferences.
 
  Methods defined here:
__init__(self)
Set the default preferences, execute title & preferences fileName.
execute(self)
Cool button has been clicked.

 
class CoolSkein
    A class to cool a skein of extrusions.
 
  Methods defined here:
__init__(self)
addGcodeFromFeedrateMovementZ(self, feedrateMinute, point, z)
Add a movement to the output.
addLine(self, line)
Add a line of text and a newline to the output.
getRounded(self, number)
Get number rounded to the number of carried decimal places as a string.
linearMove(self, splitLine)
Add line to time spent on layer.
parseGcode(self, gcodeText, coolPreferences)
Parse gcode text and store the cool gcode.
parseInitialization(self, coolPreferences)
Parse gcode initialization and store the parameters.
parseLine(self, coolPreferences, line)
Parse a gcode line and add it to the cool skein.

 
Functions
       
getCoolChainGcode(fileName, gcodeText, coolPreferences=None)
Cool a gcode linear move text.  Chain cool the gcode if it is not already cooled.
getCoolGcode(gcodeText, coolPreferences=None)
Cool a gcode linear move text.
main(hashtable=None)
Display the cool dialog.
writeOutput(fileName='')
Cool a gcode linear move file.  Chain cool the gcode if it is not already cooled. If no fileName is specified, cool 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)