I've found LLMs will reinvent the wheel in the form of doing manual things when a library already solves it well, and with all the bugs and edge cases that the library was originally created to solve. So you either had a simple enough case where it didn't matter, use a library, or have to iterate with the LLM until you've basically reproduced the original library in your own code.
Disclaimer: not a 3d-specific comment though, more of my general experience.