Any way to nest existing G-Code jobs?
Any way to nest existing G-Code jobs?
(OP)
I'm not entirely sure if this is even possible, and the only lead I've heard thus far was not terribly promising, but I'd like to ask here to see if there is another option.
Background: We manufacture various sizes of simple custom circuitboards as a part of our business, using a router and small milling bits to etch isolation paths to create circuit traces, and drill out the holes. We previously had a small router that was specifically intended for this purpose, which used its own proprietary software. Unfortunately, its size was quite limited and it required constant babysitting to keep changing tools, so we purchased a large format CNC router that accepts standard G-Code, and it also features an automatic toolchanger.
Our in-house programming expert put together a script that converts our individual circuitboard files directly to G-Code, so we can now run jobs on this large router.
What I'm looking for: Something that can take multiple existing G-code jobs and nest them together so that we can batch a bunch of jobs at once. (Nesting in the circuitboard software takes longer than we'd like, as the software isn't really cut out to do very large boards, or nesting.)
It doesn't need to be terribly complex or snazzy, just something that can fit a bunch of G-code rectangles and their associated artwork into a predefined area, and be able to rotate them by 90° for a better fit.
So, is this something that exists in any fashion? The one lead I got said that doing something like this requires some manner of reverse-engineering software package that'd cost >$10k. I guess in my mind, it sounds like just a bunch of coordinate math - the 90° rotation functionality aside, it's just a matter of finding the size of the first job, and then taking the second job and move its origin by a certain amount, and quick sift through the text in its code to find and alter the coordinates by the necessary amount.
We'd just prefer to find and buy something now rather than have to spend the time and resources developing yet another piece of software in-house.
Thank you!
Background: We manufacture various sizes of simple custom circuitboards as a part of our business, using a router and small milling bits to etch isolation paths to create circuit traces, and drill out the holes. We previously had a small router that was specifically intended for this purpose, which used its own proprietary software. Unfortunately, its size was quite limited and it required constant babysitting to keep changing tools, so we purchased a large format CNC router that accepts standard G-Code, and it also features an automatic toolchanger.
Our in-house programming expert put together a script that converts our individual circuitboard files directly to G-Code, so we can now run jobs on this large router.
What I'm looking for: Something that can take multiple existing G-code jobs and nest them together so that we can batch a bunch of jobs at once. (Nesting in the circuitboard software takes longer than we'd like, as the software isn't really cut out to do very large boards, or nesting.)
It doesn't need to be terribly complex or snazzy, just something that can fit a bunch of G-code rectangles and their associated artwork into a predefined area, and be able to rotate them by 90° for a better fit.
So, is this something that exists in any fashion? The one lead I got said that doing something like this requires some manner of reverse-engineering software package that'd cost >$10k. I guess in my mind, it sounds like just a bunch of coordinate math - the 90° rotation functionality aside, it's just a matter of finding the size of the first job, and then taking the second job and move its origin by a certain amount, and quick sift through the text in its code to find and alter the coordinates by the necessary amount.
We'd just prefer to find and buy something now rather than have to spend the time and resources developing yet another piece of software in-house.
Thank you!





