mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 02:41:17 +00:00
Merge: Snapmaker Orca 2.1.2
This commit is contained in:
@@ -1729,7 +1729,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
// Orca: skip version check
|
||||
bool dont_load_config = !m_load_config;
|
||||
// if (m_bambuslicer_generator_version) {
|
||||
// Semver app_version = *(Semver::parse(SoftFever_VERSION));
|
||||
// Semver app_version = *(Semver::parse(Snapmaker_VERSION));
|
||||
// Semver file_version = *m_bambuslicer_generator_version;
|
||||
// if (file_version.maj() != app_version.maj())
|
||||
// dont_load_config = true;
|
||||
@@ -1858,7 +1858,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
lock.close();
|
||||
|
||||
if (!m_is_bbl_3mf) {
|
||||
// if the 3mf was not produced by OrcaSlicer and there is more than one instance,
|
||||
// if the 3mf was not produced by Snapmaker_Orca and there is more than one instance,
|
||||
// split the object in as many objects as instances
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ":" << __LINE__ << boost::format(", found 3mf from other vendor, split as instance");
|
||||
for (const IdToModelObjectMap::value_type& object : m_objects) {
|
||||
@@ -2094,7 +2094,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
extruder_id = extruder_opt->getInt();
|
||||
|
||||
if (extruder_id == 0 || extruder_id > max_filament_id)
|
||||
mo->config.set_key_value("extruder", new ConfigOptionInt(1));
|
||||
mo->config.set_key_value("extruder", new ConfigOptionInt(0));
|
||||
|
||||
if (mo->volumes.size() == 1) {
|
||||
mo->volumes[0]->config.erase("extruder");
|
||||
@@ -2108,7 +2108,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
if (vol_extruder_opt->getInt() == 0)
|
||||
mv->config.erase("extruder");
|
||||
else if (vol_extruder_opt->getInt() > max_filament_id)
|
||||
mv->config.set_key_value("extruder", new ConfigOptionInt(1));
|
||||
mv->config.set_key_value("extruder", new ConfigOptionInt(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3328,7 +3328,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
}
|
||||
|
||||
if (!m_is_bbl_3mf) {
|
||||
// if the 3mf was not produced by OrcaSlicer and there is only one object,
|
||||
// if the 3mf was not produced by Snapmaker_Orca and there is only one object,
|
||||
// set the object name to match the filename
|
||||
if (m_model->objects.size() == 1)
|
||||
m_model->objects.front()->name = m_name;
|
||||
@@ -3728,12 +3728,12 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
}*/
|
||||
} else if (m_curr_metadata_name == BBL_APPLICATION_TAG) {
|
||||
// Generator application of the 3MF.
|
||||
// SLIC3R_APP_KEY - SoftFever_VERSION
|
||||
// SLIC3R_APP_KEY - Snapmaker_VERSION
|
||||
if (boost::starts_with(m_curr_characters, "BambuStudio-")) {
|
||||
m_is_bbl_3mf = true;
|
||||
m_bambuslicer_generator_version = Semver::parse(m_curr_characters.substr(12));
|
||||
}
|
||||
else if (boost::starts_with(m_curr_characters, "OrcaSlicer-")) {
|
||||
else if (boost::starts_with(m_curr_characters, "Snapmaker_Orca-")) {
|
||||
m_is_bbl_3mf = true;
|
||||
m_bambuslicer_generator_version = Semver::parse(m_curr_characters.substr(11));
|
||||
}
|
||||
@@ -3741,15 +3741,15 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
/*} else if (m_curr_metadata_name == BBS_FDM_SUPPORTS_PAINTING_VERSION) {
|
||||
m_fdm_supports_painting_version = (unsigned int) atoi(m_curr_characters.c_str());
|
||||
check_painting_version(m_fdm_supports_painting_version, FDM_SUPPORTS_PAINTING_VERSION,
|
||||
_(L("The selected 3MF contains FDM supports painted object using a newer version of OrcaSlicer and is not compatible.")));
|
||||
_(L("The selected 3MF contains FDM supports painted object using a newer version of Snapmaker_Orca and is not compatible.")));
|
||||
} else if (m_curr_metadata_name == BBS_SEAM_PAINTING_VERSION) {
|
||||
m_seam_painting_version = (unsigned int) atoi(m_curr_characters.c_str());
|
||||
check_painting_version(m_seam_painting_version, SEAM_PAINTING_VERSION,
|
||||
_(L("The selected 3MF contains seam painted object using a newer version of OrcaSlicer and is not compatible.")));
|
||||
_(L("The selected 3MF contains seam painted object using a newer version of Snapmaker_Orca and is not compatible.")));
|
||||
} else if (m_curr_metadata_name == BBS_MM_PAINTING_VERSION) {
|
||||
m_mm_painting_version = (unsigned int) atoi(m_curr_characters.c_str());
|
||||
check_painting_version(m_mm_painting_version, MM_PAINTING_VERSION,
|
||||
_(L("The selected 3MF contains multi-material painted object using a newer version of OrcaSlicer and is not compatible.")));*/
|
||||
_(L("The selected 3MF contains multi-material painted object using a newer version of Snapmaker_Orca and is not compatible.")));*/
|
||||
} else if (m_curr_metadata_name == BBL_MODEL_ID_TAG) {
|
||||
m_model_id = xml_unescape(m_curr_characters);
|
||||
} else if (m_curr_metadata_name == BBL_MODEL_NAME_TAG) {
|
||||
@@ -4908,7 +4908,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
TriangleMesh triangle_mesh(std::move(its), volume_data.mesh_stats);
|
||||
|
||||
if (!m_is_bbl_3mf) {
|
||||
// if the 3mf was not produced by OrcaSlicer and there is only one instance,
|
||||
// if the 3mf was not produced by Snapmaker_Orca and there is only one instance,
|
||||
// bake the transformation into the geometry to allow the reload from disk command
|
||||
// to work properly
|
||||
if (object.instances.size() == 1) {
|
||||
@@ -5791,7 +5791,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
}
|
||||
|
||||
// Adds content types file ("[Content_Types].xml";).
|
||||
// The content of this file is the same for each OrcaSlicer 3mf.
|
||||
// The content of this file is the same for each Snapmaker_Orca 3mf.
|
||||
if (!_add_content_types_file_to_archive(archive)) {
|
||||
return false;
|
||||
}
|
||||
@@ -6174,7 +6174,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
}
|
||||
|
||||
// Adds relationships file ("_rels/.rels").
|
||||
// The content of this file is the same for each OrcaSlicer 3mf.
|
||||
// The content of this file is the same for each Snapmaker_Orca 3mf.
|
||||
// The relationshis file contains a reference to the geometry file "3D/3dmodel.model", the name was chosen to be compatible with CURA.
|
||||
if (!_add_relationships_file_to_archive(archive, {}, {}, {}, temp_data, export_plate_idx)) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ":" <<__LINE__ << boost::format(", _add_relationships_file_to_archive failed\n");
|
||||
@@ -6538,7 +6538,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
metadata_item_map[BBL_CREATION_DATE_TAG] = "";
|
||||
metadata_item_map[BBL_MODIFICATION_TAG] = "";
|
||||
//SoftFever: write BambuStudio tag to keep it compatible
|
||||
metadata_item_map[BBL_APPLICATION_TAG] = (boost::format("%1%-%2%") % "BambuStudio" % SoftFever_VERSION).str();
|
||||
metadata_item_map[BBL_APPLICATION_TAG] = (boost::format("%1%-%2%") % "BambuStudio" % Snapmaker_VERSION).str();
|
||||
}
|
||||
metadata_item_map[BBS_3MF_VERSION] = std::to_string(VERSION_BBS_3MF);
|
||||
|
||||
@@ -7420,7 +7420,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
{
|
||||
const std::string& temp_path = model.get_backup_path();
|
||||
std::string temp_file = temp_path + std::string("/") + "_temp_1.config";
|
||||
config.save_to_json(temp_file, std::string("project_settings"), std::string("project"), std::string(SoftFever_VERSION));
|
||||
config.save_to_json(temp_file, std::string("project_settings"), std::string("project"), std::string(Snapmaker_VERSION));
|
||||
return _add_file_to_archive(archive, BBS_PROJECT_CONFIG_FILE, temp_file);
|
||||
}
|
||||
|
||||
@@ -7798,7 +7798,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
// save slice header for debug
|
||||
stream << " <" << SLICE_HEADER_TAG << ">\n";
|
||||
stream << " <" << SLICE_HEADER_ITEM_TAG << " " << KEY_ATTR << "=\"" << "X-BBL-Client-Type" << "\" " << VALUE_ATTR << "=\"" << "slicer" << "\"/>\n";
|
||||
stream << " <" << SLICE_HEADER_ITEM_TAG << " " << KEY_ATTR << "=\"" << "X-BBL-Client-Version" << "\" " << VALUE_ATTR << "=\"" << convert_to_full_version(SoftFever_VERSION) << "\"/>\n";
|
||||
stream << " <" << SLICE_HEADER_ITEM_TAG << " " << KEY_ATTR << "=\"" << "X-BBL-Client-Version" << "\" " << VALUE_ATTR << "=\"" << convert_to_full_version(Snapmaker_VERSION) << "\"/>\n";
|
||||
stream << " </" << SLICE_HEADER_TAG << ">\n";
|
||||
|
||||
for (unsigned int i = 0; i < (unsigned int)plate_data_list.size(); ++i)
|
||||
|
||||
Reference in New Issue
Block a user