You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
703 B
27 lines
703 B
8 months ago
|
from hpgl_multipen_output import HpglMultipenOutput
|
||
|
import subprocess
|
||
|
# from hpgl_output_adapted import HpglOutputAdapted
|
||
8 months ago
|
|
||
|
def svgToHPGL (path, speed=1, penCount=8, force=2):
|
||
8 months ago
|
|
||
|
subprocess.call(['inkscape',
|
||
|
'-f', path,
|
||
|
'--verb', 'EditSelectAll',
|
||
|
'--verb', 'ObjectToPath',
|
||
|
'--verb', 'FileSave',
|
||
|
'--verb', 'FileQuit' ])
|
||
|
|
||
|
e = HpglMultipenOutput()
|
||
8 months ago
|
e.affect([
|
||
8 months ago
|
'--orientation', '270',
|
||
8 months ago
|
'--force', '0',
|
||
|
'--overcut', '0',
|
||
|
'--precut', 'false',
|
||
8 months ago
|
'--flat', '8',
|
||
8 months ago
|
'--toolOffset', '0',
|
||
|
'--autoAlign', 'false',
|
||
|
'--speed', str(speed),
|
||
|
'--force', str(force),
|
||
|
path], False)
|
||
|
|
||
|
return e.hpgl
|