コード例 #1
0
def writeOutput(fileName=''):
    "Alternate shell file."
    fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(
        fileName)
    if fileName == '':
        return
    skeinforge_craft.writeChainTextWithNounMessage(fileName, 'altshell')
コード例 #2
0
def writeOutput(fileName=''):
    "Chamber a gcode linear move file."
    fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(
        fileName)
    if fileName == '':
        return
    skeinforge_craft.writeChainTextWithNounMessage(fileName, 'chamber')
コード例 #3
0
def writeOutput(fileName=''):
    "Preface the carving of a gcode file.  If no fileName is specified, preface the first unmodified gcode file in this folder."
    fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(
        fileName)
    if fileName == '':
        return
    skeinforge_craft.writeChainTextWithNounMessage(fileName, 'preface')
コード例 #4
0
ファイル: export.py プロジェクト: weeberp/MakerDroid
def writeOutput(fileName=''):
    "Export a gcode linear move file."
    fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(
        fileName)
    if fileName == '':
        return
    exportRepository = ExportRepository()
    settings.getReadRepository(exportRepository)
    startTime = time.time()
    print('File ' + gcodec.getSummarizedFileName(fileName) +
          ' is being chain exported.')
    Filehandle = open('report.txt', 'w')
    Filehandle.write('File ' + gcodec.getSummarizedFileName(fileName) +
                     ' is being chain exported.\n')
    Filehandle.close()
    suffixFileName = fileName[:fileName.rfind(
        '.')] + '_export.' + exportRepository.fileExtension.value
    gcodeText = gcodec.getGcodeFileText(fileName, '')
    procedures = skeinforge_craft.getProcedures('export', gcodeText)
    gcodeText = skeinforge_craft.getChainTextFromProcedures(
        fileName, procedures[:-1], gcodeText)
    if gcodeText == '':
        return
    skeinforge_analyze.writeOutput(suffixFileName, gcodeText)
    if exportRepository.savePenultimateGcode.value:
        penultimateFileName = fileName[:fileName.
                                       rfind('.')] + '_penultimate.gcode'
        gcodec.writeFileText(penultimateFileName, gcodeText)
        print('The penultimate file is saved as ' +
              gcodec.getSummarizedFileName(penultimateFileName))
    exportChainGcode = getCraftedTextFromText(gcodeText, exportRepository)
    replaceableExportChainGcode = None
    selectedPluginModule = getSelectedPluginModule(
        exportRepository.exportPlugins)
    if selectedPluginModule == None:
        replaceableExportChainGcode = exportChainGcode
    else:
        if selectedPluginModule.isReplaceable():
            replaceableExportChainGcode = selectedPluginModule.getOutput(
                exportChainGcode)
        else:
            selectedPluginModule.writeOutput(suffixFileName, exportChainGcode)
    if replaceableExportChainGcode != None:
        replaceableExportChainGcode = getReplaced(replaceableExportChainGcode)
        gcodec.writeFileText(suffixFileName, replaceableExportChainGcode)
        print('The exported file is saved as ' +
              gcodec.getSummarizedFileName(suffixFileName))
    if exportRepository.alsoSendOutputTo.value != '':
        if replaceableExportChainGcode == None:
            replaceableExportChainGcode = selectedPluginModule.getOutput(
                exportChainGcode)
        exec('print >> ' + exportRepository.alsoSendOutputTo.value +
             ', replaceableExportChainGcode')
    print('It took ' + str(int(round(time.time() - startTime))) +
          ' seconds to export the file.')
    Filehandle = open('report.txt', 'a')
    Filehandle.write('It took ' + str(int(round(time.time() - startTime))) +
                     ' seconds to export the file.')
    Filehandle.close()
コード例 #5
0
def writeOutput(fileName=''):
    'Export a gcode linear move file.'
    fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(
        fileName)
    if fileName == '':
        return
    repository = ExportRepository()
    settings.getReadRepository(repository)
    startTime = time.time()
    print('File ' + archive.getSummarizedFileName(fileName) +
          ' is being chain exported.')
    suffixFileName = fileName[:fileName.rfind('.')]
    if repository.addExportSuffix.value:
        suffixFileName += '_export'
    suffixFileName += '.' + repository.fileExtension.value
    gcodeText = gcodec.getGcodeFileText(fileName, '')
    procedures = skeinforge_craft.getProcedures('export', gcodeText)
    gcodeText = skeinforge_craft.getChainTextFromProcedures(
        fileName, procedures[:-1], gcodeText)
    if gcodeText == '':
        return
    window = skeinforge_analyze.writeOutput(fileName, suffixFileName,
                                            gcodeText)
    if repository.savePenultimateGcode.value:
        penultimateFileName = fileName[:fileName.
                                       rfind('.')] + '_penultimate.gcode'
        archive.writeFileText(penultimateFileName, gcodeText)
        print('The penultimate file is saved as ' +
              archive.getSummarizedFileName(penultimateFileName))
    exportChainGcode = getCraftedTextFromText(gcodeText, repository)
    replaceableExportChainGcode = None
    selectedPluginModule = getSelectedPluginModule(repository.exportPlugins)
    if selectedPluginModule == None:
        replaceableExportChainGcode = exportChainGcode
    else:
        if selectedPluginModule.globalIsReplaceable:
            replaceableExportChainGcode = selectedPluginModule.getOutput(
                exportChainGcode)
        else:
            selectedPluginModule.writeOutput(suffixFileName, exportChainGcode)
    if replaceableExportChainGcode != None:
        replaceableExportChainGcode = getReplaced(replaceableExportChainGcode)
        archive.writeFileText(suffixFileName, replaceableExportChainGcode)
        print('The exported file is saved as ' +
              archive.getSummarizedFileName(suffixFileName))
    if repository.alsoSendOutputTo.value != '':
        if replaceableExportChainGcode == None:
            replaceableExportChainGcode = selectedPluginModule.getOutput(
                exportChainGcode)
        exec('print >> ' + repository.alsoSendOutputTo.value +
             ', replaceableExportChainGcode')
    print('It took %s to export the file.' %
          euclidean.getDurationString(time.time() - startTime))
    return window
コード例 #6
0
ファイル: export.py プロジェクト: chriskyfung/MakerDroid
def writeOutput( fileName = '' ):
	"Export a gcode linear move file."
	fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified( fileName )
	if fileName == '':
		return
	exportRepository = ExportRepository()
	settings.getReadRepository( exportRepository )
	startTime = time.time()
	print( 'File ' + gcodec.getSummarizedFileName( fileName ) + ' is being chain exported.' )
	Filehandle = open ('report.txt', 'w')
	Filehandle.write ('File ' + gcodec.getSummarizedFileName( fileName ) + ' is being chain exported.\n')
	Filehandle.close ()
	suffixFileName = fileName[ : fileName.rfind( '.' ) ] + '_export.' + exportRepository.fileExtension.value
	gcodeText = gcodec.getGcodeFileText( fileName, '' )
	procedures = skeinforge_craft.getProcedures( 'export', gcodeText )
	gcodeText = skeinforge_craft.getChainTextFromProcedures( fileName, procedures[ : - 1 ], gcodeText )
	if gcodeText == '':
		return
	skeinforge_analyze.writeOutput( suffixFileName, gcodeText )
	if exportRepository.savePenultimateGcode.value:
		penultimateFileName = fileName[ : fileName.rfind( '.' ) ] + '_penultimate.gcode'
		gcodec.writeFileText( penultimateFileName, gcodeText )
		print( 'The penultimate file is saved as ' + gcodec.getSummarizedFileName( penultimateFileName ) )
	exportChainGcode = getCraftedTextFromText( gcodeText, exportRepository )
	replaceableExportChainGcode = None
	selectedPluginModule = getSelectedPluginModule( exportRepository.exportPlugins )
	if selectedPluginModule == None:
		replaceableExportChainGcode = exportChainGcode
	else:
		if selectedPluginModule.isReplaceable():
			replaceableExportChainGcode = selectedPluginModule.getOutput( exportChainGcode )
		else:
			selectedPluginModule.writeOutput( suffixFileName, exportChainGcode )
	if replaceableExportChainGcode != None:
		replaceableExportChainGcode = getReplaced( replaceableExportChainGcode )
		gcodec.writeFileText( suffixFileName, replaceableExportChainGcode )
		print( 'The exported file is saved as ' + gcodec.getSummarizedFileName( suffixFileName ) )
	if exportRepository.alsoSendOutputTo.value != '':
		if replaceableExportChainGcode == None:
			replaceableExportChainGcode = selectedPluginModule.getOutput( exportChainGcode )
		exec( 'print >> ' + exportRepository.alsoSendOutputTo.value + ', replaceableExportChainGcode' )
	print( 'It took ' + str( int( round( time.time() - startTime ) ) ) + ' seconds to export the file.' )
	Filehandle = open ('report.txt', 'a')
	Filehandle.write ('It took '+ str( int( round( time.time() - startTime ) ) )+' seconds to export the file.')
	Filehandle.close ()
