VisiCut icon indicating copy to clipboard operation
VisiCut copied to clipboard

Problem with CorelDrawX7 SVGs in Visicut

Open Graphicsamateur opened this issue 9 years ago • 13 comments

Hi Guys,

I have a problem with my SVGs from CorelDraw in VisiCut. Visicut doesnt recognize the object colours as it looks. Here are my screenshots. One is from CD and one to compare from InkScape where are for this easy project also no problems.

screenshot corel

screenshot inkscape

Do you have any idea how to fix that problem?

Best greets Alex

Graphicsamateur avatar Feb 15 '16 19:02 Graphicsamateur

Without the files themselves I can't help. Since github doesn't allow attaching SVG files, please open the SVG file in a text editor, copy the content to pastebin.com (or github gists etc.), and send the URL.

mgmax avatar Feb 15 '16 19:02 mgmax

Here is the file from CD

http://pastebin.com/h1kfkLdR

and InkScape if you need to compare

http://pastebin.com/DCJPp7nt

Thanks a lot

Graphicsamateur avatar Feb 15 '16 19:02 Graphicsamateur

It looks as if Corel Draw uses CSS in a Style element inside of the defs block instead of style attributes of groups. VisiCut uses SVGSalamander to interpret SVGs, which does not seem to support separate style blocks....

t-oster avatar Feb 15 '16 20:02 t-oster

...or I am not using it correct, this needs further investigation.

t-oster avatar Feb 15 '16 20:02 t-oster

So if you need any further information from my side, let me know!!???!? It would be really nice if there would be a solution for using the Corel files!

Graphicsamateur avatar Feb 16 '16 09:02 Graphicsamateur

Looks like the problem isn't especially easy to fix. As a workaround, you could try different export settings.

mgmax avatar Feb 16 '16 17:02 mgmax

I tried already some different options in the Corel export settings, but all bring the same problem. Unfortunately Corel works the best and least problematic with my graphic files. Maybe you can do something the next days to find out some solutions?

Graphicsamateur avatar Feb 16 '16 17:02 Graphicsamateur

What happens if you load your Corel SVG's into Inkscape and send them to Visicut using the plugin?

pelrun avatar Feb 18 '16 09:02 pelrun

Why do you need the separate colors at all? Maybe use can use groups/layers instead of colors to classify your lines? The problem is that VisiCut does not interpret the style completely like a CSS processor, but only uses the style information directly present in the nodes. Maybe there is also an export-setting for corel draw, which "inlines" the CSS. If anyone wants to work on this, the code here: https://github.com/t-oster/VisiCut/blob/develop/src/com/t_oster/visicut/model/graphicelements/svgsupport/SVGObject.java#L132 has to be changed to take the CSS definitions into account instead of just processing inline style attributes.

t-oster avatar Feb 18 '16 09:02 t-oster

Hello! That would be great if someone could change and fix that problem. Unfortunately I was unable to check something yesterday. I´ll try today something again with export options. But also I have to say that my Nickname here is no joke.

@pelrun I didn´t know about this way of using VisiCut via plugin. I´ll try also this later.

Thanks for now.

I´m still full of hope for any final solution.... :-)

Graphicsamateur avatar Feb 19 '16 05:02 Graphicsamateur

There is also development ongoing for a Corel plugin (not sure if X7 or X6) Still trying to push @gurkih to publish it

mgmax avatar Feb 19 '16 07:02 mgmax

In Corel X8, you can set something like "form options = display attributes" (don't know the exact translation, in german: "Formoptionen = Darstellungsattribute"). Then VisiCut can read the files. Maybe you want to try the exercise of writing a Corel extension (macro) which calls the export with this option?

mgmax avatar Apr 23 '17 15:04 mgmax

I've done a minimalistic python implementation fixing this issue in inksvg.py https://github.com/jnweiger/inkscape-thunderlaser/commit/dffee336bf84a4a1df056973ae61eb9944356060

Maybe a Java-Wizzzard would want to re-implement that for VisiCut? It is only 50 lines of code.

jnweiger avatar Dec 25 '17 22:12 jnweiger