RE: Any way to nest existing G-Code jobs?
The canadian AXYS router has a proprietary post processor Called Toolpath that does just what you are asking.
I think what you are asking for is a nesting program.
B.E.
The good engineer does not need to memorize every formula; he just needs to know where he can find them when he needs them. Old professor
RE: Any way to nest existing G-Code jobs?
Link
I've looked around at various nesting programs out there, but any that I've seen will only import files such as DXF or 2D/3D models - none that I've seen can import G-code directly.
RE: Any way to nest existing G-Code jobs?
These are M/G codes specific for our machine so yours may differ but this basically starts at absolute 0,0 for one program then changes to absolute 5,0 for the next. In ours setting G52 makes the machine think that whatever X/Y we call out is the 0,0 point
Something like this
G52 X0.000 Y0.000
M98 P1000 (Call PCB Sub1)
G52 X5.000 Y0.000
M98 P1001 (Call PCB Sub2)
O1000 (PCB Program 1 Starts here)
Gcode here
O1001 (PCB Program 2 Starts here)
Gcode here
RE: Any way to nest existing G-Code jobs?
G52 X0.000 Y0.000
M98 P1000 (Call PCB Sub1)
G52 X5.000 Y0.000
M98 P1001 (Call PCB Sub2)
O1000 (PCB Program 1 Starts here)
Gcode here
M99 (End Sub 1)
O1001 (PCB Program 2 Starts here)
Gcode here
M99 (End Sub 2)
RE: Any way to nest existing G-Code jobs?
It might end up being simpler though - maybe a non-graphic "Nest Jobs" script.
Moving them isn't much trouble - we've already got the ability to stack boards, but no ability to rotate and manipulate them otherwise.
The tricky parts:
- Rotate 90°. Sure it's not as bad as arbitrary angle rotation, but it could be interesting, as we want to be able to route out arcs.
- Automatic and reasonably efficient nesting. We could always brute-force that though. Absolute worst-case might be figuring out how to fit 8 rectangles into a larger rectangle.
In any case, I was hoping that something was already on the market to nest and manipulate existing G-Code, but it looks like what's out there all starts with a DXF file, and generates G-Code from that. We may end up having to buckle down and write our own piece of software that'll do the offsets, nesting, and rotation.
However, I'll still gladly take recommendations for software that's available off-the-shelf.
RE: Any way to nest existing G-Code jobs?
http://www.jetcam.com/expert_aerospace.htm
B.E.
The good engineer does not need to memorize every formula; he just needs to know where he can find them when he needs them. Old professor
RE: Any way to nest existing G-Code jobs?
http://www.optinest.com/optirout.asp
I have used Optimation products for sheetmetal nesting with both Unigraphics and Pro/Engineer.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: Any way to nest existing G-Code jobs?
http://www
Software For Metalworking
http://closetolerancesoftware.com
RE: Any way to nest existing G-Code jobs?
NX 7.5
Teamcenter 8
RE: Any way to nest existing G-Code jobs?
I've been exploring some of the options here, and a few others.
One company has some of our G-Code files, and will get back to me as to what of their software might be a match.
Most of the rest have never seen an application quite like this one. (Admittedly, this application does appear to be rather unique, as well as our present solution.)
The price estimate I've been given from this one company is "Somewhere between $1,000 and $30,000. It depends on the files."
As an aside, I've seen and used software that directly manipulates Gerber files, and they strike me as being in the same genre as G-Code. Of course, I've also got no idea how much that software package costs.
RE: Any way to nest existing G-Code jobs?
Swapping over the dxf's would've been fast (enough) then.
With drilling tools etc, you would indeed lose a lot of information.
Would it be possible to make the nestings in the old software, and then coverting them to g-code?
More questions:
-Since you're switching from a manual tool change to an automatic tool changing machine, won't you have to 'recode' all of the tools anyway?
-Does your new software come with an option to automatically create the toolpaths?
-Even if both are G-code, aren't there brand/machine-specific differences in the code between the 2 machines?
NX 7.5
Teamcenter 8
RE: Any way to nest existing G-Code jobs?
- The switch from manual to automatic occurred as a result of a machine switch, from the old router to the new router. The new router is quite different from the old one - the old one used its own proprietary interface and conversion software.
Whereas G-code is all a bunch of nice plain-text files, the CAM files that the proprietary software creates show up (quite expectedly) as gibberish in a text editor.
- The scripting solution we use creates the toolpaths from the PCB editor software. It creates various masks around the traces, and creates toolpaths based on the entered diameters of available tooling.
- See first bullet. The old way we routed circuitboards is effectively its own separate system. We switched away from that because of the limitations on working area - the old had a working area of approximately 12x30". The new is 48x96".
RE: Any way to nest existing G-Code jobs?
Optinest is a nesting program which can also do what you want to do but it is pricey.
RE: Any way to nest existing G-Code jobs?
He's going to strip down the individual G-code jobs to get the perimeter rectangles, then have a GUI so the operator can import the day's batch of files, arrange the rectangles by drag-and-drop, rotate 90° as needed with a right-click, then click Output, which will generate the whole nested mess of code. That can then be run as a single job.
Once that's proven out, I'm sure that the next step after that will be automatic nesting.
RE: Any way to nest existing G-Code jobs?
http://www.optimalprograms.com/
RE: Any way to nest existing G-Code jobs?
Do know that, as far is I know, the only way to do this is iterative. I don't think any formula exists that will allow you to calculate this. The only other option is write out every possible solution and take the best one.
In laser-nesting programs, they usually start with the biggest items and then fit the smaller ones in between those. I guess this is your best bet.
NX 7.5
Teamcenter 8
RE: Any way to nest existing G-Code jobs?
I have a feeling that the interface will take more time than the nesting itself, possibly with the exception of 90°-rotation functionality.
I have a feeling we'll also go with a larger-to-smaller nesting sequence.
(And yes, these will be perfect rectangles. I can think of only 2 jobs in the past several years that required odd shapes.)
RE: Any way to nest existing G-Code jobs?
(very quick google search suggests G68, you should check your manual).
putting that one at the front, and the on that cancels it (google says g69) at the end of a job would fix your rotation problem.
Shouldn't be that hard to program.
NX 7.5
Teamcenter 8
RE: Any way to nest existing G-Code jobs?
Though I'd imagine that swapping out x for y coordinates shouldn't be too terribly horrific of a programming challenge.
Updates will arrive as the program progresses.
RE: Any way to nest existing G-Code jobs?
You'd also have trouble with any arc-like coding.
NX 7.5
Teamcenter 8
RE: Any way to nest existing G-Code jobs?
So we've nearly got our own in-house program that can take G-code jobs, rotate them 90° if needed, and nest them, along with snap-to-grid functionality. He's also working on automatic collision detection, if someone's trying to move the individual jobs around manually.
Basic tool and path optimization will come next.