Inkscape for G-Code creation

Inkscape related questions, tips and topics can be posted here
adbuch
6 Star Elite Contributing Member
6 Star Elite Contributing Member
Posts: 10135
Joined: Thu Sep 21, 2017 5:22 pm
Location: Tucson, Arizona
Contact:

Re: Inkscape for G-Code creation

Post by adbuch »

adbuch
6 Star Elite Contributing Member
6 Star Elite Contributing Member
Posts: 10135
Joined: Thu Sep 21, 2017 5:22 pm
Location: Tucson, Arizona
Contact:

Re: Inkscape for G-Code creation

Post by adbuch »

Creative25 - I just came across these Inkscape g-code videos and thought you might be interested.

David
Creative25
1.5 Star Member
1.5 Star Member
Posts: 27
Joined: Sat Oct 12, 2024 8:07 am

Re: Inkscape for G-Code creation

Post by Creative25 »

Thanks for all these videos.
Generating Gcode on Inkscape works for me. As long as I don’t use the prepare for plasma function.
But it is with adding lead ins where I don’t get it to work.

Question if you ar cutting arts with plasma do you add lead ins ?
weldguy
4.5 Star Elite Contributing Member
4.5 Star Elite Contributing Member
Posts: 2186
Joined: Fri Apr 17, 2009 11:48 am

Re: Inkscape for G-Code creation

Post by weldguy »

Lead ins are always a good thing to prevent the pierce spot on the edge of your finished part but I suppose on some art type stuff it would not really matter.
weldguy
4.5 Star Elite Contributing Member
4.5 Star Elite Contributing Member
Posts: 2186
Joined: Fri Apr 17, 2009 11:48 am

Re: Inkscape for G-Code creation

Post by weldguy »

Creative25 wrote: Sat Oct 19, 2024 2:17 pm I have been trying this. Somehow it creates the lead ins on the outside of the holes. How do I tell geode tools to cut on the inside?
I wonder if this is the case, and hopefully I can explain this where it makes sense.

Below we have what looks to be similar designs.

Objects.png

On the left we have 2 objects, a circle and a square, I would expect some software would see these as 2 individual objects and add a lead in to the outside of each not knowing we want the lead in on the inside of the circle.

On the right we have what looks like 2 objects, a circle and a square, however it is only 1 object because the circle has been trimmed our cut out of the square. It is still 2 cuts but the software will be able to determine that the circle on the inside is to be cut out of the square so the lead in would be placed on the inside of the circle.

Using Fills as I have done above in black will help you to distinguish whether or not the center interior objects have been cut out of the outer profile or not. If this was in wireframe you have no visual way of determining this.

This may not be your lead in issue but I have seen this before so its worth bringing up.
Creative25
1.5 Star Member
1.5 Star Member
Posts: 27
Joined: Sat Oct 12, 2024 8:07 am

Re: Inkscape for G-Code creation

Post by Creative25 »

I have been doing this with subtracting circles. I had some success at random.
But the weird thing it put a lead in on the inside of the square.

I just think if I import a dxf file from Freecad sketcher it is supposed to work without modifications.

I think for now I just use viaconstructor.
I can give Inkscape a try next time I do letters.
Creative25
1.5 Star Member
1.5 Star Member
Posts: 27
Joined: Sat Oct 12, 2024 8:07 am

Re: Inkscape for G-Code creation

Post by Creative25 »

Creative25 wrote: Tue Oct 22, 2024 12:46 am Thanks.
There is a custom postprocessor on the linixcnc forum.
Strange that it is not provided by Fusion 360.
I will post agai about how it works.

https://forum.linuxcnc.org/plasmac/3843 ... ors#159042
Unfortunately Fusion 360
Is a bit disappointing for me.
I can create Gcode without an Internet connection.

But I can not open my project witoit an Internet connection.
I like how much control you have for creating Gcode.

Unfortunately the Postprocessor for plasmac is experimental as stated by the person who created it says.
The geode I got is giving me lots of errors.
Looks like it still needs a lot of work.

However Fusion 360 has a native post processor that creates Gcode for routers on linuxcnc.
adbuch
6 Star Elite Contributing Member
6 Star Elite Contributing Member
Posts: 10135
Joined: Thu Sep 21, 2017 5:22 pm
Location: Tucson, Arizona
Contact:

Re: Inkscape for G-Code creation

Post by adbuch »

