Browse Source

Add some notes

master
Adam Goldsmith 4 years ago
parent
commit
57fbc2997f
  1. 9
      HPGLWrap.py

9
HPGLWrap.py

@ -4,6 +4,12 @@ import os
import re
import sys
# Based off of notes from
# https://github.com/fellesverkstedet/gcc-laserpro-driver
# and http://www.wiki.cl.cam.ac.uk/rowiki/CompArch/HardwareLab/LaserCutter
# and src/core/path_gcc.c from
# https://github.com/fellesverkstedet/fabmodules
def write_pen_values(values, char):
return "!v64" + char + "".join(["{:04d}".format(value) for value in values])
@ -32,7 +38,7 @@ def pre_content(filename, power, speed, rate, pen_settings):
# Select first (and only) pen (commented out in original source)
# outString += "!v1D"
# outString += "!m2A" # might cause autofocus?
# outString += "!m2A" # triggers autofocus
# Use same value for all 16 pens
# doesn't seem to affect vector settings
@ -52,6 +58,7 @@ def set_vector_pens(content, pen_settings):
power=pen_settings['power'][num],
speed=pen_settings['speed'][num],
penNum=num+1) for num in range(0, 16)])
# TODO: find out why slow movement in PU (pen up) until first PD (pen down)
content = re.sub(
"FS\d{1,4};VS\d{1,4};SP1;",
settings + "SP1;",

Loading…
Cancel
Save