Why not a curved trajectory drawn box when we set timeline to curved?

I posted the code above the screenshot.

Just call Generate in the constructor