News for hackers. Stuff that matters.
Re:CNC milling with open source software by grawprog on Friday January 18, 2019 @12:54PM (#18941185)
The g-code variant my machines use contains most of the control structures of modern programming languages. It has variables, comparisons, loops, subroutines, the codes are all fairly straight forward and honestly a lot of g-code is produced automatically with CAM software rather than being written manually these days.

It's a simple language, you don't have to memorize the codes and you end up memorizing the few you use most often anyway.

Honestly the actual math and figuring out the toolpaths for your machine ia far harder than writing the g-code for it.

Re:CNC milling with open source software by onmai-xyz on Saturday January 19, 2019 @12:42PM (#18948121)
Have you been able to arrive at any clear repeatable structure in your macro programming, or is it just ad-hoc make it fit for this job and this machine?

Asking, because I am trying to level up cnc programming to "normal" programming.

Re:CNC milling with open source software by grawprog on Tuesday January 22, 2019 @06:24PM (#18973859)
Not so much no. About the closest i come is reusing the same program for pieces that are identical. This rarely happens.

The cam software i use does come with a few handy baked in things. Stuff like automatically lowering the feedrate for corners under a certain radius or for setting up z-level ramps.

There's a couple i can think of being handy. Functions for automatically decreasing feedrates at certain axis loads or horsepowers would be nice.

I think it would come down to something more like a handy library of functions for little things like that rather than anything really repeatable. Even that would likely be specific to whatever machine you use though.