Example #1
0
def getRaftlessGcode( gcodeText, raftlessPreferences = None ):
	"Raftless a gcode linear move text."
	if gcodec.isProcedureDone( gcodeText, 'raft' ):
		print( 'The gcode already contains a raft. Skipping raftless tool.' )
		return gcodeText
	if gcodec.isProcedureDone( gcodeText, 'raftless' ):
		return gcodeText
	if raftlessPreferences == None:
		raftlessPreferences = RaftlessPreferences()
		preferences.readPreferences( raftlessPreferences )
	if not raftlessPreferences.activateRaftless.value:
		return gcodeText
	skein = RaftlessSkein()
	skein.parseGcode( gcodeText, raftlessPreferences )
	return skein.output.getvalue()
Example #2
0
def getRaftlessGcode(gcodeText, raftlessPreferences=None):
    "Raftless a gcode linear move text."
    if gcodec.isProcedureDone(gcodeText, 'raft'):
        print('The gcode already contains a raft. Skipping raftless tool.')
        return gcodeText
    if gcodec.isProcedureDone(gcodeText, 'raftless'):
        return gcodeText
    if raftlessPreferences == None:
        raftlessPreferences = RaftlessPreferences()
        preferences.readPreferences(raftlessPreferences)
    if not raftlessPreferences.activateRaftless.value:
        return gcodeText
    skein = RaftlessSkein()
    skein.parseGcode(gcodeText, raftlessPreferences)
    return skein.output.getvalue()
Example #3
0
def getTwitterbotChainGcode( fileName, gcodeText, twitterbotPreferences = None ):
	"Add Twitterbot M-code to a gcode text.  Chain twitterbot the gcode if it is not already twitterbotted."
	gcodeText = gcodec.getGcodeFileText( fileName, gcodeText )
	if not gcodec.isProcedureDone( gcodeText, 'unpause' ):
		gcodeText = unpause.getUnpauseChainGcode( fileName, gcodeText )
		print( 'getTwitterbotChainGcode(fileName): ' + fileName )
	return getTwitterbotGcode( gcodeText, fileName, twitterbotPreferences )
Example #4
0
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()
    for craftSequenceIndex in xrange(len(craftSequence) - 1, -1, -1):
        procedure = craftSequence[craftSequenceIndex]
        if gcodec.isProcedureDone(fileText, procedure):
            return craftSequenceIndex + 1
    return 0
Example #5
0
def getInsetChainGcode( fileName, gcodeText, insetPreferences = None ):
	"Inset the carves of a gcode text.  Chain inset the gcode if it is not already carved."
	if gcodeText == '':
		if fileName[ - len( '.svg' ) : ] == '.svg':
			gcodeText = gcodec.getFileText( fileName )
	if not gcodec.isProcedureDone( gcodeText, '"carve"' ): #"carve" is used instead of carve because quotes have to be used for strings in svg files
		gcodeText = carve.getCarveGcode( fileName )
	return getInsetGcode( gcodeText, insetPreferences )
Example #6
0
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()
	for craftSequenceIndex in xrange( len( craftSequence ) - 1, - 1, - 1 ):
		procedure = craftSequence[ craftSequenceIndex ]
		if gcodec.isProcedureDone( fileText, procedure ):
			return craftSequenceIndex + 1
	return 0
Example #7
0
def getChainTextFromProcedures( fileName, procedures, text ):
	"Get a crafted shape file from a list of procedures."
	lastProcedureTime = time.time()
	for procedure in procedures:
		craftModule = getCraftModule( procedure )
		text = craftModule.getCraftedText( fileName, text )
		if gcodec.isProcedureDone( text, procedure ):
			print( '%s procedure took %s seconds.' % ( procedure.capitalize(), int( round( time.time() - lastProcedureTime ) ) ) )
			lastProcedureTime = time.time()
	return text
