G-Code import (backplot) function (Solved)

Discussions around the CAM Add-On of QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Indicate the post processor used.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
Daniel4
Junior Member
Posts: 17
Joined: Sat Jan 30, 2021 5:34 pm
Location: Wisconsin

G-Code import (backplot) function (Solved)

Post by Daniel4 » Wed May 19, 2021 1:39 am

I love having the G-code import (backplot) function at such an affordable price. I use it all the time.
Would you consider an option to backplot NC files line by line? You could have forward/ backward buttons to navigate each line of code.

Just a thought.

Thank you.

Windows 10, 64 bit
QCad/Cam 3.26.2
Last edited by Daniel4 on Tue Dec 21, 2021 3:37 am, edited 1 time in total.

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: G-Code import (backplot) function

Post by CVH » Wed May 19, 2021 6:28 am

Hi,
Daniel4 wrote:
Wed May 19, 2021 1:39 am
You could have forward/ backward buttons to navigate each line of code.
Aren't they already inserted in order of appearance?

Navigation is then with the '<' and '>' key.
The order can be made visible with View .. Overlay .. Order (VO)

I know that the consecutive order of things in a drawing can be mixed up.
Doing a File Save .. Revert will fix that before the 'backplot'.
Remark here that after reverting the order of existing entities can be arbitrary.

Regards,
CVH

RobB
Full Member
Posts: 72
Joined: Sun May 26, 2019 4:02 pm
Location: Alpnach, Switzerland

Re: G-Code import (backplot) function

Post by RobB » Fri May 21, 2021 11:50 am

This is interesting. I recently spend a few hours to see how I could add G-code to my design.

I am trying to cut large plastic nuts with internal thread. The blank inside and the hexagonal outside are easily generated as two separate toolpaths in QCAD. I have a G-code routine that cuts internal thread of a specific form. However, if I import that with G-code import, I get an additional window (I guess an overlay) which remains blank.

How does this work? There is no real information in the manual, are there some documents in the web to read about it?

Thanks, Robert
Linux Mint 20 , qcadcam-3.24.3.10-pro-linux-x86_64

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: G-Code import (backplot) function

Post by CVH » Fri May 21, 2021 12:07 pm

@ RobB,
RobB wrote:
Fri May 21, 2021 11:50 am
I have a G-code routine that cuts internal thread of a specific form. However, if I import that with G-code import ...
A G-code macro or is the export in plain G-Code?
Can you post an example file?

Regards,
CVH

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: G-Code import (backplot) function

Post by andrew » Fri May 21, 2021 1:07 pm

There are thousands of G-Code dialects and QCAD/CAM can only import the most basic standard (G0, G1, G2, G3 moves with X/Y coordinates).

If you are familiar with regular expressions, G-Code import is configurable to a certain degree under:
Edit > Application Preferences > CAM > CAM Import

RobB
Full Member
Posts: 72
Joined: Sun May 26, 2019 4:02 pm
Location: Alpnach, Switzerland

Re: G-Code import (backplot) function

Post by RobB » Fri May 21, 2021 1:35 pm

Thanks for the answers. However, I am trying to understand on a more basic level what happens with imported G-code.
Did not try the actual code yet, which is plain linuxcnc anyway.

As a test I made a small file with:

G0 X0 Y0 Z5
G1 F1000
G1 X100 Y100
G1 X0 Y100
G1 X0 Y0
M30

When I import that, I get an additional QCAD Window which is empty. Does that contain the imported code anywhere, and can I see it?
I guess it should create an overlay, with the option to add it to the original design, or am I completely wrong here?

Regards; Robert
Linux Mint 20 , qcadcam-3.24.3.10-pro-linux-x86_64

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: G-Code import (backplot) function

Post by andrew » Fri May 21, 2021 1:43 pm

This example seems to import fine here. Perhaps an auto zoom helps?

The import is always into a new, empty document. You can then of course always copy / paste that into another drawing if desired.

RobB
Full Member
Posts: 72
Joined: Sun May 26, 2019 4:02 pm
Location: Alpnach, Switzerland

Re: G-Code import (backplot) function

Post by RobB » Fri May 21, 2021 2:05 pm

Thanks Andrew, yes that worked.
So in the new page, the G-code creates what looks like an object. Would I then add the object to the original drawing and regenerate a toolpath for that, or would I copy a toolpath generated from the 'object' directly into the toolpath list of the original drawing (if it is at all possible to copy toolpaths)?
I am not familiar with this process at all...

Regards, Robert
Linux Mint 20 , qcadcam-3.24.3.10-pro-linux-x86_64

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: G-Code import (backplot) function

Post by andrew » Fri May 21, 2021 2:11 pm

G-Code import is just a way to import geometry (lines, arcs) from G-Code. What you do with that imported geometry is of course entirely up to you.

You could for example create a new toolpath from it, yes.

RobB
Full Member
Posts: 72
Joined: Sun May 26, 2019 4:02 pm
Location: Alpnach, Switzerland

Re: G-Code import (backplot) function

Post by RobB » Fri May 21, 2021 2:35 pm

Thanks Andrew.
Linux Mint 20 , qcadcam-3.24.3.10-pro-linux-x86_64

Daniel4
Junior Member
Posts: 17
Joined: Sat Jan 30, 2021 5:34 pm
Location: Wisconsin

Re: G-Code import (backplot) function (Solved)

Post by Daniel4 » Tue Dec 21, 2021 3:39 am

Hello,
Looks like I forgot about this one. It is solved.
Thank you CVH! Both of your recommendations work well!

Navigation is then with the '<' and '>' key.
The order can be made visible with View .. Overlay .. Order (VO)

Thank you.

Post Reply

Return to “QCAD/CAM”