Files

VDE Official 3MF Format Plugin

P4 dogfood: pure C ABI format plugin, no kernel link.

Capabilities

format:3mf.read
format:3mf.write

Read

  • OPC/ZIP package, model path 3D/3dmodel.model;
  • ZIP method 0 (stored) and method 8 (raw deflate, puff);
  • core mesh: object/mesh/vertices/vertex and triangles/triangle;
  • object/components/build-item transforms applied in plugin (row-vector 4x3);
  • model unit converted to millimeter (micron/mm/cm/inch/foot/meter);
  • each build item/object becomes a host body via body_from_mesh;
  • malformed indices / missing model -> explicit error, no empty success.

Write

  • host body_tessellate -> stored-ZIP 3MF;
  • emits Content_Types.xml, _rels/.rels, 3D/3dmodel.model;
  • one object per body.

Known limitations

  • materials/colors/PMI are not written;
  • only ZIP method 0/8; method 12/14 rejected;
  • non-standard transform conventions are documented but not auto-detected;
  • no support for slice/production extensions.

Build

Registered by plugins/official/CMakeLists.txt:

cmake --build build --target vde_official_3mf

Output:

build/plugins/official/3mf/vde_official_3mf.dll
build/plugins/official/3mf/vde-plugin.json

Test

  • test_plugin_format_official includes Official3mfReadWrite and Official3mfTransformAndUnit;
  • local direct host harness: 1000/1000 corpus/3mf samples read/write/read roundtrip.

License

Plugin code Apache-2.0; puff.c/puff.h zlib license (Mark Adler).