manyfold3d / manyfold

A self-hosted digital asset manager for 3d print files.
https://manyfold.app
MIT License
808 stars 49 forks source link

Support 3MF files that use the 3MF Production Extension #2438

Open dieseldan opened 3 months ago

dieseldan commented 3 months ago

Describe the bug Importing 3MF files produced by BambuStudio or OrcaSlicer results in a "Load Error" message in the preview window.

To Reproduce Steps to reproduce the behavior:

  1. In Bambu Studio or OrcaSlicer, select File> "Save Project as..." and save .3mf file to local drive.
  2. Upload the 3MF file to Manyfold.
  3. View any page within Manyfold that utilizes 3d render preview

Expected behavior A rendered preview as seen from other 3MF files.

Screenshots

chrome_YHQVyk6WWy chrome_QAoOhyOycZ

Desktop (please complete the following information):

Additional context In Bambu Studio or OrcaSlicer, selecting File> Export> "Export Generic 3MF..." creates a 3MF file that can be properly rendered in Manyfold. It would be quite helpful if 3MF files from Bambu or Orca could be natively supported without having to do an additional conversion and upload.

Floppy commented 3 months ago

Thanks! I suspect these are using some of the actual print features of 3MF which is confusing it. So, I can try to fix that. If you're able to attach a file that definitely causes the error, that would be really helpful!

dieseldan commented 3 months ago

I found this info about Bambu's use of the 3MF Production Extension, and wonder if this may be at the root of the issue. https://wiki.bambulab.com/en/software/bambu-studio/3mf-compatibility

I can't attach 3MF files to the comment because Github doesn't support that, but here's a link to them. The one named "_generic" is the generic 3MF exported that works properly in Manyfold.

Floppy commented 3 months ago

Nice, that seems pretty likely to be the issue. I'll see if I can add in support for that extension, and see if it fixes it!

https://github.com/3MFConsortium/spec_production/blob/1.1.2/3MF%20Production%20Extension.md

Floppy commented 3 months ago

Yep, from a quick look:

In order to avoid data loss while parsing, a 3MF package which uses referenced objects MUST enlist the production extension as "required extension", as defined in the core specification.

That's probably the issue - because THREE.js (where our 3MF loader comes from) doesn't support the production extension, it's (correctly) failing to load it rather than load it in a lossy way.

That's definitely a thing Manyfold should support though, so I'll get it on the list.

dieseldan commented 3 months ago

Thanks for the help. Looking forward to it being added.

kwiksilver commented 3 months ago

As a user with a Bambu printer this feature is essential to me. I'm excited to see it implemented. Should I hold off on uploading 3MF in this format or will the fix be retroactive? Thanks for making such a cool self hosted tool.

Floppy commented 3 months ago

It'll be retroactive when I get it in there, so go ahead!

MwC-Trexx commented 2 months ago

As a user with a Bambu printer this feature is essential to me. I'm excited to see it implemented. Should I hold off on uploading 3MF in this format or will the fix be retroactive? Thanks for making such a cool self hosted tool.

I am in the same boat with the need for 3MF support as well.

shad-lp commented 2 months ago

Definitely needing it, I'm on the verge of reordering all my personal creations with manyfold, but can't right now because of my bambu 3mf files can't be previewed :) Thanks for the hard work !

dertbv commented 2 months ago

Following hoping for an update..

shad-lp commented 1 month ago

Just FYI, from Bambu studio you can export the 3mf as a genereic type, hence making its preview visible in manyfold :

image

Same 3mf both as a "Bambu" and generic type :

image

profucius commented 1 month ago

Just FYI, from Bambu studio you can export the 3mf as a genereic type, hence making its preview visible in manyfold :

This worked for me. Does this mean we need to do this every time we save a file from Bambu Studio before uploading to ManyFold? @Floppy

algoz098 commented 1 month ago

I have been looking for a solution to manipulate or at least open a 3MF Production Extension from BambuSlicer, and found this thread.

After some consideration I have open the files and created my own code to do the bareminimum I needed.

I can confidently say, the way the scructure they use are by FAR as you can be from the common 3mf.

But, to export as a normal, and use it on bambu, you will have to do it every time.

Floppy commented 1 month ago

Just FYI, from Bambu studio you can export the 3mf as a genereic type, hence making its preview visible in manyfold :

This worked for me. Does this mean we need to do this every time we save a file from Bambu Studio before uploading to ManyFold? @Floppy

If you want to see the model, yeah, unfortunately. This is high up my list, but needs to wait for funding so I can spend the time on it. Hopefully soon.

@algoz098 thanks for the info there, sounds like it might be a challenge!

algoz098 commented 1 month ago

It will be, a lot of possibilities and combinations and ids through the files. I can share my code, but prob will not be any good, for it is used to position several stls in positions, and only that.