Example #8
0
def getInsetChainGcode(fileName, gcodeText, insetPreferences=None):
    "Inset the carves of a gcode text.  Chain inset the gcode if it is not already carved."
    if gcodeText == '':
        if fileName[-len('.svg'):] == '.svg':
            gcodeText = gcodec.getFileText(fileName)
    if not gcodec.isProcedureDone(
            gcodeText, '"carve"'
    ):  #"carve" is used instead of carve because quotes have to be used for strings in svg files
        gcodeText = carve.getCarveGcode(fileName)
    return getInsetGcode(gcodeText, insetPreferences)
Example #9
0
def getInsetGcode(gcodeText, insetPreferences=None):
    "Inset the carves of a gcode text."
    if gcodeText == '':
        return ''
    if gcodec.isProcedureDone(gcodeText, 'inset'):
        return gcodeText
    if insetPreferences == None:
        insetPreferences = InsetPreferences()
        preferences.readPreferences(insetPreferences)
    skein = InsetSkein()
    skein.parseGcode(insetPreferences, gcodeText)
    return skein.output.getvalue()
Example #10
0
def getInsetGcode( gcodeText, insetPreferences = None ):
	"Inset the carves of a gcode text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'inset' ):
		return gcodeText
	if insetPreferences == None:
		insetPreferences = InsetPreferences()
		preferences.readPreferences( insetPreferences )
	skein = InsetSkein()
	skein.parseGcode( insetPreferences, gcodeText )
	return skein.output.getvalue()
Example #11
0
def writeOutput(fileName=''):
    """Export a gcode linear move file.  Chain export the gcode if it is not already exported.
	If no fileName is specified, export the first unmodified gcode file in this folder."""
    if fileName == '':
        unmodified = interpret.getGNUTranslatorFilesUnmodified()
        if len(unmodified) == 0:
            print("There are no unmodified gcode files in this folder.")
            return
        fileName = unmodified[0]
    exportPreferences = ExportPreferences()
    preferences.readPreferences(exportPreferences)
    startTime = time.time()
    print('File ' + gcodec.getSummarizedFilename(fileName) +
          ' is being chain exported.')
    suffixFilename = fileName[:fileName.rfind(
        '.')] + '.' + exportPreferences.fileExtension.value
    gcodeText = gcodec.getGcodeFileText(fileName, '')
    #	if not gcodec.isProcedureDone( gcodeText, 'unpause' ):
    #		gcodeText = unpause.getUnpauseChainGcode( fileName, gcodeText )
    if not gcodec.isProcedureDone(gcodeText, 'raftless'):
        gcodeText = raftless.getRaftlessChainGcode(fileName, gcodeText)
    if gcodeText == '':
        return

    # Now prepend the start file and append the end file
    gcodeText = getStartText() + gcodeText + getEndText()

    analyze.writeOutput(suffixFilename, gcodeText)
    exportChainGcode = getExportGcode(gcodeText, exportPreferences)

    replacableExportChainGcode = None
    selectedPluginModule = getSelectedPlugin(exportPreferences)
    if selectedPluginModule == None:
        replacableExportChainGcode = exportChainGcode
    else:
        if selectedPluginModule.isReplacable():
            replacableExportChainGcode = selectedPluginModule.getOutput(
                exportChainGcode)
        else:
            selectedPluginModule.writeOutput(suffixFilename, exportChainGcode)
    if replacableExportChainGcode != None:
        replacableExportChainGcode = getReplaced(replacableExportChainGcode)
        gcodec.writeFileText(suffixFilename, replacableExportChainGcode)
        print('The exported file is saved as ' +
              gcodec.getSummarizedFilename(suffixFilename))
    if exportPreferences.alsoSendOutputTo.value != '':
        if replacableExportChainGcode == None:
            replacableExportChainGcode = selectedPluginModule.getOutput(
                exportChainGcode)
        exec('print >> ' + exportPreferences.alsoSendOutputTo.value +
             ', replacableExportChainGcode')
    print('It took ' + str(int(round(time.time() - startTime))) +
          ' seconds to export the file.')
