Universal Robots Forum

Using inkscape to generate g-code

I’m trying to use inkscape with the gcodetools-extenstion to generate G-code for an UR5e, running the “Remote TCP & Toolpath” URCap.
I want it to draw a drawing from an image.

Has anybody succeeded using gcodetools for this purpose? In polyscope I just get the error about Empty Toolpath in line 0.
I have tried with Inkscape, pyCam and jscut.org, but all of them make Polyscope throw the same error.

Dear Nicholas,

I am working on a project for my internship wich is also combined with a UR5e and they also want me to look for a program that uses G-codes to run the tool. Did you already find something which works? Or is there no chance its going to work?

I would love to hear something back!

Kind regards,

What I found out after looking at an example code is that the G-code file needs to have .nc extension, and it needs the % sign in top and bottom of the file.
Also, the G-codes need N-codes in front (which is like line numbering) with an incrementation of five.

I made this python-script to make valid G-codes:

path = input('Path: ')
file = open(path, 'r')
Lines = file.readlines()
n = 10

with open('mod_' + path, 'w') as file:
    for nbr, line in enumerate(Lines):
        if line[0] == 'G':
            line = 'N' + str(n) + ' '+ line
        if line[0] != "%":
            if nbr == 0:
                line = "%\n" + line
            elif nbr == len(Lines)-1:
                line = line + "%"

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.