def writeOutput(fileName, fileNamePenultimate, fileNameSuffix, filePenultimateWritten, gcodeText=''):
	'Write scalable vector graphics for a skeinforge gcode file, if activate synopsis is selected.'
	repository = settings.getReadRepository( SynopsisRepository() )
	if not repository.activateSynopsis.value:
		return
	gcodeText = archive.getTextIfEmpty( fileNameSuffix, gcodeText )
	getWindowAnalyzeFileGivenText( fileNameSuffix, gcodeText, repository )
def writeOutput( fileName, fileNameSuffix, gcodeText = ''):
	"Display a skeinlayered gcode file for a skeinforge gcode file, if 'Activate Skeinlayer' is selected."
	repository = settings.getReadRepository( SkeinlayerRepository() )
	if repository.activateSkeinlayer.value:
		gcodeText = archive.getTextIfEmpty( fileNameSuffix, gcodeText )
		window = getWindowAnalyzeFileGivenText( fileNameSuffix, gcodeText, repository )
		tableau.startMainLoopFromWindow(window)
Beispiel #3
0
def writeOutput( fileName, fileNameSuffix, gcodeText = ''):
	"Write scalable vector graphics for a skeinforge gcode file, if activate vectorwrite is selected."
	repository = settings.getReadRepository( VectorwriteRepository() )
	if not repository.activateVectorwrite.value:
		return
	gcodeText = archive.getTextIfEmpty( fileNameSuffix, gcodeText )
	getWindowAnalyzeFileGivenText( fileNameSuffix, gcodeText, repository )
Beispiel #4
0
def writeOutput(fileName,
                fileNamePenultimate,
                fileNameSuffix,
                filePenultimateWritten,
                gcodeText=''):
    "Analyze a gcode file."
    gcodeText = archive.getTextIfEmpty(fileName, gcodeText)
    pluginFileNames = getPluginFileNames()
    window = None
    for pluginFileName in pluginFileNames:
        analyzePluginsDirectoryPath = getPluginsDirectoryPath()
        pluginModule = archive.getModuleWithDirectoryPath(
            analyzePluginsDirectoryPath, pluginFileName)
        if pluginModule != None:
            try:
                newWindow = pluginModule.writeOutput(fileName,
                                                     fileNamePenultimate,
                                                     fileNameSuffix,
                                                     filePenultimateWritten,
                                                     gcodeText)
                if newWindow != None:
                    window = newWindow
            except:
                print('Warning, the tool %s could not analyze the output.' %
                      pluginFileName)
                print(
                    'Exception traceback in writeOutput in skeinforge_analyze:'
                )
                traceback.print_exc(file=sys.stdout)
    return window
Beispiel #5
0
def writeOutput(fileName, fileNamePenultimate, fileNameSuffix, filePenultimateWritten, gcodeText=''):
	'Write scalable vector graphics for a skeinforge gcode file, if activate synopsis is selected.'
	repository = settings.getReadRepository( SynopsisRepository() )
	if not repository.activateSynopsis.value:
		return
	gcodeText = archive.getTextIfEmpty( fileNameSuffix, gcodeText )
	getWindowAnalyzeFileGivenText( fileNameSuffix, gcodeText, repository )
Beispiel #6
0
def writeOutput(fileName, fileNameSuffix, gcodeText=''):
    "Display a skeinlayered gcode file for a skeinforge gcode file, if 'Activate Skeinlayer' is selected."
    repository = settings.getReadRepository(SkeinlayerRepository())
    if repository.activateSkeinlayer.value:
        gcodeText = archive.getTextIfEmpty(fileNameSuffix, gcodeText)
        return getWindowAnalyzeFileGivenText(fileNameSuffix, gcodeText,
                                             repository)
Beispiel #7
0
def writeOutput(fileName, fileNameSuffix, gcodeText=''):
    "Write scalable vector graphics for a skeinforge gcode file, if activate vectorwrite is selected."
    repository = settings.getReadRepository(VectorwriteRepository())
    if not repository.activateVectorwrite.value:
        return
    gcodeText = archive.getTextIfEmpty(fileNameSuffix, gcodeText)
    getWindowAnalyzeFileGivenText(fileNameSuffix, gcodeText, repository)
Beispiel #8
0
def writeOutput(fileName, fileNamePenultimate, fileNameSuffix, filePenultimateWritten, gcodeText=''):
	"Display a skeinlayered gcode file for a skeinforge gcode file, if 'Activate Skeinlayer' is selected."
	try:
		import Tkinter
	except:
		print('Warning, skeinlayer will do nothing because Tkinter is not installed.')
		return
	repository = settings.getReadRepository( SkeinlayerRepository() )
	if repository.activateSkeinlayer.value:
		gcodeText = archive.getTextIfEmpty( fileNameSuffix, gcodeText )
		return getWindowAnalyzeFileGivenText( fileNameSuffix, gcodeText, repository )
Beispiel #9
0
def writeOutput( fileName, fileNameSuffix, gcodeText = ''):
	"Analyze a gcode file."
	gcodeText = archive.getTextIfEmpty(fileName, gcodeText)
	pluginFileNames = getPluginFileNames()
	for pluginFileName in pluginFileNames:
		analyzePluginsDirectoryPath = getPluginsDirectoryPath()
		pluginModule = archive.getModuleWithDirectoryPath( analyzePluginsDirectoryPath, pluginFileName )
		if pluginModule != None:
			try:
				pluginModule.writeOutput( fileName, fileNameSuffix, gcodeText )
			except:
				print('Warning, the tool %s could not analyze the output.' % pluginFileName )
Beispiel #10
0
def getCraftedText(fileName, gcodeText="", repository=None):
    "Get carved text."
    if fileName.endswith(".svg"):
        gcodeText = archive.getTextIfEmpty(fileName, gcodeText)
        if gcodec.isProcedureDoneOrFileIsEmpty(gcodeText, "carve"):
            return gcodeText
    carving = svg_writer.getCarving(fileName)
    if carving is None:
        return ""
    if repository is None:
        repository = CarveRepository()
        settings.getReadRepository(repository)
    return CarveSkein().getCarvedSVG(carving, fileName, repository)
Beispiel #11
0
def getCraftedText(fileName, gcodeText='', repository=None):
    "Get carved text."
    if fileName.endswith('.svg'):
        gcodeText = archive.getTextIfEmpty(fileName, gcodeText)
        if gcodec.isProcedureDoneOrFileIsEmpty(gcodeText, 'carve'):
            return gcodeText
    carving = svg_writer.getCarving(fileName)
    if carving == None:
        return ''
    if repository == None:
        repository = CarveRepository()
        settings.getReadRepository(repository)
    return CarveSkein().getCarvedSVG(carving, fileName, repository)
def getCraftedText( fileName, gcodeText = '', repository=None):
	"Get cleaved text."
	if fileName.endswith('.svg'):
		gcodeText = archive.getTextIfEmpty(fileName, gcodeText)
		if gcodec.isProcedureDoneOrFileIsEmpty( gcodeText, 'cleave'):
			return gcodeText
	carving = svg_writer.getCarving(fileName)
	if carving == None:
		return ''
	if repository == None:
		repository = CleaveRepository()
		settings.getReadRepository(repository)
	return CleaveSkein().getCarvedSVG( carving, fileName, repository )
Beispiel #13
0
def writeOutput(fileName, fileNameSuffix, gcodeText=''):
    "Analyze a gcode file."
    gcodeText = archive.getTextIfEmpty(fileName, gcodeText)
    pluginFileNames = getPluginFileNames()
    for pluginFileName in pluginFileNames:
        analyzePluginsDirectoryPath = getPluginsDirectoryPath()
        pluginModule = archive.getModuleWithDirectoryPath(
            analyzePluginsDirectoryPath, pluginFileName)
        if pluginModule != None:
            try:
                pluginModule.writeOutput(fileName, fileNameSuffix, gcodeText)
            except:
                print('Warning, the tool %s could not analyze the output.' %
                      pluginFileName)
def writeOutput( fileName, fileNameSuffix, gcodeText = ''):
	"Analyze a gcode file."
	gcodeText = archive.getTextIfEmpty(fileName, gcodeText)
	pluginFileNames = getPluginFileNames()
	window = None
	for pluginFileName in pluginFileNames:
		analyzePluginsDirectoryPath = getPluginsDirectoryPath()
		pluginModule = archive.getModuleWithDirectoryPath( analyzePluginsDirectoryPath, pluginFileName )
		if pluginModule != None:
			try:
				newWindow = pluginModule.writeOutput( fileName, fileNameSuffix, gcodeText )
				if newWindow != None:
					window = newWindow
			except:
				print('Warning, the tool %s could not analyze the output.' % pluginFileName )
				print('Exception traceback in writeOutput in skeinforge_analyze:')
				traceback.print_exc(file=sys.stdout)
	return window
