2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3 <html><head><title>Python: module skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.static_plugins.gcode_small</title>
4 </head><body bgcolor="#f0f0f8">
6 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
8 <td valign=bottom> <br>
9 <font color="#ffffff" face="helvetica, arial"> <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>.<a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.html"><font color="#ffffff">export_plugins</font></a>.<a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.static_plugins.html"><font color="#ffffff">static_plugins</font></a>.gcode_small</strong></big></big> ($Date: 2008/21/04 $)</font></td
10 ><td align=right valign=bottom
11 ><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_plugins/static_plugins/gcode_small.py">/home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/static_plugins/gcode_small.py</a></font></td></tr></table>
13 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.gcode_time_segment.html">Previous</a> / <a href="skeinforge_application.skeinforge_plugins.craft_plugins.feed.html">Next</a> / <a href="contents.html">Contents</a>
16 Gcode_small is an export plugin to remove the comments and the redundant z and feed rate parameters from a gcode file.<br>
18 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. It is meant to be run from the export tool. To ensure that the plugin works on platforms which do not handle file capitalization properly, give the plugin a lower case name.<br>
20 The getOutput function of this script takes a gcode text and returns that text without comments and redundant z and feed rate parameters. The writeOutput function of this script takes a gcode text and writes that text without comments and redundant z and feed rate parameters to a file.<br>
22 Many of the functions in this script are copied from gcodec in skeinforge_utilities. They are copied rather than imported so developers making new plugins do not have to learn about gcodec, the code here is all they need to learn.</tt>
26 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.gcode_time_segment.html">Previous</a> / <a href="skeinforge_application.skeinforge_plugins.craft_plugins.feed.html">Next</a> / <a href="contents.html">Contents</a>
31 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
32 <tr bgcolor="#aa55cc">
33 <td colspan=3 valign=bottom> <br>
34 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
36 <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
37 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="cStringIO.html">cStringIO</a><br>
38 </td><td width="25%" valign=top><a href="os.html">os</a><br>
39 </td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
40 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
41 <tr bgcolor="#ee77aa">
42 <td colspan=3 valign=bottom> <br>
43 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
45 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
47 <dt><font face="helvetica, arial"><a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.static_plugins.gcode_small.html#GcodeSmallSkein">GcodeSmallSkein</a>
50 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
51 <tr bgcolor="#ffc8d8">
52 <td colspan=3 valign=bottom> <br>
53 <font color="#000000" face="helvetica, arial"><a name="GcodeSmallSkein">class <strong>GcodeSmallSkein</strong></a></font></td></tr>
55 <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
56 <td colspan=2><tt>A class to remove redundant z and feed rate parameters from a skein of extrusions.<br> </tt></td></tr>
58 <td width="100%">Methods defined here:<br>
59 <dl><dt><a name="GcodeSmallSkein-__init__"><strong>__init__</strong></a>(self)</dt></dl>
61 <dl><dt><a name="GcodeSmallSkein-getCraftedGcode"><strong>getCraftedGcode</strong></a>(self, gcodeText)</dt><dd><tt>Parse gcode text and store the gcode.</tt></dd></dl>
63 <dl><dt><a name="GcodeSmallSkein-parseLine"><strong>parseLine</strong></a>(self, line)</dt><dd><tt>Parse a gcode line.</tt></dd></dl>
65 </td></tr></table></td></tr></table><p>
66 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
67 <tr bgcolor="#eeaa77">
68 <td colspan=3 valign=bottom> <br>
69 <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
71 <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
72 <td width="100%"><dl><dt><a name="-getIndexOfStartingWithSecond"><strong>getIndexOfStartingWithSecond</strong></a>(letter, splitLine)</dt><dd><tt>Get index of the first occurence of the given letter in the split line, starting with the second word. Return - 1 if letter is not found</tt></dd></dl>
73 <dl><dt><a name="-getOutput"><strong>getOutput</strong></a>(gcodeText)</dt><dd><tt>Get the exported version of a gcode file.</tt></dd></dl>
74 <dl><dt><a name="-getSplitLineBeforeBracketSemicolon"><strong>getSplitLineBeforeBracketSemicolon</strong></a>(line)</dt><dd><tt>Get the split line before a bracket or semicolon.</tt></dd></dl>
75 <dl><dt><a name="-getStringFromCharacterSplitLine"><strong>getStringFromCharacterSplitLine</strong></a>(character, splitLine)</dt><dd><tt>Get the string after the first occurence of the character in the split line.</tt></dd></dl>
76 <dl><dt><a name="-getSummarizedFileName"><strong>getSummarizedFileName</strong></a>(fileName)</dt><dd><tt>Get the fileName basename if the file is in the current working directory, otherwise return the original full name.</tt></dd></dl>
77 <dl><dt><a name="-getTextLines"><strong>getTextLines</strong></a>(text)</dt><dd><tt>Get the all the lines of text of a text.</tt></dd></dl>
79 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
80 <tr bgcolor="#55aa55">
81 <td colspan=3 valign=bottom> <br>
82 <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
84 <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
85 <td width="100%"><strong>__author__</strong> = 'Enrique Perez (perez_enrique@yahoo.com)'<br>
86 <strong>__date__</strong> = '$Date: 2008/21/04 $'<br>
87 <strong>__license__</strong> = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'<br>
88 <strong>absolute_import</strong> = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)<br>
89 <strong>globalIsReplaceable</strong> = True</td></tr></table><p>
90 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
91 <tr bgcolor="#7799ee">
92 <td colspan=3 valign=bottom> <br>
93 <font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
95 <tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td>
96 <td width="100%">Enrique Perez (perez_enrique@yahoo.com)</td></tr></table>