What is the best free source for generating g-code
Try using TinkerCAD!

I'm not advertising here - I have used TinkerCAD in the past for 3D printing.
TinkerCAD allows you to easily build and create simple shapes by the press of a button. (I assume this is what you mean by generation)

It is great for testing if your homebrew 3D printer works.

Link: https://www.tinkercad.com/