From f7234aa943c0a9264e0e828156c486eed96309ea Mon Sep 17 00:00:00 2001 From: "maosheng.wei" Date: Mon, 6 Nov 2023 10:27:40 +0800 Subject: [PATCH] FIX: UUID conflict issue when referencing volume Jira: XXXX 3mf file standard Change-Id: I953a87294684ea85d03a95e7d2843c096904aeae Signed-off-by: maosheng.wei --- src/libslic3r/Format/bbs_3mf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/Format/bbs_3mf.cpp b/src/libslic3r/Format/bbs_3mf.cpp index 083145e48..504eaab9e 100644 --- a/src/libslic3r/Format/bbs_3mf.cpp +++ b/src/libslic3r/Format/bbs_3mf.cpp @@ -6411,7 +6411,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result) else stream << " <" << COMPONENT_TAG << " p:path=\"" << xml_escape(*ppath) << "\" objectid=\"" << volume_id; // << "\"/>\n"; if (m_production_ext) - stream << "\" " << PUUID_ATTR << "=\"" << hex_wrap{(boost::uint32_t) volume_id} << COMPONENT_UUID_SUFFIX; + stream << "\" " << PUUID_ATTR << "=\"" << hex_wrap{(boost::uint32_t) (volume_id + (object_data.backup_id << 16))} << COMPONENT_UUID_SUFFIX; const Transform3d &transf = volume->get_matrix(); stream << "\" " << TRANSFORM_ATTR << "=\""; for (unsigned c = 0; c < 4; ++c) { @@ -6536,7 +6536,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result) if (m_production_ext) { std::stringstream stream; reset_stream(stream); - stream << "\" " << PUUID_ATTR << "=\"" << hex_wrap{(boost::uint32_t) volume_id} << SUB_OBJECT_UUID_SUFFIX; + stream << "\" " << PUUID_ATTR << "=\"" << hex_wrap{(boost::uint32_t) (volume_id + (object_data.backup_id << 16))} << SUB_OBJECT_UUID_SUFFIX; //output_buffer += "\" "; //output_buffer += PUUID_ATTR; //output_buffer += "=\"";