/reprap_python_beanshell/documentation/skeinforge_tools.analyze_plugins.statistic.html
HTML | 143 lines | 123 code | 20 blank | 0 comment | 0 complexity | 919b805b2c11cd4d5f09c19e7d9516e9 MD5 | raw file
- <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <html><head><title>Python: module skeinforge_tools.analyze_plugins.statistic</title>
- </head><body bgcolor="#f0f0f8">
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
- <tr bgcolor="#7799ee">
- <td valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="skeinforge_tools.html"><font color="#ffffff">skeinforge_tools</font></a>.<a href="skeinforge_tools.analyze_plugins.html"><font color="#ffffff">analyze_plugins</font></a>.statistic</strong></big></big> ($Date: 2008/21/04 $)</font></td
- ><td align=right valign=bottom
- ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/enrique/Desktop/backup/babbleold/script/reprap/pyRepRap/skeinforge_tools/analyze_plugins/statistic.py">/home/enrique/Desktop/backup/babbleold/script/reprap/pyRepRap/skeinforge_tools/analyze_plugins/statistic.py</a></font></td></tr></table>
- <p><tt>Statistic is a script to generate statistics a gcode file.<br>
- <br>
- The default 'Activate Statistic' checkbox is on. When it is on, the functions described below will work when called from the skeinforge toolchain, when it is off, the functions will not be called from the toolchain. The functions will still be called, whether or not the 'Activate Statistic' checkbox is on, when statistic is run directly.<br>
- <br>
- When the 'Print Statistics' checkbox is on, the statistics will be printed to the console, the default is on. When the 'Save Statistics' checkbox is on, the statistics will be save as a .txt file, the default is off.<br>
- <br>
- To run statistic, in a shell in the folder which statistic is in type:<br>
- > python statistic.py<br>
- <br>
- An explanation of the gcodes is at:<br>
- <a href="http://reprap.org/bin/view/Main/Arduino_GCode_Interpreter">http://reprap.org/bin/view/Main/Arduino_GCode_Interpreter</a><br>
- <br>
- and at:<br>
- <a href="http://reprap.org/bin/view/Main/MCodeReference">http://reprap.org/bin/view/Main/MCodeReference</a><br>
- <br>
- A gode example is at:<br>
- <a href="http://forums.reprap.org/file.php?12,file=565">http://forums.reprap.org/file.php?12,file=565</a><br>
- <br>
- This example generates statistics for the gcode file Screw Holder_comb.gcode. This example is run in a terminal in the folder which contains Screw Holder_comb.gcode and statistic.py.<br>
- <br>
- <br>
- > python<br>
- Python 2.5.1 (r251:54863, Sep 22 2007, 01:43:31)<br>
- [GCC 4.2.1 (SUSE Linux)] on linux2<br>
- Type "help", "copyright", "credits" or "license" for more information.<br>
- >>> import statistic<br>
- >>> statistic.<a href="#-main">main</a>()<br>
- This brings up the statistic dialog.<br>
- <br>
- <br>
- >>> statistic.<a href="#-statisticFile">statisticFile</a>()<br>
- The statistics file is saved as Screw Holder_comb_statistic.gcode</tt></p>
- <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#aa55cc">
- <td colspan=3 valign=bottom> <br>
- <font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
-
- <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
- <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="__init__.html">__init__</a><br>
- <a href="cStringIO.html">cStringIO</a><br>
- </td><td width="25%" valign=top><a href="skeinforge_tools.skeinforge_utilities.euclidean.html">skeinforge_tools.skeinforge_utilities.euclidean</a><br>
- <a href="skeinforge_tools.skeinforge_utilities.gcodec.html">skeinforge_tools.skeinforge_utilities.gcodec</a><br>
- </td><td width="25%" valign=top><a href="math.html">math</a><br>
- <a href="skeinforge_tools.polyfile.html">skeinforge_tools.polyfile</a><br>
- </td><td width="25%" valign=top><a href="skeinforge_tools.skeinforge_utilities.preferences.html">skeinforge_tools.skeinforge_utilities.preferences</a><br>
- <a href="sys.html">sys</a><br>
- </td></tr></table></td></tr></table><p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ee77aa">
- <td colspan=3 valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
-
- <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
- <td width="100%"><dl>
- <dt><font face="helvetica, arial"><a href="skeinforge_tools.analyze_plugins.statistic.html#StatisticPreferences">StatisticPreferences</a>
- </font></dt><dt><font face="helvetica, arial"><a href="skeinforge_tools.analyze_plugins.statistic.html#StatisticSkein">StatisticSkein</a>
- </font></dt></dl>
- <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><a name="StatisticPreferences">class <strong>StatisticPreferences</strong></a></font></td></tr>
-
- <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
- <td colspan=2><tt>A class to handle the statistics preferences.<br> </tt></td></tr>
- <tr><td> </td>
- <td width="100%">Methods defined here:<br>
- <dl><dt><a name="StatisticPreferences-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Set the default preferences, execute title & preferences fileName.</tt></dd></dl>
- <dl><dt><a name="StatisticPreferences-execute"><strong>execute</strong></a>(self)</dt><dd><tt>Write button has been clicked.</tt></dd></dl>
- </td></tr></table> <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><a name="StatisticSkein">class <strong>StatisticSkein</strong></a></font></td></tr>
-
- <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
- <td colspan=2><tt>A class to get statistics for a gcode skein.<br> </tt></td></tr>
- <tr><td> </td>
- <td width="100%">Methods defined here:<br>
- <dl><dt><a name="StatisticSkein-__init__"><strong>__init__</strong></a>(self)</dt></dl>
- <dl><dt><a name="StatisticSkein-addLine"><strong>addLine</strong></a>(self, line)</dt><dd><tt>Add a line of text and a newline to the output.</tt></dd></dl>
- <dl><dt><a name="StatisticSkein-addToPath"><strong>addToPath</strong></a>(self, location)</dt><dd><tt>Add a point to travel and maybe extrusion.</tt></dd></dl>
- <dl><dt><a name="StatisticSkein-extruderSet"><strong>extruderSet</strong></a>(self, active)</dt><dd><tt>Maybe increment the number of times the extruder was toggled.</tt></dd></dl>
- <dl><dt><a name="StatisticSkein-getLocationSetFeedRateToSplitLine"><strong>getLocationSetFeedRateToSplitLine</strong></a>(self, splitLine)</dt></dl>
- <dl><dt><a name="StatisticSkein-helicalMove"><strong>helicalMove</strong></a>(self, isCounterclockwise, splitLine)</dt><dd><tt>Get statistics for a helical move.</tt></dd></dl>
- <dl><dt><a name="StatisticSkein-linearMove"><strong>linearMove</strong></a>(self, splitLine)</dt><dd><tt>Get statistics for a linear move.</tt></dd></dl>
- <dl><dt><a name="StatisticSkein-parseGcode"><strong>parseGcode</strong></a>(self, gcodeText)</dt><dd><tt>Parse gcode text and store the statistics.</tt></dd></dl>
- <dl><dt><a name="StatisticSkein-parseLine"><strong>parseLine</strong></a>(self, line)</dt><dd><tt>Parse a gcode line and add it to the statistics.</tt></dd></dl>
- </td></tr></table></td></tr></table><p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#eeaa77">
- <td colspan=3 valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
-
- <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
- <td width="100%"><dl><dt><a name="-getPreferencesConstructor"><strong>getPreferencesConstructor</strong></a>()</dt><dd><tt>Get the preferences constructor.</tt></dd></dl>
- <dl><dt><a name="-getStatisticGcode"><strong>getStatisticGcode</strong></a>(gcodeText)</dt><dd><tt>Get statistics for a gcode text.</tt></dd></dl>
- <dl><dt><a name="-main"><strong>main</strong></a>()</dt><dd><tt>Display the statistics dialog.</tt></dd></dl>
- <dl><dt><a name="-statisticFile"><strong>statisticFile</strong></a>(fileName<font color="#909090">=''</font>)</dt><dd><tt>Write statistics for a gcode file. If no fileName is specified, write statistics for the first gcode file in this folder that is not modified.</tt></dd></dl>
- <dl><dt><a name="-writeOutput"><strong>writeOutput</strong></a>(fileName, gcodeText<font color="#909090">=''</font>)</dt><dd><tt>Write statistics for a skeinforge gcode file, if 'Write Statistics File for Skeinforge Chain' is selected.</tt></dd></dl>
- <dl><dt><a name="-writeStatisticFileGivenText"><strong>writeStatisticFileGivenText</strong></a>(fileName, gcodeText, statisticPreferences)</dt><dd><tt>Write statistics for a gcode file.</tt></dd></dl>
- </td></tr></table><p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#55aa55">
- <td colspan=3 valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
-
- <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
- <td width="100%"><strong>__author__</strong> = 'Enrique Perez (perez_enrique@yahoo.com)'<br>
- <strong>__date__</strong> = '$Date: 2008/21/04 $'<br>
- <strong>__license__</strong> = 'GPL 3.0'<br>
- <strong>absolute_import</strong> = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)</td></tr></table><p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#7799ee">
- <td colspan=3 valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
-
- <tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td>
- <td width="100%">Enrique Perez (perez_enrique@yahoo.com)</td></tr></table>
- </body></html>