Ghost Gcodetools products

Post about using Inkscape with cutters or plotters.
Micromet
Posts: 17
Joined: Tue Oct 13, 2015 12:26 am

Ghost Gcodetools products

Postby Micromet » Tue Oct 13, 2015 12:49 am

Hi - I'm new to both Inkscape and cnc machining. I'm been trying to get Inkscape and the Gcodetools extension to produce gcode for an engraved image. It all worked fine for the image of the dormouse (see attached image) and I've been able to engrave that successfully with my machine. But then, I returned to the image and tried to add some text around the edge. The text letters were created, sized and converted to path away from the dormouse image and then re-positioned next to the dormouse image. I have tried to combine the images as a group or just coupled by an enclosing box, I have tried simple moves, cut and paste with moves, copy with moves (and delete original), create the text on a separate layer, copy to top layer and delete the text layer, and even save the completed image to another filename in the hope that the errors would go away. But every time I do an engraving gcodetools procedure, the image is gcoded fine, the text I want is not, and I get residual, almost ghost gcode of text elsewhere that I didn't even target. Any ideas what is going wrong. The image attached shows the resultant gcodetools "return" after process on the left with the original image on the right.
Inkscape-error.png
Inkscape-error.png (27.05 KiB) Viewed 5919 times

Micromet
Posts: 17
Joined: Tue Oct 13, 2015 12:26 am

Re: Ghost Gcodetools products

Postby Micromet » Tue Oct 13, 2015 8:02 pm

Update on this problem: I went back to the origianl images and constructed the composite image (Dormouse + Text) in Libreoffice Impress, grouped them and exported to png. Then imported the complete image into inkscape and ran gcodetools. No problem - gcodetools did the conversion perfectly (checked by running linuxcnc to view the engraving 3D picture).

So I think the problem lies with the "history" of Inkscape that allows multiple "undo"'s, these must be maintained somewhere, even if not visible and somehow gcodetools is "seeing" these as well. If there is no solution within Inkscape - at least I will be aware of the problem in the future.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Ghost Gcodetools products

Postby brynn » Tue Oct 13, 2015 8:35 pm

If we could see the SVG file where the error is occuring, we could probably figure out where things are going wrong. There are certain un-un-do-able processes in Inkscape. It's probably not the problem here, but for example, once you convert anything to a path, it can't be converted back (text, for example).

Or if you know about XML, you could use the XML Editor and compare the code in the file where it works with the file where it doesn't work.

Wait....so you can run that extension and the CNC off of a PNG? Maybe that was the problem? Maybe the non-working file had part raster and part vector contents. I've always thought those type of programs need real vector paths to cut on...

Micromet
Posts: 17
Joined: Tue Oct 13, 2015 12:26 am

Re: Ghost Gcodetools products

Postby Micromet » Tue Oct 13, 2015 9:08 pm

Hi brynn,
Attached is the recalcitrant svg file that produced the above erroneous engraving code. I have little knowledge of xml except what it is. Regarding the png issue - it might have been a problem except that my successful route via LibreOffice Impress was to produce a png file which was then converted to path inside Inkscape. In my initial Inkscape effort that produced the wayward engraving code, the dormouse was imported into inkscape as a png - then bitmap traced; the separate O M G Text was Inkscape text which was then "object to path" converted.
Gcode conversion programs do generally need vector images for successful gcode production but there are many programs that successfully convert bitmap images (jpg, png, gif) to vector form for use with a number of gcode producing programs. Many follow the CAD-CAM-Gcode route with individual programs supplying each stage - the nice thing about Inkscape was the possibility of that entire route being within one program.
Attachments
OMG Dormouse-Text-v4.svg
(89.62 KiB) Downloaded 339 times

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Ghost Gcodetools products

Postby Moini » Wed Oct 14, 2015 12:59 am