コード例 #7
0
ファイル: export.py プロジェクト: mrkim/ReplicatorG
def writeOutput(fileName=''):
	'Export a gcode linear move file.'
	fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName)
	if fileName == '':
		return
	repository = ExportRepository()
	settings.getReadRepository(repository)
	startTime = time.time()
	print('File ' + archive.getSummarizedFileName(fileName) + ' is being chain exported.')
	suffixFileName = fileName[: fileName.rfind('.')]
	if repository.addExportSuffix.value:
		suffixFileName += '_export'
	suffixFileName += '.' + repository.fileExtension.value
	gcodeText = gcodec.getGcodeFileText(fileName, '')
	procedures = skeinforge_craft.getProcedures('export', gcodeText)
	gcodeText = skeinforge_craft.getChainTextFromProcedures(fileName, procedures[ : - 1 ], gcodeText)
	if gcodeText == '':
		return
	window = skeinforge_analyze.writeOutput(fileName, suffixFileName, gcodeText)
	if repository.savePenultimateGcode.value:
		penultimateFileName = fileName[: fileName.rfind('.')] + '_penultimate.gcode'
		archive.writeFileText(penultimateFileName, gcodeText)
		print('The penultimate file is saved as ' + archive.getSummarizedFileName(penultimateFileName))
	exportChainGcode = getCraftedTextFromText(gcodeText, repository)
	replaceableExportChainGcode = None
	selectedPluginModule = getSelectedPluginModule(repository.exportPlugins)
	if selectedPluginModule == None:
		replaceableExportChainGcode = exportChainGcode
	else:
		if selectedPluginModule.globalIsReplaceable:
			replaceableExportChainGcode = selectedPluginModule.getOutput(exportChainGcode)
		else:
			selectedPluginModule.writeOutput(suffixFileName, exportChainGcode)
	if replaceableExportChainGcode != None:
		replaceableExportChainGcode = getReplaced(replaceableExportChainGcode)
		archive.writeFileText( suffixFileName, replaceableExportChainGcode )
		print('The exported file is saved as ' + archive.getSummarizedFileName(suffixFileName))
	if repository.alsoSendOutputTo.value != '':
		if replaceableExportChainGcode == None:
			replaceableExportChainGcode = selectedPluginModule.getOutput(exportChainGcode)
		exec('print >> ' + repository.alsoSendOutputTo.value + ', replaceableExportChainGcode')
	print('It took %s to export the file.' % euclidean.getDurationString(time.time() - startTime))
	return window
コード例 #8
0
ファイル: cool.py プロジェクト: LawrenceLeung/ReplicatorG
def writeOutput(fileName=''):
	'Cool a gcode linear move file.  Chain cool the gcode if it is not already cooled.'
	fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName)
	if fileName != '':
		skeinforge_craft.writeChainTextWithNounMessage(fileName, 'cool')
コード例 #9
0
ファイル: mill.py プロジェクト: greenarrow/skeinforgeGit
def writeOutput(fileName=''):
	"Mill a gcode linear move file."
	fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName)
	if fileName == '':
		return
	skeinforge_craft.writeChainTextWithNounMessage( fileName, 'mill')
コード例 #10
0
ファイル: speed.py プロジェクト: elmom/Skeinforge-Mirror
def writeOutput(fileName=""):
    "Speed a gcode linear move file."
    fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName)
    if fileName != "":
        skeinforge_craft.writeChainTextWithNounMessage(fileName, "speed")
コード例 #11
0
def writeOutput(fileName=''):
    "Fillet a gcode linear move file. Depending on the settings, either arcPoint, arcRadius, arcSegment, bevel or do nothing."
    fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(
        fileName)
    if fileName != '':
        skeinforge_craft.writeChainTextWithNounMessage(fileName, 'fillet')
コード例 #12
0
ファイル: altshell.py プロジェクト: Anoyomouse/ReplicatorG
def writeOutput( fileName = ''):
	"Alternate shell file."
	fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName)
	if fileName == '':
		return
	skeinforge_craft.writeChainTextWithNounMessage( fileName, 'altshell')
