New issue 362 by d...@nakedscientists.com: Svg import issues with inkscape
svgs
http://code.google.com/p/heekscad/issues/detail?id=362
What steps will reproduce the problem?
1. Import the attached svg file which was made in inkscape
What is the expected output?
The design you get when opening it in another svg editor
What do you see instead?
The attached bad_import.png
What version of the product are you using? On what operating system?
I compiled the git repository about 2 days ago
Please provide any additional information below.
The problem appears to be with importing paths which don't bother to put in
the letter commands for every action, which svg.cpp assumes that they do.
In the svg spec is says that instead of writing
<path d="M -2.8571429,1052.3622 l 748.57143,1055.2193 l
745.71429,0.93361119 l -8.5714286,6.6478969 l -365.71429,535.21933 l
220,698.07647">
it is also valid to write
<path d="M -2.8571429,1052.3622 l 748.57143,1055.2193 745.71429,0.93361119
-8.5714286,6.6478969 -365.71429,535.21933 220,698.07647">
in fact inkscape just writes
<path d="M -2.8571429,1052.3622 748.57143,1055.2193 745.71429,0.93361119
-8.5714286,6.6478969 -365.71429,535.21933 220,698.07647">
so it seems that the default command is 'l'
I have edited svg.cpp, so it seems to work with my files, I also had to
change how it dealt with relative coordinates in cubics ('c') - the spec
says that all the coordinates in the command are relative to the previous
point, but the code assumed they were relative to one another.
I don't know if my code is right, but it seems to work.
cheers
Attachments:
Boat race CNC.svg 4.4 KB
bad_import.png 115 KB
svg.cpp 19.6 KB
svg.h 2.5 KB
svg.cpp.diff 4.5 KB
cool! thanks for the changes. we will check them out and push them to the
git repo.
Comment #2 on issue 362 by ddfalck2...@yahoo.com: Svg import issues with
inkscape svgs
http://code.google.com/p/heekscad/issues/detail?id=362
your changes have been merged with master on the git repo.
Thanks!