Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 
Share Thread:
Reddit Facebook Twitter
SVG import more broken than before?
12-07-2016, 11:24 AM
Post: #10
RE: SVG import more broken than before?
Quote:Here is some background history on the svg import plugin. This is from the old forum...svg import plugin
Thank you helpful information.
The background history of svg import plugin, this is interesting.
Also,I tested saved SVG file by GIMPv2.9.5's path export(using Export path)
I could read it without any problems so far.

----------------------------------------------------------------------

By the way,I investigated how to convert to SVG<Path> element for shapes in Inkscape, AffinityDesigner and Illustrator.
Then,I could make the SVG file that contains <Path> element only, on each software.
However, an error still occurred when importing to Wings.

Illustrator and AffinityDesigner didn't separated by a space with SVG draw command and parameter figures .
For example Affinity Designer is export a following data.
Code:
<path d="M613.728,505.061L402.215,505.061L234.494,505.061L234.494,745.222L613.728,745.222​L613.728,505.061Z" style="fill:rgb(235,235,235);"/>

So fix add space after Import OK (Incidentally,Inkscape use spacing)
<path d="M 613.728,505.061 L 402.215,505.061 L 234.494,505.061 L 234.494,745.222 L 613.728,745.222 L 613.728,505.061 Z" style="fill:rgb(235,235,235);"/>


For example Illustrator SVG faild, I saw H/h and V/v command (Vertical and Horizontal lineto) in Illustrator SVG data.
Code:
<path style="fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;" d="M438,331l-6-40h-61v29l-36,4l-9,27c0,0-25-5-25-5
    c-0.975,23.391-0.942,49.771,30.546,48.16c9.048-0.463,16.905-7.56,25.447-7.358c11.493,0.271,10.497,11.405,17.669,15.825
    c5.188,3.198,13.446,5.61,13.236-4.566c12.177-1.655,24.871,10.787,37.933,10.905c1.367-12.196-5.331-11.096-8.678-19.224
    c-5.319-12.921,16.718-19.29,19.932-29.46C439.703,351.995,437.726,339.775,438,331z"/>

For example Inkscape SVG failed ,Because Wings3D SVG importer not support "A" and "a" (Elliptical Arc) commands in <Path> Element.
It appears when convert an ellipse to Path.
Code:
d="m 428.57143,340.93362 a 65.714287,82.85714 0 0 1 -65.71428,82.85714 65.714287,82.85714 0 0 1 -65.71429,-82.85714 65.714287,82.85714 0 0 1 65.71429,-82.85714 65.714287,82.85714 0 0 1 65.71428,82.85714 z"

We can see this in Wings3D log window
Quote:File Import Error Report:
{'EXIT',{badarg,[{erlang,list_to_float,["a.0"],[]},
{wpc_svg_path,string_to_float,1,
[{file,"wpc_svg_path.erl"},{line,214}]},.

See the information about all command for <Path> elements
https://developer.mozilla.org/en/docs/We...rial/Paths

The current SVG Import plugin does not enough support variations of command and parameter description even if it is limited to Path element.
I hope these information will be useful for debugging someone. Smile
Reply


Messages In This Thread
RE: SVG import more broken than before? - tkbd - 12-07-2016 11:24 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)