mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-10 00:07:52 -06:00
Merge branch 'v1.7.2-remote'
Signed-off-by: SoftFever <softfeverever@gmail.com> # Conflicts: # deps/ZLIB/ZLIB.cmake # localization/i18n/OrcaSlicer.pot # localization/i18n/de/OrcaSlicer_de.po # localization/i18n/en/OrcaSlicer_en.po # localization/i18n/es/OrcaSlicer_es.po # localization/i18n/fr/OrcaSlicer_fr.po # localization/i18n/hu/OrcaSlicer_hu.po # localization/i18n/it/OrcaSlicer_it.po # localization/i18n/ja/OrcaSlicer_ja.po # localization/i18n/ko/OrcaSlicer_ko.po # localization/i18n/list.txt # localization/i18n/nl/OrcaSlicer_nl.po # localization/i18n/sv/OrcaSlicer_sv.po # localization/i18n/zh_cn/OrcaSlicer_zh_CN.po # resources/calib/PressureAdvance/pa_pattern.3mf # resources/handy_models/Disc.stl # resources/i18n/de/BambuStudio.mo # resources/i18n/en/BambuStudio.mo # resources/i18n/es/BambuStudio.mo # resources/i18n/fr/BambuStudio.mo # resources/i18n/hu/BambuStudio.mo # resources/i18n/it/BambuStudio.mo # resources/i18n/ja/BambuStudio.mo # resources/i18n/ko/BambuStudio.mo # resources/i18n/nl/BambuStudio.mo # resources/i18n/sv/BambuStudio.mo # resources/i18n/zh_cn/BambuStudio.mo # resources/profiles/Anycubic.json # resources/profiles/Anycubic/machine/Anycubic Kobra 2 0.4 nozzle.json # resources/profiles/BBL.json # resources/profiles/BBL/filament/Bambu ASA @BBL X1C 0.2 nozzle.json # resources/profiles/BBL/filament/Bambu ASA @BBL X1C 0.4 nozzle.json # resources/profiles/BBL/filament/Bambu ASA @BBL X1C.json # resources/profiles/BBL/filament/Bambu PA-CF @base.json # resources/profiles/BBL/filament/Bambu PA6-CF @BBL X1C.json # resources/profiles/BBL/filament/Bambu PA6-CF @base.json # resources/profiles/BBL/filament/Bambu PETG-CF @BBL X1C.json # resources/profiles/BBL/filament/Bambu Support W @BBL X1.json # resources/profiles/BBL/filament/Bambu TPU 95A @BBL X1.json # resources/profiles/BBL/filament/Generic HIPS @BBL X1C 0.2 nozzle.json # resources/profiles/BBL/filament/Generic HIPS @BBL X1C.json # resources/profiles/BBL/filament/Generic PA-CF.json # resources/profiles/BBL/filament/Generic PC.json # resources/profiles/BBL/filament/Generic PETG-CF @BBL X1C.json # resources/profiles/BBL/filament/Generic PLA @0.2 nozzle.json # resources/profiles/BBL/filament/Generic PLA High Speed @BBL P1P 0.2 nozzle.json # resources/profiles/BBL/filament/Generic PLA High Speed @BBL P1P.json # resources/profiles/BBL/filament/Generic PLA High Speed @BBL X1C 0.2 nozzle.json # resources/profiles/BBL/filament/Generic PLA High Speed @BBL X1C.json # resources/profiles/BBL/filament/Generic PLA-CF.json # resources/profiles/BBL/filament/Generic PLA.json # resources/profiles/BBL/filament/Generic TPU.json # resources/profiles/BBL/filament/Overture Matte PLA @BBL P1P 0.2 nozzle.json # resources/profiles/BBL/filament/Overture Matte PLA @BBL P1P.json # resources/profiles/BBL/filament/Overture Matte PLA @BBL X1.json # resources/profiles/BBL/filament/Overture Matte PLA @BBL X1C 0.2 nozzle.json # resources/profiles/BBL/filament/Overture Matte PLA @BBL X1C.json # resources/profiles/BBL/filament/Overture Matte PLA @base.json # resources/profiles/BBL/filament/Overture PLA @BBL P1P 0.2 nozzle.json # resources/profiles/BBL/filament/Overture PLA @BBL P1P.json # resources/profiles/BBL/filament/Overture PLA @BBL X1.json # resources/profiles/BBL/filament/Overture PLA @BBL X1C 0.2 nozzle.json # resources/profiles/BBL/filament/Overture PLA @BBL X1C.json # resources/profiles/BBL/filament/Overture PLA @base.json # resources/profiles/BBL/filament/P1P/Bambu TPU 95A @BBL P1P.json # resources/profiles/BBL/filament/P1P/Generic PLA @BBL P1P 0.2 nozzle.json # resources/profiles/BBL/filament/P1P/Generic TPU @BBL P1P.json # resources/profiles/BBL/filament/P1P/eSUN PLA+ @BBL P1P 0.2 nozzle.json # resources/profiles/BBL/filament/P1P/eSUN PLA+ @BBL P1P.json # resources/profiles/BBL/filament/PolyLite ABS @BBL P1P 0.2 nozzle.json # resources/profiles/BBL/filament/PolyLite ABS @BBL P1P.json # resources/profiles/BBL/filament/PolyLite ABS @BBL X1C 0.2 nozzle.json # resources/profiles/BBL/filament/PolyLite ABS @BBL X1C.json # resources/profiles/BBL/filament/PolyLite ABS @base.json # resources/profiles/BBL/filament/PolyLite ASA @BBL P1P 0.2 nozzle.json # resources/profiles/BBL/filament/PolyLite ASA @BBL P1P.json # resources/profiles/BBL/filament/PolyLite ASA @BBL X1C 0.2 nozzle.json # resources/profiles/BBL/filament/PolyLite ASA @BBL X1C.json # resources/profiles/BBL/filament/PolyLite ASA @base.json # resources/profiles/BBL/filament/PolyLite PETG @BBL P1P 0.2 nozzle.json # resources/profiles/BBL/filament/PolyLite PETG @BBL P1P.json # resources/profiles/BBL/filament/PolyLite PETG @BBL X1C 0.2 nozzle.json # resources/profiles/BBL/filament/PolyLite PETG @BBL X1C.json # resources/profiles/BBL/filament/PolyLite PETG @base.json # resources/profiles/BBL/filament/PolyLite PLA @BBL X1.json # resources/profiles/BBL/filament/PolyTerra PLA @BBL X1.json # resources/profiles/BBL/filament/eSUN PLA+ @BBL X1.json # resources/profiles/BBL/filament/eSUN PLA+ @BBL X1C 0.2 nozzle.json # resources/profiles/BBL/filament/eSUN PLA+ @BBL X1C.json # resources/profiles/BBL/machine/Bambu Lab P1P 0.2 nozzle.json # resources/profiles/BBL/machine/Bambu Lab P1P 0.4 nozzle.json # resources/profiles/BBL/machine/Bambu Lab P1P 0.6 nozzle.json # resources/profiles/BBL/machine/Bambu Lab P1P 0.8 nozzle.json # resources/profiles/BBL/machine/Bambu Lab P1S 0.2 nozzle.json # resources/profiles/BBL/machine/Bambu Lab P1S 0.4 nozzle.json # resources/profiles/BBL/machine/Bambu Lab P1S 0.6 nozzle.json # resources/profiles/BBL/machine/Bambu Lab P1S 0.8 nozzle.json # resources/profiles/BBL/machine/Bambu Lab X1 0.2 nozzle.json # resources/profiles/BBL/machine/Bambu Lab X1 0.4 nozzle.json # resources/profiles/BBL/machine/Bambu Lab X1 0.6 nozzle.json # resources/profiles/BBL/machine/Bambu Lab X1 0.8 nozzle.json # resources/profiles/BBL/machine/Bambu Lab X1 Carbon 0.2 nozzle.json # resources/profiles/BBL/machine/Bambu Lab X1 Carbon 0.4 nozzle.json # resources/profiles/BBL/machine/Bambu Lab X1 Carbon 0.6 nozzle.json # resources/profiles/BBL/machine/Bambu Lab X1 Carbon 0.8 nozzle.json # resources/profiles/BBL/machine/fdm_bbl_3dp_001_common.json # resources/profiles/BBL/process/0.06mm Standard @BBL X1C 0.2 nozzle.json # resources/profiles/BBL/process/0.08mm Extra Fine @BBL P1P.json # resources/profiles/BBL/process/0.08mm Extra Fine @BBL X1C.json # resources/profiles/BBL/process/0.08mm Standard @BBL X1C 0.2 nozzle.json # resources/profiles/BBL/process/0.10mm Standard @BBL P1P 0.2 nozzle.json # resources/profiles/BBL/process/0.10mm Standard @BBL X1C 0.2 nozzle.json # resources/profiles/BBL/process/0.12mm Fine @BBL P1P.json # resources/profiles/BBL/process/0.12mm Fine @BBL X1C.json # resources/profiles/BBL/process/0.12mm Standard @BBL X1C 0.2 nozzle.json # resources/profiles/BBL/process/0.14mm Standard @BBL X1C 0.2 nozzle.json # resources/profiles/BBL/process/0.16mm Optimal @BBL P1P.json # resources/profiles/BBL/process/0.16mm Optimal @BBL X1C.json # resources/profiles/BBL/process/0.18mm Standard @BBL X1C 0.6 nozzle.json # resources/profiles/BBL/process/0.20mm Standard @BBL P1P.json # resources/profiles/BBL/process/0.20mm Standard @BBL X1C.json # resources/profiles/BBL/process/0.20mm Strength @BBL P1P.json # resources/profiles/BBL/process/0.20mm Strength @BBL X1C.json # resources/profiles/BBL/process/0.24mm Draft @BBL P1P.json # resources/profiles/BBL/process/0.24mm Draft @BBL X1C.json # resources/profiles/BBL/process/0.24mm Standard @BBL X1C 0.6 nozzle.json # resources/profiles/BBL/process/0.24mm Standard @BBL X1C 0.8 nozzle.json # resources/profiles/BBL/process/0.28mm Extra Draft @BBL P1P.json # resources/profiles/BBL/process/0.28mm Extra Draft @BBL X1C.json # resources/profiles/BBL/process/0.30mm Standard @BBL P1P 0.6 nozzle.json # resources/profiles/BBL/process/0.30mm Standard @BBL X1 0.6 nozzle.json # resources/profiles/BBL/process/0.30mm Standard @BBL X1C 0.6 nozzle.json # resources/profiles/BBL/process/0.30mm Strength @BBL X1C 0.6 nozzle.json # resources/profiles/BBL/process/0.32mm Standard @BBL X1C 0.8 nozzle.json # resources/profiles/BBL/process/0.36mm Standard @BBL X1C 0.6 nozzle.json # resources/profiles/BBL/process/0.40mm Standard @BBL P1P 0.8 nozzle.json # resources/profiles/BBL/process/0.40mm Standard @BBL X1 0.8 nozzle.json # resources/profiles/BBL/process/0.40mm Standard @BBL X1C 0.8 nozzle.json # resources/profiles/BBL/process/0.42mm Standard @BBL X1C 0.6 nozzle.json # resources/profiles/BBL/process/0.48mm Standard @BBL X1C 0.8 nozzle.json # resources/profiles/BBL/process/0.56mm Standard @BBL X1C 0.8 nozzle.json # resources/profiles/BBL/process/fdm_process_bbl_common.json # resources/profiles/Creality.json # resources/profiles/Creality/machine/Creality CR-10 Max 0.4 nozzle.json # resources/profiles/Creality/machine/Creality CR-10 V2 0.4 nozzle.json # resources/profiles/Creality/machine/Creality CR-6 Max 0.2 nozzle.json # resources/profiles/Creality/machine/Creality CR-6 Max 0.4 nozzle.json # resources/profiles/Creality/machine/Creality CR-6 Max 0.6 nozzle.json # resources/profiles/Creality/machine/Creality CR-6 Max 0.8 nozzle.json # resources/profiles/Creality/machine/Creality CR-6 SE 0.2 nozzle.json # resources/profiles/Creality/machine/Creality CR-6 SE 0.4 nozzle.json # resources/profiles/Creality/machine/Creality CR-6 SE 0.6 nozzle.json # resources/profiles/Creality/machine/Creality CR-6 SE 0.8 nozzle.json # resources/profiles/Creality/machine/Creality Ender-3 S1 0.4 nozzle.json # resources/profiles/Creality/machine/Creality Ender-3 S1 Pro 0.4 nozzle.json # resources/profiles/Creality/machine/Creality Ender-5 0.4 nozzle.json # resources/profiles/Creality/machine/Creality Ender-5 Plus 0.4 nozzle.json # resources/profiles/Creality/machine/Creality Ender-5 S1 0.4 nozzle.json # resources/profiles/Creality/machine/Creality Ender-5S 0.4 nozzle.json # resources/profiles/Creality/machine/Creality Ender-6 0.4 nozzle.json # resources/profiles/Elegoo.json # resources/profiles/Elegoo/machine/Elegoo Neptune 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune 2 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune 2D 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune 2S 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune 3 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune 3 Max 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune 3 Plus 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune 3 Pro 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune X 0.4 nozzle.json # resources/profiles/Prusa.json # resources/profiles/Prusa/machine/Prusa MINI 0.4 nozzle.json # resources/profiles/Prusa/machine/Prusa MK3S 0.4 nozzle.json # resources/profiles/Qidi/machine/Qidi X-CF Pro 0.4 nozzle.json # resources/profiles/Qidi/machine/Qidi X-Max 0.4 nozzle.json # resources/profiles/Qidi/machine/Qidi X-Max 3 0.4 nozzle.json # resources/profiles/Qidi/machine/Qidi X-Plus 0.4 nozzle.json # resources/profiles/Qidi/machine/Qidi X-Plus 3 0.4 nozzle.json # resources/profiles/Qidi/machine/Qidi X-Smart 3 0.4 nozzle.json # resources/profiles/Tronxy.json # resources/profiles/Tronxy/machine/Tronxy X5SA 400 0.4 nozzle.json # resources/profiles/Tronxy/process/0.08mm Extra Fine @Tronxy.json # resources/profiles/Tronxy/process/0.12mm Fine @Tronxy.json # resources/profiles/Tronxy/process/0.15mm Optimal @Tronxy.json # resources/profiles/Tronxy/process/0.20mm Standard @Tronxy.json # resources/profiles/Tronxy/process/0.24mm Draft @Tronxy.json # resources/profiles/Tronxy/process/0.28mm Extra Draft @Tronxy.json # resources/profiles/Voxelab/machine/Voxelab Aquila X2 0.4 nozzle.json # resources/web/data/text.js # src/OrcaSlicer.cpp # src/libslic3r/GCode.cpp # src/libslic3r/GCode/SeamPlacer.cpp # src/libslic3r/GCode/SeamPlacer.hpp # src/libslic3r/GCodeWriter.cpp # src/libslic3r/GCodeWriter.hpp # src/libslic3r/Preset.cpp # src/libslic3r/PresetBundle.cpp # src/libslic3r/Print.cpp # src/libslic3r/PrintConfig.cpp # src/libslic3r/PrintConfig.hpp # src/libslic3r/TreeSupport.cpp # src/libslic3r/calib.cpp # src/libslic3r/calib.hpp # src/slic3r/GUI/BackgroundSlicingProcess.cpp # src/slic3r/GUI/BedShapeDialog.cpp # src/slic3r/GUI/ConfigManipulation.cpp # src/slic3r/GUI/GUI.cpp # src/slic3r/GUI/GUI_App.cpp # src/slic3r/GUI/GUI_Factories.cpp # src/slic3r/GUI/GUI_ObjectList.cpp # src/slic3r/GUI/Jobs/ArrangeJob.cpp # src/slic3r/GUI/OptionsGroup.cpp # src/slic3r/GUI/PartPlate.cpp # src/slic3r/GUI/PartPlate.hpp # src/slic3r/GUI/Plater.cpp # src/slic3r/GUI/StatusPanel.cpp # src/slic3r/GUI/Tab.cpp # src/slic3r/GUI/Widgets/AMSControl.hpp # version.inc
This commit is contained in:
commit
b8172316b8
608 changed files with 23446 additions and 10493 deletions
|
@ -116,6 +116,7 @@ const std::string BBL_DESIGNER_USER_ID_TAG = "DesignerUserId";
|
|||
const std::string BBL_DESIGNER_COVER_FILE_TAG = "DesignerCover";
|
||||
const std::string BBL_DESCRIPTION_TAG = "Description";
|
||||
const std::string BBL_COPYRIGHT_TAG = "CopyRight";
|
||||
const std::string BBL_COPYRIGHT_NORMATIVE_TAG = "Copyright";
|
||||
const std::string BBL_LICENSE_TAG = "License";
|
||||
const std::string BBL_REGION_TAG = "Region";
|
||||
const std::string BBL_MODIFICATION_TAG = "ModificationDate";
|
||||
|
@ -226,11 +227,14 @@ static constexpr const char* HIT_NORMAL_ATTR = "hit_normal";
|
|||
// BBS: encrypt
|
||||
static constexpr const char* RELATIONSHIP_TAG = "Relationship";
|
||||
static constexpr const char* PID_ATTR = "pid";
|
||||
static constexpr const char* PUUID_ATTR = "p:uuid";
|
||||
static constexpr const char* PUUID_ATTR = "p:UUID";
|
||||
static constexpr const char* PUUID_LOWER_ATTR = "p:uuid";
|
||||
static constexpr const char* PPATH_ATTR = "p:path";
|
||||
static constexpr const char *OBJECT_UUID_SUFFIX = "-61cb-4c03-9d28-80fed5dfa1dc";
|
||||
static constexpr const char *OBJECT_UUID_SUFFIX2 = "-71cb-4c03-9d28-80fed5dfa1dc";
|
||||
static constexpr const char* BUILD_UUID = "d8eb061-b1ec-4553-aec9-835e5b724bb4";
|
||||
static constexpr const char *SUB_OBJECT_UUID_SUFFIX = "-81cb-4c03-9d28-80fed5dfa1dc";
|
||||
static constexpr const char *COMPONENT_UUID_SUFFIX = "-b206-40ff-9872-83e8017abed1";
|
||||
static constexpr const char* BUILD_UUID = "2c7c17d8-22b5-4d84-8835-1976022ea369";
|
||||
static constexpr const char* BUILD_UUID_SUFFIX = "-b1ec-4553-aec9-835e5b724bb4";
|
||||
static constexpr const char* TARGET_ATTR = "Target";
|
||||
static constexpr const char* RELS_TYPE_ATTR = "Type";
|
||||
|
@ -281,6 +285,8 @@ static constexpr const char* PLATER_NAME_ATTR = "plater_name";
|
|||
static constexpr const char* PLATE_IDX_ATTR = "index";
|
||||
static constexpr const char* SLICE_PREDICTION_ATTR = "prediction";
|
||||
static constexpr const char* SLICE_WEIGHT_ATTR = "weight";
|
||||
static constexpr const char* TIMELAPSE_TYPE_ATTR = "timelapse_type";
|
||||
static constexpr const char* TIMELAPSE_ERROR_CODE_ATTR = "timelapse_error_code";
|
||||
static constexpr const char* OUTSIDE_ATTR = "outside";
|
||||
static constexpr const char* SUPPORT_USED_ATTR = "support_used";
|
||||
static constexpr const char* LABEL_OBJECT_ENABLED_ATTR = "label_object_enabled";
|
||||
|
@ -1679,7 +1685,12 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
std::string name(stat.m_filename);
|
||||
std::replace(name.begin(), name.end(), '\\', '/');
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ":" << __LINE__ << boost::format("extract %1%th file %2%, total=%3%\n")%(i+1)%name%num_entries;
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ":" << __LINE__ << boost::format("extract %1%th file %2%, total=%3%")%(i+1)%name%num_entries;
|
||||
|
||||
if (name.find("/../") != std::string::npos) {
|
||||
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(", find file path including /../, not valid, skip it\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (boost::algorithm::iequals(name, BBS_LAYER_HEIGHTS_PROFILE_FILE)) {
|
||||
// extract slic3r layer heights profile file
|
||||
|
@ -1763,6 +1774,9 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
//BBS parsing pattern config files
|
||||
_extract_file_from_archive(archive, stat);
|
||||
}
|
||||
else {
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ":" << __LINE__ << boost::format(", %1% skipped, already parsed or a directory or not supported\n")%name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2175,7 +2189,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
}
|
||||
}
|
||||
char error_buf[1024];
|
||||
::sprintf(error_buf, "File %s not found from archive", path.c_str());
|
||||
::snprintf(error_buf, 1024, "File %s not found from archive", path.c_str());
|
||||
add_error(error_buf);
|
||||
return false;
|
||||
}
|
||||
|
@ -2234,7 +2248,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
|
||||
if (!XML_ParseBuffer(m_xml_parser, (int)stat.m_uncomp_size, 1)) {
|
||||
char error_buf[1024];
|
||||
::sprintf(error_buf, "Error (%s) while parsing xml file at line %d", XML_ErrorString(XML_GetErrorCode(m_xml_parser)), (int)XML_GetCurrentLineNumber(m_xml_parser));
|
||||
::snprintf(error_buf, 1024, "Error (%s) while parsing xml file at line %d", XML_ErrorString(XML_GetErrorCode(m_xml_parser)), (int)XML_GetCurrentLineNumber(m_xml_parser));
|
||||
add_error(error_buf);
|
||||
return false;
|
||||
}
|
||||
|
@ -2280,7 +2294,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
CallbackData* data = (CallbackData*)pOpaque;
|
||||
if (!XML_Parse(data->parser, (const char*)pBuf, (int)n, (file_ofs + n == data->stat.m_uncomp_size) ? 1 : 0) || data->importer.parse_error()) {
|
||||
char error_buf[1024];
|
||||
::sprintf(error_buf, "Error (%s) while parsing '%s' at line %d", data->importer.parse_error_message(), data->stat.m_filename, (int)XML_GetCurrentLineNumber(data->parser));
|
||||
::snprintf(error_buf, 1024, "Error (%s) while parsing '%s' at line %d", data->importer.parse_error_message(), data->stat.m_filename, (int)XML_GetCurrentLineNumber(data->parser));
|
||||
throw Slic3r::FileIOError(error_buf);
|
||||
}
|
||||
return n;
|
||||
|
@ -2501,6 +2515,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
|
||||
void _BBS_3MF_Importer::_extract_auxiliary_file_from_archive(mz_zip_archive& archive, const mz_zip_archive_file_stat& stat, Model& model)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", stat.m_uncomp_size is %1%")%stat.m_uncomp_size;
|
||||
if (stat.m_uncomp_size > 0) {
|
||||
std::string dest_file;
|
||||
if (stat.m_is_utf8) {
|
||||
|
@ -2518,6 +2533,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
dest_file = dest_file.substr(found + AUXILIARY_STR_LEN);
|
||||
else
|
||||
return;
|
||||
|
||||
if (dest_file.find('/') != std::string::npos) {
|
||||
boost::filesystem::path src_path = boost::filesystem::path(dest_file);
|
||||
boost::filesystem::path parent_path = src_path.parent_path();
|
||||
|
@ -3175,6 +3191,9 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
m_curr_object->name = bbs_get_attribute_value_string(attributes, num_attributes, NAME_ATTR);
|
||||
|
||||
m_curr_object->uuid = bbs_get_attribute_value_string(attributes, num_attributes, PUUID_ATTR);
|
||||
if (m_curr_object->uuid.empty()) {
|
||||
m_curr_object->uuid = bbs_get_attribute_value_string(attributes, num_attributes, PUUID_LOWER_ATTR);
|
||||
}
|
||||
m_curr_object->pid = bbs_get_attribute_value_int(attributes, num_attributes, PID_ATTR);
|
||||
}
|
||||
|
||||
|
@ -3563,7 +3582,10 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
BOOST_LOG_TRIVIAL(trace) << "design_info, load_3mf found license = " << m_curr_characters;
|
||||
model_info.license = xml_unescape(m_curr_characters);
|
||||
} else if (m_curr_metadata_name == BBL_COPYRIGHT_TAG) {
|
||||
BOOST_LOG_TRIVIAL(trace) << "design_info, load_3mf found copyright = " << m_curr_characters;
|
||||
BOOST_LOG_TRIVIAL(trace) << "design_info, load_3mf found CopyRight = " << m_curr_characters;
|
||||
model_info.copyright = xml_unescape(m_curr_characters);
|
||||
} else if (m_curr_metadata_name == BBL_COPYRIGHT_NORMATIVE_TAG) {
|
||||
BOOST_LOG_TRIVIAL(trace) << "design_info, load_3mf found Copyright = " << m_curr_characters;
|
||||
model_info.copyright = xml_unescape(m_curr_characters);
|
||||
} else if (m_curr_metadata_name == BBL_REGION_TAG) {
|
||||
BOOST_LOG_TRIVIAL(trace) << "design_info, load_3mf found region = " << m_curr_characters;
|
||||
|
@ -4027,7 +4049,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
{
|
||||
if (!m_curr_plater)
|
||||
{
|
||||
add_error("don't find plater created before");
|
||||
add_error("_handle_end_config_plater: don't find plate created before");
|
||||
return false;
|
||||
}
|
||||
m_plater_data.emplace(m_curr_plater->plate_index, m_curr_plater);
|
||||
|
@ -4039,7 +4061,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
{
|
||||
if (!m_curr_plater)
|
||||
{
|
||||
add_error("don't find plater created before");
|
||||
add_error("_handle_start_config_plater_instance: don't find plate created before");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -4051,7 +4073,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
{
|
||||
if (!m_curr_plater)
|
||||
{
|
||||
add_error("don't find plater created before");
|
||||
add_error("_handle_end_config_plater_instance: don't find plate created before");
|
||||
return false;
|
||||
}
|
||||
if ((m_curr_instance.object_id == -1) || (m_curr_instance.instance_id == -1))
|
||||
|
@ -4430,6 +4452,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
volume->supported_facets.shrink_to_fit();
|
||||
volume->seam_facets.shrink_to_fit();
|
||||
volume->mmu_segmentation_facets.shrink_to_fit();
|
||||
volume->mmu_segmentation_facets.touch();
|
||||
}
|
||||
|
||||
volume->set_type(volume_data->part_type);
|
||||
|
@ -4709,6 +4732,9 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
current_object->name = bbs_get_attribute_value_string(attributes, num_attributes, NAME_ATTR);
|
||||
|
||||
current_object->uuid = bbs_get_attribute_value_string(attributes, num_attributes, PUUID_ATTR);
|
||||
if (current_object->uuid.empty()) {
|
||||
current_object->uuid = bbs_get_attribute_value_string(attributes, num_attributes, PUUID_LOWER_ATTR);
|
||||
}
|
||||
current_object->pid = bbs_get_attribute_value_int(attributes, num_attributes, PID_ATTR);
|
||||
}
|
||||
|
||||
|
@ -5096,7 +5122,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
CallbackData* data = (CallbackData*)pOpaque;
|
||||
if (!XML_Parse(data->parser, (const char*)pBuf, (int)n, (file_ofs + n == data->stat.m_uncomp_size) ? 1 : 0) || data->importer.object_parse_error()) {
|
||||
char error_buf[1024];
|
||||
::sprintf(error_buf, "Error (%s) while parsing '%s' at line %d", data->importer.object_parse_error_message(), data->stat.m_filename, (int)XML_GetCurrentLineNumber(data->parser));
|
||||
::snprintf(error_buf, 1024, "Error (%s) while parsing '%s' at line %d", data->importer.object_parse_error_message(), data->stat.m_filename, (int)XML_GetCurrentLineNumber(data->parser));
|
||||
throw Slic3r::FileIOError(error_buf);
|
||||
}
|
||||
return n;
|
||||
|
@ -5219,7 +5245,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
|
||||
bool _add_content_types_file_to_archive(mz_zip_archive& archive);
|
||||
|
||||
bool _add_thumbnail_file_to_archive(mz_zip_archive& archive, const ThumbnailData& thumbnail_data, const char* local_path, int index);
|
||||
bool _add_thumbnail_file_to_archive(mz_zip_archive& archive, const ThumbnailData& thumbnail_data, const char* local_path, int index, bool generate_small_thumbnail = false);
|
||||
bool _add_calibration_file_to_archive(mz_zip_archive& archive, const ThumbnailData& thumbnail_data, int index);
|
||||
bool _add_bbox_file_to_archive(mz_zip_archive& archive, const PlateBBoxData& id_bboxes, int index);
|
||||
bool _add_relationships_file_to_archive(mz_zip_archive & archive,
|
||||
|
@ -5245,7 +5271,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
bool _add_project_embedded_presets_to_archive(mz_zip_archive& archive, Model& model, std::vector<Preset*> project_presets);
|
||||
bool _add_model_config_file_to_archive(mz_zip_archive& archive, const Model& model, PlateDataPtrs& plate_data_list, const ObjectToObjectDataMap &objects_data, int export_plate_idx = -1, bool save_gcode = true, bool use_loaded_id = false);
|
||||
bool _add_cut_information_file_to_archive(mz_zip_archive &archive, Model &model);
|
||||
bool _add_slice_info_config_file_to_archive(mz_zip_archive &archive, const Model &model, PlateDataPtrs &plate_data_list, const ObjectToObjectDataMap &objects_data);
|
||||
bool _add_slice_info_config_file_to_archive(mz_zip_archive &archive, const Model &model, PlateDataPtrs &plate_data_list, const ObjectToObjectDataMap &objects_data, const DynamicPrintConfig& config);
|
||||
bool _add_gcode_file_to_archive(mz_zip_archive& archive, const Model& model, PlateDataPtrs& plate_data_list, Export3mfProgressFn proFn = nullptr);
|
||||
bool _add_custom_gcode_per_print_z_file_to_archive(mz_zip_archive& archive, Model& model, const DynamicPrintConfig* config);
|
||||
bool _add_auxiliary_dir_to_archive(mz_zip_archive &archive, const std::string &aux_dir, PackingTemporaryData &data);
|
||||
|
@ -5464,9 +5490,10 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
{
|
||||
if (thumbnail_data[index]->is_valid())
|
||||
{
|
||||
if (!_add_thumbnail_file_to_archive(archive, *thumbnail_data[index], "Metadata/plate", index)) {
|
||||
if (!_add_thumbnail_file_to_archive(archive, *thumbnail_data[index], "Metadata/plate", index, true)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ":" <<__LINE__ << boost::format(",add thumbnail %1%'s data into 3mf")%(index+1);
|
||||
thumbnail_status[index] = true;
|
||||
}
|
||||
|
@ -5746,7 +5773,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
|
||||
// Adds sliced info of plate file ("Metadata/slice_info.config")
|
||||
// This file contains all sliced info of all plates
|
||||
if (!_add_slice_info_config_file_to_archive(archive, model, plate_data_list, objects_data)) {
|
||||
if (!_add_slice_info_config_file_to_archive(archive, model, plate_data_list, objects_data, *config)) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ":" << __LINE__ << boost::format(", _add_slice_info_config_file_to_archive failed\n");
|
||||
return false;
|
||||
}
|
||||
|
@ -5843,7 +5870,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool _BBS_3MF_Exporter::_add_thumbnail_file_to_archive(mz_zip_archive& archive, const ThumbnailData& thumbnail_data, const char* local_path, int index)
|
||||
bool _BBS_3MF_Exporter::_add_thumbnail_file_to_archive(mz_zip_archive& archive, const ThumbnailData& thumbnail_data, const char* local_path, int index, bool generate_small_thumbnail)
|
||||
{
|
||||
bool res = false;
|
||||
|
||||
|
@ -5860,6 +5887,49 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ":" << __LINE__ << boost::format(", Unable to add thumbnail file to archive\n");
|
||||
}
|
||||
|
||||
if (generate_small_thumbnail && thumbnail_data.is_valid()) {
|
||||
//generate small size of thumbnail
|
||||
std::vector<unsigned char> small_pixels;
|
||||
small_pixels.resize(PLATE_THUMBNAIL_SMALL_WIDTH * PLATE_THUMBNAIL_SMALL_HEIGHT * 4);
|
||||
/* step width and step height */
|
||||
int sw = thumbnail_data.width / PLATE_THUMBNAIL_SMALL_WIDTH;
|
||||
int sh = thumbnail_data.height / PLATE_THUMBNAIL_SMALL_HEIGHT;
|
||||
for (int i = 0; i < thumbnail_data.height; i += sh) {
|
||||
for (int j = 0; j < thumbnail_data.width; j += sw) {
|
||||
int r = 0, g = 0, b = 0, a = 0;
|
||||
for (int m = 0; m < sh; m++) {
|
||||
for (int n = 0; n < sw; n++) {
|
||||
r += (int)thumbnail_data.pixels[4 * ((i + m) * thumbnail_data.width + j + n) + 0];
|
||||
g += (int)thumbnail_data.pixels[4 * ((i + m) * thumbnail_data.width + j + n) + 1];
|
||||
b += (int)thumbnail_data.pixels[4 * ((i + m) * thumbnail_data.width + j + n) + 2];
|
||||
a += (int)thumbnail_data.pixels[4 * ((i + m) * thumbnail_data.width + j + n) + 3];
|
||||
}
|
||||
}
|
||||
r = std::clamp(0, r / sw / sh, 255);
|
||||
g = std::clamp(0, g / sw / sh, 255);
|
||||
b = std::clamp(0, b / sw / sh, 255);
|
||||
a = std::clamp(0, a / sw / sh, 255);
|
||||
small_pixels[4 * (i / sw * PLATE_THUMBNAIL_SMALL_WIDTH + j / sh) + 0] = (unsigned char)r;
|
||||
small_pixels[4 * (i / sw * PLATE_THUMBNAIL_SMALL_WIDTH + j / sh) + 1] = (unsigned char)g;
|
||||
small_pixels[4 * (i / sw * PLATE_THUMBNAIL_SMALL_WIDTH + j / sh) + 2] = (unsigned char)b;
|
||||
small_pixels[4 * (i / sw * PLATE_THUMBNAIL_SMALL_WIDTH + j / sh) + 3] = (unsigned char)a;
|
||||
//memcpy((void*)&small_pixels[4*(i / sw * PLATE_THUMBNAIL_SMALL_WIDTH + j / sh)], thumbnail_data.pixels.data() + 4*(i * thumbnail_data.width + j), 4);
|
||||
}
|
||||
}
|
||||
size_t small_png_size = 0;
|
||||
void* small_png_data = tdefl_write_image_to_png_file_in_memory_ex((const void*)small_pixels.data(), PLATE_THUMBNAIL_SMALL_WIDTH, PLATE_THUMBNAIL_SMALL_HEIGHT, 4, &small_png_size, MZ_DEFAULT_COMPRESSION, 1);
|
||||
if (png_data != nullptr) {
|
||||
std::string thumbnail_name = (boost::format("%1%_%2%_small.png") % local_path % (index + 1)).str();
|
||||
res = mz_zip_writer_add_mem(&archive, thumbnail_name.c_str(), (const void*)small_png_data, small_png_size, MZ_NO_COMPRESSION);
|
||||
mz_free(small_png_data);
|
||||
}
|
||||
|
||||
if (!res) {
|
||||
add_error("Unable to add small thumbnail file to archive");
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ":" << __LINE__ << boost::format(", Unable to add small thumbnail file to archive\n");
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -5909,27 +5979,46 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
if (from.empty()) {
|
||||
stream << " <Relationship Target=\"/" << MODEL_FILE << "\" Id=\"rel-1\" Type=\"http://schemas.microsoft.com/3dmanufacturing/2013/01/3dmodel\"/>\n";
|
||||
|
||||
if (data._3mf_thumbnail.empty()) {
|
||||
if (export_plate_idx < 0) {
|
||||
stream << " <Relationship Target=\"/" << THUMBNAIL_FILE
|
||||
<< "\" Id=\"rel-2\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail\"/>\n";
|
||||
if (export_plate_idx < 0) {
|
||||
//use cover image if have
|
||||
if (data._3mf_thumbnail.empty()) {
|
||||
stream << " <Relationship Target=\"/Metadata/plate_1.png"
|
||||
<< "\" Id=\"rel-2\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail\"/>\n";
|
||||
} else {
|
||||
std::string thumbnail_file_str = (boost::format("Metadata/plate_%1%.png") % (export_plate_idx + 1)).str();
|
||||
stream << " <Relationship Target=\"/" << xml_escape(thumbnail_file_str)
|
||||
<< "\" Id=\"rel-2\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail\"/>\n";
|
||||
stream << " <Relationship Target=\"/" << xml_escape(data._3mf_thumbnail)
|
||||
<< "\" Id=\"rel-2\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail\"/>\n";
|
||||
}
|
||||
} else {
|
||||
stream << " <Relationship Target=\"/" << xml_escape(data._3mf_thumbnail)
|
||||
<< "\" Id=\"rel-2\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail\"/>\n";
|
||||
}
|
||||
|
||||
if (!data._3mf_printer_thumbnail_middle.empty()) {
|
||||
stream << " <Relationship Target=\"/" << xml_escape(data._3mf_printer_thumbnail_middle)
|
||||
<< "\" Id=\"rel-4\" Type=\"http://schemas.bambulab.com/package/2021/cover-thumbnail-middle\"/>\n";
|
||||
if (data._3mf_printer_thumbnail_middle.empty()) {
|
||||
stream << " <Relationship Target=\"/Metadata/plate_1.png"
|
||||
<< "\" Id=\"rel-4\" Type=\"http://schemas.bambulab.com/package/2021/cover-thumbnail-middle\"/>\n";
|
||||
} else {
|
||||
stream << " <Relationship Target=\"/" << xml_escape(data._3mf_printer_thumbnail_middle)
|
||||
<< "\" Id=\"rel-4\" Type=\"http://schemas.bambulab.com/package/2021/cover-thumbnail-middle\"/>\n";
|
||||
}
|
||||
|
||||
if (data._3mf_printer_thumbnail_small.empty()) {
|
||||
stream << "<Relationship Target=\"/Metadata/plate_1_small.png"
|
||||
<< "\" Id=\"rel-5\" Type=\"http://schemas.bambulab.com/package/2021/cover-thumbnail-small\"/>\n";
|
||||
} else {
|
||||
stream << " <Relationship Target=\"/" << xml_escape(data._3mf_printer_thumbnail_small)
|
||||
<< "\" Id=\"rel-5\" Type=\"http://schemas.bambulab.com/package/2021/cover-thumbnail-small\"/>\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
//always use plate thumbnails
|
||||
std::string thumbnail_file_str = (boost::format("Metadata/plate_%1%.png") % (export_plate_idx + 1)).str();
|
||||
stream << " <Relationship Target=\"/" << xml_escape(thumbnail_file_str)
|
||||
<< "\" Id=\"rel-2\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail\"/>\n";
|
||||
|
||||
thumbnail_file_str = (boost::format("Metadata/plate_%1%.png") % (export_plate_idx + 1)).str();
|
||||
stream << " <Relationship Target=\"/" << xml_escape(thumbnail_file_str)
|
||||
<< "\" Id=\"rel-4\" Type=\"http://schemas.bambulab.com/package/2021/cover-thumbnail-middle\"/>\n";
|
||||
|
||||
thumbnail_file_str = (boost::format("Metadata/plate_%1%_small.png") % (export_plate_idx + 1)).str();
|
||||
stream << " <Relationship Target=\"/" << xml_escape(thumbnail_file_str)
|
||||
<< "\" Id=\"rel-5\" Type=\"http://schemas.bambulab.com/package/2021/cover-thumbnail-small\"/>\n";
|
||||
}
|
||||
if (!data._3mf_printer_thumbnail_small.empty())
|
||||
stream << " <Relationship Target=\"/" << xml_escape(data._3mf_printer_thumbnail_small)
|
||||
<< "\" Id=\"rel-5\" Type=\"http://schemas.bambulab.com/package/2021/cover-thumbnail-small\"/>\n";
|
||||
}
|
||||
else if (targets.empty()) {
|
||||
return false;
|
||||
|
@ -6059,7 +6148,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
metadata_item_map[BBL_DESIGNER_USER_ID_TAG] = user_id;
|
||||
metadata_item_map[BBL_DESIGNER_COVER_FILE_TAG] = xml_escape(design_cover);
|
||||
metadata_item_map[BBL_DESCRIPTION_TAG] = xml_escape(description);
|
||||
metadata_item_map[BBL_COPYRIGHT_TAG] = xml_escape(copyright);
|
||||
metadata_item_map[BBL_COPYRIGHT_NORMATIVE_TAG] = xml_escape(copyright);
|
||||
metadata_item_map[BBL_LICENSE_TAG] = xml_escape(license);
|
||||
|
||||
/* save model info */
|
||||
|
@ -6313,9 +6402,10 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
}
|
||||
//add the transform of the volume
|
||||
if (ppath->empty())
|
||||
stream << " <" << COMPONENT_TAG << " objectid=\"" << volume_id; // << "\"/>\n";
|
||||
stream << " <" << COMPONENT_TAG << " objectid=\"" << volume_id;
|
||||
else
|
||||
stream << " <" << COMPONENT_TAG << " p:path=\"" << xml_escape(*ppath) << "\" objectid=\"" << volume_id; // << "\"/>\n";
|
||||
stream << "\" " << PUUID_ATTR << "=\"" << hex_wrap<boost::uint32_t>{(boost::uint32_t) object_data.backup_id} << COMPONENT_UUID_SUFFIX;
|
||||
const Transform3d &transf = volume->get_matrix();
|
||||
stream << "\" " << TRANSFORM_ATTR << "=\"";
|
||||
for (unsigned c = 0; c < 4; ++c) {
|
||||
|
@ -6437,17 +6527,17 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
output_buffer += OBJECT_TAG;
|
||||
output_buffer += " id=\"";
|
||||
output_buffer += std::to_string(volume_id);
|
||||
/*if (m_production_ext) {
|
||||
if (m_production_ext) {
|
||||
std::stringstream stream;
|
||||
reset_stream(stream);
|
||||
stream << "\" " << PUUID_ATTR << "=\"" << hex_wrap<boost::uint32_t>{(boost::uint32_t)backup_id} << OBJECT_UUID_SUFFIX;
|
||||
stream << "\" " << PUUID_ATTR << "=\"" << hex_wrap<boost::uint32_t>{(boost::uint32_t) object_data.backup_id} << SUB_OBJECT_UUID_SUFFIX;
|
||||
//output_buffer += "\" ";
|
||||
//output_buffer += PUUID_ATTR;
|
||||
//output_buffer += "=\"";
|
||||
//output_buffer += std::to_string(hex_wrap<boost::uint32_t>{(boost::uint32_t)backup_id});
|
||||
//output_buffer += OBJECT_UUID_SUFFIX;
|
||||
output_buffer += stream.str();
|
||||
}*/
|
||||
}
|
||||
output_buffer += "\" type=\"";
|
||||
output_buffer += type;
|
||||
output_buffer += "\">\n";
|
||||
|
@ -6580,6 +6670,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
{
|
||||
// This happens for empty projects
|
||||
if (build_items.size() == 0) {
|
||||
stream << " <" << BUILD_TAG << "/>\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -6621,12 +6712,12 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
++count;
|
||||
const std::vector<double>& layer_height_profile = object->layer_height_profile.get();
|
||||
if (layer_height_profile.size() >= 4 && layer_height_profile.size() % 2 == 0) {
|
||||
sprintf(buffer, "object_id=%d|", count);
|
||||
snprintf(buffer, 1024, "object_id=%d|", count);
|
||||
out += buffer;
|
||||
|
||||
// Store the layer height profile as a single semicolon separated list.
|
||||
for (size_t i = 0; i < layer_height_profile.size(); ++i) {
|
||||
sprintf(buffer, (i == 0) ? "%f" : ";%f", layer_height_profile[i]);
|
||||
snprintf(buffer, 1024, (i == 0) ? "%f" : ";%f", layer_height_profile[i]);
|
||||
out += buffer;
|
||||
}
|
||||
|
||||
|
@ -6797,7 +6888,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
{
|
||||
assert(is_decimal_separator_point());
|
||||
char buffer[1024];
|
||||
sprintf(buffer, "; %s\n\n", header_slic3r_generated().c_str());
|
||||
snprintf(buffer, 1024, "; %s\n\n", header_slic3r_generated().c_str());
|
||||
std::string out = buffer;
|
||||
|
||||
for (const std::string &key : config.keys())
|
||||
|
@ -6828,7 +6919,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
bool _BBS_3MF_Exporter::_add_project_embedded_presets_to_archive(mz_zip_archive& archive, Model& model, std::vector<Preset*> project_presets)
|
||||
{
|
||||
char buffer[1024];
|
||||
sprintf(buffer, "; %s\n\n", header_slic3r_generated().c_str());
|
||||
snprintf(buffer, 1024, "; %s\n\n", header_slic3r_generated().c_str());
|
||||
std::string out = buffer;
|
||||
int print_count = 0, filament_count = 0, printer_count = 0;
|
||||
const std::string& temp_path = model.get_backup_path();
|
||||
|
@ -7235,7 +7326,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool _BBS_3MF_Exporter::_add_slice_info_config_file_to_archive(mz_zip_archive& archive, const Model& model, PlateDataPtrs& plate_data_list, const ObjectToObjectDataMap &objects_data)
|
||||
bool _BBS_3MF_Exporter::_add_slice_info_config_file_to_archive(mz_zip_archive& archive, const Model& model, PlateDataPtrs& plate_data_list, const ObjectToObjectDataMap &objects_data, const DynamicPrintConfig& config)
|
||||
{
|
||||
std::stringstream stream;
|
||||
// Store mesh transformation in full precision, as the volumes are stored transformed and they need to be transformed back
|
||||
|
@ -7260,6 +7351,16 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
stream << " <" << PLATE_TAG << ">\n";
|
||||
//plate index
|
||||
stream << " <" << METADATA_TAG << " " << KEY_ATTR << "=\"" << PLATE_IDX_ATTR << "\" " << VALUE_ATTR << "=\"" << plate_data->plate_index + 1 << "\"/>\n";
|
||||
|
||||
int timelapse_type = int(config.opt_enum<TimelapseType>("timelapse_type"));
|
||||
for (auto it = plate_data->warnings.begin(); it != plate_data->warnings.end(); it++) {
|
||||
if (it->msg == NOT_GENERATE_TIMELAPSE) {
|
||||
timelapse_type = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
stream << " <" << METADATA_TAG << " " << KEY_ATTR << "=\"" << TIMELAPSE_TYPE_ATTR << "\" " << VALUE_ATTR << "=\"" << timelapse_type << "\"/>\n";
|
||||
//stream << " <" << METADATA_TAG << " " << KEY_ATTR << "=\"" << TIMELAPSE_ERROR_CODE_ATTR << "\" " << VALUE_ATTR << "=\"" << plate_data->timelapse_warning_code << "\"/>\n";
|
||||
stream << " <" << METADATA_TAG << " " << KEY_ATTR << "=\"" << SLICE_PREDICTION_ATTR << "\" " << VALUE_ATTR << "=\"" << plate_data->get_gcode_prediction_str() << "\"/>\n";
|
||||
stream << " <" << METADATA_TAG << " " << KEY_ATTR << "=\"" << SLICE_WEIGHT_ATTR << "\" " << VALUE_ATTR << "=\"" << plate_data->get_gcode_weight_str() << "\"/>\n";
|
||||
stream << " <" << METADATA_TAG << " " << KEY_ATTR << "=\"" << OUTSIDE_ATTR << "\" " << VALUE_ATTR << "=\"" << std::boolalpha<< plate_data->toolpath_outside << "\"/>\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue