Can you post it? Or a link to where you found it? And some samples of the curves you are trying to generate g-code from?
I don’t know if I can help, but there are others on this forum doing similar things. If you can provide more information you will probably get some help.