Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrusaSlicer isn't honoring 3MF metadata element "preserve" attribute #13920

Open
1 of 2 tasks
jon-gilbert opened this issue Jan 6, 2025 · 0 comments
Open
1 of 2 tasks

Comments

@jon-gilbert
Copy link

Description of the bug

I have a 3MF file with metadata elements set within the model's XML. The metadata looks like this (the object model data is excluded below):

<?xml version='1.0' encoding='UTF-8'?>
<model
	xmlns="http://schemas.microsoft.com/3dmanufacturing/core/2015/02"
	xmlns:p="http://schemas.microsoft.com/3dmanufacturing/production/2015/06" unit="millimeter" xml:lang="en-US">
...
	<metadata name="Application" preserve="1">507movements</metadata>
	<metadata name="Copyright" preserve="1">© 2022-2024 Jonathan Gilbert &lt;[email protected]&gt;</metadata>
	<metadata name="CreationDate" preserve="1">2022-09-01</metadata>
	<metadata name="Description" preserve="1">507movements, movement 002</metadata>
	<metadata name="Designer" preserve="1">Jonathan Gilbert &lt;[email protected]&gt;</metadata>
	<metadata name="LicenseTerms" preserve="1">MIT License (see https://github.com/jon-gilbert/507movements)</metadata>
	<metadata name="ModificationDate" preserve="1">2024-05-19</metadata>
	<metadata name="Title" preserve="1">002</metadata>
</model>

Opening the 3MF file within the most recent version of PrusaSlicer (2.9.0) on Windows works fine. However, if I save changes made in PrusaSlicer, the metadata tags are wholesale removed and replaced:

<model unit="millimeter" xml:lang="en-US" xmlns="http://schemas.microsoft.com/3dmanufacturing/core/2015/02" xmlns:slic3rpe="http://schemas.slic3r.org/3mf/2017/06">
 <metadata name="slic3rpe:Version3mf">1</metadata>
 <metadata name="Title">002-1</metadata>
 <metadata name="Designer"></metadata>
 <metadata name="Description">002-1</metadata>
 <metadata name="Copyright"></metadata>
 <metadata name="LicenseTerms"></metadata>
 <metadata name="Rating"></metadata>
 <metadata name="CreationDate">2025-01-06</metadata>
 <metadata name="ModificationDate">2025-01-06</metadata>
 <metadata name="Application">PrusaSlicer-2.9.0</metadata>
 <resources>
 ...

All of the metadata elements have updated values, even those whose preserve attribute is set to 1.
I get the ModificationDate is always mutable and the Title is subject to change if the 3mf file is saved to a new file, but my understanding of the 3MF core spec at 1 is that none of it should have changed.

If this is intentional, would you please explain why?

If this isn't intentional, what would you need to do for PrusaSlicer to honor the preserve attribute on 3MF metadata elements?

Project file & How to reproduce

Included is a zip file of two 3mf project files. The original, 002.3mf, has the preserve attribute set on the <metadata> elements within its 3D/3dmodel.model file. To get the modified 002-1.3mf, I did:

  1. open 002.3mf in PrusaSlicer
  2. Use the File->Save As menu option and save the contents as 002-1.3mf
    No other changes were made.

Examining the 3D/3dmodel.model files involves unpacking the 3MF files with unzip and viewing the model file. Eg:

unzip 002.3mf 3D/3dmodel.model
less 3D/3dmodel.model

github-prusaslicer-metadata.zip

Checklist of files included above

  • Project file
  • Screenshot

Version of PrusaSlicer

Version 2.9.0

Operating system

MS Windows 10 x86-64 bit 19045.5247

Printer model

Prusa MK4 (though, this is not related to a printer issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant