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.gcode_time_segment</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>.gcode_time_segment</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/gcode_time_segment.py">/home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/gcode_time_segment.py</a></font></td></tr></table>
13 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.gcode_step.html">Previous</a> / <a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.static_plugins.gcode_small.html">Next</a> / <a href="contents.html">Contents</a>
16 Gcode time segment is an export plugin to convert gcode from float position to number of steps.<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 it with the positions converted into number of steps and time. The writeOutput function of this script takes a gcode text and writes that with the positions converted into number of steps and time.<br>
23 <a href="#Settings">Settings</a><br />
24 <a href="#Add Space Between Words">Add Space Between Words</a><br />
25 <a href="#Offset">Offset</a><br />
26 <a href="#X Offset">X Offset</a><br />
27 <a href="#Y Offset">Y Offset</a><br />
28 <a href="#Z Offset">Z Offset</a><br />
29 <a href="#Step">Step</a><br />
30 <a href="#Extrusion Step">Extrusion Step</a><br />
31 <a href="#Time Step">Time Step</a><br />
32 <a href="#X Step">X Step</a><br />
33 <a href="#Y Step">Y Step</a><br />
34 <a href="#Z Step">Z Step</a><br />
36 <a name="Settings" id="Settings"></a><h2>Settings</h2>
39 <a name="Add Space Between Words" id="Add Space Between Words"></a><h3>Add Space Between Words</h3>
43 When selected, a space will be added between each gcode word.<br>
45 <a name="Offset" id="Offset"></a><h3>Offset</h3>
47 <a name="X Offset" id="X Offset"></a><h4>X Offset</h4>
51 Defines the X Offset.<br>
53 <a name="Y Offset" id="Y Offset"></a><h4>Y Offset</h4>
57 Defines the Y Offset.<br>
59 <a name="Z Offset" id="Z Offset"></a><h4>Z Offset</h4>
63 Defines the Z Offset.<br>
65 <a name="Step" id="Step"></a><h3>Step</h3>
67 <a name="Extrusion Step" id="Extrusion Step"></a><h3>Extrusion Step</h3>
69 Default is 0.01 mm.<br>
71 Defines the radius step length.<br>
73 <a name="Time Step" id="Time Step"></a><h3>Time Step</h3>
75 Default is 1 microsecond(mcs).<br>
77 Defines the time step duration.<br>
79 <a name="X Step" id="X Step"></a><h4>X Step</h4>
81 Default is 0.1 mm.<br>
83 Defines the X axis step length.<br>
85 <a name="Y Step" id="Y Step"></a><h4>Y Step</h4>
87 Default is 0.1 mm.<br>
89 Defines the Y axis step length.<br>
91 <a name="Z Step" id="Z Step"></a><h4>Z Step</h4>
93 Default is 0.01 mm.<br>
95 Defines the Z axis step length.</tt>
99 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.gcode_step.html">Previous</a> / <a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.static_plugins.gcode_small.html">Next</a> / <a href="contents.html">Contents</a>
104 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
105 <tr bgcolor="#aa55cc">
106 <td colspan=3 valign=bottom> <br>
107 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
109 <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
110 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="__init__.html">__init__</a><br>
111 <a href="fabmetheus_utilities.archive.html">fabmetheus_utilities.archive</a><br>
112 <a href="cStringIO.html">cStringIO</a><br>
113 </td><td width="25%" valign=top><a href="fabmetheus_utilities.fabmetheus_tools.fabmetheus_interpret.html">fabmetheus_utilities.fabmetheus_tools.fabmetheus_interpret</a><br>
114 <a href="fabmetheus_utilities.gcodec.html">fabmetheus_utilities.gcodec</a><br>
115 <a href="os.html">os</a><br>
116 </td><td width="25%" valign=top><a href="fabmetheus_utilities.settings.html">fabmetheus_utilities.settings</a><br>
117 <a href="skeinforge_application.skeinforge_utilities.skeinforge_polyfile.html">skeinforge_application.skeinforge_utilities.skeinforge_polyfile</a><br>
118 <a href="skeinforge_application.skeinforge_utilities.skeinforge_profile.html">skeinforge_application.skeinforge_utilities.skeinforge_profile</a><br>
119 </td><td width="25%" valign=top><a href="sys.html">sys</a><br>
120 </td></tr></table></td></tr></table><p>
121 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
122 <tr bgcolor="#ee77aa">
123 <td colspan=3 valign=bottom> <br>
124 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
126 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
127 <td width="100%"><dl>
128 <dt><font face="helvetica, arial"><a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.gcode_time_segment.html#GcodeTimeSegmentRepository">GcodeTimeSegmentRepository</a>
129 </font></dt><dt><font face="helvetica, arial"><a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.gcode_time_segment.html#GcodeTimeSegmentSkein">GcodeTimeSegmentSkein</a>
132 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
133 <tr bgcolor="#ffc8d8">
134 <td colspan=3 valign=bottom> <br>
135 <font color="#000000" face="helvetica, arial"><a name="GcodeTimeSegmentRepository">class <strong>GcodeTimeSegmentRepository</strong></a></font></td></tr>
137 <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
138 <td colspan=2><tt>A class to handle the export settings.<br> </tt></td></tr>
140 <td width="100%">Methods defined here:<br>
141 <dl><dt><a name="GcodeTimeSegmentRepository-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Set the default settings, execute title & settings fileName.</tt></dd></dl>
143 <dl><dt><a name="GcodeTimeSegmentRepository-execute"><strong>execute</strong></a>(self)</dt><dd><tt>Convert to gcode step button has been clicked.</tt></dd></dl>
145 </td></tr></table> <p>
146 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
147 <tr bgcolor="#ffc8d8">
148 <td colspan=3 valign=bottom> <br>
149 <font color="#000000" face="helvetica, arial"><a name="GcodeTimeSegmentSkein">class <strong>GcodeTimeSegmentSkein</strong></a></font></td></tr>
151 <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
152 <td colspan=2><tt>A class to convert gcode into time segments.<br> </tt></td></tr>
154 <td width="100%">Methods defined here:<br>
155 <dl><dt><a name="GcodeTimeSegmentSkein-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Initialize.</tt></dd></dl>
157 <dl><dt><a name="GcodeTimeSegmentSkein-addCharacterInteger"><strong>addCharacterInteger</strong></a>(self, character, lineStringIO, offset, splitLine, step)</dt><dd><tt>Add a character and integer to line string.</tt></dd></dl>
159 <dl><dt><a name="GcodeTimeSegmentSkein-addLine"><strong>addLine</strong></a>(self, line)</dt><dd><tt>Add a line of text and a newline to the output.</tt></dd></dl>
161 <dl><dt><a name="GcodeTimeSegmentSkein-addStringToLine"><strong>addStringToLine</strong></a>(self, lineStringIO, wordString)</dt><dd><tt>Add a character and integer to line string.</tt></dd></dl>
163 <dl><dt><a name="GcodeTimeSegmentSkein-getCraftedGcode"><strong>getCraftedGcode</strong></a>(self, gcodeText, repository)</dt><dd><tt>Parse gcode text and store the gcode.</tt></dd></dl>
165 <dl><dt><a name="GcodeTimeSegmentSkein-parseLine"><strong>parseLine</strong></a>(self, line)</dt><dd><tt>Parse a gcode line.</tt></dd></dl>
167 </td></tr></table></td></tr></table><p>
168 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
169 <tr bgcolor="#eeaa77">
170 <td colspan=3 valign=bottom> <br>
171 <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
173 <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
174 <td width="100%"><dl><dt><a name="-getCharacterIntegerString"><strong>getCharacterIntegerString</strong></a>(character, offset, splitLine, step)</dt><dd><tt>Get a character and integer string.</tt></dd></dl>
175 <dl><dt><a name="-getFloatFromCharacterSplitLine"><strong>getFloatFromCharacterSplitLine</strong></a>(character, splitLine)</dt><dd><tt>Get the float after the first occurence of the character in the split line.</tt></dd></dl>
176 <dl><dt><a name="-getNewRepository"><strong>getNewRepository</strong></a>()</dt><dd><tt>Get new repository.</tt></dd></dl>
177 <dl><dt><a name="-getOutput"><strong>getOutput</strong></a>(gcodeText, repository<font color="#909090">=None</font>)</dt><dd><tt>Get the exported version of a gcode file.</tt></dd></dl>
178 <dl><dt><a name="-main"><strong>main</strong></a>()</dt><dd><tt>Display the export dialog.</tt></dd></dl>
179 <dl><dt><a name="-writeOutput"><strong>writeOutput</strong></a>(fileName, gcodeText<font color="#909090">=''</font>)</dt><dd><tt>Write the exported version of a gcode file.</tt></dd></dl>
180 </td></tr></table><p>
181 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
182 <tr bgcolor="#55aa55">
183 <td colspan=3 valign=bottom> <br>
184 <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
186 <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
187 <td width="100%"><strong>__author__</strong> = 'Enrique Perez (perez_enrique@yahoo.com)'<br>
188 <strong>__date__</strong> = '$Date: 2008/21/04 $'<br>
189 <strong>__license__</strong> = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'<br>
190 <strong>absolute_import</strong> = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)<br>
191 <strong>globalIsReplaceable</strong> = True</td></tr></table><p>
192 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
193 <tr bgcolor="#7799ee">
194 <td colspan=3 valign=bottom> <br>
195 <font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
197 <tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td>
198 <td width="100%">Enrique Perez (perez_enrique@yahoo.com)</td></tr></table>