コード例 #13
0
ファイル: limit.py プロジェクト: folksjos/RepG
def writeOutput(fileName=''):
	'Limit a gcode file.'
	fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName)
	if fileName != '':
		skeinforge_craft.writeChainTextWithNounMessage( fileName, 'limit')
コード例 #14
0
def writeOutput(fileName=''):
    "Hop a gcode linear move file.  Chain hop the gcode if it is not already hopped. If no fileName is specified, hop the first unmodified gcode file in this folder."
    fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(
        fileName)
    if fileName != '':
        skeinforge_craft.writeChainTextWithNounMessage(fileName, 'hop')
コード例 #15
0
ファイル: home.py プロジェクト: greenarrow/skeinforgeGit
def writeOutput(fileName=''):
	"Home a gcode linear move file.  Chain home the gcode if it is not already homed. If no fileName is specified, home the first unmodified gcode file in this folder."
	fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName)
	if fileName != '':
		skeinforge_craft.writeChainTextWithNounMessage( fileName, 'home')
コード例 #16
0
ファイル: oozebane.py プロジェクト: folksjos/RepG
def writeOutput(fileName=''):
	"Oozebane a gcode linear move file."
	fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName)
	if fileName != '':
		skeinforge_craft.writeChainTextWithNounMessage( fileName, 'oozebane')
コード例 #17
0
ファイル: dimension.py プロジェクト: chriskyfung/MakerDroid
def writeOutput( fileName = '' ):
	"Dimension a gcode file."
	fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified( fileName )
	if fileName != '':
		skeinforge_craft.writeChainTextWithNounMessage( fileName, 'dimension' )
コード例 #18
0
ファイル: fillet.py プロジェクト: mccoyn/SkeinFactory
	def writeOutput( self, fileName = ''):
		"Fillet a gcode linear move file. Depending on the settings, either arcPoint, arcRadius, arcSegment, bevel or do nothing."
		fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName)
		if fileName != '':
			skeinforge_craft.writeChainTextWithNounMessage( fileName, 'fillet')
コード例 #19
0
ファイル: dimension.py プロジェクト: weeberp/MakerDroid
def writeOutput(fileName=''):
    "Dimension a gcode file."
    fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(
        fileName)
    if fileName != '':
        skeinforge_craft.writeChainTextWithNounMessage(fileName, 'dimension')
コード例 #20
0
ファイル: inset.py プロジェクト: LawrenceLeung/ReplicatorG
def writeOutput(fileName=''):
	"Inset the carving of a gcode file."
	fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName)
	if fileName != '':
		skeinforge_craft.writeChainTextWithNounMessage( fileName, 'inset')
コード例 #21
0
ファイル: whittle.py プロジェクト: mccoyn/SkeinFactory
	def writeOutput( self, fileName = ''):
		"Whittle the carving of a gcode file.  If no fileName is specified, whittle the first unmodified gcode file in this folder."
		fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName)
		if fileName == '':
			return
		skeinforge_craft.writeChainTextWithNounMessage( fileName, 'whittle')
コード例 #22
0
ファイル: unpause.py プロジェクト: weeberp/MakerDroid
def writeOutput(fileName=''):
    "Unpause a gcode linear move file."
    fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(
        fileName)
    if fileName != '':
        skeinforge_craft.writeChainTextWithNounMessage(fileName, 'unpause')
コード例 #23
0
ファイル: outset.py プロジェクト: folksjos/RepG
def writeOutput(fileName=''):
	"Outset the carving of a gcode file.  If no fileName is specified, outset the first unmodified gcode file in this folder."
	fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName)
	if fileName != '':
		skeinforge_craft.writeChainTextWithNounMessage( fileName, 'outset')
コード例 #24
0
def writeOutput(fileName=''):
    "Lift the carving of a gcode file."
    fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(
        fileName)
    if fileName != '':
        skeinforge_craft.writeChainTextWithNounMessage(fileName, 'lift')
コード例 #25
0
ファイル: cool.py プロジェクト: marrrry/ReplicatorG
def writeOutput(fileName=''):
    'Cool a gcode linear move file.  Chain cool the gcode if it is not already cooled.'
    fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(
        fileName)
    if fileName != '':
        skeinforge_craft.writeChainTextWithNounMessage(fileName, 'cool')