Example #12
0
def getChainTextFromProcedures(fileName, procedures, text):
    "Get a crafted shape file from a list of procedures."
    lastProcedureTime = time.time()
    for procedure in procedures:
        craftModule = getCraftModule(procedure)
        if craftModule != None:
            text = craftModule.getCraftedText(fileName, text)
            if gcodec.isProcedureDone(text, procedure):
                print('%s procedure took %s seconds.' %
                      (procedure.capitalize(),
                       int(round(time.time() - lastProcedureTime))))
                lastProcedureTime = time.time()
    return text
Example #13
0
def getHopGcode( gcodeText, hopPreferences = None ):
	"Hop a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'hop' ):
		return gcodeText
	if hopPreferences == None:
		hopPreferences = HopPreferences()
		preferences.readPreferences( hopPreferences )
	if not hopPreferences.activateHop.value:
		return gcodeText
	skein = HopSkein()
	skein.parseGcode( gcodeText, hopPreferences )
	return skein.output.getvalue()
Example #14
0
def getTowerGcode( gcodeText, towerPreferences = None ):
	"Tower a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'tower' ):
		return gcodeText
	if towerPreferences == None:
		towerPreferences = TowerPreferences()
		preferences.readPreferences( towerPreferences )
	if not towerPreferences.activateTower.value:
		return gcodeText
	skein = TowerSkein()
	skein.parseGcode( gcodeText, towerPreferences )
	return skein.output.getvalue()
Example #15
0
def getHopGcode(gcodeText, hopPreferences=None):
    "Hop a gcode linear move text."
    if gcodeText == '':
        return ''
    if gcodec.isProcedureDone(gcodeText, 'hop'):
        return gcodeText
    if hopPreferences == None:
        hopPreferences = HopPreferences()
        preferences.readPreferences(hopPreferences)
    if not hopPreferences.activateHop.value:
        return gcodeText
    skein = HopSkein()
    skein.parseGcode(gcodeText, hopPreferences)
    return skein.output.getvalue()
Example #16
0
def getStretchGcode( gcodeText, stretchPreferences = None ):
	"Stretch a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'stretch' ):
		return gcodeText
	if stretchPreferences == None:
		stretchPreferences = StretchPreferences()
		preferences.readPreferences( stretchPreferences )
	if not stretchPreferences.activateStretch.value:
		return gcodeText
	skein = StretchSkein()
	skein.parseGcode( gcodeText, stretchPreferences )
	return skein.output.getvalue()
Example #17
0
def getUnpauseGcode(gcodeText, unpausePreferences=None):
    "Unpause a gcode linear move text."
    if gcodeText == '':
        return ''
    if gcodec.isProcedureDone(gcodeText, 'unpause'):
        return gcodeText
    if unpausePreferences == None:
        unpausePreferences = UnpausePreferences()
        preferences.readPreferences(unpausePreferences)
    if not unpausePreferences.activateUnpause.value:
        return gcodeText
    skein = UnpauseSkein()
    skein.parseGcode(unpausePreferences, gcodeText)
    return skein.output.getvalue()
Example #18
0
def getClipGcode( gcodeText, loopTailorPreferences = None ):
	"Clip a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'clip' ):
		return gcodeText
	if loopTailorPreferences == None:
		loopTailorPreferences = ClipPreferences()
		preferences.readPreferences( loopTailorPreferences )
	if not loopTailorPreferences.activateClip.value:
		return gcodeText
	skein = ClipSkein()
	skein.parseGcode( gcodeText, loopTailorPreferences )
	return skein.output.getvalue()