weldguy wrote: Tue Oct 22, 2024 10:18 am Lead ins are always a good thing to prevent the pierce spot on the edge of your finished part but I suppose on some art type stuff it would not really matter.
In this case, if the lead-ins are on the wrong side the cut path is also on the wrong side - so it is cutting going the wrong direction and to the incorrect size for the finished part. I have tried a circle in a square as both discrete paths and as a single differenced object and had the same result. The closest I had to success was using Inkscape 0.92 - the lead-ins and lead-outs are on the correct side, but it is still cutting in the wrong direction for the inner circle.

David
Last edited by adbuch on Tue Oct 22, 2024 4:42 pm, edited 2 times in total.
adbuch
6 Star Elite Contributing Member
6 Star Elite Contributing Member
Posts: 10135
Joined: Thu Sep 21, 2017 5:22 pm
Location: Tucson, Arizona
Contact:

Re: Inkscape for G-Code creation

Post by adbuch »

weldguy wrote: Tue Oct 22, 2024 10:32 am
Creative25 wrote: Sat Oct 19, 2024 2:17 pm I have been trying this. Somehow it creates the lead ins on the outside of the holes. How do I tell geode tools to cut on the inside?
I wonder if this is the case, and hopefully I can explain this where it makes sense.

Below we have what looks to be similar designs.


Objects.png


On the left we have 2 objects, a circle and a square, I would expect some software would see these as 2 individual objects and add a lead in to the outside of each not knowing we want the lead in on the inside of the circle.

On the right we have what looks like 2 objects, a circle and a square, however it is only 1 object because the circle has been trimmed our cut out of the square. It is still 2 cuts but the software will be able to determine that the circle on the inside is to be cut out of the square so the lead in would be placed on the inside of the circle.

Using Fills as I have done above in black will help you to distinguish whether or not the center interior objects have been cut out of the outer profile or not. If this was in wireframe you have no visual way of determining this.

