Google for "3D printing" and you'll get heaps of info and producers.
I've been working with Stratasys machines. The software sliced a solid model in layers and every single layer was then created with - G code!
This was more than 10 years ago and it might have changed, but I think the software still translates the models into G-code but keeps it internally. The biggest challenge is to make a workable heater nozzle, and to get a plastic that works well. They usually have two nozzles, one for the primary plastic and one for supporting plastic that is shot where the primary plastic has no support (angled surfaces etc).
And BTW, as the machine creates the model in layers, there's no need for a fourth axis.