Example #19
0
def getMultiplyGcode(gcodeText, multiplyPreferences=None):
    "Multiply a gcode linear move text."
    if gcodeText == '':
        return ''
    if gcodec.isProcedureDone(gcodeText, 'multiply'):
        return gcodeText
    if multiplyPreferences == None:
        multiplyPreferences = MultiplyPreferences()
        preferences.readPreferences(multiplyPreferences)
    if not multiplyPreferences.activateMultiply.value:
        return gcodeText
    skein = MultiplySkein()
    skein.parseGcode(gcodeText, multiplyPreferences)
    return skein.output.getvalue()
Example #20
0
def getExportGcode(gcodeText, exportPreferences=None):
    "Export a gcode linear move text."
    if gcodeText == '':
        return ''
    if gcodec.isProcedureDone(gcodeText, 'export'):
        return gcodeText
    if exportPreferences == None:
        exportPreferences = ExportPreferences()
        preferences.readPreferences(exportPreferences)
    if not exportPreferences.activateExport.value:
        return gcodeText
    skein = ExportSkein()
    skein.parseGcode(exportPreferences, gcodeText)
    return skein.output.getvalue()
Example #21
0
def getSpeedGcode(gcodeText, speedPreferences=None):
    "Speed a gcode linear move text."
    if gcodeText == "":
        return ""
    if gcodec.isProcedureDone(gcodeText, "speed"):
        return gcodeText
    if speedPreferences == None:
        speedPreferences = SpeedPreferences()
        preferences.readPreferences(speedPreferences)
    if not speedPreferences.activateSpeed.value:
        return gcodeText
    skein = SpeedSkein()
    skein.parseGcode(gcodeText, speedPreferences)
    return skein.output.getvalue()
Example #22
0
def getRaftGcode( gcodeText, raftPreferences = None ):
	"Raft a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'raft' ):
		return gcodeText
	if raftPreferences == None:
		raftPreferences = RaftPreferences()
		preferences.readPreferences( raftPreferences )
	if not raftPreferences.activateRaft.value:
		return gcodeText
	skein = RaftSkein()
	skein.parseGcode( gcodeText, raftPreferences )
	return skein.output.getvalue()
Example #23
0
def getCombGcode(gcodeText, combPreferences=None):
    "Comb a gcode linear move text."
    if gcodeText == '':
        return ''
    if gcodec.isProcedureDone(gcodeText, 'comb'):
        return gcodeText
    if combPreferences == None:
        combPreferences = CombPreferences()
        preferences.readPreferences(combPreferences)
    if not combPreferences.activateComb.value:
        return gcodeText
    skein = CombSkein()
    skein.parseGcode(combPreferences, gcodeText)
    return skein.output.getvalue()
Example #24
0
def getWipeGcode(gcodeText, wipePreferences=None):
    "Wipe a gcode linear move text."
    if gcodeText == '':
        return ''
    if gcodec.isProcedureDone(gcodeText, 'wipe'):
        return gcodeText
    if wipePreferences == None:
        wipePreferences = WipePreferences()
        preferences.readPreferences(wipePreferences)
    if not wipePreferences.activateWipe.value:
        return gcodeText
    skein = WipeSkein()
    skein.parseGcode(gcodeText, wipePreferences)
    return skein.output.getvalue()
Example #25
0
def getMultiplyGcode( gcodeText, multiplyPreferences = None ):
	"Multiply a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'multiply' ):
		return gcodeText
	if multiplyPreferences == None:
		multiplyPreferences = MultiplyPreferences()
		preferences.readPreferences( multiplyPreferences )
	if not multiplyPreferences.activateMultiply.value:
		return gcodeText
	skein = MultiplySkein()
	skein.parseGcode( gcodeText, multiplyPreferences )
	return skein.output.getvalue()
Example #26
0
def getOozebaneGcode( gcodeText, oozebanePreferences = None ):
	"Oozebane a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'oozebane' ):
		return gcodeText
	if oozebanePreferences == None:
		oozebanePreferences = OozebanePreferences()
		preferences.readPreferences( oozebanePreferences )
	if not oozebanePreferences.activateOozebane.value:
		return gcodeText
	skein = OozebaneSkein()
	skein.parseGcode( gcodeText, oozebanePreferences )
	return skein.output.getvalue()
Example #27
0
def getExportGcode( gcodeText, exportPreferences = None ):
	"Export a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'export' ):
		return gcodeText
	if exportPreferences == None:
		exportPreferences = ExportPreferences()
		preferences.readPreferences( exportPreferences )
	if not exportPreferences.activateExport.value:
		return gcodeText
	skein = ExportSkein()
	skein.parseGcode( exportPreferences, gcodeText )
	return skein.output.getvalue()
Example #28
0
def getUnpauseGcode( gcodeText, unpausePreferences = None ):
	"Unpause a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'unpause' ):
		return gcodeText
	if unpausePreferences == None:
		unpausePreferences = UnpausePreferences()
		preferences.readPreferences( unpausePreferences )
	if not unpausePreferences.activateUnpause.value:
		return gcodeText
	skein = UnpauseSkein()
	skein.parseGcode( unpausePreferences, gcodeText )
	return skein.output.getvalue()
Example #29
0
def getWipeGcode( gcodeText, wipePreferences = None ):
	"Wipe a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'wipe' ):
		return gcodeText
	if wipePreferences == None:
		wipePreferences = WipePreferences()
		preferences.readPreferences( wipePreferences )
	if not wipePreferences.activateWipe.value:
		return gcodeText
	skein = WipeSkein()
	skein.parseGcode( gcodeText, wipePreferences )
	return skein.output.getvalue()
Example #30
0
def getCoolGcode( gcodeText, coolPreferences = None ):
	"Cool a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'cool' ):
		return gcodeText
	if coolPreferences == None:
		coolPreferences = CoolPreferences()
		preferences.readPreferences( coolPreferences )
	if not coolPreferences.activateCool.value:
		return gcodeText
	skein = CoolSkein()
	skein.parseGcode( gcodeText, coolPreferences )
	return skein.output.getvalue()
Example #31
0
def getStretchGcode(gcodeText, stretchPreferences=None):
    "Stretch a gcode linear move text."
    if gcodeText == '':
        return ''
    if gcodec.isProcedureDone(gcodeText, 'stretch'):
        return gcodeText
    if stretchPreferences == None:
        stretchPreferences = StretchPreferences()
        preferences.readPreferences(stretchPreferences)
    if not stretchPreferences.activateStretch.value:
        return gcodeText
    skein = StretchSkein()
    skein.parseGcode(gcodeText, stretchPreferences)
    return skein.output.getvalue()
Example #32
0
def getSpeedGcode(gcodeText, speedPreferences=None):
    "Speed a gcode linear move text."
    if gcodeText == '':
        return ''
    if gcodec.isProcedureDone(gcodeText, 'speed'):
        return gcodeText
    if speedPreferences == None:
        speedPreferences = SpeedPreferences()
        preferences.readPreferences(speedPreferences)
    if not speedPreferences.activateSpeed.value:
        return gcodeText
    skein = SpeedSkein()
    skein.parseGcode(gcodeText, speedPreferences)
    return skein.output.getvalue()
Example #33
0
def getTwitterbotGcode( gcodeText, fileName, twitterbotPreferences = None ):
	"Add Twitterbot M-code to a gcode text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'twitterbot' ):
		return gcodeText
	if twitterbotPreferences == None:
		twitterbotPreferences = TwitterbotPreferences()
		preferences.readPreferences( twitterbotPreferences )
	if not twitterbotPreferences.activateTwitterbot.value:
		return gcodeText
	skein = TwitterbotSkein()
	skein.setGcodeFilePathAndName( fileName )
	skein.parseGcode( gcodeText, twitterbotPreferences )
	return skein.output.getvalue()
Example #34
0
def writeOutput( fileName = '' ):
	"""Export a gcode linear move file.  Chain export the gcode if it is not already exported.
	If no fileName is specified, export the first unmodified gcode file in this folder."""
	if fileName == '':
		unmodified = interpret.getGNUTranslatorFilesUnmodified()
		if len( unmodified ) == 0:
			print( "There are no unmodified gcode files in this folder." )
			return
		fileName = unmodified[ 0 ]
	exportPreferences = ExportPreferences()
	preferences.readPreferences( exportPreferences )
	startTime = time.time()
	print( 'File ' + gcodec.getSummarizedFilename( fileName ) + ' is being chain exported.' )
	suffixFilename = fileName[ : fileName.rfind( '.' ) ] + '.' + exportPreferences.fileExtension.value
	gcodeText = gcodec.getGcodeFileText( fileName, '' )
#	if not gcodec.isProcedureDone( gcodeText, 'unpause' ):
#		gcodeText = unpause.getUnpauseChainGcode( fileName, gcodeText )
	if not gcodec.isProcedureDone( gcodeText, 'raftless' ):
		gcodeText = raftless.getRaftlessChainGcode( fileName, gcodeText )
	if gcodeText == '':
		return

	# Now prepend the start file and append the end file
	gcodeText = getStartText() + gcodeText + getEndText()

	analyze.writeOutput( suffixFilename, gcodeText )
	exportChainGcode = getExportGcode( gcodeText, exportPreferences )

	replacableExportChainGcode = None
	selectedPluginModule = getSelectedPlugin( exportPreferences )
	if selectedPluginModule == None:
		replacableExportChainGcode = exportChainGcode
	else:
		if selectedPluginModule.isReplacable():
			replacableExportChainGcode = selectedPluginModule.getOutput( exportChainGcode )
		else:
			selectedPluginModule.writeOutput( suffixFilename, exportChainGcode )
	if replacableExportChainGcode != None:
		replacableExportChainGcode = getReplaced( replacableExportChainGcode )
		gcodec.writeFileText( suffixFilename, replacableExportChainGcode )
		print( 'The exported file is saved as ' + gcodec.getSummarizedFilename( suffixFilename ) )
	if exportPreferences.alsoSendOutputTo.value != '':
		if replacableExportChainGcode == None:
			replacableExportChainGcode = selectedPluginModule.getOutput( exportChainGcode )
		exec( 'print >> ' + exportPreferences.alsoSendOutputTo.value + ', replacableExportChainGcode' )
	print( 'It took ' + str( int( round( time.time() - startTime ) ) ) + ' seconds to export the file.' )
Example #35
0
def getFilletGcode( gcodeText, filletPreferences = None ):
	"Fillet a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'fillet' ):
		return gcodeText
	if filletPreferences == None:
		filletPreferences = FilletPreferences()
		preferences.readPreferences( filletPreferences )
	if not filletPreferences.activateFillet.value:
		return gcodeText
	if filletPreferences.arcPoint.value:
		return getArcPointGcode( filletPreferences, gcodeText )
	elif filletPreferences.arcRadius.value:
		return getArcRadiusGcode( filletPreferences, gcodeText )
	elif filletPreferences.arcSegment.value:
		return getArcSegmentGcode( filletPreferences, gcodeText )
	elif filletPreferences.bevel.value:
		return getBevelGcode( filletPreferences, gcodeText )
	return gcodeText
Example #36
0
def getClipChainGcode( fileName, gcodeText, loopTailorPreferences = None ):
	"Clip a gcode linear move text.  Chain clip the gcode if it is not already clipped."
	gcodeText = gcodec.getGcodeFileText( fileName, gcodeText )
	if not gcodec.isProcedureDone( gcodeText, 'comb' ):
		gcodeText = comb.getCombChainGcode( fileName, gcodeText )
	return getClipGcode( gcodeText, loopTailorPreferences )
