3MFConsortium / lib3mf

lib3mf is an implementation of the 3D Manufacturing Format file standard
http://3mf.io
BSD 2-Clause "Simplified" License
228 stars 92 forks source link

Issue when calling ModelResourceID CModel::generateResourceID with unordered resource list #380

Closed jaimemachado closed 2 weeks ago

jaimemachado commented 1 month ago

image

The lib3mf makes the assumption that the resourceList is ordered. This is not correct. I attached a 3mf that was generated using microsoft 3dbuilder that breaks this code generating a id that already exists. Box.zip

vijaiaeroastro commented 1 month ago

The problem here is that the package resource id and generateResourceID() are not in sync and this becomes an issue when models start with id 2 (seems to be the case with microsoft builder) instead of 1.