SGV Import error - bad lexical cast - Very simple SVG file

SGV Import error - bad lexical cast - Very simple SVG file

ignacioHR1
Contributor Contributor
1,114 Views
3 Replies
Message 1 of 4

SGV Import error - bad lexical cast - Very simple SVG file

ignacioHR1
Contributor
Contributor

Hello,

 

I recently created this small SVG in order to extrude it on a design. The SVG is really simple and renders OK in Safari and Chrome. The SVG contains just one path and text along the path. Units are in millimetres in order to fit the SVG inside the designed piece.

 

The errors I obtain are:

 

Error: bad lexical cast: source type value could not be interpreted as target
Error: The selected SVG file contains no information or some unsupported information. The Fusion sketch will not include unsupported geometry.

 

1) I can't find anything wrong in the SVG file so I don't think there is any lexical problem

2) I can understand Fusion 360 might not support some features of SVG so I'm sending this sample SVG so your development team would consider improving the error messages so we can better understand what features are not supported and find workarounds

 

Cheers

Ignacio

0 Likes
Accepted solutions (1)
1,115 Views
3 Replies
Replies (3)
Message 2 of 4

raycon2010
Contributor
Contributor
Accepted solution

I opened your SVG file in a text editor and InkScape.

The bad lexical cast looks to be in the style attribute.  I commented out the style attribute in the the snippet below.  The below snippet imports into Fusion 360 with no text on path -- pretty useless.

<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     version="1.1"
     width="55mm" height="51.631mm"
     viewBox="0 0 55 51.631">
    <!-- <defs> -->
    <!-- style="stroke:#600; fill:none"-->
        <path id="low" d="M11,25.8155 a16.5,16.5 0 0,0 33,0"  />
    <!-- </defs>-->
 
    <!--style="font-family: Arial Black;font-size: 9;letter-spacing: 2px;stroke: #000000;" -->
    <text font-family="Arial Black" font-size="9"  fill="black" text-anchor="middle" >
        <textPath xlink:href="#low" startOffset="50%">Volumen</textPath>
    </text>
   
</svg>

I don't think Fusion supports the <textPath> element. I used InkScape to edit your attached SVG.  Takes longer for InkScape to open than it does to convert Text Object (Volumen)  to Path elements. 

 

In InkScape. Select text apply Object to Path. This converts your textPath to individual Path elements.  Screen print of the SVG imported into Fusion 360.

 

 

SVG inserted into Fusion 360SVG inserted into Fusion 360

 

0 Likes
Message 3 of 4

ignacioHR1
Contributor
Contributor

Hello,

 

Thank you for your time on this topic. I'm going to accept your post as solution.

 

I've to add that I tried Inkscape on my Mac but since I updated to the latest version or due to the reason I've not my second screen plugged in, it does not starts (see screen capture).

InkscapeStartupError.jpg

 

Of course, Inkscake is out of the scope of Autodesk products and It would be nice if we can find alternatives to Inkscape as it is becoming more and more obsolete over time.

0 Likes
Message 4 of 4

g-andresen
Consultant
Consultant

Hi Ignacio

for such things, I now prefer gravit designer.

The application is free and has both an online and a download version available.

 

 

 

 

günther

0 Likes