From b38b9132f4903a91ebbbd2cf725d8bbbd93d8069 Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Wed, 27 Nov 2024 20:39:57 +0800 Subject: [PATCH] Fix 3mf object type to conform the 3mf core spec (#7586) Fix 3mf object type. Always use "model" instead of "other" for modifiers, to conform the 3mf core spec (SoftFever/OrcaSlicer#7574) --- src/libslic3r/Format/bbs_3mf.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/Format/bbs_3mf.cpp b/src/libslic3r/Format/bbs_3mf.cpp index 206fc2aacd..f13181ad27 100644 --- a/src/libslic3r/Format/bbs_3mf.cpp +++ b/src/libslic3r/Format/bbs_3mf.cpp @@ -6813,7 +6813,12 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result) return false; } - std::string type = (volume->type() == ModelVolumeType::MODEL_PART)?"model":"other"; + // Orca#7574: always use "model" type to follow the 3MF Core Specification: + // https://github.com/3MFConsortium/spec_core/blob/20c079eef39e45ed223b8443dc9f34cbe32dc2c2/3MF%20Core%20Specification.md#3431-item-element + // > Note: items MUST NOT reference objects of type "other", either directly or recursively. + // This won't break anything because when loading the file Orca (and Bambu) simply does not care about the actual object type at all (as long as it's one of "model" & "other"); + // But PrusaSlicer requires the type to be "model". + std::string type = "model"; output_buffer += " <"; output_buffer += OBJECT_TAG;