PageRenderTime 60ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 0ms

/reprap_python_beanshell/documentation/skeinforge_tools.analyze_plugins.statistic.html

https://github.com/TeamTeamUSA/SkeinFox
HTML | 143 lines | 123 code | 20 blank | 0 comment | 0 complexity | 919b805b2c11cd4d5f09c19e7d9516e9 MD5 | raw file
  1. <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html><head><title>Python: module skeinforge_tools.analyze_plugins.statistic</title>
  3. </head><body bgcolor="#f0f0f8">
  4. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
  5. <tr bgcolor="#7799ee">
  6. <td valign=bottom>&nbsp;<br>
  7. <font color="#ffffff" face="helvetica, arial">&nbsp;<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
  8. ><td align=right valign=bottom
  9. ><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>
  10. <p><tt>Statistic is a script to generate statistics a gcode file.<br>
  11. <br>
  12. 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>
  13. <br>
  14. 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>
  15. <br>
  16. To run statistic, in a shell in the folder which statistic is in type:<br>
  17. &gt; python statistic.py<br>
  18. <br>
  19. An explanation of the gcodes is at:<br>
  20. <a href="http://reprap.org/bin/view/Main/Arduino_GCode_Interpreter">http://reprap.org/bin/view/Main/Arduino_GCode_Interpreter</a><br>
  21. <br>
  22. and at:<br>
  23. <a href="http://reprap.org/bin/view/Main/MCodeReference">http://reprap.org/bin/view/Main/MCodeReference</a><br>
  24. <br>
  25. A gode example is at:<br>
  26. <a href="http://forums.reprap.org/file.php?12,file=565">http://forums.reprap.org/file.php?12,file=565</a><br>
  27. <br>
  28. 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>
  29. <br>
  30. <br>
  31. &gt; python<br>
  32. Python 2.5.1 (r251:54863, Sep 22 2007, 01:43:31)<br>
  33. [GCC 4.2.1 (SUSE Linux)] on linux2<br>
  34. Type "help", "copyright", "credits" or "license" for more information.<br>
  35. &gt;&gt;&gt; import statistic<br>
  36. &gt;&gt;&gt; statistic.<a href="#-main">main</a>()<br>
  37. This brings up the statistic dialog.<br>
  38. <br>
  39. <br>
  40. &gt;&gt;&gt; statistic.<a href="#-statisticFile">statisticFile</a>()<br>
  41. The statistics file is saved as Screw Holder_comb_statistic.gcode</tt></p>
  42. <p>
  43. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  44. <tr bgcolor="#aa55cc">
  45. <td colspan=3 valign=bottom>&nbsp;<br>
  46. <font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
  47. <tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  48. <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="__init__.html">__init__</a><br>
  49. <a href="cStringIO.html">cStringIO</a><br>
  50. </td><td width="25%" valign=top><a href="skeinforge_tools.skeinforge_utilities.euclidean.html">skeinforge_tools.skeinforge_utilities.euclidean</a><br>
  51. <a href="skeinforge_tools.skeinforge_utilities.gcodec.html">skeinforge_tools.skeinforge_utilities.gcodec</a><br>
  52. </td><td width="25%" valign=top><a href="math.html">math</a><br>
  53. <a href="skeinforge_tools.polyfile.html">skeinforge_tools.polyfile</a><br>
  54. </td><td width="25%" valign=top><a href="skeinforge_tools.skeinforge_utilities.preferences.html">skeinforge_tools.skeinforge_utilities.preferences</a><br>
  55. <a href="sys.html">sys</a><br>
  56. </td></tr></table></td></tr></table><p>
  57. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  58. <tr bgcolor="#ee77aa">
  59. <td colspan=3 valign=bottom>&nbsp;<br>
  60. <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
  61. <tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  62. <td width="100%"><dl>
  63. <dt><font face="helvetica, arial"><a href="skeinforge_tools.analyze_plugins.statistic.html#StatisticPreferences">StatisticPreferences</a>
  64. </font></dt><dt><font face="helvetica, arial"><a href="skeinforge_tools.analyze_plugins.statistic.html#StatisticSkein">StatisticSkein</a>
  65. </font></dt></dl>
  66. <p>
  67. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  68. <tr bgcolor="#ffc8d8">
  69. <td colspan=3 valign=bottom>&nbsp;<br>
  70. <font color="#000000" face="helvetica, arial"><a name="StatisticPreferences">class <strong>StatisticPreferences</strong></a></font></td></tr>
  71. <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
  72. <td colspan=2><tt>A&nbsp;class&nbsp;to&nbsp;handle&nbsp;the&nbsp;statistics&nbsp;preferences.<br>&nbsp;</tt></td></tr>
  73. <tr><td>&nbsp;</td>
  74. <td width="100%">Methods defined here:<br>
  75. <dl><dt><a name="StatisticPreferences-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Set&nbsp;the&nbsp;default&nbsp;preferences,&nbsp;execute&nbsp;title&nbsp;&amp;&nbsp;preferences&nbsp;fileName.</tt></dd></dl>
  76. <dl><dt><a name="StatisticPreferences-execute"><strong>execute</strong></a>(self)</dt><dd><tt>Write&nbsp;button&nbsp;has&nbsp;been&nbsp;clicked.</tt></dd></dl>
  77. </td></tr></table> <p>
  78. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  79. <tr bgcolor="#ffc8d8">
  80. <td colspan=3 valign=bottom>&nbsp;<br>
  81. <font color="#000000" face="helvetica, arial"><a name="StatisticSkein">class <strong>StatisticSkein</strong></a></font></td></tr>
  82. <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
  83. <td colspan=2><tt>A&nbsp;class&nbsp;to&nbsp;get&nbsp;statistics&nbsp;for&nbsp;a&nbsp;gcode&nbsp;skein.<br>&nbsp;</tt></td></tr>
  84. <tr><td>&nbsp;</td>
  85. <td width="100%">Methods defined here:<br>
  86. <dl><dt><a name="StatisticSkein-__init__"><strong>__init__</strong></a>(self)</dt></dl>
  87. <dl><dt><a name="StatisticSkein-addLine"><strong>addLine</strong></a>(self, line)</dt><dd><tt>Add&nbsp;a&nbsp;line&nbsp;of&nbsp;text&nbsp;and&nbsp;a&nbsp;newline&nbsp;to&nbsp;the&nbsp;output.</tt></dd></dl>
  88. <dl><dt><a name="StatisticSkein-addToPath"><strong>addToPath</strong></a>(self, location)</dt><dd><tt>Add&nbsp;a&nbsp;point&nbsp;to&nbsp;travel&nbsp;and&nbsp;maybe&nbsp;extrusion.</tt></dd></dl>
  89. <dl><dt><a name="StatisticSkein-extruderSet"><strong>extruderSet</strong></a>(self, active)</dt><dd><tt>Maybe&nbsp;increment&nbsp;the&nbsp;number&nbsp;of&nbsp;times&nbsp;the&nbsp;extruder&nbsp;was&nbsp;toggled.</tt></dd></dl>
  90. <dl><dt><a name="StatisticSkein-getLocationSetFeedRateToSplitLine"><strong>getLocationSetFeedRateToSplitLine</strong></a>(self, splitLine)</dt></dl>
  91. <dl><dt><a name="StatisticSkein-helicalMove"><strong>helicalMove</strong></a>(self, isCounterclockwise, splitLine)</dt><dd><tt>Get&nbsp;statistics&nbsp;for&nbsp;a&nbsp;helical&nbsp;move.</tt></dd></dl>
  92. <dl><dt><a name="StatisticSkein-linearMove"><strong>linearMove</strong></a>(self, splitLine)</dt><dd><tt>Get&nbsp;statistics&nbsp;for&nbsp;a&nbsp;linear&nbsp;move.</tt></dd></dl>
  93. <dl><dt><a name="StatisticSkein-parseGcode"><strong>parseGcode</strong></a>(self, gcodeText)</dt><dd><tt>Parse&nbsp;gcode&nbsp;text&nbsp;and&nbsp;store&nbsp;the&nbsp;statistics.</tt></dd></dl>
  94. <dl><dt><a name="StatisticSkein-parseLine"><strong>parseLine</strong></a>(self, line)</dt><dd><tt>Parse&nbsp;a&nbsp;gcode&nbsp;line&nbsp;and&nbsp;add&nbsp;it&nbsp;to&nbsp;the&nbsp;statistics.</tt></dd></dl>
  95. </td></tr></table></td></tr></table><p>
  96. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  97. <tr bgcolor="#eeaa77">
  98. <td colspan=3 valign=bottom>&nbsp;<br>
  99. <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
  100. <tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  101. <td width="100%"><dl><dt><a name="-getPreferencesConstructor"><strong>getPreferencesConstructor</strong></a>()</dt><dd><tt>Get&nbsp;the&nbsp;preferences&nbsp;constructor.</tt></dd></dl>
  102. <dl><dt><a name="-getStatisticGcode"><strong>getStatisticGcode</strong></a>(gcodeText)</dt><dd><tt>Get&nbsp;statistics&nbsp;for&nbsp;a&nbsp;gcode&nbsp;text.</tt></dd></dl>
  103. <dl><dt><a name="-main"><strong>main</strong></a>()</dt><dd><tt>Display&nbsp;the&nbsp;statistics&nbsp;dialog.</tt></dd></dl>
  104. <dl><dt><a name="-statisticFile"><strong>statisticFile</strong></a>(fileName<font color="#909090">=''</font>)</dt><dd><tt>Write&nbsp;statistics&nbsp;for&nbsp;a&nbsp;gcode&nbsp;file.&nbsp;&nbsp;If&nbsp;no&nbsp;fileName&nbsp;is&nbsp;specified,&nbsp;write&nbsp;statistics&nbsp;for&nbsp;the&nbsp;first&nbsp;gcode&nbsp;file&nbsp;in&nbsp;this&nbsp;folder&nbsp;that&nbsp;is&nbsp;not&nbsp;modified.</tt></dd></dl>
  105. <dl><dt><a name="-writeOutput"><strong>writeOutput</strong></a>(fileName, gcodeText<font color="#909090">=''</font>)</dt><dd><tt>Write&nbsp;statistics&nbsp;for&nbsp;a&nbsp;skeinforge&nbsp;gcode&nbsp;file,&nbsp;if&nbsp;'Write&nbsp;Statistics&nbsp;File&nbsp;for&nbsp;Skeinforge&nbsp;Chain'&nbsp;is&nbsp;selected.</tt></dd></dl>
  106. <dl><dt><a name="-writeStatisticFileGivenText"><strong>writeStatisticFileGivenText</strong></a>(fileName, gcodeText, statisticPreferences)</dt><dd><tt>Write&nbsp;statistics&nbsp;for&nbsp;a&nbsp;gcode&nbsp;file.</tt></dd></dl>
  107. </td></tr></table><p>
  108. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  109. <tr bgcolor="#55aa55">
  110. <td colspan=3 valign=bottom>&nbsp;<br>
  111. <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
  112. <tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  113. <td width="100%"><strong>__author__</strong> = 'Enrique Perez (perez_enrique@yahoo.com)'<br>
  114. <strong>__date__</strong> = '$Date: 2008/21/04 $'<br>
  115. <strong>__license__</strong> = 'GPL 3.0'<br>
  116. <strong>absolute_import</strong> = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)</td></tr></table><p>
  117. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  118. <tr bgcolor="#7799ee">
  119. <td colspan=3 valign=bottom>&nbsp;<br>
  120. <font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
  121. <tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  122. <td width="100%">Enrique&nbsp;Perez&nbsp;(perez_enrique@yahoo.com)</td></tr></table>
  123. </body></html>