Ghostkeeper / Blender3mfFormat

Blender add-on to import/export 3MF files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exported 3MF files fail on open in 3D-Builder and Netfabb

mattby opened this issue · comments

Software:
OS: Win10
Blender: 2.82.7
Netfabb: 2020.3
3D Builder: 18.0.1931.0

Recipe:

  1. Start blender (has default cube)
  2. Export to 3MF
  3. Try to load in 3D Builder or Netfabb

First error encountered is the same in both:
0x80004005

The fixes are simple, perhaps I'll submit a pull request.

Hmm, the error is not specific. Apparently a catch-all error of Windows applications. It's not descriptive nor documented online.

I can try with 3D builder some time.

I found the mistake. It happens when writing material resources. The default cube has a material in Blender. The STL-to-3MF conversions I tested with to interplay with 3D Builder and Cura didn't.

There were really two mistakes, one of which was mine and one of which is on 3D Builder (or in the spec):

  • The export only writes up to 1 material. The material had resource ID material0 hard-coded. But this ID isn't allowed since one of the appendices of the spec says that it needs to be a positive integer (such as 1).
  • 3D Builder won't load the file if the resource ID of a material is the same as the resource ID of a mesh. Apparently they need to share the same pool of IDs. This is not anywhere in the spec as far as I've seen, but for better interchange I've changed it so that they can load Blender's files too.