def writeOutput(fileName=''): "Alternate shell file." fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified( fileName) if fileName == '': return skeinforge_craft.writeChainTextWithNounMessage(fileName, 'altshell')
def writeOutput(fileName=''): "Chamber a gcode linear move file." fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified( fileName) if fileName == '': return skeinforge_craft.writeChainTextWithNounMessage(fileName, 'chamber')
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')
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()
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
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 ()
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
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')
def writeOutput(fileName=''): "Mill a gcode linear move file." fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName) if fileName == '': return skeinforge_craft.writeChainTextWithNounMessage( fileName, 'mill')
def writeOutput(fileName=""): "Speed a gcode linear move file." fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName) if fileName != "": skeinforge_craft.writeChainTextWithNounMessage(fileName, "speed")
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')
def writeOutput( fileName = ''): "Alternate shell file." fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName) if fileName == '': return skeinforge_craft.writeChainTextWithNounMessage( fileName, 'altshell')
def writeOutput(fileName=''): 'Limit a gcode file.' fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName) if fileName != '': skeinforge_craft.writeChainTextWithNounMessage( fileName, 'limit')
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')
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')
def writeOutput(fileName=''): "Oozebane a gcode linear move file." fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName) if fileName != '': skeinforge_craft.writeChainTextWithNounMessage( fileName, 'oozebane')
def writeOutput( fileName = '' ): "Dimension a gcode file." fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified( fileName ) if fileName != '': skeinforge_craft.writeChainTextWithNounMessage( fileName, 'dimension' )
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')
def writeOutput(fileName=''): "Dimension a gcode file." fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified( fileName) if fileName != '': skeinforge_craft.writeChainTextWithNounMessage(fileName, 'dimension')
def writeOutput(fileName=''): "Inset the carving of a gcode file." fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified(fileName) if fileName != '': skeinforge_craft.writeChainTextWithNounMessage( fileName, 'inset')
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')
def writeOutput(fileName=''): "Unpause a gcode linear move file." fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified( fileName) if fileName != '': skeinforge_craft.writeChainTextWithNounMessage(fileName, 'unpause')
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')
def writeOutput(fileName=''): "Lift the carving of a gcode file." fileName = fabmetheus_interpret.getFirstTranslatorFileNameUnmodified( fileName) if fileName != '': skeinforge_craft.writeChainTextWithNounMessage(fileName, 'lift')
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')