|
@ -1,14 +1,23 @@ |
|
|
# from hpgl_multipen_output import HpglMultipenOutput |
|
|
from hpgl_multipen_output import HpglMultipenOutput |
|
|
from hpgl_output_adapted import HpglOutputAdapted |
|
|
import subprocess |
|
|
|
|
|
# from hpgl_output_adapted import HpglOutputAdapted |
|
|
|
|
|
|
|
|
def svgToHPGL (path, speed=1, penCount=8, force=2): |
|
|
def svgToHPGL (path, speed=1, penCount=8, force=2): |
|
|
e = HpglOutputAdapted() |
|
|
|
|
|
|
|
|
subprocess.call(['inkscape', |
|
|
|
|
|
'-f', path, |
|
|
|
|
|
'--verb', 'EditSelectAll', |
|
|
|
|
|
'--verb', 'ObjectToPath', |
|
|
|
|
|
'--verb', 'FileSave', |
|
|
|
|
|
'--verb', 'FileQuit' ]) |
|
|
|
|
|
|
|
|
|
|
|
e = HpglMultipenOutput() |
|
|
e.affect([ |
|
|
e.affect([ |
|
|
'--orientation', '0', |
|
|
'--orientation', '270', |
|
|
'--force', '0', |
|
|
'--force', '0', |
|
|
'--overcut', '0', |
|
|
'--overcut', '0', |
|
|
'--precut', 'false', |
|
|
'--precut', 'false', |
|
|
'--flat', '4', |
|
|
'--flat', '8', |
|
|
'--toolOffset', '0', |
|
|
'--toolOffset', '0', |
|
|
'--autoAlign', 'false', |
|
|
'--autoAlign', 'false', |
|
|
'--speed', str(speed), |
|
|
'--speed', str(speed), |
|
|