G-Code generator for helical and spur gears