Convert matrix index to gcode
#39 Save GCode in file Convert a list of index to gcode string in an array
This commit is contained in:
@@ -29,6 +29,13 @@ class FileUtils:
|
||||
f.write('\n')
|
||||
f.close()
|
||||
|
||||
@staticmethod
|
||||
def saveStringListToFile(stringList, filePath):
|
||||
with open(filePath, 'w') as f:
|
||||
for line in stringList:
|
||||
f.write('%s\n' % line)
|
||||
f.close()
|
||||
|
||||
@staticmethod
|
||||
def getPixelSize(matHeight, matWidth, pcbHeight, pcbWidth, unit = 'mm'):
|
||||
if unit == 'mm':
|
||||
|
||||
@@ -11,4 +11,11 @@ def readIntFile(filePath):
|
||||
|
||||
completeFile.append(tempArray)
|
||||
|
||||
return completeFile
|
||||
return completeFile
|
||||
|
||||
def readStringFile(filePath):
|
||||
file = open(filePath, 'r')
|
||||
lines = file.readlines()
|
||||
file.close()
|
||||
|
||||
return lines
|
||||
Reference in New Issue
Block a user