SVGImport.wiki
changeset 1682 22a1cfe0eaf3
parent 1680 cec5c4d1cf78
equal deleted inserted replaced
1681:b41bffc4636e 1682:22a1cfe0eaf3
    37 8) If in step (6) you have stuff other than just moves in the format listed, you'll have to you'll want to convert if you want to try the crude script in (10) - otherwise a smarter script would be needed.  Here's some Vim commands to try and fix up the paths.
    37 8) If in step (6) you have stuff other than just moves in the format listed, you'll have to you'll want to convert if you want to try the crude script in (10) - otherwise a smarter script would be needed.  Here's some Vim commands to try and fix up the paths.
    38 {{{
    38 {{{
    39 :s/\(\d\) \(\d\)/\1 L\2/g
    39 :s/\(\d\) \(\d\)/\1 L\2/g
    40 :s/,/ /g
    40 :s/,/ /g
    41 :s/\(\d\+\) \(\d\+\) V/\1 \2 L\1/g
    41 :s/\(\d\+\) \(\d\+\) V/\1 \2 L\1/g
       
    42 :s/\(\d\+\) \(\d\+\) H/\1 \2 L\2/g
    42 :s/\([LM]\)\s*/\1/g
    43 :s/\([LM]\)\s*/\1/g
    43 }}}
    44 }}}
       
    45 Note... the V/H fix attempt is for vertical line, horizontal line which Inkscape started emitting recently in optimised mode.  Could try saving as plain SVG instead.  Also depending on how minor the lines are could try just stripping them.
    44 
    46 
    45 9) It is probably a good idea to remove duplicate points.  Here's a regex for that. 
    47 9) It is probably a good idea to remove duplicate points.  Here's a regex for that. 
    46 {{{ s/\(L\d\+ \d\+ \)\1/\1/g}}}  - you should run that a couple of times, then {{{s/M\(\d\+ \d\+ \)L\1/M\1/g}}}.  That just cuts down on a bit of redundancy.  If these regexes match anything, you probably should rerun them.
    48 {{{ s/\(L\d\+ \d\+ \)\1/\1/g}}}  - you should run that a couple of times, then {{{s/M\(\d\+ \d\+ \)L\1/M\1/g}}}.  That just cuts down on a bit of redundancy.  If these regexes match anything, you probably should rerun them.
    47 Since this page is a mass of hacks, here's one more redundancy reducer, in bash this time.
    49 Since this page is a mass of hacks, here's one more redundancy reducer, in bash this time.
    48 {{{
    50 {{{