PageRenderTime 26ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

/skein_engines/skeinforge-35/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.export.html

https://github.com/nmsl1993/ReplicatorG
HTML | 217 lines | 191 code | 26 blank | 0 comment | 0 complexity | 1e8e7c083d88ac1a4df956ac7d5482cf MD5 | raw file
  1. <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html><head><title>Python: module skeinforge_application.skeinforge_plugins.craft_plugins.export</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_application.html"><font color="#ffffff">skeinforge_application</font></a>.<a href="skeinforge_application.skeinforge_plugins.html"><font color="#ffffff">skeinforge_plugins</font></a>.<a href="skeinforge_application.skeinforge_plugins.craft_plugins.html"><font color="#ffffff">craft_plugins</font></a>.export</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/fabmetheus/skeinforge_application/skeinforge_plugins/craft_plugins/export.py">/home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/skeinforge_application/skeinforge_plugins/craft_plugins/export.py</a></font></td></tr></table>
  10. <p>
  11. <a href="skeinforge_application.skeinforge_plugins.craft_plugins.drill.html">Previous</a> / <a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.binary_16_byte.html">Next</a> / <a href="contents.html">Contents</a>
  12. </p>
  13. <p><tt><br>
  14. Export is a script to pick an export plugin and optionally print the output to a file.<br>
  15. <br>
  16. The export manual page is at:<br>
  17. <a href="http://www.bitsfrombytes.com/wiki/index.php?title=Skeinforge_Export">http://www.bitsfrombytes.com/wiki/index.php?title=Skeinforge_Export</a><br>
  18. <br>
  19. <br />
  20. <a href="#Operation">Operation</a><br />
  21. <a href="#Settings">Settings</a><br />
  22. &nbsp;&nbsp;<a href="#Also Send Output To">Also Send Output To</a><br />
  23. &nbsp;&nbsp;<a href="#Delete Comments">Delete Comments</a><br />
  24. &nbsp;&nbsp;<a href="#Export Operations">Export Operations</a><br />
  25. &nbsp;&nbsp;<a href="#File Extension">File Extension</a><br />
  26. &nbsp;&nbsp;<a href="#Save Penultimate Gcode">Save Penultimate Gcode</a><br />
  27. <a href="#Alterations">Alterations</a><br />
  28. &nbsp;&nbsp;<a href="#replace.csv">replace.csv</a><br />
  29. <a href="#Examples">Examples</a><br />
  30. <br />
  31. <a name="Operation" id="Operation"></a><h2>Operation</h2>
  32. <hr>
  33. The default 'Activate Export' checkbox is on. When it is on, the functions described below will work, when it is off, the functions will not be called.<br>
  34. <br>
  35. <a name="Settings" id="Settings"></a><h2>Settings</h2>
  36. <hr>
  37. <a name="Also Send Output To" id="Also Send Output To"></a><h3>Also Send Output To</h3>
  38. Default is empty.<br>
  39. <br>
  40. Defines the output name for sending to a file or pipe. A common choice is sys.stdout to print the output in the shell screen. Another common choice is sys.stderr. With the empty default, nothing will be done.<br>
  41. <br>
  42. <a name="Delete Comments" id="Delete Comments"></a><h3>Delete Comments</h3>
  43. Default is on.<br>
  44. <br>
  45. When selected, export will delete the comments. The comments are not necessary to run a fabricator.<br>
  46. <br>
  47. <a name="Export Operations" id="Export Operations"></a><h3>Export Operations</h3>
  48. Export presents the user with a choice of the export plugins in the export_plugins folder. The chosen plugin will then modify the gcode or translate it into another format. There is also the "Do Not Change Output" choice, which will not change the output. An export plugin is a script in the export_plugins folder which has the getOutput function, the globalIsReplaceable variable and if it's output is not replaceable, the writeOutput function.<br>
  49. <br>
  50. <a name="File Extension" id="File Extension"></a><h3>File Extension</h3>
  51. Default is gcode.<br>
  52. <br>
  53. Defines the file extension added to the name of the output file.<br>
  54. <br>
  55. <a name="Save Penultimate Gcode" id="Save Penultimate Gcode"></a><h3>Save Penultimate Gcode</h3>
  56. Default is off.<br>
  57. <br>
  58. When selected, export will save the gcode with the suffix '_penultimate.gcode' just before it is exported. This is useful because the code after it is exported could be in a form which the viewers can not display.<br>
  59. <br>
  60. <a name="Alterations" id="Alterations"></a><h2>Alterations</h2>
  61. <hr>
  62. Export looks for alteration files in the alterations folder in the .skeinforge folder in the home directory. Export does not care if the text file names are capitalized, but some file systems do not handle file name cases properly, so to be on the safe side you should give them lower case names. If it doesn't find the file it then looks in the alterations folder in the skeinforge_plugins folder. If it doesn't find anything there it looks in the skeinforge_plugins folder.<br>
  63. <br>
  64. <a name="replace.csv" id="replace.csv"></a><h3>replace.csv</h3>
  65. When export is exporting the code, if there is a tab separated file replace.csv, it will replace the string in the first column by its replacement in the second column. There is an example file replace_example.csv to demonstrate the tab separated format, which can be edited in a text editor or a spreadsheet.<br>
  66. <br>
  67. <a name="Examples" id="Examples"></a><h2>Examples</h2>
  68. <hr>
  69. The following examples export the file Screw Holder Bottom.stl. The examples are run in a terminal in the folder which contains Screw Holder Bottom.stl and export.py.<br>
  70. <br>
  71. <br>
  72. &gt; python export.py<br>
  73. This brings up the export dialog.<br>
  74. <br>
  75. <br>
  76. &gt; python export.py Screw Holder Bottom.stl<br>
  77. The export tool is parsing the file:<br>
  78. Screw Holder Bottom.stl<br>
  79. ..<br>
  80. The export tool has created the file:<br>
  81. .. Screw Holder Bottom_export.gcode<br>
  82. <br>
  83. <br>
  84. &gt; python<br>
  85. Python 2.5.1 (r251:54863, Sep 22 2007, 01:43:31)<br>
  86. [GCC 4.2.1 (SUSE Linux)] on linux2<br>
  87. Type "help", "copyright", "credits" or "license" for more information.<br>
  88. &gt;&gt;&gt; import export<br>
  89. &gt;&gt;&gt; export.<a href="#-main">main</a>()<br>
  90. This brings up the export dialog.<br>
  91. <br>
  92. <br>
  93. &gt;&gt;&gt; export.<a href="#-writeOutput">writeOutput</a>('Screw Holder Bottom.stl')<br>
  94. The export tool is parsing the file:<br>
  95. Screw Holder Bottom.stl<br>
  96. ..<br>
  97. The export tool has created the file:<br>
  98. .. Screw Holder Bottom_export.gcode</tt>
  99. <br />
  100. <br />
  101. <p>
  102. <a href="skeinforge_application.skeinforge_plugins.craft_plugins.drill.html">Previous</a> / <a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.binary_16_byte.html">Next</a> / <a href="contents.html">Contents</a>
  103. </p>
  104. <hr>
  105. </p>
  106. <p>
  107. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  108. <tr bgcolor="#aa55cc">
  109. <td colspan=3 valign=bottom>&nbsp;<br>
  110. <font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
  111. <tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  112. <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="__init__.html">__init__</a><br>
  113. <a href="fabmetheus_utilities.archive.html">fabmetheus_utilities.archive</a><br>
  114. <a href="cStringIO.html">cStringIO</a><br>
  115. <a href="fabmetheus_utilities.euclidean.html">fabmetheus_utilities.euclidean</a><br>
  116. </td><td width="25%" valign=top><a href="fabmetheus_utilities.fabmetheus_tools.fabmetheus_interpret.html">fabmetheus_utilities.fabmetheus_tools.fabmetheus_interpret</a><br>
  117. <a href="fabmetheus_utilities.gcodec.html">fabmetheus_utilities.gcodec</a><br>
  118. <a href="fabmetheus_utilities.intercircle.html">fabmetheus_utilities.intercircle</a><br>
  119. <a href="os.html">os</a><br>
  120. </td><td width="25%" valign=top><a href="fabmetheus_utilities.settings.html">fabmetheus_utilities.settings</a><br>
  121. <a href="skeinforge_application.skeinforge_utilities.skeinforge_analyze.html">skeinforge_application.skeinforge_utilities.skeinforge_analyze</a><br>
  122. <a href="skeinforge_application.skeinforge_utilities.skeinforge_craft.html">skeinforge_application.skeinforge_utilities.skeinforge_craft</a><br>
  123. <a href="skeinforge_application.skeinforge_utilities.skeinforge_polyfile.html">skeinforge_application.skeinforge_utilities.skeinforge_polyfile</a><br>
  124. </td><td width="25%" valign=top><a href="skeinforge_application.skeinforge_utilities.skeinforge_profile.html">skeinforge_application.skeinforge_utilities.skeinforge_profile</a><br>
  125. <a href="sys.html">sys</a><br>
  126. <a href="time.html">time</a><br>
  127. </td></tr></table></td></tr></table><p>
  128. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  129. <tr bgcolor="#ee77aa">
  130. <td colspan=3 valign=bottom>&nbsp;<br>
  131. <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
  132. <tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  133. <td width="100%"><dl>
  134. <dt><font face="helvetica, arial"><a href="skeinforge_application.skeinforge_plugins.craft_plugins.export.html#ExportRepository">ExportRepository</a>
  135. </font></dt><dt><font face="helvetica, arial"><a href="skeinforge_application.skeinforge_plugins.craft_plugins.export.html#ExportSkein">ExportSkein</a>
  136. </font></dt></dl>
  137. <p>
  138. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  139. <tr bgcolor="#ffc8d8">
  140. <td colspan=3 valign=bottom>&nbsp;<br>
  141. <font color="#000000" face="helvetica, arial"><a name="ExportRepository">class <strong>ExportRepository</strong></a></font></td></tr>
  142. <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
  143. <td colspan=2><tt>A&nbsp;class&nbsp;to&nbsp;handle&nbsp;the&nbsp;export&nbsp;settings.<br>&nbsp;</tt></td></tr>
  144. <tr><td>&nbsp;</td>
  145. <td width="100%">Methods defined here:<br>
  146. <dl><dt><a name="ExportRepository-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Set&nbsp;the&nbsp;default&nbsp;settings,&nbsp;execute&nbsp;title&nbsp;&amp;&nbsp;settings&nbsp;fileName.</tt></dd></dl>
  147. <dl><dt><a name="ExportRepository-execute"><strong>execute</strong></a>(self)</dt><dd><tt>Export&nbsp;button&nbsp;has&nbsp;been&nbsp;clicked.</tt></dd></dl>
  148. </td></tr></table> <p>
  149. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  150. <tr bgcolor="#ffc8d8">
  151. <td colspan=3 valign=bottom>&nbsp;<br>
  152. <font color="#000000" face="helvetica, arial"><a name="ExportSkein">class <strong>ExportSkein</strong></a></font></td></tr>
  153. <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
  154. <td colspan=2><tt>A&nbsp;class&nbsp;to&nbsp;export&nbsp;a&nbsp;skein&nbsp;of&nbsp;extrusions.<br>&nbsp;</tt></td></tr>
  155. <tr><td>&nbsp;</td>
  156. <td width="100%">Methods defined here:<br>
  157. <dl><dt><a name="ExportSkein-__init__"><strong>__init__</strong></a>(self)</dt></dl>
  158. <dl><dt><a name="ExportSkein-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>
  159. <dl><dt><a name="ExportSkein-getCraftedGcode"><strong>getCraftedGcode</strong></a>(self, exportRepository, gcodeText)</dt><dd><tt>Parse&nbsp;gcode&nbsp;text&nbsp;and&nbsp;store&nbsp;the&nbsp;export&nbsp;gcode.</tt></dd></dl>
  160. <dl><dt><a name="ExportSkein-getLineWithTruncatedNumber"><strong>getLineWithTruncatedNumber</strong></a>(self, character, line, splitLine)</dt><dd><tt>Get&nbsp;a&nbsp;line&nbsp;with&nbsp;the&nbsp;number&nbsp;after&nbsp;the&nbsp;character&nbsp;truncated.</tt></dd></dl>
  161. <dl><dt><a name="ExportSkein-parseLine"><strong>parseLine</strong></a>(self, exportRepository, line)</dt><dd><tt>Parse&nbsp;a&nbsp;gcode&nbsp;line.</tt></dd></dl>
  162. </td></tr></table></td></tr></table><p>
  163. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  164. <tr bgcolor="#eeaa77">
  165. <td colspan=3 valign=bottom>&nbsp;<br>
  166. <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
  167. <tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  168. <td width="100%"><dl><dt><a name="-getCraftedTextFromText"><strong>getCraftedTextFromText</strong></a>(gcodeText, exportRepository<font color="#909090">=None</font>)</dt><dd><tt>Export&nbsp;a&nbsp;gcode&nbsp;linear&nbsp;move&nbsp;text.</tt></dd></dl>
  169. <dl><dt><a name="-getDistanceGcode"><strong>getDistanceGcode</strong></a>(exportText)</dt><dd><tt>Get&nbsp;gcode&nbsp;lines&nbsp;with&nbsp;distance&nbsp;variable&nbsp;added.</tt></dd></dl>
  170. <dl><dt><a name="-getNewRepository"><strong>getNewRepository</strong></a>()</dt><dd><tt>Get&nbsp;the&nbsp;repository&nbsp;constructor.</tt></dd></dl>
  171. <dl><dt><a name="-getReplaced"><strong>getReplaced</strong></a>(exportText)</dt><dd><tt>Get&nbsp;text&nbsp;with&nbsp;strings&nbsp;replaced&nbsp;according&nbsp;to&nbsp;replace.csv&nbsp;file.</tt></dd></dl>
  172. <dl><dt><a name="-getSelectedPluginModule"><strong>getSelectedPluginModule</strong></a>(plugins)</dt><dd><tt>Get&nbsp;the&nbsp;selected&nbsp;plugin&nbsp;module.</tt></dd></dl>
  173. <dl><dt><a name="-main"><strong>main</strong></a>()</dt><dd><tt>Display&nbsp;the&nbsp;export&nbsp;dialog.</tt></dd></dl>
  174. <dl><dt><a name="-writeOutput"><strong>writeOutput</strong></a>(fileName<font color="#909090">=''</font>)</dt><dd><tt>Export&nbsp;a&nbsp;gcode&nbsp;linear&nbsp;move&nbsp;file.</tt></dd></dl>
  175. </td></tr></table><p>
  176. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  177. <tr bgcolor="#55aa55">
  178. <td colspan=3 valign=bottom>&nbsp;<br>
  179. <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
  180. <tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  181. <td width="100%"><strong>__author__</strong> = 'Enrique Perez (perez_enrique@yahoo.com)'<br>
  182. <strong>__date__</strong> = '$Date: 2008/21/04 $'<br>
  183. <strong>__license__</strong> = 'GPL 3.0'<br>
  184. <strong>absolute_import</strong> = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)</td></tr></table><p>
  185. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  186. <tr bgcolor="#7799ee">
  187. <td colspan=3 valign=bottom>&nbsp;<br>
  188. <font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
  189. <tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  190. <td width="100%">Enrique&nbsp;Perez&nbsp;(perez_enrique@yahoo.com)</td></tr></table>
  191. </body></html>