mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-10 00:07:52 -06:00
post changes after merging BS1.7.4
Remove tracking etc..
This commit is contained in:
parent
e65b11a831
commit
2a478ab4f9
615 changed files with 46215 additions and 54844 deletions
|
@ -277,7 +277,7 @@ static constexpr const char* OBJECT_ID_ATTR = "object_id";
|
|||
static constexpr const char* INSTANCEID_ATTR = "instance_id";
|
||||
static constexpr const char* IDENTIFYID_ATTR = "identify_id";
|
||||
static constexpr const char* PLATERID_ATTR = "plater_id";
|
||||
static constexpr const char* PLATER_NAME_ATTR = "plater_name";
|
||||
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";
|
||||
|
@ -910,7 +910,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
bool m_load_restore = false;
|
||||
std::string m_backup_path;
|
||||
std::string m_origin_file;
|
||||
// Semantic version of Bambu Studio, that generated this 3MF.
|
||||
// Semantic version of Orca Slicer, that generated this 3MF.
|
||||
boost::optional<Semver> m_bambuslicer_generator_version;
|
||||
unsigned int m_fdm_supports_painting_version = 0;
|
||||
unsigned int m_seam_painting_version = 0;
|
||||
|
@ -1769,7 +1769,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
lock.close();
|
||||
|
||||
if (!m_is_bbl_3mf) {
|
||||
// if the 3mf was not produced by BambuStudio and there is more than one instance,
|
||||
// if the 3mf was not produced by OrcaSlicer 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) {
|
||||
|
@ -2046,7 +2046,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
}
|
||||
plate_data_list[it->first-1]->locked = it->second->locked;
|
||||
plate_data_list[it->first-1]->plate_index = it->second->plate_index-1;
|
||||
plate_data_list[it->first-1]->plate_name = it->second->plate_name;
|
||||
plate_data_list[it->first-1]->plate_name = it->second->plate_name;
|
||||
plate_data_list[it->first-1]->obj_inst_map = it->second->obj_inst_map;
|
||||
plate_data_list[it->first-1]->gcode_file = (m_load_restore || it->second->gcode_file.empty()) ? it->second->gcode_file : m_backup_path + "/" + it->second->gcode_file;
|
||||
plate_data_list[it->first-1]->gcode_prediction = it->second->gcode_prediction;
|
||||
|
@ -2616,7 +2616,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void _BBS_3MF_Importer::_extract_layer_config_ranges_from_archive(mz_zip_archive& archive, const mz_zip_archive_file_stat& stat, ConfigSubstitutionContext& config_substitutions)
|
||||
{
|
||||
if (stat.m_uncomp_size > 0) {
|
||||
|
@ -3121,7 +3121,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
}
|
||||
|
||||
if (!m_is_bbl_3mf) {
|
||||
// if the 3mf was not produced by BambuStudio and there is only one object,
|
||||
// if the 3mf was not produced by OrcaSlicer 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;
|
||||
|
@ -3522,19 +3522,23 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
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-")) {
|
||||
m_is_bbl_3mf = true;
|
||||
m_bambuslicer_generator_version = Semver::parse(m_curr_characters.substr(11));
|
||||
}
|
||||
//TODO: currently use version 0, no need to load&&save this string
|
||||
/*} 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 BambuStudio and is not compatible.")));
|
||||
_(L("The selected 3MF contains FDM supports painted object using a newer version of OrcaSlicer 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 BambuStudio and is not compatible.")));
|
||||
_(L("The selected 3MF contains seam painted object using a newer version of OrcaSlicer 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 BambuStudio and is not compatible.")));*/
|
||||
_(L("The selected 3MF contains multi-material painted object using a newer version of OrcaSlicer 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) {
|
||||
|
@ -4543,7 +4547,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 BambuStudio and there is only one instance,
|
||||
// if the 3mf was not produced by OrcaSlicer 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) {
|
||||
|
@ -5414,7 +5418,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 BambuStudio 3mf.
|
||||
// The content of this file is the same for each OrcaSlicer 3mf.
|
||||
if (!_add_content_types_file_to_archive(archive)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -5769,7 +5773,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
}
|
||||
|
||||
// Adds relationships file ("_rels/.rels").
|
||||
// The content of this file is the same for each BambuStudio 3mf.
|
||||
// The content of this file is the same for each OrcaSlicer 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");
|
||||
|
@ -5934,7 +5938,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
int i = 0;
|
||||
for (auto & path : targets) {
|
||||
for (auto & type : types)
|
||||
stream << " <Relationship Target=\"/" << xml_escape(path) << "\" Id=\"rel-" << boost::to_string(++i) << "\" Type=\"" << type << "\"/>\n";
|
||||
stream << " <Relationship Target=\"/" << xml_escape(path) << "\" Id=\"rel-" << std::to_string(++i) << "\" Type=\"" << type << "\"/>\n";
|
||||
}
|
||||
}
|
||||
stream << "</Relationships>";
|
||||
|
@ -6069,7 +6073,8 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
date = date.substr(0, 10);
|
||||
metadata_item_map[BBL_CREATION_DATE_TAG] = date;
|
||||
metadata_item_map[BBL_MODIFICATION_TAG] = date;
|
||||
metadata_item_map[BBL_APPLICATION_TAG] = (boost::format("%1%-%2%") % SLIC3R_APP_KEY % SLIC3R_VERSION).str();
|
||||
//SoftFever: write BambuStudio tag to keep it compatible
|
||||
metadata_item_map[BBL_APPLICATION_TAG] = (boost::format("%1%-%2%") % "BambuStudio" % SLIC3R_VERSION).str();
|
||||
}
|
||||
metadata_item_map[BBS_3MF_VERSION] = std::to_string(VERSION_BBS_3MF);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue