.3mf files not rendering preview
Preview is not being rendered for .3mf files.
Is it a 3MF saved from a slicer? It could be to do with the lack of support for the "production extension", like #2438.
Possibly, I first noticed it on files that I downloaded some time ago. I'm not sure, but I probably downloaded it from makerworld since it is an ams y splitter for bambu printers. I then uploaded another file that although I can't be sure I think was something I exported from fusion. I will export one of my designs as 3mf to test and report results.
Confirmed that a file that I designed in Fusion 360 and exported as .3mf file is not rendering a preview when uploaded.
Thanks; could you upload a sample file so I can replicate the problem exactly, please?
Here is a phone mount that I designed and exported from Fusion 360. Phone mount v5.zip
The console reports an error THREE.3MFLoader: Unsupported resource type.
That's reported from https://github.com/manyfold3d/threejs-webworker-3mf-loader/blob/main/src/index.js#L1152, which is not the most helpful error message in the world...
Anyway, it's a different error from that which we get for production extension files; so it's a different cause and this issue will remain open until I solve it 😄
Another file failing the same way in #2734.
I can also provide examples if needed for further debugging if that helps at any point - feel free to tag me :-)
Happens with every 3mf-file i tried so far. Most downloads are from makerworld, most of my own projects are saved with bambu studio. I'd be happy if this could be solved, it's the only reason not to work with manyfold. :(
This is getting higher and higher priority, I'm gonna have to deal with it soon :)
Would really like this!
https://github.com/manyfold3d/manyfold/pull/3584 fixes a lot of 3MF issues, but not the phone mount file linked above, that has some other problem which I'll keep looking into. I'd be interested to know if the next release improves things for you and it's just that one left that's problematic, or if there are still more.
Was hoping that this Bambu Labs 3mf files were working, just installed on unraid and install went fine however still no joy with the 3mf files. There is a program called printinventory that has both mac and windows installs that are in bets. It looks to be able to handle the 3mf file structure. Would so love to have a docker ver though..
The console reports an error
THREE.3MFLoader: Unsupported resource type.That's reported from https://github.com/manyfold3d/threejs-webworker-3mf-loader/blob/main/src/index.js#L1152, which is not the most helpful error message in the world...
This issue happens because colorgroup resource entries are not read at all, so the lookup for resource with id 4 (= property type of object 3) fails. I suspect this is because that resource entry is namespaced as m:colorgroup so the issue already is here.
It seems that any model exported from Fusion 360 in .3mf format does not load a preview still.
LOL, you're all way too fast for me! I've just released improved 3MF code in v0.101.0, so unless you were trying the edge tag, you wouldn't see any change until now. Give it another go, and see if it works better! Also, I've just realised that github auto-closed this issue because I wrote "doesn't fix #2640" in the relevant PR, so that's a mistake anyway!
On the colorgroup thing for the specific file mentioned above: I was probing into the file yesterday to see what was up, and you're right, those are the ones being warned about. However, because we don't use them anyway, it shouldn't really matter. The file should still be loaded, it's not aborting the load process. But, for some reason, it's not loading any geometry into the two meshes (ids 1 and 3). I'll keep investigating that aspect in this issue, though a load of related display problems issues (#2438 and #2734) should now be fixed.
As you can see we're all eager to try this :) Thank you for your hard work!
When adding 3MF color/basematerial handling to OpenSCAD, I found another great sample file. As far as I know, it was colored in Microsoft 3D Builder and has a very interesting multi-level nested object structure with transforms on both builditems and object references.
https://www.printables.com/model/844491-pylon - file 24-114-Leitkegel.colored.3mfwith comment "colored multipart - VIEWER ONLY!"
This file also does not show in Manyfold Version: 0.101.0 (376cfa77).
great, thanks! I'll look into it. I'm also checking against the official 3mf-samples to check that we can handle all of those.
After uploading my first design to 3dprint.social (thanks!), I hit this issue again. The uploaded 3MF files are not showing up at all. The files are generated from OpenSCAD.
I've tracked down the issue as much to have a "fix" for threejs-webworker-3mf-loader, although I'm not sure if that's the best solution. The issue does not happen with the upstream ThreeJS loader.
As suspected in an earlier comment, it's the (monkey-patched) select() call failing for the material data (colorgroup) as it's using the material namespace m: in my files.
The workaround passes along the extension/namespaces collected from the model element to the parsing functions and prefixes the selector with the namespace, e.g. select("m\\:colorgroup") which makes it find the data.
A much easier solution would be finding a selector library that has direct namespace support or even better a flag to just ignore namespaces, digging a bit on npmjs.com did not bring any quick result. Considering all the lookups I've seen so far happen via trivial selectors, using only full names of elements, a simple manual tree search might be an option too.
Trimmed down snipped of the color section
<model xmlns:m="http://schemas.microsoft.com/3dmanufacturing/material/2015/02">
<resources>
<m:colorgroup id="2">
<m:color color="#3E999FFF" />
<m:color color="#EAB700FF" />
</m:colorgroup>
Never mind, xmldom has getElementsByTagNameNS() with support for wildcard namespaces and even though I missed the descendant selectors before, those are simple enough. The PR linked above fixes the issue for me.
Great, I've merged the PR and it should make it into the next release!