chiark / gitweb /
Updated to skeinforge 49
authordaid <daid303@gmail.com>
Thu, 16 Feb 2012 14:06:50 +0000 (15:06 +0100)
committerdaid <daid303@gmail.com>
Thu, 16 Feb 2012 14:06:50 +0000 (15:06 +0100)
23 files changed:
SkeinPyPy/SkeinforgeVersion
SkeinPyPy/documentation/contents.html
SkeinPyPy/documentation/fabmetheus_utilities.gcodec.html
SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.clip.html
SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.comb.html
SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.drill.html
SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.export.html
SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.html
SkeinPyPy/documentation/skeinforge_application.skeinforge_utilities.skeinforge_craft.html
SkeinPyPy/fabmetheus_utilities/gcodec.py
SkeinPyPy/fabmetheus_utilities/version.txt
SkeinPyPy/skeinforge_application/skeinforge.py
SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/analyze_utilities/tableau.py
SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeiniso.py
SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeinlayer.py
SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/clip.py
SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py
SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dwindle.py [new file with mode: 0644]
SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/inset.py
SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/raft.py
SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/splodge.py
SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/extrusion.py
SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_craft.py

index 21e72e8ac3d7e23bd6532b5f1f4a6bdf8362e6cf..95f9650f0151d7c0d3aecf40355d88effbd5b7a7 100644 (file)
@@ -1 +1 @@
-48
+49
index 376a8a37bf33c1d2e5190c6254261e5458472038..a930f5aad0530c7e9935802d3fc82e6730dca74d 100644 (file)
@@ -53,6 +53,7 @@ Previous / <a href="fabmetheus_utilities.html">Next</a> / Contents
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="skeinforge_application.skeinforge_plugins.craft_plugins.cool.html">Cool</a><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="skeinforge_application.skeinforge_plugins.craft_plugins.dimension.html">Dimension</a><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="skeinforge_application.skeinforge_plugins.craft_plugins.drill.html">Drill</a><br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="skeinforge_application.skeinforge_plugins.craft_plugins.dwindle.html">Dwindle</a><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="skeinforge_application.skeinforge_plugins.craft_plugins.export.html">Export</a><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.binary_16_byte.html">Binary 16 Byte</a><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.gcode_step.html">Gcode Step</a><br>
index 7e58b2b16c52e27228efbb73283a588f125821a8..39531e069f0e5dc41a7e5f5cf280158353df1f18 100644 (file)
@@ -88,6 +88,8 @@ many lines of text<br>
 <td width="100%">Methods defined here:<br>
 <dl><dt><a name="DistanceFeedRate-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Initialize.</tt></dd></dl>
 
+<dl><dt><a name="DistanceFeedRate-addFlowRateLine"><strong>addFlowRateLine</strong></a>(self, flowRate)</dt><dd><tt>Add&nbsp;a&nbsp;flow&nbsp;rate&nbsp;line.</tt></dd></dl>
+
 <dl><dt><a name="DistanceFeedRate-addGcodeFromFeedRateThreadZ"><strong>addGcodeFromFeedRateThreadZ</strong></a>(self, feedRateMinute, thread, travelFeedRateMinute, z)</dt><dd><tt>Add&nbsp;a&nbsp;thread&nbsp;to&nbsp;the&nbsp;output.</tt></dd></dl>
 
 <dl><dt><a name="DistanceFeedRate-addGcodeFromLoop"><strong>addGcodeFromLoop</strong></a>(self, loop, z)</dt><dd><tt>Add&nbsp;the&nbsp;gcode&nbsp;loop.</tt></dd></dl>
@@ -98,6 +100,8 @@ many lines of text<br>
 
 <dl><dt><a name="DistanceFeedRate-addGcodeMovementZWithFeedRate"><strong>addGcodeMovementZWithFeedRate</strong></a>(self, feedRateMinute, point, z)</dt><dd><tt>Add&nbsp;a&nbsp;movement&nbsp;to&nbsp;the&nbsp;output.</tt></dd></dl>
 
+<dl><dt><a name="DistanceFeedRate-addGcodeMovementZWithFeedRateVector3"><strong>addGcodeMovementZWithFeedRateVector3</strong></a>(self, feedRateMinute, vector3)</dt><dd><tt>Add&nbsp;a&nbsp;movement&nbsp;to&nbsp;the&nbsp;output&nbsp;by&nbsp;Vector3.</tt></dd></dl>
+
 <dl><dt><a name="DistanceFeedRate-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>
 
 <dl><dt><a name="DistanceFeedRate-addLineCheckAlteration"><strong>addLineCheckAlteration</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&nbsp;and&nbsp;check&nbsp;to&nbsp;see&nbsp;if&nbsp;it&nbsp;is&nbsp;an&nbsp;alteration&nbsp;line.</tt></dd></dl>
index 559506d543956e25ef504e8fd94df106b5f3a5c8..b0833de25372a291b201710b637cc2891c2b8747 100644 (file)
@@ -136,7 +136,7 @@ The clip tool has created the file:<br>
 
 <dl><dt><a name="ClipSkein-getConnectionIsCloseWithoutOverlap"><strong>getConnectionIsCloseWithoutOverlap</strong></a>(self, location, path)</dt><dd><tt>Determine&nbsp;if&nbsp;the&nbsp;connection&nbsp;is&nbsp;close&nbsp;enough&nbsp;and&nbsp;does&nbsp;not&nbsp;overlap&nbsp;another&nbsp;thread.</tt></dd></dl>
 
-<dl><dt><a name="ClipSkein-getCraftedGcode"><strong>getCraftedGcode</strong></a>(self, clipRepository, gcodeText)</dt><dd><tt>Parse&nbsp;gcode&nbsp;text&nbsp;and&nbsp;store&nbsp;the&nbsp;clip&nbsp;gcode.</tt></dd></dl>
+<dl><dt><a name="ClipSkein-getCraftedGcode"><strong>getCraftedGcode</strong></a>(self, gcodeText, repository)</dt><dd><tt>Parse&nbsp;gcode&nbsp;text&nbsp;and&nbsp;store&nbsp;the&nbsp;clip&nbsp;gcode.</tt></dd></dl>
 
 <dl><dt><a name="ClipSkein-getNextThreadIsACloseLoop"><strong>getNextThreadIsACloseLoop</strong></a>(self, path)</dt><dd><tt>Determine&nbsp;if&nbsp;the&nbsp;next&nbsp;thread&nbsp;is&nbsp;a&nbsp;loop.</tt></dd></dl>
 
@@ -144,7 +144,7 @@ The clip tool has created the file:<br>
 
 <dl><dt><a name="ClipSkein-linearMove"><strong>linearMove</strong></a>(self, splitLine)</dt><dd><tt>Add&nbsp;to&nbsp;loop&nbsp;path&nbsp;if&nbsp;this&nbsp;is&nbsp;a&nbsp;loop&nbsp;or&nbsp;path.</tt></dd></dl>
 
-<dl><dt><a name="ClipSkein-parseInitialization"><strong>parseInitialization</strong></a>(self, clipRepository)</dt><dd><tt>Parse&nbsp;gcode&nbsp;initialization&nbsp;and&nbsp;store&nbsp;the&nbsp;parameters.</tt></dd></dl>
+<dl><dt><a name="ClipSkein-parseInitialization"><strong>parseInitialization</strong></a>(self)</dt><dd><tt>Parse&nbsp;gcode&nbsp;initialization&nbsp;and&nbsp;store&nbsp;the&nbsp;parameters.</tt></dd></dl>
 
 <dl><dt><a name="ClipSkein-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;clip&nbsp;skein.</tt></dd></dl>
 
@@ -157,8 +157,8 @@ The clip tool has created the file:<br>
 <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
     
 <tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
-<td width="100%"><dl><dt><a name="-getCraftedText"><strong>getCraftedText</strong></a>(fileName, text, clipRepository<font color="#909090">=None</font>)</dt><dd><tt>Clip&nbsp;a&nbsp;gcode&nbsp;linear&nbsp;move&nbsp;file&nbsp;or&nbsp;text.</tt></dd></dl>
- <dl><dt><a name="-getCraftedTextFromText"><strong>getCraftedTextFromText</strong></a>(gcodeText, clipRepository<font color="#909090">=None</font>)</dt><dd><tt>Clip&nbsp;a&nbsp;gcode&nbsp;linear&nbsp;move&nbsp;text.</tt></dd></dl>
+<td width="100%"><dl><dt><a name="-getCraftedText"><strong>getCraftedText</strong></a>(fileName, text, repository<font color="#909090">=None</font>)</dt><dd><tt>Clip&nbsp;a&nbsp;gcode&nbsp;linear&nbsp;move&nbsp;file&nbsp;or&nbsp;text.</tt></dd></dl>
+ <dl><dt><a name="-getCraftedTextFromText"><strong>getCraftedTextFromText</strong></a>(gcodeText, repository<font color="#909090">=None</font>)</dt><dd><tt>Clip&nbsp;a&nbsp;gcode&nbsp;linear&nbsp;move&nbsp;text.</tt></dd></dl>
  <dl><dt><a name="-getNewRepository"><strong>getNewRepository</strong></a>()</dt><dd><tt>Get&nbsp;new&nbsp;repository.</tt></dd></dl>
  <dl><dt><a name="-main"><strong>main</strong></a>()</dt><dd><tt>Display&nbsp;the&nbsp;clip&nbsp;dialog.</tt></dd></dl>
  <dl><dt><a name="-writeOutput"><strong>writeOutput</strong></a>(fileName, shouldAnalyze<font color="#909090">=True</font>)</dt><dd><tt>Clip&nbsp;a&nbsp;gcode&nbsp;linear&nbsp;move&nbsp;file.&nbsp;&nbsp;Chain&nbsp;clip&nbsp;the&nbsp;gcode&nbsp;if&nbsp;it&nbsp;is&nbsp;not&nbsp;already&nbsp;clipped.</tt></dd></dl>
index 0d969ed46b47ea5822e7880374ad72e749ae443a..5cd7aee12ead33f5fb5a7586553cb3334102aa2d 100644 (file)
@@ -141,8 +141,6 @@ The comb tool has created the file:<br>
 
 <dl><dt><a name="CombSkein-getAroundBetweenPath"><strong>getAroundBetweenPath</strong></a>(self, begin, end)</dt><dd><tt>Get&nbsp;the&nbsp;path&nbsp;around&nbsp;the&nbsp;loops&nbsp;in&nbsp;the&nbsp;way&nbsp;of&nbsp;the&nbsp;original&nbsp;line&nbsp;segment.</tt></dd></dl>
 
-<dl><dt><a name="CombSkein-getBetweens"><strong>getBetweens</strong></a>(self)</dt><dd><tt>Get&nbsp;betweens&nbsp;for&nbsp;the&nbsp;layer.</tt></dd></dl>
-
 <dl><dt><a name="CombSkein-getBoundaries"><strong>getBoundaries</strong></a>(self)</dt><dd><tt>Get&nbsp;boundaries&nbsp;for&nbsp;the&nbsp;layer.</tt></dd></dl>
 
 <dl><dt><a name="CombSkein-getBoundaryIndexes"><strong>getBoundaryIndexes</strong></a>(self, begin, boundaries, end, points)</dt><dd><tt>Get&nbsp;boundary&nbsp;indexes&nbsp;and&nbsp;set&nbsp;the&nbsp;points&nbsp;in&nbsp;the&nbsp;way&nbsp;of&nbsp;the&nbsp;original&nbsp;line&nbsp;segment.</tt></dd></dl>
index 2f9f8e0663fcdbebb9295b36fd845126c4e1490e..5ae1b02ab270486dd1677368b5e389d9129e6c87 100644 (file)
@@ -10,7 +10,7 @@
 ><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/fabmetheus/skeinforge_application/skeinforge_plugins/craft_plugins/drill.py">/home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/skeinforge_application/skeinforge_plugins/craft_plugins/drill.py</a></font></td></tr></table>
     <p>
-<a href="skeinforge_application.skeinforge_plugins.craft_plugins.dimension.html">Previous</a> / <a href="skeinforge_application.skeinforge_plugins.craft_plugins.export.html">Next</a> / <a href="contents.html">Contents</a>
+<a href="skeinforge_application.skeinforge_plugins.craft_plugins.dimension.html">Previous</a> / <a href="skeinforge_application.skeinforge_plugins.craft_plugins.dwindle.html">Next</a> / <a href="contents.html">Contents</a>
 </p>
 <p><tt><br>
 Drill is a script to drill down small holes.<br>
@@ -60,7 +60,7 @@ The drill tool has created the file:<br>
 <br />
 <br />
 <p>
-<a href="skeinforge_application.skeinforge_plugins.craft_plugins.dimension.html">Previous</a> / <a href="skeinforge_application.skeinforge_plugins.craft_plugins.export.html">Next</a> / <a href="contents.html">Contents</a>
+<a href="skeinforge_application.skeinforge_plugins.craft_plugins.dimension.html">Previous</a> / <a href="skeinforge_application.skeinforge_plugins.craft_plugins.dwindle.html">Next</a> / <a href="contents.html">Contents</a>
 </p>
 <hr>
 </p>
index 7c2d9947924040e5fb80b80b0c6f56a7d32a6994..8cda68c8ed2c473af7d466e979d33fe14cd0ce2f 100644 (file)
@@ -10,7 +10,7 @@
 ><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/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>
     <p>
-<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>
+<a href="skeinforge_application.skeinforge_plugins.craft_plugins.dwindle.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>
 </p>
 <p><tt><br>
 Export is a craft tool to pick an export plugin, add information to the file name, and delete comments.<br>
@@ -149,7 +149,7 @@ The export tool has created the file:<br>
 <br />
 <br />
 <p>
-<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>
+<a href="skeinforge_application.skeinforge_plugins.craft_plugins.dwindle.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>
 </p>
 <hr>
 </p>
index 40ae545e24621ef66a9f554ceaaf23e42bd57fde..d7076fa6a17ddf4f14272fcf2d2bc4444df10172 100644 (file)
@@ -28,7 +28,8 @@
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.comb.html">comb</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.cool.html">cool</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.dimension.html">dimension</a><br>
-</td><td width="25%" valign=top><a href="skeinforge_application.skeinforge_plugins.craft_plugins.drill.html">drill</a><br>
+<a href="skeinforge_application.skeinforge_plugins.craft_plugins.drill.html">drill</a><br>
+</td><td width="25%" valign=top><a href="skeinforge_application.skeinforge_plugins.craft_plugins.dwindle.html">dwindle</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.export.html">export</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.export_plugins.html"><strong>export_plugins</strong>&nbsp;(package)</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.feed.html">feed</a><br>
@@ -39,8 +40,8 @@
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.hop.html">hop</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.inset.html">inset</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.jitter.html">jitter</a><br>
-</td><td width="25%" valign=top><a href="skeinforge_application.skeinforge_plugins.craft_plugins.lash.html">lash</a><br>
-<a href="skeinforge_application.skeinforge_plugins.craft_plugins.lift.html">lift</a><br>
+<a href="skeinforge_application.skeinforge_plugins.craft_plugins.lash.html">lash</a><br>
+</td><td width="25%" valign=top><a href="skeinforge_application.skeinforge_plugins.craft_plugins.lift.html">lift</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.limit.html">limit</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.mill.html">mill</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.multiply.html">multiply</a><br>
@@ -50,9 +51,9 @@
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.raft.html">raft</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.scale.html">scale</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.skin.html">skin</a><br>
-</td><td width="25%" valign=top><a href="skeinforge_application.skeinforge_plugins.craft_plugins.skirt.html">skirt</a><br>
+<a href="skeinforge_application.skeinforge_plugins.craft_plugins.skirt.html">skirt</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.smooth.html">smooth</a><br>
-<a href="skeinforge_application.skeinforge_plugins.craft_plugins.speed.html">speed</a><br>
+</td><td width="25%" valign=top><a href="skeinforge_application.skeinforge_plugins.craft_plugins.speed.html">speed</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.splodge.html">splodge</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.stretch.html">stretch</a><br>
 <a href="skeinforge_application.skeinforge_plugins.craft_plugins.temperature.html">temperature</a><br>
index 881b12c58656c824c5d02c60db7b0894e7c41296..7c8e9a6f0c5ab185ac58d70b05fce68040d01d80 100644 (file)
@@ -92,7 +92,6 @@ The plugin buttons which are commonly used are bolded and the ones which are rar
  <dl><dt><a name="-getPluginsDirectoryPath"><strong>getPluginsDirectoryPath</strong></a>()</dt><dd><tt>Get&nbsp;the&nbsp;plugins&nbsp;directory&nbsp;path.</tt></dd></dl>
  <dl><dt><a name="-getProcedures"><strong>getProcedures</strong></a>(procedure, text)</dt><dd><tt>Get&nbsp;the&nbsp;procedures&nbsp;up&nbsp;to&nbsp;and&nbsp;including&nbsp;the&nbsp;given&nbsp;procedure.</tt></dd></dl>
  <dl><dt><a name="-getReadCraftSequence"><strong>getReadCraftSequence</strong></a>()</dt><dd><tt>Get&nbsp;profile&nbsp;sequence.</tt></dd></dl>
- <dl><dt><a name="-getSequenceIndexFromProcedure"><strong>getSequenceIndexFromProcedure</strong></a>(procedure)</dt><dd><tt>Get&nbsp;the&nbsp;profile&nbsp;sequence&nbsp;index&nbsp;of&nbsp;the&nbsp;procedure.&nbsp;&nbsp;Return&nbsp;None&nbsp;if&nbsp;the&nbsp;procedure&nbsp;is&nbsp;not&nbsp;in&nbsp;the&nbsp;sequence</tt></dd></dl>
  <dl><dt><a name="-getSequenceIndexPlusOneFromText"><strong>getSequenceIndexPlusOneFromText</strong></a>(fileText)</dt><dd><tt>Get&nbsp;the&nbsp;profile&nbsp;sequence&nbsp;index&nbsp;of&nbsp;the&nbsp;file&nbsp;plus&nbsp;one.&nbsp;&nbsp;Return&nbsp;zero&nbsp;if&nbsp;the&nbsp;procedure&nbsp;is&nbsp;not&nbsp;in&nbsp;the&nbsp;file</tt></dd></dl>
  <dl><dt><a name="-main"><strong>main</strong></a>()</dt><dd><tt>Write&nbsp;craft&nbsp;output.</tt></dd></dl>
  <dl><dt><a name="-writeChainTextWithNounMessage"><strong>writeChainTextWithNounMessage</strong></a>(fileName, procedure, shouldAnalyze<font color="#909090">=True</font>)</dt><dd><tt>Get&nbsp;and&nbsp;write&nbsp;a&nbsp;crafted&nbsp;shape&nbsp;file.</tt></dd></dl>
index 9ec90f987cddbe0b4cdbde129fbdcea11d16632d..b348674a99766865532ac9d7eb8dec9381feb3b0 100644 (file)
@@ -201,6 +201,11 @@ def isProcedureDone(gcodeText, procedure):
                return False
        extruderInitializationIndex = gcodeText.find('(</extruderInitialization>)')
        if extruderInitializationIndex == -1:
+               metadataBeginIndex = gcodeText.find('<metadata>')
+               metadataEndIndex = gcodeText.find('</metadata>')
+               if metadataBeginIndex != -1 and metadataEndIndex != -1:
+                       attributeString = "procedureName='%s'" % procedure
+                       return gcodeText.find(attributeString, metadataBeginIndex, metadataEndIndex) != -1
                return False
        return gcodeText.find(getTagBracketedProcedure(procedure), 0, extruderInitializationIndex) != -1
 
@@ -260,6 +265,10 @@ class DistanceFeedRate:
                self.decimalPlacesCarried = 3
                self.output = cStringIO.StringIO()
 
+       def addFlowRateLine(self, flowRate):
+               'Add a flow rate line.'
+               self.output.write('M108 S%s\n' % euclidean.getFourSignificantFigures(flowRate))
+
        def addGcodeFromFeedRateThreadZ(self, feedRateMinute, thread, travelFeedRateMinute, z):
                'Add a thread to the output.'
                if len(thread) > 0:
@@ -270,10 +279,10 @@ class DistanceFeedRate:
                        print('thread of only one point in addGcodeFromFeedRateThreadZ in gcodec, this should never happen.')
                        print(thread)
                        return
-               self.addLine('M101') # Turn extruder on.
+               self.output.write('M101\n') # Turn extruder on.
                for point in thread[1 :]:
                        self.addGcodeMovementZWithFeedRate(feedRateMinute, point, z)
-               self.addLine('M103') # Turn extruder off.
+               self.output.write('M103\n') # Turn extruder off.
 
        def addGcodeFromLoop(self, loop, z):
                'Add the gcode loop.'
@@ -292,18 +301,24 @@ class DistanceFeedRate:
                        print('thread of only one point in addGcodeFromThreadZ in gcodec, this should never happen.')
                        print(thread)
                        return
-               self.addLine('M101') # Turn extruder on.
+               self.output.write('M101\n') # Turn extruder on.
                for point in thread[1 :]:
                        self.addGcodeMovementZ(point, z)
-               self.addLine('M103') # Turn extruder off.
+               self.output.write('M103\n') # Turn extruder off.
 
        def addGcodeMovementZ(self, point, z):
                'Add a movement to the output.'
-               self.addLine(self.getLinearGcodeMovement(point, z))
+               self.output.write(self.getLinearGcodeMovement(point, z) + '\n')
 
        def addGcodeMovementZWithFeedRate(self, feedRateMinute, point, z):
                'Add a movement to the output.'
-               self.addLine(self.getLinearGcodeMovementWithFeedRate(feedRateMinute, point, z))
+               self.output.write(self.getLinearGcodeMovementWithFeedRate(feedRateMinute, point, z) + '\n')
+
+       def addGcodeMovementZWithFeedRateVector3(self, feedRateMinute, vector3):
+               'Add a movement to the output by Vector3.'
+               xRounded = self.getRounded(vector3.x)
+               yRounded = self.getRounded(vector3.y)
+               self.output.write('G1 X%s Y%s Z%s F%s\n' % (xRounded, yRounded, self.getRounded(vector3.z), self.getRounded(feedRateMinute)))
 
        def addLine(self, line):
                'Add a line of text and a newline to the output.'
@@ -392,7 +407,7 @@ class DistanceFeedRate:
 
        def getLinearGcodeMovement(self, point, z):
                'Get a linear gcode movement.'
-               return 'G1 X%s Y%s Z%s' % ( self.getRounded( point.real ), self.getRounded( point.imag ), self.getRounded(z) )
+               return 'G1 X%s Y%s Z%s' % (self.getRounded(point.real), self.getRounded(point.imag), self.getRounded(z))
 
        def getLinearGcodeMovementWithFeedRate(self, feedRateMinute, point, z):
                'Get a z limited gcode movement.'
index a4bc447a2ca988a711230fe843551095ad518ab4..0d73a0c7fa6eba205e4e6fd460eebdf8ec81d0e0 100644 (file)
@@ -1 +1 @@
-12.01.21
\ No newline at end of file
+12.02.10
\ No newline at end of file
index 590fd250e1b8bdca06d8d95b4abb412ee59ddd72..33279a9a7e3dbd1de88ae16b841a1ae48cfd43bd 100755 (executable)
@@ -232,6 +232,12 @@ import platform
 import subprocess
 
 
+# dwindle check for close, document announce dwindle
+# document chamber: heated bed off at a layer http://blog.makerbot.com/2011/03/17/if-you-cant-stand-the-heat/
+# document announce volumeFraction
+# question, should 'Infill Odd Layer Extra Rotation' be dropped
+# consolidate Object First Layer Flow
+#
 # document raft, stretch, then carve, comb, fill, inset, oozebane, splodge, temperature, speed once they are updated
 # wiki document help, description, polyfile
 # subplugins like export static, maybe later mill cut and coil plugins, maybe later still export plugins & change file extension to output file extension  http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge
@@ -246,14 +252,9 @@ import subprocess
 # analyze doesn't save skeinlayer settings, remember xy in skeiniso
 #
 #
-#
-# question, should 'Infill Odd Layer Extra Rotation' be dropped
-# consolidate Object First Layer Flow
-#
 # retraction step leave
 # melt _extrusion
 # think about http://code.google.com/p/skeinarchiver/ and/or undo
-# add volume fraction to fill
 # getStrokeRadius default to edgeWidth
 # look at loop end removed bug in upper loop of layer 8 of Screw_Holder_alteration
 # fix tower edge line start problem
@@ -261,7 +262,6 @@ import subprocess
 # set temperature in temperature
 # maybe rename geometry_plugins xml
 # maybe add carve preview, opening it up in browser
-# dwindle or dawdle or taper
 # voronoi average location intersection looped inset intercircles
 # skin layers without something over the infill
 # check for last existing then remove unneeded fill code (getLastExistingFillLoops) from euclidean, add fill in penultimate loops, if there is no fill it should not use edge - skin should work
@@ -269,8 +269,8 @@ import subprocess
 # unpause slow flow rate instead of speeding feed rate
 # maybe in svgReader if loop intersection with previous union else add
 # add links download manual svg_writer, add left right arrow keys to layer
-# delete location from wipe, in other words Arrival X instead of Location Arrival X, also convert Location Arrival to Arrival Location
 # command
+# thin support When using support, thin column and then gradually widen: http://img534.imageshack.us/img534/514/overhang.jpg 
 # manipulation derivations
 # cutting ahmet
 #
@@ -279,7 +279,6 @@ import subprocess
 # check inset loop for intersection with loopLayer.loops
 # maybe make vectorwrite prominent, not skeiniso, probably not because it doesn't work on Mac
 # close, getPillarByLoopLists, addConcave, polymorph original graph section, loop, add step object, add continuous object
-# chamber: heated bed off at a layer http://blog.makerbot.com/2011/03/17/if-you-cant-stand-the-heat/
 # profile copy / rename   /   delete, maybe move craft type to profile
 # think about rectangular getVector3RemoveByPre..
 # del previous, add begin & end if far  get actual path
@@ -360,7 +359,6 @@ import subprocess
 # get arounds in inset, the inside become extrude loops and the outside below loops _speed
 #
 #
-# add hook _extrusion
 # integral thin width _extrusion
 # layer color, for multilayer start http://reprap.org/pub/Main/MultipleMaterialsFiles/legend.xml _extrusion
 # maybe raft triple layer base, middle interface with hot loop or ties
@@ -404,7 +402,6 @@ import subprocess
 # maybe split into source code and documentation sections
 # transform plugins, start with sarrus http://www.thingiverse.com/thing:1425
 # maybe make setting backups
-# move skeinforge_utilities to fabmetheus_utilities
 # maybe lathe cutting
 # maybe lathe extrusion
 # maybe lathe milling
index c282d95e4ae99fb401f40dcb163c7e2850ae7af1..a52555205e60514bd2ebc0bcd25d11147ccdfac6 100644 (file)
@@ -526,8 +526,8 @@ class TableauWindow:
 
        def limitIndex(self):
                'Limit the index so it is not below zero or above the top.'
-               self.repository.layer.value = max( 0, self.repository.layer.value )
-               self.repository.layer.value = min( len( self.skeinPanes ) - 1, self.repository.layer.value )
+               self.repository.layer.value = max(0, self.repository.layer.value)
+               self.repository.layer.value = min(len(self.skeinPanes) - 1, self.repository.layer.value)
 
        def limitIndexSetArrowMouseDeleteCanvas(self):
                'Limit the index, set the arrow type, and delete all the canvas items.'
index 68406e772531412a4f40f3a72bdca11eb60fb882..180f5c9d84d8951e2b096b06745f7cb2388e0c67 100644 (file)
@@ -763,6 +763,8 @@ class SkeinWindow( tableau.TableauWindow ):
 
        def getColoredLines(self):
                "Get the colored lines from the skein pane."
+               if len(self.skeinPanes) == 0:
+                       return []
                return self.skeinPanes[ self.repository.layer.value ].coloredLines
 
        def getCopy(self):
index 35d8cde5383343e214072ab6475c3d0e367140ee..e2a3fe0d20de8ada18c337692229abacf0ba6863 100644 (file)
@@ -463,6 +463,8 @@ class SkeinWindow( tableau.TableauWindow ):
 
        def getColoredLines(self):
                "Get the colored lines from the skein pane."
+               if len(self.skeinPanes) == 0:
+                       return []
                return self.skeinPanes[self.repository.layer.value]
 
        def getCopy(self):
index 8e5dd7a81bb4f18ce5800b9d14053b6a11c084a0..6b8b169cf265db7c557178f699a6131973a0703c 100644 (file)
@@ -62,19 +62,19 @@ __date__ = '$Date: 2008/21/04 $'
 __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
 
 
-def getCraftedText( fileName, text, clipRepository = None ):
+def getCraftedText(fileName, text, repository=None):
        "Clip a gcode linear move file or text."
-       return getCraftedTextFromText( archive.getTextIfEmpty(fileName, text), clipRepository )
+       return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text), repository)
 
-def getCraftedTextFromText( gcodeText, clipRepository = None ):
+def getCraftedTextFromText(gcodeText, repository=None):
        "Clip a gcode linear move text."
-       if gcodec.isProcedureDoneOrFileIsEmpty( gcodeText, 'clip'):
+       if gcodec.isProcedureDoneOrFileIsEmpty(gcodeText, 'clip'):
                return gcodeText
-       if clipRepository == None:
-               clipRepository = settings.getReadRepository( ClipRepository() )
-       if not clipRepository.activateClip.value:
+       if repository == None:
+               repository = settings.getReadRepository(ClipRepository())
+       if not repository.activateClip.value:
                return gcodeText
-       return ClipSkein().getCraftedGcode( clipRepository, gcodeText )
+       return ClipSkein().getCraftedGcode(gcodeText, repository)
 
 def getNewRepository():
        'Get new repository.'
@@ -89,12 +89,12 @@ class ClipRepository:
        "A class to handle the clip settings."
        def __init__(self):
                "Set the default settings, execute title & settings fileName."
-               skeinforge_profile.addListsToCraftTypeRepository('skeinforge_application.skeinforge_plugins.craft_plugins.clip.html', self )
-               self.fileNameInput = settings.FileNameInput().getFromFileName( fabmetheus_interpret.getGNUTranslatorGcodeFileTypeTuples(), 'Open File for Clip', self, '')
+               skeinforge_profile.addListsToCraftTypeRepository('skeinforge_application.skeinforge_plugins.craft_plugins.clip.html', self)
+               self.fileNameInput = settings.FileNameInput().getFromFileName(fabmetheus_interpret.getGNUTranslatorGcodeFileTypeTuples(), 'Open File for Clip', self, '')
                self.openWikiManualHelpPage = settings.HelpPage().getOpenFromAbsolute('http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Clip')
-               self.activateClip = settings.BooleanSetting().getFromValue('Activate Clip', self, False )
-               self.clipOverEdgeWidth = settings.FloatSpin().getFromValue( 0.1, 'Clip Over Perimeter Width (ratio):', self, 0.8, 0.5 )
-               self.maximumConnectionDistanceOverEdgeWidth = settings.FloatSpin().getFromValue( 1.0, 'Maximum Connection Distance Over Perimeter Width (ratio):', self, 20.0, 10.0 )
+               self.activateClip = settings.BooleanSetting().getFromValue('Activate Clip', self, False)
+               self.clipOverEdgeWidth = settings.FloatSpin().getFromValue(0.1, 'Clip Over Perimeter Width (ratio):', self, 0.8, 0.5)
+               self.maximumConnectionDistanceOverEdgeWidth = settings.FloatSpin().getFromValue(1.0, 'Maximum Connection Distance Over Perimeter Width (ratio):', self, 20.0, 10.0)
                self.executeTitle = 'Clip'
 
        def execute(self):
@@ -180,10 +180,11 @@ class ClipSkein:
                euclidean.addValueSegmentToPixelTable( path[-1], locationComplex, self.layerPixelTable, None, self.layerPixelWidth )
                return True
 
-       def getCraftedGcode( self, clipRepository, gcodeText ):
+       def getCraftedGcode(self, gcodeText, repository):
                "Parse gcode text and store the clip gcode."
                self.lines = archive.getTextLines(gcodeText)
-               self.parseInitialization( clipRepository )
+               self.repository = repository
+               self.parseInitialization()
                for self.lineIndex in xrange(self.lineIndex, len(self.lines)):
                        line = self.lines[self.lineIndex]
                        self.parseLine(line)
@@ -243,7 +244,7 @@ class ClipSkein:
                        self.loopPath.path.append(location.dropAxis())
                self.oldLocation = location
 
-       def parseInitialization(self, clipRepository):
+       def parseInitialization(self):
                'Parse gcode initialization and store the parameters.'
                for self.lineIndex in xrange(len(self.lines)):
                        line = self.lines[self.lineIndex]
@@ -254,13 +255,13 @@ class ClipSkein:
                                self.distanceFeedRate.addTagBracketedProcedure('clip')
                                return
                        elif firstWord == '(<edgeWidth>':
-                               self.distanceFeedRate.addTagBracketedLine('clipOverEdgeWidth', clipRepository.clipOverEdgeWidth.value)
+                               self.distanceFeedRate.addTagBracketedLine('clipOverEdgeWidth', self.repository.clipOverEdgeWidth.value)
                                self.edgeWidth = float(splitLine[1])
                                absoluteEdgeWidth = abs(self.edgeWidth)
-                               self.clipLength = clipRepository.clipOverEdgeWidth * self.edgeWidth
+                               self.clipLength = self.repository.clipOverEdgeWidth.value * self.edgeWidth
                                self.connectingStepLength = 0.5 * absoluteEdgeWidth
                                self.layerPixelWidth = 0.34321 * absoluteEdgeWidth
-                               self.maximumConnectionDistance = clipRepository.maximumConnectionDistanceOverEdgeWidth.value * absoluteEdgeWidth
+                               self.maximumConnectionDistance = self.repository.maximumConnectionDistanceOverEdgeWidth.value * absoluteEdgeWidth
                        elif firstWord == '(<travelFeedRatePerSecond>':
                                self.travelFeedRateMinute = 60.0 * float(splitLine[1])
                        self.distanceFeedRate.addLine(line)
index 7fc787241e0d77b2d761c5f757c5b847f5a9528f..8ca5e2d270ada38b481bd46909af78408ab6bebd 100644 (file)
@@ -175,7 +175,7 @@ class CombSkein:
        "A class to comb a skein of extrusions."
        def __init__(self):
                'Initialize'
-               self.betweenTable = {}
+#              self.betweenTable = {}
                self.boundaryLoop = None
                self.distanceFeedRate = gcodec.DistanceFeedRate()
                self.extruderActive = False
@@ -241,7 +241,7 @@ class CombSkein:
        def getAroundBetweenPath(self, begin, end):
                'Get the path around the loops in the way of the original line segment.'
                aroundBetweenPath = []
-               betweens = self.getBetweens()
+#              betweens = self.getBetweens()
                boundaries = self.getBoundaries()
                boundarySegments = self.getBoundarySegments(begin, boundaries, end)
                for boundarySegmentIndex, boundarySegment in enumerate(boundarySegments):
@@ -261,18 +261,18 @@ class CombSkein:
                        afterIndex = pointIndex + 1
                        if afterIndex < len(aroundBetweenPath):
                                pointAfter = aroundBetweenPath[afterIndex]
-                       if not euclidean.isLineIntersectingLoops(betweens, pointBefore, pointAfter):
+                       if not euclidean.isLineIntersectingLoops(boundaries, pointBefore, pointAfter):
                                del aroundBetweenPath[pointIndex]
                return aroundBetweenPath
 
-       def getBetweens(self):
-               'Get betweens for the layer.'
-               if not self.layerZ in self.betweenTable:
-                       self.betweenTable[self.layerZ] = []
-                       for boundary in self.getBoundaries():
-                               self.betweenTable[self.layerZ] += intercircle.getInsetLoopsFromLoop(boundary, self.betweenInset)
-               return self.betweenTable[self.layerZ]
-
+#      def getBetweens(self):
+#              'Get betweens for the layer.'
+#              if not self.layerZ in self.betweenTable:
+#                      self.betweenTable[self.layerZ] = []
+#                      for boundary in self.getBoundaries():
+#                              self.betweenTable[self.layerZ] += intercircle.getInsetLoopsFromLoop(boundary, self.betweenInset)
+#              return self.betweenTable[self.layerZ]
+#
        def getBoundaries(self):
                "Get boundaries for the layer."
                if self.layerZ in self.layerTable:
@@ -440,7 +440,7 @@ class CombSkein:
                                return
                        elif firstWord == '(<edgeWidth>':
                                self.edgeWidth = float(splitLine[1])
-                               self.betweenInset = 0.7 * self.edgeWidth
+#                              self.betweenInset = 0.7 * self.edgeWidth
                                self.doubleEdgeWidth = self.edgeWidth + self.edgeWidth
                                self.halfEdgeWidth = 0.5 * self.edgeWidth
                                self.quadrupleEdgeWidth = self.doubleEdgeWidth + self.doubleEdgeWidth
diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dwindle.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dwindle.py
new file mode 100644 (file)
index 0000000..05c1b59
--- /dev/null
@@ -0,0 +1,270 @@
+"""
+This page is in the table of contents.
+Dwindle is a plugin to smooth the surface dwindle of an object by replacing the edge surface with a surface printed at a fraction of the carve
+height.  This gives the impression that the object was carved at a much thinner height giving a high-quality finish, but still prints 
+in a relatively short time.  The latest process has some similarities with a description at:
+
+The dwindle manual page is at:
+http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Dwindle
+
+==Operation==
+The default 'Activate Dwindle' checkbox is off.  When it is on, the functions described below will work, when it is off, nothing will be done.
+
+==Settings==
+====Vertical Divisions====
+Default: 2
+
+Defines the number of times the dwindle infill and edges are divided vertically.
+
+==Examples==
+The following examples dwindle the file Screw Holder Bottom.stl.  The examples are run in a terminal in the folder which contains Screw Holder Bottom.stl and dwindle.py.
+
+> python dwindle.py
+This brings up the dwindle dialog.
+
+> python dwindle.py Screw Holder Bottom.stl
+The dwindle tool is parsing the file:
+Screw Holder Bottom.stl
+..
+The dwindle tool has created the file:
+.. Screw Holder Bottom_dwindle.gcode
+
+"""
+
+from __future__ import absolute_import
+#Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module.
+import __init__
+
+from fabmetheus_utilities.fabmetheus_tools import fabmetheus_interpret
+from fabmetheus_utilities.vector3 import Vector3
+from fabmetheus_utilities import archive
+from fabmetheus_utilities import euclidean
+from fabmetheus_utilities import gcodec
+from fabmetheus_utilities import settings
+from skeinforge_application.skeinforge_utilities import skeinforge_craft
+from skeinforge_application.skeinforge_utilities import skeinforge_polyfile
+from skeinforge_application.skeinforge_utilities import skeinforge_profile
+import math
+import sys
+
+
+__author__ = 'Enrique Perez (perez_enrique aht yahoo.com)'
+__date__ = '$Date: 2008/21/04 $'
+__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
+
+
+def getCraftedText(fileName, gcodeText, repository=None):
+       'Dwindle a gcode linear move text.'
+       return getCraftedTextFromText(archive.getTextIfEmpty(fileName, gcodeText), repository)
+
+def getCraftedTextFromText(gcodeText, repository=None):
+       'Dwindle a gcode linear move text.'
+       if gcodec.isProcedureDoneOrFileIsEmpty(gcodeText, 'dwindle'):
+               return gcodeText
+       if repository == None:
+               repository = settings.getReadRepository(DwindleRepository())
+       if not repository.activateDwindle.value:
+               return gcodeText
+       return DwindleSkein().getCraftedGcode(gcodeText, repository)
+
+def getNewRepository():
+       'Get new repository.'
+       return DwindleRepository()
+
+def writeOutput(fileName, shouldAnalyze=True):
+       'Dwindle a gcode linear move file.  Chain dwindle the gcode if it is not already dwindle.'
+       skeinforge_craft.writeChainTextWithNounMessage(fileName, 'dwindle', shouldAnalyze)
+
+
+class DwindleRepository:
+       'A class to handle the dwindle settings.'
+       def __init__(self):
+               'Set the default settings, execute title & settings fileName.'
+               skeinforge_profile.addListsToCraftTypeRepository('skeinforge_application.skeinforge_plugins.craft_plugins.dwindle.html', self )
+               self.fileNameInput = settings.FileNameInput().getFromFileName( fabmetheus_interpret.getGNUTranslatorGcodeFileTypeTuples(), 'Open File for Dwindle', self, '')
+               self.openWikiManualHelpPage = settings.HelpPage().getOpenFromAbsolute('http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Dwindle')
+               self.activateDwindle = settings.BooleanSetting().getFromValue('Activate Dwindle', self, False)
+               settings.LabelSeparator().getFromRepository(self)
+               self.endRateMultiplier = settings.FloatSpin().getFromValue(0.4, 'End Rate Multiplier (ratio):', self, 0.8, 0.5)
+               self.pentUpVolume = settings.FloatSpin().getFromValue(0.1, 'Pent Up Volume (cubic millimeters):', self, 1.0, 0.4)
+               self.slowdownSteps = settings.IntSpin().getFromValue(2, 'Slowdown Steps (positive integer):', self, 10, 3)
+               self.slowdownVolume = settings.FloatSpin().getFromValue(0.4, 'Slowdown Volume (cubic millimeters):', self, 4.0, 2.0)
+               self.executeTitle = 'Dwindle'
+
+       def execute(self):
+               'Dwindle button has been clicked.'
+               fileNames = skeinforge_polyfile.getFileOrDirectoryTypesUnmodifiedGcode(self.fileNameInput.value, fabmetheus_interpret.getImportPluginFileNames(), self.fileNameInput.wasCancelled)
+               for fileName in fileNames:
+                       writeOutput(fileName)
+
+
+class DwindleSkein:
+       'A class to dwindle a skein of extrusions.'
+       def __init__(self):
+               'Initialize.'
+               self.distanceFeedRate = gcodec.DistanceFeedRate()
+               self.feedRateMinute = 959.0
+               self.isActive = False
+               self.layerIndex = -1
+               self.lineIndex = 0
+               self.lines = None
+               self.oldFlowRate = None
+               self.oldLocation = None
+               self.threadSections = []
+
+       def addThread(self):
+               'Add the thread sections to the gcode.'
+               if len(self.threadSections) == 0:
+                       return
+               area = self.area
+               dwindlePortion = 0.0
+               endRateMultiplier = self.repository.endRateMultiplier.value
+               halfOverSteps = self.halfOverSteps
+               oneOverSteps = self.oneOverSteps
+               currentPentUpVolume = self.repository.pentUpVolume.value * self.oldFlowRate / self.operatingFlowRate
+               slowdownFlowRateMultiplier = 1.0 - (currentPentUpVolume / self.repository.slowdownVolume.value)
+               operatingFeedRateMinute = self.operatingFeedRateMinute
+               slowdownVolume = self.repository.slowdownVolume.value
+               for threadSectionIndex in xrange(len(self.threadSections) - 1, -1, -1):
+                       threadSection = self.threadSections[threadSectionIndex]
+                       dwindlePortion = threadSection.getDwindlePortion(area, dwindlePortion, operatingFeedRateMinute, self.operatingFlowRate, slowdownVolume)
+               for threadSection in self.threadSections:
+                       threadSection.addGcodeThreadSection(self.distanceFeedRate, endRateMultiplier, halfOverSteps, oneOverSteps, slowdownFlowRateMultiplier)
+               self.distanceFeedRate.addFlowRateLine(self.oldFlowRate)
+               self.threadSections = []
+
+       def getCraftedGcode(self, gcodeText, repository):
+               'Parse gcode text and store the dwindle gcode.'
+               self.lines = archive.getTextLines(gcodeText)
+               self.repository = repository
+               self.parseInitialization()
+               self.area = self.infillWidth * self.layerHeight
+               self.oneOverSteps = 1.0 / float(repository.slowdownSteps.value)
+               self.halfOverSteps = 0.5 * self.oneOverSteps
+               for self.lineIndex in xrange(self.lineIndex, len(self.lines)):
+                       line = self.lines[self.lineIndex]
+                       self.parseLine(line)
+               return gcodec.getGcodeWithoutDuplication('M108', self.distanceFeedRate.output.getvalue())
+
+       def parseInitialization(self):
+               'Parse gcode initialization and store the parameters.'
+               for self.lineIndex in xrange(len(self.lines)):
+                       line = self.lines[self.lineIndex]
+                       splitLine = gcodec.getSplitLineBeforeBracketSemicolon(line)
+                       firstWord = gcodec.getFirstWord(splitLine)
+                       self.distanceFeedRate.parseSplitLine(firstWord, splitLine)
+                       if firstWord == '(</extruderInitialization>)':
+                               self.distanceFeedRate.addTagBracketedProcedure('dwindle')
+                               return
+                       elif firstWord == '(<infillWidth>':
+                               self.infillWidth = float(splitLine[1])
+                       elif firstWord == '(<layerHeight>':
+                               self.layerHeight = float(splitLine[1])
+                       elif firstWord == '(<operatingFeedRatePerSecond>':
+                               self.operatingFeedRateMinute = 60.0 * float(splitLine[1])
+                       elif firstWord == '(<operatingFlowRate>':
+                               self.operatingFlowRate = float(splitLine[1])
+                               self.oldFlowRate = self.operatingFlowRate
+                       self.distanceFeedRate.addLine(line)
+
+       def parseLine(self, line):
+               'Parse a gcode line and add it to the dwindle skein.'
+               splitLine = gcodec.getSplitLineBeforeBracketSemicolon(line)
+               if len(splitLine) < 1:
+                       return
+               firstWord = splitLine[0]
+               if firstWord == 'G1':
+                       self.feedRateMinute = gcodec.getFeedRateMinute(self.feedRateMinute, splitLine)
+                       location = gcodec.getLocationFromSplitLine(self.oldLocation, splitLine)
+                       if self.isActive:
+                               self.threadSections.append(ThreadSection(self.feedRateMinute, self.oldFlowRate, location, self.oldLocation))
+                       self.oldLocation = location
+               elif firstWord == '(<layer>':
+                       self.layerIndex += 1
+                       settings.printProgress(self.layerIndex, 'dwindle')
+               elif firstWord == 'M101':
+                       self.isActive = True
+               elif firstWord == 'M103':
+                       self.isActive = False
+                       self.addThread()
+               elif firstWord == 'M108':
+                       self.oldFlowRate = gcodec.getDoubleAfterFirstLetter(splitLine[1])
+               if len(self.threadSections) == 0:
+                       self.distanceFeedRate.addLine(line)
+
+
+class ThreadSection:
+       'A class to handle a volumetric section of a thread.'
+       def __init__(self, feedRateMinute, flowRate, location, oldLocation):
+               'Initialize.'
+               self.feedRateMinute = feedRateMinute
+               self.flowRate = flowRate
+               self.location = location
+               self.oldLocation = oldLocation
+
+       def addGcodeMovementByRate(self, distanceFeedRate, endRateMultiplier, location, rateMultiplier, slowdownFlowRateMultiplier):
+               'Add gcode movement by rate multiplier.'
+               flowRate = self.flowRate
+               rateMultiplier = rateMultiplier + endRateMultiplier * (1.0 - rateMultiplier)
+               if rateMultiplier < 1.0:
+                       flowRate *= slowdownFlowRateMultiplier
+               distanceFeedRate.addFlowRateLine(flowRate * rateMultiplier)
+               distanceFeedRate.addGcodeMovementZWithFeedRateVector3(self.feedRateMinute * rateMultiplier, location)
+
+       def addGcodeThreadSection(self, distanceFeedRate, endRateMultiplier, halfOverSteps, oneOverSteps, slowdownFlowRateMultiplier):
+               'Add gcode thread section.'
+               if self.dwindlePortionEnd > 1.0 - halfOverSteps:
+                       distanceFeedRate.addFlowRateLine(self.flowRate)
+                       distanceFeedRate.addGcodeMovementZWithFeedRateVector3(self.feedRateMinute, self.location)
+                       return
+               dwindleDifference = self.dwindlePortionBegin - self.dwindlePortionEnd
+               if self.dwindlePortionBegin < 1.0 and dwindleDifference > oneOverSteps:
+                       numberOfStepsFloat = math.ceil(dwindleDifference / oneOverSteps)
+                       numberOfSteps = int(numberOfStepsFloat)
+                       for stepIndex in xrange(numberOfSteps):
+                               alongBetween = (float(stepIndex) + 0.5) / numberOfStepsFloat
+                               location = self.getLocation(float(stepIndex + 1) / numberOfStepsFloat)
+                               rateMultiplier = self.dwindlePortionEnd * alongBetween + self.dwindlePortionBegin * (1.0 - alongBetween)
+                               self.addGcodeMovementByRate(distanceFeedRate, endRateMultiplier, location, rateMultiplier, slowdownFlowRateMultiplier)
+                       return
+               if self.dwindlePortionBegin > 1.0 and self.dwindlePortionEnd < 1.0:
+                       alongDwindle = 0.0
+                       if self.dwindlePortionBegin > 1.0 + halfOverSteps:
+                               alongDwindle = (self.dwindlePortionBegin - 1.0) / dwindleDifference
+                               self.addGcodeMovementByRate(distanceFeedRate, endRateMultiplier, self.getLocation(alongDwindle), 1.0, slowdownFlowRateMultiplier)
+                       alongDwindlePortion = self.dwindlePortionEnd * alongDwindle + self.dwindlePortionBegin * (1.0 - alongDwindle)
+                       alongDwindleDifference = alongDwindlePortion - self.dwindlePortionEnd
+                       numberOfStepsFloat = math.ceil(alongDwindleDifference / oneOverSteps)
+                       numberOfSteps = int(numberOfStepsFloat)
+                       for stepIndex in xrange(numberOfSteps):
+                               alongBetween = (float(stepIndex) + 0.5) / numberOfStepsFloat
+                               alongDwindleLocation = float(stepIndex + 1) / numberOfStepsFloat
+                               location = self.getLocation(alongDwindleLocation + alongDwindle * (1.0 - alongDwindleLocation))
+                               rateMultiplier = self.dwindlePortionEnd * alongBetween + alongDwindlePortion * (1.0 - alongBetween)
+                               self.addGcodeMovementByRate(distanceFeedRate, endRateMultiplier, location, rateMultiplier, slowdownFlowRateMultiplier)
+                       return
+               rateMultiplier = min(0.5 * (self.dwindlePortionBegin + self.dwindlePortionEnd), 1.0)
+               self.addGcodeMovementByRate(distanceFeedRate, endRateMultiplier, self.location, rateMultiplier, slowdownFlowRateMultiplier)
+
+       def getDwindlePortion(self, area, dwindlePortion, operatingFeedRateMinute, operatingFlowRate, slowdownVolume):
+               'Get cumulative dwindle portion.'
+               self.dwindlePortionEnd = dwindlePortion
+               distance = abs(self.oldLocation - self.location)
+               volume = area * distance
+               self.dwindlePortionBegin = dwindlePortion + volume / slowdownVolume
+               return self.dwindlePortionBegin
+
+       def getLocation(self, along):
+               'Get location along way.'
+               return self.location * along + self.oldLocation * (1.0 - along)
+
+
+def main():
+       'Display the dwindle dialog.'
+       if len(sys.argv) > 1:
+               writeOutput(' '.join(sys.argv[1 :]))
+       else:
+               settings.startMainLoopFromConstructor(getNewRepository())
+
+if __name__ == '__main__':
+       main()
index 8f1ec926bbfa7cf3befe5eefba32fea0ad872f4a..74cc85c0583133cfc2f66453817f364dcec14f16 100644 (file)
@@ -302,6 +302,7 @@ class InsetRepository:
                self.loopOrderDescendingArea = settings.MenuRadio().getFromMenuButtonDisplay(self.loopOrderChoice, 'Descending Area', self, False)
                self.overlapRemovalWidthOverEdgeWidth = settings.FloatSpin().getFromValue(0.3, 'Overlap Removal Width over Perimeter Width (ratio):', self, 0.9, 0.6)
                self.turnExtruderHeaterOffAtShutDown = settings.BooleanSetting().getFromValue('Turn Extruder Heater Off at Shut Down', self, True)
+               self.volumeFraction = settings.FloatSpin().getFromValue(0.7, 'Volume Fraction (ratio):', self, 0.9, 0.82)
                self.executeTitle = 'Inset'
 
        def execute(self):
@@ -426,6 +427,7 @@ class InsetSkein:
                                layerHeight = float(splitLine[1])
                                self.infillWidth = self.repository.infillWidthOverThickness.value * layerHeight
                                self.distanceFeedRate.addTagRoundedLine('infillWidth', self.infillWidth)
+                               self.distanceFeedRate.addTagRoundedLine('volumeFraction', self.repository.volumeFraction.value)
                        elif firstWord == '(<edgeWidth>':
                                self.edgeWidth = float(splitLine[1])
                                self.halfEdgeWidth = 0.5 * self.edgeWidth
index bf6fbb278a5cb027906989499d20a513fd85629e..cdb47ce4bad46747c3e97dbc361485a9c9c41dcf 100644 (file)
@@ -439,6 +439,7 @@ class RaftSkein:
                self.oldLocation = None
                self.oldTemperatureOutputString = None
                self.operatingFeedRateMinute = None
+               self.operatingFlowRate = None
                self.operatingLayerEndLine = '(<operatingLayerEnd> </operatingLayerEnd>)'
                self.operatingJump = None
                self.orbitalFeedRatePerSecond = 2.01
@@ -548,8 +549,8 @@ class RaftSkein:
                aroundWidth = 0.34321 * step
                paths = euclidean.getPathsFromEndpoints(endpoints, 1.5 * step, aroundPixelTable, aroundWidth)
                self.addLayerLine(z)
-               if self.oldFlowRate != None:
-                       self.addFlowRate(flowRateMultiplier * self.oldFlowRate)
+               if self.operatingFlowRate != None:
+                       self.addFlowRate(flowRateMultiplier * self.operatingFlowRate)
                for path in paths:
                        simplifiedPath = euclidean.getSimplifiedPath(path, step)
                        self.distanceFeedRate.addGcodeFromFeedRateThreadZ(feedRateMinute, simplifiedPath, self.travelFeedRateMinute, z)
@@ -903,6 +904,8 @@ class RaftSkein:
                                return
                        elif firstWord == '(<layerHeight>':
                                self.layerHeight = float(splitLine[1])
+                       elif firstWord == 'M108':
+                               self.oldFlowRate = float(splitLine[1][1 :])
                        elif firstWord == '(<objectFirstLayerFeedRateInfillMultiplier>':
                                self.objectFirstLayerFeedRateInfillMultiplier = float(splitLine[1])
                        elif firstWord == '(<objectFirstLayerFlowRateInfillMultiplier>':
@@ -919,8 +922,9 @@ class RaftSkein:
                                self.operatingFeedRateMinute = 60.0 * float(splitLine[1])
                                self.feedRateMinute = self.operatingFeedRateMinute
                        elif firstWord == '(<operatingFlowRate>':
-                               self.oldFlowRate = float(splitLine[1])
-                               self.supportFlowRate = self.oldFlowRate * self.repository.supportFlowRateOverOperatingFlowRate.value
+                               self.operatingFlowRate = float(splitLine[1])
+                               self.oldFlowRate = self.operatingFlowRate
+                               self.supportFlowRate = self.operatingFlowRate * self.repository.supportFlowRateOverOperatingFlowRate.value
                        elif firstWord == '(<edgeWidth>':
                                self.edgeWidth = float(splitLine[1])
                                self.halfEdgeWidth = 0.5 * self.edgeWidth
index d13a958f4f624e2d2ba0b4e7c1427b6dfc17ac5d..7404029cfb2f762c9c61e6c965d510264e405982 100644 (file)
@@ -117,7 +117,7 @@ class SplodgeRepository:
                settings.LabelDisplay().getFromName('- Operating -', self )
                self.operatingLiftOverExtraThickness = settings.FloatSpin().getFromValue( 0.5, 'Operating Lift over Extra Thickness (ratio):', self, 1.5, 1.0 )
                self.operatingSplodgeFeedRate = settings.FloatSpin().getFromValue( 0.4, 'Operating Splodge Feed Rate (mm/s):', self, 2.4, 1.0 )
-               self.operatingSplodgeQuantityLength = settings.FloatSpin().getFromValue( 0.4, 'Operating Splodge Quantity Length (millimeters):', self, 2.4, 1.0 )
+               self.operatingSplodgeQuantityLength = settings.FloatSpin().getFromValue(0.4, 'Operating Splodge Quantity Length (millimeters):', self, 2.4, 1.0)
                settings.LabelSeparator().getFromRepository(self)
                self.executeTitle = 'Splodge'
 
index a6f09a93a9ebecd81de8e45ddccfd733f589db54..e32917b5c931d2c187a957fc388a7a72ed170ee1 100644 (file)
@@ -28,7 +28,7 @@ __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agp
 
 def getCraftSequence():
        'Get the extrusion craft sequence.'
-       return 'carve scale bottom preface widen inset fill multiply speed temperature raft skirt chamber tower jitter clip smooth stretch skin comb cool hop wipe oozebane splodge home lash fillet limit unpause dimension alteration export'.split()
+       return 'carve scale bottom preface widen inset fill multiply speed temperature raft skirt chamber tower jitter clip smooth stretch skin comb cool hop wipe oozebane dwindle splodge home lash fillet limit unpause dimension alteration export'.split()
 
 def getNewRepository():
        'Get new repository.'
index 4a872db6a73226a16322e511ecdeac2d78324629..d44137327cbe3695333fc8da173faf26f6e85ef9 100644 (file)
@@ -90,21 +90,16 @@ def getPluginsDirectoryPath():
 def getProcedures( procedure, text ):
        "Get the procedures up to and including the given procedure."
        craftSequence = getReadCraftSequence()
+       sequenceIndexFromProcedure = 0
+       if procedure in craftSequence:
+               sequenceIndexFromProcedure = craftSequence.index(procedure)
        sequenceIndexPlusOneFromText = getSequenceIndexPlusOneFromText(text)
-       sequenceIndexFromProcedure = getSequenceIndexFromProcedure(procedure)
        return craftSequence[ sequenceIndexPlusOneFromText : sequenceIndexFromProcedure + 1 ]
 
 def getReadCraftSequence():
        "Get profile sequence."
        return skeinforge_profile.getCraftTypePluginModule().getCraftSequence()
 
-def getSequenceIndexFromProcedure(procedure):
-       "Get the profile sequence index of the procedure.  Return None if the procedure is not in the sequence"
-       craftSequence = getReadCraftSequence()
-       if procedure not in craftSequence:
-               return 0
-       return craftSequence.index(procedure)
-
 def getSequenceIndexPlusOneFromText(fileText):
        "Get the profile sequence index of the file plus one.  Return zero if the procedure is not in the file"
        craftSequence = getReadCraftSequence()