Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Inkscape SVG files problems
simone
Newbie
Posts: 14
Permalink
Post Inkscape SVG files problems
on: August 15, 2015, 23:07
Quote

Hi
I am having problems to load correctly svg files from inkscapes, basic geometries seem to work fine but if I add some text and make it into a path it loads weirdly in the controller as you can see in the image attached.

Also consider these 2 paths:

<path
id="path3017"
d="m 483.12041,710.40463 a 6.7950955,6.7950955 0 1 0 -13.59019,0 6.7950955,6.7950955 0 1 0 13.59019,0 z"/>

<path
id="path3019"
d="m 471.47072,726.33063 c 0,-3.75283 -2.78973,-6.54255 -6.54256,-6.54255 -3.75282,0 -6.79509,3.04226 -6.79509,6.79509 0,3.75283 3.04227,6.79509 6.79509,6.79509 3.75283,0 6.54256,-3.2948 6.54256,-7.04763 z" />

the first one will not draw, the second one will.

tx
Simone
Image

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Inkscape SVG files problems
on: August 16, 2015, 11:30
Quote

Hello, that's odd isn't it, it looks like all curves are getting thrown out. The letters with straight lines all come out ok, the ones with curves are missing entirely, or at least have parts of their curves missing.

It looks like the q command is being ignored, and I'd say the c as well, but when I draw a freehand shape using c, then it draws ok.

I can't say if this is a problem with the old version of geomerative I'm using, or something new in inkscape (I doubt it), or some stupidity in the controller (most likely). I'll try to get some time to troubleshoot this.

sn

simone
Newbie
Posts: 14
Permalink
Post Re: Inkscape SVG files problems
on: August 16, 2015, 16:27
Quote

It seems like it is not understanding the "a" element which represents an elliptical arc curve command and the "q" element, quadratic Bézier curve command.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Inkscape SVG files problems
on: August 16, 2015, 16:39
Quote

Your first example includes "a" and you said that worked ok though?

simone
Newbie
Posts: 14
Permalink
Post Re: Inkscape SVG files problems
on: August 16, 2015, 16:54
Quote

No, I said it did NOT work.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Inkscape SVG files problems
on: August 16, 2015, 16:56
Quote

Duh, of course you did 🙂 I misread!

simone
Newbie
Posts: 14
Permalink
Post Re: Inkscape SVG files problems
on: August 16, 2015, 16:56
Quote

Maybe that is due to the fact that standard Gcode does not understands bezier curves? As far as I can see only arcs are supported.
S.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Inkscape SVG files problems
on: August 16, 2015, 17:05
Quote

Don't think it's that, the g-code reading is limited to an import filter, internally a g-code file gets converted to a RShape right away. Any g-code limitations are forgotten. To load the SVG, I'm just using Geomerative's default RG.loadShape() method, and always have.

There _has_ been a level of redirection introduced when g-code reading was added. I'll investigate that. I also have a version of this controller running in Processing 2, with the new geomerative library, so will give that a go.

sn

simone
Newbie
Posts: 14
Permalink
Post Re: Inkscape SVG files problems
on: August 16, 2015, 20:20
Quote

There is a little trick to fix this problem:
-export the svg from inkscape as pdf
-new inkscape file and import the pdf
-resave a new svg file

in this way you get rid of these uncommon bezier curves and elipsis

S.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Inkscape SVG files problems
on: August 16, 2015, 20:36
Quote

Great spot Simone, what a pain though!

I wonder if there's an option to control what kind of curves to use when converting to paths. I can't see one, but I'm not an inkscape whizz either.

Just had a test with Processing 2 and the latest Geomerative, and it has the same problem. Either I've broken something in the code, or something's changed in the way that inkscape builds it's paths from text.

sn

simone
Newbie
Posts: 14
Permalink
Post Re: Inkscape SVG files problems
on: August 16, 2015, 22:39
Quote

SVG is a "standard" you know ..

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Inkscape SVG files problems
on: August 16, 2015, 22:45
Quote

Well yes .. that's what makes me think it's probably something I've done to break it in the controller.

simone
Newbie
Posts: 14
Permalink
Post Re: Inkscape SVG files problems
on: August 16, 2015, 23:05
Quote

Image

kongorilla
Pro
Posts: 362
Permalink
kongorilla
Post Re: Inkscape SVG files problems
on: August 20, 2015, 21:03
Quote

Something has changed in the way Inkscape converts text to paths. When I encountered this problem, I went back to an older, portable version of Inkscape (.48.4), and all the curves it created were imported into the controller. I did encounter a different problem with the paths from .48.4, though:

Image

(The paths from .48.4 look fine when loaded in .91, but resaving them from .91 doesn't fix the offset curve problem in the controller).

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Inkscape SVG files problems
on: August 20, 2015, 21:31
Quote

That's good news in a way - it means I haven't broken the controller. In that way, anyway. I've seen that problem before though, and I fixed with by ungrouping the objects and the "break apart" too.

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.062 seconds.