Example #37
0
def getRaftlessChainGcode( fileName, gcodeText, raftlessPreferences = None ):
	"Raftless the file or text. Chain raftless the gcode if it is not already raftless'd."
	gcodeText = gcodec.getGcodeFileText( fileName, gcodeText )
	if not gcodec.isProcedureDone( gcodeText, 'unpause' ):
		gcodeText = unpause.getUnpauseChainGcode( fileName, gcodeText )
	return getRaftlessGcode( gcodeText, raftlessPreferences )
Example #38
0
def getUnpauseChainGcode( fileName, gcodeText, unpausePreferences = None ):
	"Unpause a gcode linear move text.  Chain unpause the gcode if it is not already unpaused."
	gcodeText = gcodec.getGcodeFileText( fileName, gcodeText )
	if not gcodec.isProcedureDone( gcodeText, 'fillet' ):
		gcodeText = fillet.getFilletChainGcode( fileName, gcodeText )
	return getUnpauseGcode( gcodeText, unpausePreferences )
Example #39
0
def getWipeChainGcode(fileName, gcodeText, wipePreferences=None):
    "Wipe a gcode linear move text.  Chain wipe the gcode if it is not already wiped."
    gcodeText = gcodec.getGcodeFileText(fileName, gcodeText)
    if not gcodec.isProcedureDone(gcodeText, 'hop'):
        gcodeText = hop.getHopChainGcode(fileName, gcodeText)
    return getWipeGcode(gcodeText, wipePreferences)
Example #40
0
def getMultiplyChainGcode( fileName, gcodeText, multiplyPreferences = None ):
	"Multiply a gcode linear move text.  Chain multiply the gcode if it is not already multiplied."
	gcodeText = gcodec.getGcodeFileText( fileName, gcodeText )
	if not gcodec.isProcedureDone( gcodeText, 'fill' ):
		gcodeText = fill.getFillChainGcode( fileName, gcodeText )
	return getMultiplyGcode( gcodeText, multiplyPreferences )
Example #41
0
def getHopChainGcode( fileName, gcodeText, hopPreferences = None ):
	"Hop a gcode linear move text.  Chain hop the gcode if it is not already hopped."
	gcodeText = gcodec.getGcodeFileText( fileName, gcodeText )
	if not gcodec.isProcedureDone( gcodeText, 'stretch' ):
		gcodeText = stretch.getStretchChainGcode( fileName, gcodeText )
	return getHopGcode( gcodeText, hopPreferences )
Example #42
0
def getRaftChainGcode( fileName, gcodeText, raftPreferences = None ):
	"Raft a gcode linear move text.  Chain raft the gcode if it is not already rafted."
	gcodeText = gcodec.getGcodeFileText( fileName, gcodeText )
	if not gcodec.isProcedureDone( gcodeText, 'speed' ):
		gcodeText = speed.getSpeedChainGcode( fileName, gcodeText )
	return getRaftGcode( gcodeText, raftPreferences )
Example #43
0
def getCombChainGcode(fileName, gcodeText, combPreferences=None):
    "Comb a gcode linear move text.  Chain comb the gcode if it is not already combed."
    gcodeText = gcodec.getGcodeFileText(fileName, gcodeText)
    if not gcodec.isProcedureDone(gcodeText, 'tower'):
        gcodeText = tower.getTowerChainGcode(fileName, gcodeText)
    return getCombGcode(gcodeText, combPreferences)
Example #44
0
def getUnpauseChainGcode(fileName, gcodeText, unpausePreferences=None):
    "Unpause a gcode linear move text.  Chain unpause the gcode if it is not already unpaused."
    gcodeText = gcodec.getGcodeFileText(fileName, gcodeText)
    if not gcodec.isProcedureDone(gcodeText, 'fillet'):
        gcodeText = fillet.getFilletChainGcode(fileName, gcodeText)
    return getUnpauseGcode(gcodeText, unpausePreferences)
