Beispiel #1
0
def getWindowAnalyzeFileGivenText(fileName, gcodeText):
    "Write a commented gcode file for a gcode file."
    skein = CommentSkein()
    skein.parseGcode(gcodeText)
    gcodec.writeFileMessageEnd('_comment.gcode', fileName,
                               skein.output.getvalue(),
                               'The commented file is saved as ')
Beispiel #2
0
def analyzeFileGivenText( fileName, gcodeText, repository = None ):
	"Write statistics for a gcode file."
	print( '' )
	print( '' )
	print( 'Statistics are being generated for the file ' + gcodec.getSummarizedFileName( fileName ) )
	if repository == None:
		repository = settings.getReadRepository( StatisticRepository() )
	skein = StatisticSkein()
	statisticGcode = skein.getCraftedGcode( gcodeText, repository )
	if repository.printStatistics.value:
		print( statisticGcode )
	if repository.saveStatistics.value:
		gcodec.writeFileMessageEnd( '.txt', fileName, statisticGcode, 'The statistics file is saved as ' )
Beispiel #3
0
def getWindowAnalyzeFileGivenText(fileName, gcodeText):
	"Write a commented gcode file for a gcode file."
	skein = CommentSkein()
	skein.parseGcode(gcodeText)
	gcodec.writeFileMessageEnd('_comment.gcode', fileName, skein.output.getvalue(), 'The commented file is saved as ')