I think that maybe the fact that the letters are groups with transforms applied to them might have caused the problem. (but it's just guessing!)
What happens if you ungroup them?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Ghost Gcodetools products

Postby tylerdurden » Wed Oct 14, 2015 1:11 am

I would probably keep an svg as a construction/edit file, and only use a copy of that file for gcode generation.

The gcode extension does heavy modification of the file which might not be reversible.

The "ghost" paths may be the original positions of the paths before transforms (move, rotate, scale) were applied. Inkscape can save the transforms as separate lines of code, or modify the cordinates of the path to "optimize" the svg code.

Again, I'd work on a SVG file for editing, and use a copy of that for gcode generation. Menu: Edit>Preferences>>Behavior>Transforms
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

Micromet
Posts: 17
Joined: Tue Oct 13, 2015 12:26 am

Re: Ghost Gcodetools products

Postby Micromet » Wed Oct 14, 2015 1:45 am

Thanks to all for the info regarding possible reasons for the "ghost" gcode images. When you say "use a copy" of the SVG file - how does that produce something different - unless I save it to a different format - perhaps dxf? A straight copy to a different-named SVG file (which I have done - see original question) will surely preserve all the current svg file parameters, transforms, history, etc. and the gcodetools will again just produce the ghost artefacts. In the original images above, as soon as I click on the "after gcoding" inkscape image, the image returns to its pristine condition- shown above on the right.

To Moini - yes I've tried both grouping the image via the menu and also just a mouse "select" grouping - and the product is the same. If you mean - create gcode for each individual item in the image i.e. the O, the M, the G, the dormouse, - its beginning to get a little more complicated than my ad-hoc solution via LibreOffice Impress - which does work.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Ghost Gcodetools products

Postby Moini » Wed Oct 14, 2015 4:06 am

I mean UNgrouping :) - Ctrl+U (or did you mistype?)

The letters are in groups. Each letter is a group of one single path.
Those groups have extra transformations applied - maybe those are not taken into account by your engraver / the file creation tool. If you ungroup the letters (just hit Ctrl+A, then Ctrl+U until there are no more groups in the selection, see status line at the bottom), then the transforms can be removed.

To get rid of transforms, in the Preferences: 'Behaviour -> Transforms -> Optimized' will be helpful.
This will throw away most transforms (but keep those on groups, as far as I understand).
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Micromet
Posts: 17
Joined: Tue Oct 13, 2015 12:26 am

Re: Ghost Gcodetools products

Postby Micromet » Wed Oct 14, 2015 8:48 pm

Hi Moini,
Your suggestions appeared to have done the trick - and perhaps I have an inkling of what is happening even if I don't know why. If you enclose an area and then "group" you appear to group all the transforms and artefacts as well (that bit I don't understand why). But selecting each individual image element additively (Shift left-click) into a group (the O, M G, dormouse images) and then running the gcodetools procedure - you only get gcode produced for the O, M, G, Dormouse images with no ghost artefact gcode.

It's certainly something that has taken a while to fully appreciate and deal with - at least I know what to do in the future - thanks very much.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Ghost Gcodetools products

Postby Moini » Thu Oct 15, 2015 12:20 am

:D - Great! (I don't think you need to group anything at all, though - it's probably safest to ungroup everything before exporting, because groups will retain transforms with these settings, while single paths will not. You can give absolute positions for each node in a path, but you can't do that for objects in a group (if I understand this correctly).)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Ghost Gcodetools products

Postby brynn » Thu Oct 15, 2015 4:11 am

When you say "use a copy" of the SVG file - how does that produce something different - unless I save it to a different format - perhaps dxf? A straight copy to a different-named SVG file (which I have done - see original question) will surely preserve all the current svg file parameters, transforms, history, etc. and the gcodetools will again just produce the ghost artefacts. In the original images above, as soon as I click on the "after gcoding" inkscape image, the image returns to its pristine condition- shown above on the right.


I can't speak for tylerdurden, but I might suggest the same thing, (especially if you later plan to save in a different file format) if only to make sure you have an editable copy on hand. Sometimes newbies will spend a lot of time learning how to use Inkscape and making their drawing, and then export to PNG, or save in another format (PDF, DXF, EPS, etc, etc) without also saving an SVG file. Especially for the PNG, they will not be able to edit it later, at all. For other formats, maybe they would be able to open in Inkscape and edit, but maybe not.

I don't know much about Gcodetools extensions. But from what I've learned here, it sounds like it only outputs what you need, and doesn't alter the drawing. ....although that could be a misinterpretation.... But still, better to save an SVG file, than delete it after the export...unless you know for certain you'll never need it in the future.

Anyway, I'm glad you solved the problem!


Return to “Inkscape & Cutters/Plotters”