Beispiel #15
0
def getCraftedText(fileName, text='', repository=None):
    'Alteration a gcode linear move text.'
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text),
                                  repository)
Beispiel #16
0
def getCraftedText(fileName, text='', repository=None):
    "Temperature the file or text."
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text),
                                  repository)
Beispiel #17
0
def getCraftedText( fileName, gcodeText = '', repository=None):
	'Dimension a gcode file or text.'
	return getCraftedTextFromText( archive.getTextIfEmpty(fileName, gcodeText), repository )
Beispiel #18
0
def getCraftedText(fileName, text, reversalRepository=None):
    "Reversal a gcode linear move file or text."
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text),
                                  reversalRepository)
Beispiel #19
0
def getCraftedText(fileName, text, towerRepository=None):
    "Tower a gcode linear move file or text."
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text),
                                  towerRepository)
Beispiel #20
0
def getCraftedText(fileName, text='', flowRepository=None):
    "Flow the file or text."
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text),
                                  flowRepository)
Beispiel #21
0
def getCraftedText( fileName, text='', repository = None ):
	"Preface and convert an svg file or text."
	return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text), repository)
def getCraftedText(fileName, text='', repository=None):
	'Multiply the fill file or text.'
	return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text), repository)
Beispiel #23
0
def getCraftedText(fileName, text="", repository=None):
    "Skirt the fill file or text."
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text), repository)
Beispiel #24
0
def getCraftedText( fileName, text, lashRepository = None ):
	"Get a lashed gcode linear move text."
	return getCraftedTextFromText( archive.getTextIfEmpty(fileName, text), lashRepository )
Beispiel #25
0
def getCraftedText( fileName, text, jitterRepository = None ):
	'Jitter a gcode linear move text.'
	return getCraftedTextFromText( archive.getTextIfEmpty(fileName, text), jitterRepository )
Beispiel #26
0
def getCraftedText( fileName, text = '', repository = None ):
	"Outline the file or text."
	return getCraftedTextFromText( archive.getTextIfEmpty( fileName, text ), repository )
Beispiel #27
0
def getCraftedText( fileName, gcodeText, stretchRepository = None ):
	"Stretch a gcode linear move text."
	return getCraftedTextFromText( archive.getTextIfEmpty(fileName, gcodeText), stretchRepository )
Beispiel #28
0
def getCraftedText(fileName, text, jitterRepository=None):
    'Jitter a gcode linear move text.'
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text),
                                  jitterRepository)
Beispiel #29
0
def getCraftedText(fileName, text='', repository=None):
    'Skirt the fill file or text.'
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text),
                                  repository)
Beispiel #30
0
def getCraftedText(fileName, text, repository=None):
    "Comb a gcode linear move text."
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text),
                                  repository)
Beispiel #31
0
def getCraftedText( fileName, text='', whittleRepository = None ):
	"Whittle the preface file or text."
	return getCraftedTextFromText( archive.getTextIfEmpty(fileName, text), whittleRepository )
Beispiel #32
0
def getCraftedText(fileName, gcodeText='', repository=None):
    "Feed the file or text."
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, gcodeText),
                                  repository)
Beispiel #33
0
def getCraftedText(fileName, gcodeText, repository=None):
    "Fillet a gcode linear move file or text."
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, gcodeText),
                                  repository)
Beispiel #34
0
def getCraftedText( fileName, text='', repository=None ):
	"Alternate shell text."
	return getCraftedTextFromText( archive.getTextIfEmpty( fileName, text ), repository )
Beispiel #35
0
def getCraftedText( fileName, gcodeText = '', repository=None):
	'Dimension a gcode file or text.'
	return getCraftedTextFromText( archive.getTextIfEmpty(fileName, gcodeText), repository )
Beispiel #36
0
def getCraftedText(fileName, gcodeText, repository=None):
    'Dwindle a gcode linear move text.'
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, gcodeText),
                                  repository)
Beispiel #37
0
def getCraftedText(fileName, text, splodgeRepository=None):
    "Splodge a gcode linear move file or text."
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text),
                                  splodgeRepository)