This may not be your lead in issue but I have seen this before so its worth bringing up.
I have tried to generate the g-code using Inkscape (Creative25's file) and had the same problem. Apparently the current Inkscape g-code extension has problems and does not work the same as the one I used in an older Inkscape version when I first posted this demo.

David
Creative25
1.5 Star Member
1.5 Star Member
Posts: 27
Joined: Sat Oct 12, 2024 8:07 am

Re: Inkscape for G-Code creation

Post by Creative25 »

I just had some success.
I exported the file from Freecad to svg instead of dxf.
Then I ungrouped the shape.
Then Shape to path.

Then I reversed the direction of the inside paths.

Now the circles have correct lead ins.
However the rectangular shapes don’t get any useful lead ins regardless of path direction.
IMG_0540.jpeg
Attachments
IMG_0541.jpeg
adbuch
6 Star Elite Contributing Member
6 Star Elite Contributing Member
Posts: 10135
Joined: Thu Sep 21, 2017 5:22 pm
Location: Tucson, Arizona
Contact:

Re: Inkscape for G-Code creation

Post by adbuch »

Happy to hear you are making some progress. Please keep us informed as you go.
Thanks,
David
Creative25
1.5 Star Member
1.5 Star Member
Posts: 27
Joined: Sat Oct 12, 2024 8:07 am

Re: Inkscape for G-Code creation

Post by Creative25 »

So I finally got it to work.
Looks like development stopped around 2021

Ungroup
Select outer path
Fill with Color
Send to back
Do A difference with all closed inside shape.
Object to path

Ad nodes to internal rectangular shapes for a start point.
Break Path in those nodes.

Select the outside path.

And press prepare for plasma. (Make sure replace Original path is ticked)

Now all the lead ins are correct

Now press path reverse (I don’t Know why that is needed)

Select All paths

Press path to Gcode.

That’s it.”

I have tested the code with CAMotics and it looks ok

The Gcode Plugin still works but I find it quite Complicated.
The advantage you have with it it gives you control over each lead in as you see fit.


I rather use viaconstructor:
There I just have to select the places where I need a lead in. That is much easier.
Much less time consuming.
Creative25
1.5 Star Member
1.5 Star Member
Posts: 27
Joined: Sat Oct 12, 2024 8:07 am

Re: Inkscape for G-Code creation

Post by Creative25 »

IMG_0546.jpeg
adbuch
6 Star Elite Contributing Member
6 Star Elite Contributing Member
Posts: 10135
Joined: Thu Sep 21, 2017 5:22 pm
Location: Tucson, Arizona
Contact:

Re: Inkscape for G-Code creation

Post by adbuch »

I'm happy to hear you have had more success! Those are a lot of steps just to create cut paths from a drawing. A few years ago using an older Inkscape version - I had no problems using Inkscape to create g-code as I showed in my previous examples. Now apparently things have changed with either how Inkscape interfaces with the g-code extension - or perhaps the actual g-code extension has changed. I did recently have some success using an older Inkscape version - as I showed above. The only problem was that the cut path for my circle was going the wrong direction. I think that could possibly be corrected using the reverse path tool you mentioned.

Thanks for your efforts!

David
Creative25
1.5 Star Member
1.5 Star Member
Posts: 27
Joined: Sat Oct 12, 2024 8:07 am

Re: Inkscape for G-Code creation

Post by Creative25 »

If you create a design on Inkscape it’s a lot easier.
Because most of these steps happen during the design.

Only extra steps are adding the nodes and break the path
In rectangular shapes. Then after preparing for plasma reverse all paths.

I would say it is not very useful for creating Gcode from things you design on other programs.
adbuch
6 Star Elite Contributing Member
6 Star Elite Contributing Member
Posts: 10135
Joined: Thu Sep 21, 2017 5:22 pm
Location: Tucson, Arizona
Contact:

Re: Inkscape for G-Code creation

Post by adbuch »

Creative25 - which Inkscape version are you using?
Thanks,
David
adbuch
6 Star Elite Contributing Member
6 Star Elite Contributing Member
Posts: 10135
Joined: Thu Sep 21, 2017 5:22 pm
Location: Tucson, Arizona
Contact:

Re: Inkscape for G-Code creation

Post by adbuch »

I am using Inkscape version 1.2.2 and your tip about using the Path Reverse worked out well. I did a simple test using a rectangle with a hole in the center. I did not combine them and I did not "Path, Difference" them. I did break both paths and add lead-ins as the simulator is not showing my lead-ins for this particular file - although it does show them for some files I have done in the past.

David
Inkscape gcode test plate with hole.svg
(19.5 KiB) Downloaded 12 times
Inkscape gcode test plate with hole.svg
(19.5 KiB) Downloaded 12 times
Inkscape g-code test 1.jpg
https://ncviewer.com/
Inkscape g-code test 2.jpg
adbuch
6 Star Elite Contributing Member
6 Star Elite Contributing Member
Posts: 10135
Joined: Thu Sep 21, 2017 5:22 pm
Location: Tucson, Arizona
Contact:

Re: Inkscape for G-Code creation

Post by adbuch »

Inkscape g-code test 3.jpg
Inkscape g-code test 4.jpg
adbuch
6 Star Elite Contributing Member
6 Star Elite Contributing Member
Posts: 10135
Joined: Thu Sep 21, 2017 5:22 pm
Location: Tucson, Arizona
Contact:

Re: Inkscape for G-Code creation

Post by adbuch »

Candle is another useful g-code visualizer. This is the program I use to send g-code to the GRBL Arduino that runs my diy cnc router/engraver table.

David

https://github.com/Denvi/Candle?tab=readme-ov-file
Inkscape g-code test 6.jpg
Inkscape g-code test 5.jpg
adbuch
6 Star Elite Contributing Member
6 Star Elite Contributing Member
Posts: 10135
Joined: Thu Sep 21, 2017 5:22 pm
Location: Tucson, Arizona
Contact:

Re: Inkscape for G-Code creation

Post by adbuch »

This is the Inkscape g-code example that I first posted at this thread about 2 years ago. The cut path direction looks correct in the Inkscape preview for the holes, but is going the wrong way for the outer perimeter. In the g-code simulation I did at the time, the path direction for the holes was the wrong direction - but the outer perimeter path direction was correct.
Inkscape g-code test 8.jpg
Inkscape g-code 9.jpg
Now that I look at it again, I see that if I would have used the "Path, Reverse" tool on the holes before creating the g-code - all of the cut path directions would have most likely been correct.
Inkscape g-code test 7.jpg
So Creative25 - thanks for your valuable tip on using "Path, Reverse" for the inner features.

David
Creative25
1.5 Star Member
1.5 Star Member
Posts: 27
Joined: Sat Oct 12, 2024 8:07 am

Re: Inkscape for G-Code creation

Post by Creative25 »

adbuch wrote: Mon Oct 28, 2024 2:05 am Creative25 - which Inkscape version are you using?
Thanks,
David
I use version 1.3.2

Another useful trick to make it to cut the outer path last is to go to.

Object
Lower to bottom.

I got that all from the link you posted about the Gcodetools thread. Looks like there are no new posts but it has lots of useful info.
Post Reply

Return to “Inkscape”