Example #45
0
def getStretchChainGcode(fileName, gcodeText, stretchPreferences=None):
    "Stretch a gcode linear move text.  Chain stretch the gcode if it is not already stretched."
    gcodeText = gcodec.getGcodeFileText(fileName, gcodeText)
    if not gcodec.isProcedureDone(gcodeText, 'cool'):
        gcodeText = cool.getCoolChainGcode(fileName, gcodeText)
    return getStretchGcode(gcodeText, stretchPreferences)
Example #46
0
def getFilletChainGcode( fileName, gcodeText, filletPreferences = None ):
	"Fillet a gcode linear move text.  Chain oozebane the gcode if it is not already oozebaned."
	gcodeText = gcodec.getGcodeFileText( fileName, gcodeText )
	if not gcodec.isProcedureDone( gcodeText, 'oozebane' ):
		gcodeText = oozebane.getOozebaneChainGcode( fileName, gcodeText )
	return getFilletGcode( gcodeText, filletPreferences )
Example #47
0
def getHopChainGcode(fileName, gcodeText, hopPreferences=None):
    "Hop a gcode linear move text.  Chain hop the gcode if it is not already hopped."
    gcodeText = gcodec.getGcodeFileText(fileName, gcodeText)
    if not gcodec.isProcedureDone(gcodeText, 'stretch'):
        gcodeText = stretch.getStretchChainGcode(fileName, gcodeText)
    return getHopGcode(gcodeText, hopPreferences)
Example #48
0
def getSpeedChainGcode(fileName, gcodeText, speedPreferences=None):
    "Speed a gcode linear move text.  Chain speed the gcode if it is not already speeded."
    gcodeText = gcodec.getGcodeFileText(fileName, gcodeText)
    if not gcodec.isProcedureDone(gcodeText, 'multiply'):
        gcodeText = multiply.getMultiplyChainGcode(fileName, gcodeText)
    return getSpeedGcode(gcodeText, speedPreferences)
Example #49
0
def getStretchChainGcode( fileName, gcodeText, stretchPreferences = None ):
	"Stretch a gcode linear move text.  Chain stretch the gcode if it is not already stretched."
	gcodeText = gcodec.getGcodeFileText( fileName, gcodeText )
	if not gcodec.isProcedureDone( gcodeText, 'cool' ):
		gcodeText = cool.getCoolChainGcode( fileName, gcodeText )
	return getStretchGcode( gcodeText, stretchPreferences )
Example #50
0
def getSpeedChainGcode(fileName, gcodeText, speedPreferences=None):
    "Speed a gcode linear move text.  Chain speed the gcode if it is not already speeded."
    gcodeText = gcodec.getGcodeFileText(fileName, gcodeText)
    if not gcodec.isProcedureDone(gcodeText, "multiply"):
        gcodeText = multiply.getMultiplyChainGcode(fileName, gcodeText)
    return getSpeedGcode(gcodeText, speedPreferences)
Example #51
0
def getOozebaneChainGcode( fileName, gcodeText, oozebanePreferences = None ):
	"Oozebane a gcode linear move text.  Chain oozebane the gcode if it is not already oozebaned."
	gcodeText = gcodec.getGcodeFileText( fileName, gcodeText )
	if not gcodec.isProcedureDone( gcodeText, 'wipe' ):
		gcodeText = wipe.getWipeChainGcode( fileName, gcodeText )
	return getOozebaneGcode( gcodeText, oozebanePreferences )
Example #52
0
def getCoolChainGcode( fileName, gcodeText, coolPreferences = None ):
	"Cool a gcode linear move text.  Chain cool the gcode if it is not already cooled."
	gcodeText = gcodec.getGcodeFileText( fileName, gcodeText )
	if not gcodec.isProcedureDone( gcodeText, 'clip' ):
		gcodeText = clip.getClipChainGcode( fileName, gcodeText )
	return getCoolGcode( gcodeText, coolPreferences )