Beispiel #38
0
def getCraftedText(fileName, gcodeText="", repository=None):
    "Coil the file or gcodeText."
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, gcodeText), repository)
Beispiel #39
0
def getCraftedText(fileName, text='', repository=None):
    "Widen the preface file or text."
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text),
                                  repository)
Beispiel #40
0
def getCraftedText(fileName, gcodeText='', repository=None):
    'Mill the file or gcodeText.'
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, gcodeText),
                                  repository)
Beispiel #41
0
def writeOutput( fileName, fileNameSuffix, gcodeText = ''):
	"Write a skeinisoed gcode file for a skeinforge gcode file, if 'Activate Skeiniso' is selected."
	repository = settings.getReadRepository( SkeinisoRepository() )
	if repository.activateSkeiniso.value:
		gcodeText = archive.getTextIfEmpty( fileNameSuffix, gcodeText )
		return getWindowAnalyzeFileGivenText( fileNameSuffix, gcodeText, repository )
Beispiel #42
0
def getCraftedText( fileName, gcodeText = '', repository=None):
	'Mill the file or gcodeText.'
	return getCraftedTextFromText( archive.getTextIfEmpty(fileName, gcodeText), repository )
Beispiel #43
0
def getCraftedText( fileName, text='', repository=None ):
	"Alternate shell text."
	return getCraftedTextFromText( archive.getTextIfEmpty( fileName, text ), repository )
Beispiel #44
0
def getCraftedText(fileName, text, lashRepository=None):
    "Get a lashed gcode linear move text."
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text),
                                  lashRepository)
Beispiel #45
0
def getCraftedText(fileName, gcodeText, stretchRepository=None):
    "Stretch a gcode linear move text."
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, gcodeText),
                                  stretchRepository)
Beispiel #46
0
def getCraftedText(fileName, svgText='', repository=None):
	"Scale and convert an svg file or svgText."
	return getCraftedTextFromText(fileName, archive.getTextIfEmpty(fileName, svgText), repository)
Beispiel #47
0
def getCraftedText(fileName, text='', multiplyRepository=None):
    "Multiply the fill file or text."
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text),
                                  multiplyRepository)
Beispiel #48
0
def getCraftedText( fileName, text, homeRepository = None ):
	"Home a gcode linear move file or text."
	return getCraftedTextFromText( archive.getTextIfEmpty( fileName, text ), homeRepository )
Beispiel #49
0
def getCraftedText( fileName, text = '', flowRepository = None ):
	"Flow the file or text."
	return getCraftedTextFromText( archive.getTextIfEmpty( fileName, text ), flowRepository )
Beispiel #50
0
def getCraftedText( fileName, text='', repository=None):
	"Inset the preface file or text."
	return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text), repository)
Beispiel #51
0
def getCraftedText(fileName, gcodeText, repository=None):
	'Joris a gcode linear move text.'
	return getCraftedTextFromText(archive.getTextIfEmpty(fileName, gcodeText), repository)
Beispiel #52
0
def getCraftedText(fileName, gcodeText='', repository=None):
	"""Feed the file or text."""
	return getCraftedTextFromText( archive.getTextIfEmpty( fileName, gcodeText ), repository )
Beispiel #53
0
def getCraftedText(fileName, text='', repository=None):
	'Alteration a gcode linear move text.'
	return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text), repository)
Beispiel #54
0
def getCraftedText(fileName, text, repository=None):
    "Comb a gcode linear move text."
    return getCraftedTextFromText(archive.getTextIfEmpty(fileName, text), repository)
Beispiel #55
0
def getCraftedText( fileName, gcodeText, repository = None ):
	"Fillet a gcode linear move file or text."
	return getCraftedTextFromText( archive.getTextIfEmpty( fileName, gcodeText ), repository )
Beispiel #56
0
def getCraftedText(fileName, svgText='', repository=None):
	"Scale and convert an svg file or svgText."
	return getCraftedTextFromText(fileName, archive.getTextIfEmpty(fileName, svgText), repository)
Beispiel #57
0
def getCraftedText(fileName, text='', repository=None):
	'Alteration a gcode linear move text.'
	preamble = '(generated from file ' + fileName + ' )\n'
	return preamble + getCraftedTextFromText(archive.getTextIfEmpty(fileName, text), repository)