diff --git a/SkeinPyPy/SkeinforgeVersion b/SkeinPyPy/SkeinforgeVersion index 21e72e8..95f9650 100644 --- a/SkeinPyPy/SkeinforgeVersion +++ b/SkeinPyPy/SkeinforgeVersion @@ -1 +1 @@ -48 +49 diff --git a/SkeinPyPy/documentation/contents.html b/SkeinPyPy/documentation/contents.html index 376a8a3..a930f5a 100644 --- a/SkeinPyPy/documentation/contents.html +++ b/SkeinPyPy/documentation/contents.html @@ -53,6 +53,7 @@ Previous / Next / Contents       Cool
      Dimension
      Drill
+      Dwindle
      Export
        Binary 16 Byte
        Gcode Step
diff --git a/SkeinPyPy/documentation/fabmetheus_utilities.gcodec.html b/SkeinPyPy/documentation/fabmetheus_utilities.gcodec.html index 7e58b2b..39531e0 100644 --- a/SkeinPyPy/documentation/fabmetheus_utilities.gcodec.html +++ b/SkeinPyPy/documentation/fabmetheus_utilities.gcodec.html @@ -88,6 +88,8 @@ many lines of text
Methods defined here:
__init__(self)
Initialize.
+
addFlowRateLine(self, flowRate)
Add a flow rate line.
+
addGcodeFromFeedRateThreadZ(self, feedRateMinute, thread, travelFeedRateMinute, z)
Add a thread to the output.
addGcodeFromLoop(self, loop, z)
Add the gcode loop.
@@ -98,6 +100,8 @@ many lines of text
addGcodeMovementZWithFeedRate(self, feedRateMinute, point, z)
Add a movement to the output.
+
addGcodeMovementZWithFeedRateVector3(self, feedRateMinute, vector3)
Add a movement to the output by Vector3.
+
addLine(self, line)
Add a line of text and a newline to the output.
addLineCheckAlteration(self, line)
Add a line of text and a newline to the output and check to see if it is an alteration line.
diff --git a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.clip.html b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.clip.html index 559506d..b0833de 100644 --- a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.clip.html +++ b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.clip.html @@ -136,7 +136,7 @@ The clip tool has created the file:
getConnectionIsCloseWithoutOverlap(self, location, path)
Determine if the connection is close enough and does not overlap another thread.
-
getCraftedGcode(self, clipRepository, gcodeText)
Parse gcode text and store the clip gcode.
+
getCraftedGcode(self, gcodeText, repository)
Parse gcode text and store the clip gcode.
getNextThreadIsACloseLoop(self, path)
Determine if the next thread is a loop.
@@ -144,7 +144,7 @@ The clip tool has created the file:
linearMove(self, splitLine)
Add to loop path if this is a loop or path.
-
parseInitialization(self, clipRepository)
Parse gcode initialization and store the parameters.
+
parseInitialization(self)
Parse gcode initialization and store the parameters.
parseLine(self, line)
Parse a gcode line and add it to the clip skein.
@@ -157,8 +157,8 @@ The clip tool has created the file:
Functions         -
getCraftedText(fileName, text, clipRepository=None)
Clip a gcode linear move file or text.
-
getCraftedTextFromText(gcodeText, clipRepository=None)
Clip a gcode linear move text.
+
getCraftedText(fileName, text, repository=None)
Clip a gcode linear move file or text.
+
getCraftedTextFromText(gcodeText, repository=None)
Clip a gcode linear move text.
getNewRepository()
Get new repository.
main()
Display the clip dialog.
writeOutput(fileName, shouldAnalyze=True)
Clip a gcode linear move file.  Chain clip the gcode if it is not already clipped.
diff --git a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.comb.html b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.comb.html index 0d969ed..5cd7aee 100644 --- a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.comb.html +++ b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.comb.html @@ -141,8 +141,6 @@ The comb tool has created the file:
getAroundBetweenPath(self, begin, end)
Get the path around the loops in the way of the original line segment.
-
getBetweens(self)
Get betweens for the layer.
-
getBoundaries(self)
Get boundaries for the layer.
getBoundaryIndexes(self, begin, boundaries, end, points)
Get boundary indexes and set the points in the way of the original line segment.
diff --git a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.drill.html b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.drill.html index 2f9f8e0..5ae1b02 100644 --- a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.drill.html +++ b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.drill.html @@ -10,7 +10,7 @@ >index
/home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/skeinforge_application/skeinforge_plugins/craft_plugins/drill.py

-Previous / Next / Contents +Previous / Next / Contents


Drill is a script to drill down small holes.
@@ -60,7 +60,7 @@ The drill tool has created the file:


-Previous / Next / Contents +Previous / Next / Contents


diff --git a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.export.html b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.export.html index 7c2d994..8cda68c 100644 --- a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.export.html +++ b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.export.html @@ -10,7 +10,7 @@ >index
/home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/skeinforge_application/skeinforge_plugins/craft_plugins/export.py

-Previous / Next / Contents +Previous / Next / Contents


Export is a craft tool to pick an export plugin, add information to the file name, and delete comments.
@@ -149,7 +149,7 @@ The export tool has created the file:


-Previous / Next / Contents +Previous / Next / Contents


diff --git a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.html b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.html index 40ae545..d7076fa 100644 --- a/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.html +++ b/SkeinPyPy/documentation/skeinforge_application.skeinforge_plugins.craft_plugins.html @@ -28,7 +28,8 @@ comb
cool
dimension
-drill
+drill
+dwindle
export
export_plugins (package)
feed
@@ -39,8 +40,8 @@ hop
inset
jitter
-lash
-lift
+lash
+lift
limit
mill
multiply
@@ -50,9 +51,9 @@ raft
scale
skin
-skirt
+skirt
smooth
-speed
+speed
splodge
stretch
temperature
diff --git a/SkeinPyPy/documentation/skeinforge_application.skeinforge_utilities.skeinforge_craft.html b/SkeinPyPy/documentation/skeinforge_application.skeinforge_utilities.skeinforge_craft.html index 881b12c..7c8e9a6 100644 --- a/SkeinPyPy/documentation/skeinforge_application.skeinforge_utilities.skeinforge_craft.html +++ b/SkeinPyPy/documentation/skeinforge_application.skeinforge_utilities.skeinforge_craft.html @@ -92,7 +92,6 @@ The plugin buttons which are commonly used are bolded and the ones which are rar
getPluginsDirectoryPath()
Get the plugins directory path.
getProcedures(procedure, text)
Get the procedures up to and including the given procedure.
getReadCraftSequence()
Get profile sequence.
-
getSequenceIndexFromProcedure(procedure)
Get the profile sequence index of the procedure.  Return None if the procedure is not in the sequence
getSequenceIndexPlusOneFromText(fileText)
Get the profile sequence index of the file plus one.  Return zero if the procedure is not in the file
main()
Write craft output.
writeChainTextWithNounMessage(fileName, procedure, shouldAnalyze=True)
Get and write a crafted shape file.
diff --git a/SkeinPyPy/fabmetheus_utilities/gcodec.py b/SkeinPyPy/fabmetheus_utilities/gcodec.py index 9ec90f9..b348674 100644 --- a/SkeinPyPy/fabmetheus_utilities/gcodec.py +++ b/SkeinPyPy/fabmetheus_utilities/gcodec.py @@ -201,6 +201,11 @@ def isProcedureDone(gcodeText, procedure): return False extruderInitializationIndex = gcodeText.find('()') if extruderInitializationIndex == -1: + metadataBeginIndex = gcodeText.find('') + metadataEndIndex = gcodeText.find('') + 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.' diff --git a/SkeinPyPy/fabmetheus_utilities/version.txt b/SkeinPyPy/fabmetheus_utilities/version.txt index a4bc447..0d73a0c 100644 --- a/SkeinPyPy/fabmetheus_utilities/version.txt +++ b/SkeinPyPy/fabmetheus_utilities/version.txt @@ -1 +1 @@ -12.01.21 \ No newline at end of file +12.02.10 \ No newline at end of file diff --git a/SkeinPyPy/skeinforge_application/skeinforge.py b/SkeinPyPy/skeinforge_application/skeinforge.py index 590fd25..33279a9 100755 --- a/SkeinPyPy/skeinforge_application/skeinforge.py +++ b/SkeinPyPy/skeinforge_application/skeinforge.py @@ -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 diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/analyze_utilities/tableau.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/analyze_utilities/tableau.py index c282d95..a525552 100644 --- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/analyze_utilities/tableau.py +++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/analyze_utilities/tableau.py @@ -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.' diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeiniso.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeiniso.py index 68406e7..180f5c9 100644 --- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeiniso.py +++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeiniso.py @@ -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): diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeinlayer.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeinlayer.py index 35d8cde..e2a3fe0 100644 --- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeinlayer.py +++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/skeinlayer.py @@ -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): diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/clip.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/clip.py index 8e5dd7a..6b8b169 100644 --- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/clip.py +++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/clip.py @@ -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 == '(': - 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 == '(': self.travelFeedRateMinute = 60.0 * float(splitLine[1]) self.distanceFeedRate.addLine(line) diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py index 7fc7872..8ca5e2d 100644 --- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py +++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py @@ -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 == '(': 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 index 0000000..05c1b59 --- /dev/null +++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dwindle.py @@ -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 == '()': + self.distanceFeedRate.addTagBracketedProcedure('dwindle') + return + elif firstWord == '(': + self.infillWidth = float(splitLine[1]) + elif firstWord == '(': + self.layerHeight = float(splitLine[1]) + elif firstWord == '(': + self.operatingFeedRateMinute = 60.0 * float(splitLine[1]) + elif firstWord == '(': + 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 == '(': + 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() diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/inset.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/inset.py index 8f1ec92..74cc85c 100644 --- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/inset.py +++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/inset.py @@ -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 == '(': self.edgeWidth = float(splitLine[1]) self.halfEdgeWidth = 0.5 * self.edgeWidth diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/raft.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/raft.py index bf6fbb2..cdb47ce 100644 --- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/raft.py +++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/raft.py @@ -439,6 +439,7 @@ class RaftSkein: self.oldLocation = None self.oldTemperatureOutputString = None self.operatingFeedRateMinute = None + self.operatingFlowRate = None self.operatingLayerEndLine = '( )' 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 == '(': self.layerHeight = float(splitLine[1]) + elif firstWord == 'M108': + self.oldFlowRate = float(splitLine[1][1 :]) elif firstWord == '(': self.objectFirstLayerFeedRateInfillMultiplier = float(splitLine[1]) elif firstWord == '(': @@ -919,8 +922,9 @@ class RaftSkein: self.operatingFeedRateMinute = 60.0 * float(splitLine[1]) self.feedRateMinute = self.operatingFeedRateMinute elif firstWord == '(': - 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 == '(': self.edgeWidth = float(splitLine[1]) self.halfEdgeWidth = 0.5 * self.edgeWidth diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/splodge.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/splodge.py index d13a958..7404029 100644 --- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/splodge.py +++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/splodge.py @@ -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' diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/extrusion.py b/SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/extrusion.py index a6f09a9..e32917b 100644 --- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/extrusion.py +++ b/SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/extrusion.py @@ -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.' diff --git a/SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_craft.py b/SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_craft.py index 4a872db..d441373 100644 --- a/SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_craft.py +++ b/SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_craft.py @@ -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()