cnr-isti-vclab / meshlab

The open source mesh processing system
http://www.meshlab.net
GNU General Public License v3.0
4.72k stars 822 forks source link

3MF format import export support #1032

Open caniko opened 3 years ago

caniko commented 3 years ago

https://github.com/3MFConsortium/spec_core/blob/master/3MF%20Core%20Specification.md

ok1ok1 commented 2 years ago

3mf is quickly becoming the preferred format for 3D printed models. I hope support is added soon.

xtemp09 commented 1 year ago

AMF support also would be good.

donjan commented 1 year ago

Real world user feedback: I enjoyed using MeshLab for quickly checking on models due to it's super fast startup, snappiness and good UX. But in the last few months I've been exporting all my models to 3MF instead of STL, and I'm receiving mainly 3MF, so it's dropped out of my use.

thekorsen commented 7 months ago

Just ran into the lack of 3mf support as a pain point. Its my preferred format due to the smaller file size for high resolution complex models, and the lack of support for it will make me look to other mesh decimating software tools.

alemuntoni commented 2 months ago

@lvk88 does your implementation of 3mf importer/exporter work? Is it ready for a pull request?

lvk88 commented 2 months ago

Hey @alemuntoni , yes, I started working on 3mf import export last year and the export functionality is already working. Import is not ready unfortunately. I will try to get it running in the second half of August, I happen to have a couple of days there where I can tinker around with it. I can't promise anything, though.

Edit: are you planning a release in the upcoming times? Would be nice if the feature could be included there :)

lvk88 commented 1 month ago

Hey @alemuntoni , I am finished with a minimum working version, and opened a PR. 3MF import and export is now working as follows:

I tested these functions on Ubuntu 22.04 + GCC12 and Windows 10 + MSVC 2019, with the examples that are available in the 3MF examples repo on Github here

The more I worked on it yesterday, the more I realized that 3MF files should rather be treated as project files and not single meshes that are imported through the "Import mesh action". For example, treating export as an export mesh action makes it very difficult to export colors or textures into the final document. Also, exporting multiple meshes into 3MF (which the 3MF format is capable of) is not really possible with Export Mesh, but it would be possible with Save project. Nevertheless, I think this is version will already help some people in their workflows.

If anyone wants a more complete feature set, please let me know!

alemuntoni commented 1 month ago

@lvk88 Thank you very much!!!

The more I worked on it yesterday, the more I realized that 3MF files should rather be treated as project files and not single meshes that are imported through the "Import mesh action". For example, treating export as an export mesh action makes it very difficult to export colors or textures into the final document. Also, exporting multiple meshes into 3MF (which the 3MF format is capable of) is not really possible with Export Mesh, but it would be possible with Save project. Nevertheless, I think this is version will already help some people in their workflows.

That's ok! I faced the same problem with gltf, but there are some inconsistencies at API level and I think that for now is perfectly fine to keep things as they are!