Skip to content

3mf files with identical model contents are not binary identical. #31

Open
@deadsy

Description

Added 3mf support to https://github.com/deadsy/sdfx.

It looks like the compression process is adding some per-run data. It doesn't look like a timestamp.
Not a show-stopper but having the same input give the same output is a nice regression property.
ie - we test the sha1sum of the output. This works for an STL, but not for a 3MF.

I guess the issue is possibly fixable in qmuntal/opc or maybe compress/flate, but I mention it here.

> sha1sum *3mf
c28eed4f13d0c62b0b7d57017d32427bbbea8206  head1.3mf
481ccd135a874c9690d92a99b90b67816e54340b  head2.3mf

> unzip -v head1.3mf
Archive:  head1.3mf
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
29548892  Defl:N  3507185  88% 2022-09-30 09:18 9bfc8b92  3D/3dmodel.model
     279  Defl:N      190  32% 2022-09-30 09:18 4c62f2b8  _rels/.rels
     347  Defl:N      208  40% 2022-09-30 09:18 9dd59dad  [Content_Types].xml
--------          -------  ---                            -------
29549518          3507583  88%                            3 files

> unzip -v head2.3mf
Archive:  head2.3mf
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
29548892  Defl:N  3507185  88% 2022-09-30 09:18 9bfc8b92  3D/3dmodel.model
     279  Defl:N      190  32% 2022-09-30 09:18 4c62f2b8  _rels/.rels
     347  Defl:N      208  40% 2022-09-30 09:18 9dd59dad  [Content_Types].xml
--------          -------  ---                            -------
29549518          3507583  88%                            3 files

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions