コード例 #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 ')
コード例 #2
0
ファイル: statistic.py プロジェクト: weeberp/MakerDroid
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 ' )
コード例 #3
0
ファイル: comment.py プロジェクト: D1plo1d/ReplicatorG
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 ')