Hey guys, I’m finalizing a basic 3MFexporter from IVerticeData to 3MF files for internal use. I may share it or add it to Babylon if there’s interest from the community.
Please share your use cases or thoughts. I’ll be happy to share the Git repo or make a PR if it’s relevant.
I started adding 3MF support under the serializer. So far it is straightforward, but I have one open question that I do not have an easy answer for.
A 3MF file is a ZIP container, so to serialize it we likely need to handle ZIP compression. In my current implementation, which works well, I chose fflate because it is the most lightweight library I found that supports compression and is MIT licensed.
However, I understand that we cannot add third-party libraries like this to the project. What is the best practice in this case? And if adding a dependency is acceptable, what is the recommended way to keep it attached to the serializer only, without affecting the rest of the project?
That’s fine for me. I can take it through producing the babylon.threemfSerializer.min.js bundle. Now I need to understand what tools you put in place to test this serializer.
Everything is ready and seems to work well. I still have a few tests to run with submeshes and instances. For v1, I decided to focus on geometry only, and everything looks good so far.
The serializer is integrated into Babylon.js in my fork, and I will open a PR soon.
Now that 3MF export is integrated in Babylon.js, the next logical step could be an Inspector v2 plugin focused on last mile printing workflows. The main use case is web configurators and visualization apps that need to package the final scene state into a production oriented 3MF (units, orientation, instances, basic color and metadata) without turning Babylon into a slicer. UI wise it could stay minimal with a single 3D Printing side panel split into Profile, Preflight, and Export sections, plus an optional per mesh override in the Properties panel and a toolbar button to open the panel.
@Deltakosh@sebavan If we want to build a loader for 3MF, where do you plan/guess to put the common code (3MF interfaces and definitions)? I mean, using the same approach as GLTF with babylonjs-gltf2interface seems overkill for a format that isn’t central to the framework.