pywavefront / PyWavefront

Python library for importing Wavefront .obj files
BSD 3-Clause "New" or "Revised" License
312 stars 80 forks source link

Save Wavefront? #128

Closed MrBenGriffin closed 3 years ago

MrBenGriffin commented 3 years ago

I was hoping to use PyWavefront to lint wavefront files, but I couldn't find a file save option. Am I missing something?

Also, it would be excellent to allow exporting an internal model to wavefront.

einarf commented 3 years ago

I suspect trimesh is better for this: https://github.com/mikedh/trimesh

MrBenGriffin commented 3 years ago

Well, I don't always want to store triangular meshes. I have (coplanar) polygons, and the wavefront format supports that.

MrBenGriffin commented 3 years ago

However, you are probably right - I should really be using glTF.

einarf commented 3 years ago

Yes. wavefront is such an obscure format in 2021. This library was mainly created to load all kinds of obscure versions of wavefront files as a single library without any dependecies. There are plans for a 2.0 version having more features like you describe. The main goal was to load obj files and prepare triangulated data.

You can of course poke around in the internal data and do almost anything : https://github.com/pywavefront/PyWavefront/issues/87#issuecomment-464348971

einarf commented 3 years ago

Ups. closed it.

einarf commented 3 years ago

Also people use this library for the binary cache : https://github.com/pywavefront/PyWavefront#binary-cache

When working with large models it can sometimes take minute(s) to load with pure python.

einarf commented 3 years ago

Closing this for now.