List Archive


Thread Index


From: Torsten Paul <>
Subject: Reading 3MF files with libzip
Date: Fri, 12 Feb 2016 20:43:39 +0100


I'm trying to integrate reading of 3MF files (3D Manufacturing Format - / into
OpenSCAD (

That format is basically a ZIP container with some XML files inside.
The library now has support for platforms using GCC and uses libzip
to unpack the files in that case.

I could not read some of the example files provided along with the
library and found the reason for that is that libzip says the files
are multi-disk archives. The offending files seem to be generated
on Windows 10 using the built-in 3D-Builder application.

Some more details are in the bug report I've created at the lib3mf

Basically the files have the "end of central directory" all set
to 0xff which causes libzip to produce ZIP_ER_MULTIDISK.

$ hd -s 0x5297 torus.3mf
00005297  50 4b 05 06 ff ff ff ff  ff ff ff ff ff ff ff ff
000052a7  ff ff ff ff 00 00

The format description is confusing enough to make me unsure if the
problem is 3D-Builder producing invalid files or libzip not picking
up the zip64 extensions that are mentioned for the case where the
disk-count/disk-number values are 0xffff (or even something totally
Running unzip on those archives produces no error and just extracts
the files. Using zip -FF also complains about missing 65536 parts.

So I'm hoping someone with more insight about the ZIP format can
shed a light on that issue...


Made by MHonArc.