Commit b7c54cbb authored by gijs's avatar gijs

Scaling. Yet again

parent d2072e69
...@@ -16,10 +16,10 @@ marginleft = 30 # margin left in mm ...@@ -16,10 +16,10 @@ marginleft = 30 # margin left in mm
marginbottom = (271.75 / 3) # margin bottom in mm marginbottom = (271.75 / 3) # margin bottom in mm
page = { page = {
'left': marginleft * -40, 'left': int(marginleft * -40),
'right': (190 - marginleft) * 40, 'right': int((190 - marginleft) * 40),
'bottom': marginbottom * -40, 'bottom': int(marginbottom * -40),
'top': (271.75 - marginbottom) * 40 'top': int((271.75 - marginbottom) * 40)
} }
pen = 1 pen = 1
...@@ -59,7 +59,7 @@ def ploteps(): ...@@ -59,7 +59,7 @@ def ploteps():
textbox.insertText('{0} \n{1} \n\ntype.code, Maison du Livre, Bruxelles'.format(hpglfile, datetime.now().strftime("%d-%m-%Y %H:%M"))) textbox.insertText('{0} \n{1} \n\ntype.code, Maison du Livre, Bruxelles'.format(hpglfile, datetime.now().strftime("%d-%m-%Y %H:%M")))
hpgl = 'SC{0},{1},{2},{3};SP{4};FS{5};VS{6};PU;{7};PU;'.format(page['left'], page['right'], page['bottom'], page['top'], pen, force, speed, cleanhpgl) hpgl = 'RO90;IP0,0,7600,10870;SC{0},{1},{2},{3};SP{4};FS{5};VS{6};PU;{7};PU;'.format(page['left'], page['right'], page['bottom'], page['top'], pen, force, speed, cleanhpgl)
# hpgl += box((page['left'] + 200, page['bottom'] + 200), 200 * 40, 287 * 40) # hpgl += box((page['left'] + 200, page['bottom'] + 200), 200 * 40, 287 * 40)
hpgl += textbox.hpgl() hpgl += textbox.hpgl()
......
...@@ -25,7 +25,7 @@ while True: ...@@ -25,7 +25,7 @@ while True:
if plot: if plot:
try: try:
plotter.write('{};PG;'.format(str(plot['hpgl'].decode('utf-8')))) plotter.write('IN;{};PG;'.format(str(plot['hpgl'].decode('utf-8'))))
plotter._serial_port.flush() plotter._serial_port.flush()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment