Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How about ChatGPT producing a suitable CNC program?

(I have no idea how feasible that is, I'm just curious.)



And you thought chatgpt was bad with subtle bugs in generated Python code. Now just imagine it scrapping a thirteen hour part or crashing a $300,000 machine.


I've never worked with a CNC. Wouldn't they typically have safeguards against machine-damaging instructions?


They might try, but it is hard to know which instructions will damage something. The machine might not not what the shape of the work piece inside of it is supposed to be, and if it doesn't know that, it might not know when one operation fails in a way that would now cause a later operation to incorrectly collide part of the machine with the work piece.

On stupider machines that are only 10s of thousands of dollars/euros/etc, you also have to be certain that what the machine expects for tool geometry matches reality (meaning that the correct tool was in the correct tool location, that the tool is mounted in the holder at just the right length, that the tool itself hasn't deformed, etc.

That said, I wouldn't bet against AI stuff potentially being good at generating tool paths in the future.

Sometimes I think that existing CNC stuff might be too dumb. Where is the lathe equivalent of auto-probing a 3d printer bed or using machine vision to monitor the print? Where is the mill equivalent of visual examining each part like a pick and place machine does? Why can't I put a piece of metal in a vise and just tell the mill to square of the ends? It could be that what I'm picturing is only stuff that casual users would be interested in, and thus there isn't sufficient money to develop it.


I'm surprised there's not closed loop control for feeds and speeds. Like, it seems relatively easy to tell when the tool is chattering, even a simple microphone and audio processing would probably give a decent signal that could then instruct the machine to slow the feed or take smaller bites.


There is, actually. Just not on all machines. Typically there is a current sensor and you can set some pretty tight tolerances on what is acceptable under cutting load. This also helps to detect worn out tooling (though normally you'd pre-program this in advance, but there are workpieces that are so large they'll wear out the tool in less than one pass).


Not a direct response, but: adaptive toolpath (included in CAM programs like Fusion360) will make feed paths that aim for constant load on the tool, whereas more naive toolpaths will go from almost no load to extremely high load. On my crappy CNC machine it made a big difference in time/effort/money/waste.


Re auto probing: it exists but usually not at your level because you rarely need that precision for the work you do. On top of this, it gets far more expensive because the levelling mechanism end up having a precision cost too.

Also let say that the use case are a bit different. a 3d printer is a far far far more controlled environment


The difference is simple, a 3d printer starts with nothing on the 'table' or platform and adds. It has 100% of the information of what is added, so in theory it's possible to know where any potential collisions are (this is not done in practice, and also doesn't account for adhesion print failures, etc, but it's possible).

A CNC starts with an unknown block on the table, held by an unknown workholding fixture, made of an unknown material. There just is not enough information to not crash into something unless programmed around it. Or just run way too fast and destroy tools.

In theory you could design sets of rules, but now you're having to add so much specificity to a design it's a big time waste. There's not really any meaningful entry level CNC machines, so if you can pay for the big machine... you kind of can pay for the expertise to not destroy the machine.


There are FDM processes that go back down in Z direction - like printing multiple units on the same build plate one at a time. And in those situations you do have to be careful not to crash the print head into an already printed part.


Most will print every copy at once, switching between them.

It also often works better because doing small parts can overheat the plastic. Moving between copies lets things cool down.


It can be useful for circumstances where you want to minimize (or even eliminate) retraction. I've done some cool prints in vase/spiralize mode with large nozzle sizes -- with zero seams, zero retractions, and zero moves over printed surfaces, you can get some really awesome looking prints.

But anyway it was just an example of a scenario where the slicer might not have enough information to know how to not crash the print head.


Almost noone does this, though. But, even then, you have all the information you need in theory because you're putting down the plastic.


FDM slicers usually don't have the information about the dimensions of the print head. Yes, it is a rarely used feature that is only supported by some slicers, but I just mention it as an illustration of the similar issue that exists with CNC machining.


What the machine knows:

(1) Where the head is. (2) If you program it right, where the end of the tool is. (3) If you program it right, what the width of the cutting edge of the tool is.

That's it. You could maybe prevent it from diving the tool into the table. But you won't prevent it from trying to take a 2" cut into D2 steel. Or going down into a pocket and crashing the tool holder into a section of the workpiece. Or going down into a pocket and rapid moving left, slamming the tool into the workpiece (which if you're lucky will just break the tool).


... And depending on whether it uses steppers or servos, it may only know where the head is relative to where it was last told its origin was.

... And, if it's using steppers, it only knows that much if it hasn't slipped/missed/lost a step.


Nope, not in my experience. They will happily ram themselves at full speed into your solid-block-of-steel workpiece if you tell them you (thereby probably causing tens of thousands of dollars in damage).


To some degree. But if you purposefully program in a toolstrike and ignore the warnings you'll get a toolstrike and depending on how beefy the tool/machine is the damage may well be considerable. Hold down clamps are a particularly good source of toolstrikes.


From my at a glance knowledge of the space, complex CNC setups can have NP path routing problems to go from a model to the actual job. So I wouldn’t be surprised if the tools are underdeveloped. You’re only selling a couple of these machines to very sophisticated operators after all. There isn’t the scale/market to justify much polish.


Usually not. Especially not in machines where you manually set the bits and the machine has no idea of the bit and it's properties, nor of the piece you are machining.


Terrifying amounts of no, not even a little.


SO BAD. It is NOT aware of G and M codes on a per machine basis and will create amazing crashes will full conviction that it will work.

Edit to add: E.g. it fully recommended that I use a G38 instead of g31 in a macro, which would on my machine would probably destroy my probe.


> crashes will full conviction that it will work

That 'full conviction' part is the kicker. I don't mind if an AI says "gee, this might work", or "maybe this?" But the confident idiocy is going to kill someone. I asked one what the best breed of dog was for a family with a child who had allergy problems and was sensitive to dander. It said a golden retriever was best, since they are hypoallergenic and don't ever shed, plus they're friendly and eager to please.


"confident idiocy" is exactly what is wrong with CGPT and other AIs. (and plenty of people)


I'm sure you could train it on a bunch of g code and get g code out but it wouldn't have any context for the specifically targeted CNC machine and would probably just gouge random holes in the bed with random tools




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: