Author Topic: Moving imported nc-files  (Read 142 times)

Offline Tugge

  • Ewok
  • *
  • Posts: 8
    • View Profile
Moving imported nc-files
« on: May 18, 2020, 21:46:52 pm »
Hi,

Couldn't find any similar threads so I quess it is ok to start new.

Sometimes my workflow involves to stitch few different nc-files together. These files are generated with different softwares. I use cambam for stitching and laying out the final g-code. It would be really handy if I could move (or transform) the g-codes around. Now I need to stop the program and reposition the spindle between cuts.

I think that this would be quite simple thing to do with scripts (just add for x and Y) but im not familiar with the scripting environment. Also it would be logical to make the current Move-function to work with imported NC-files.

Also When I specify different mills for different nc-files, cambam doesn't add the tool change command between imported nc-files.

Im not sure it others would find this option handy, but atleast now I have asked.

Thank you for your support!
// Tomi Leinonen

Offline tau

  • Storm Trooper
  • ***
  • Posts: 131
    • View Profile
Re: Moving imported nc-files
« Reply #1 on: May 19, 2020, 09:22:53 am »
Tomi,

i think you might want to have a deeper look into G-Codes (without the necessity to use scripting). This can be done using G-Codes only:

https://www.cnccookbook.com/g54-g92-g52-work-offsets-cnc-g-code/
« Last Edit: May 19, 2020, 10:23:16 am by tau »

Offline Tugge

  • Ewok
  • *
  • Posts: 8
    • View Profile
Re: Moving imported nc-files
« Reply #2 on: May 19, 2020, 14:43:50 pm »
Yeah I know how to do it in g-code, but the feature I'm requesting is similar to move (ctrl + m) which works fine for texts etc. but not for the imported G-code.

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4331
    • View Profile
Re: Moving imported nc-files
« Reply #3 on: May 19, 2020, 17:10:21 pm »
You should probably right click on the imported nc file name in the left hand tree view of CamBam then choose, "Toolpaths to geometry", you can then move the geometry.

It's in the manual at the end of section "Machining Basics"
« Last Edit: May 19, 2020, 17:13:58 pm by EddyCurrent »
Made in England

Offline Tugge

  • Ewok
  • *
  • Posts: 8
    • View Profile
Re: Moving imported nc-files
« Reply #4 on: May 19, 2020, 19:46:02 pm »
I thought of that also, but in my nc-file there was more than 100 000 lines of code (height map of part of wall decoration), so it did create huge amount of geometries and moving them is not nice. And also If I make the G-code to geometries and then I recreate the g-code by using engrave mop, cambam might change the tool path optimizations etc. I didn't try it because all of these things.

But it was just an idea which could be probably implement quite easily by programmer who knows the syntax, but if others doesn't see this important, then it is not mandatory.

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2298
    • View Profile
Re: Moving imported nc-files
« Reply #5 on: May 20, 2020, 07:49:43 am »
CamBam is a CAM program and its primary purpose is to generate G-code as the final result. Using it as a job layout manager for foreign G-code is a very strange approach.
If I got right the idea I think it's best to use work coordinate offsets - G54, G55, etc. Set the machine job start positions accordingly and place a line of code activating the corresponding work offset at the beginning of the code block.

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4331
    • View Profile
Re: Moving imported nc-files
« Reply #6 on: May 20, 2020, 09:38:45 am »
You could also try the "Machining Origin" parameters under each "Part", it's in the manual section, "Machining (CAM) - > CAM Part"

Put each piece of g-code in it's own "Part" then try changing the X,Y origins of those Parts.
Made in England