mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Merge remote-tracking branch 'upstream/main' into libvgcode
# Conflicts: # src/libslic3r/GCode/GCodeProcessor.cpp
This commit is contained in:
@@ -2104,8 +2104,10 @@ Vec3d PartPlate::estimate_wipe_tower_size(const DynamicPrintConfig & config, con
|
||||
depth = std::sqrt(volume / layer_height * extra_spacing);
|
||||
if (need_wipe_tower || plate_extruder_size > 1) {
|
||||
float min_wipe_tower_depth = WipeTower::get_limit_depth_by_height(max_height);
|
||||
double volume_depth = depth;
|
||||
depth = std::max((double) min_wipe_tower_depth, depth);
|
||||
depth += rib_width / std::sqrt(2) + m_print->config().wipe_tower_extra_rib_length.value;
|
||||
rib_width = std::min(rib_width, depth / 2);
|
||||
depth = rib_width / std::sqrt(2) + std::max(depth + m_print->config().wipe_tower_extra_rib_length.value, volume_depth);
|
||||
wipe_tower_size(0) = wipe_tower_size(1) = depth;
|
||||
}
|
||||
}
|
||||
@@ -5988,6 +5990,7 @@ int PartPlateList::store_to_3mf_structure(PlateDataPtrs& plate_data_list, bool w
|
||||
plate_data_item->is_label_object_enabled = m_plate_list[i]->m_gcode_result->label_object_enabled;
|
||||
plate_data_item->limit_filament_maps = m_plate_list[i]->m_gcode_result->limit_filament_maps;
|
||||
plate_data_item->layer_filaments = m_plate_list[i]->m_gcode_result->layer_filaments;
|
||||
plate_data_item->first_layer_time = std::to_string(m_plate_list[i]->cali_bboxes_data.first_layer_time);
|
||||
Print *print = nullptr;
|
||||
m_plate_list[i]->get_print((PrintBase **) &print, nullptr, nullptr);
|
||||
if (print) {
|
||||
@@ -6225,6 +6228,7 @@ void PartPlateList::init_bed_type_info()
|
||||
std::string bottom_texture_end_name = bed_texture_maps.find("bottom_texture_end_name") != bed_texture_maps.end() ? bed_texture_maps["bottom_texture_end_name"] : "";
|
||||
std::string bottom_texture_rect_str = bed_texture_maps.find("bottom_texture_rect") != bed_texture_maps.end() ? bed_texture_maps["bottom_texture_rect"] : "";
|
||||
std::string middle_texture_rect_str = bed_texture_maps.find("middle_texture_rect") != bed_texture_maps.end() ? bed_texture_maps["middle_texture_rect"] : "";
|
||||
std::string use_double_extruder_default_texture = bed_texture_maps.find("use_double_extruder_default_texture") != bed_texture_maps.end() ? bed_texture_maps["use_double_extruder_default_texture"] : "";
|
||||
std::array<float, 4> bottom_texture_rect = {0, 0, 0, 0}, middle_texture_rect = {0, 0, 0, 0};
|
||||
if (bottom_texture_rect_str.size() > 0) {
|
||||
std::vector<std::string> items;
|
||||
@@ -6247,8 +6251,8 @@ void PartPlateList::init_bed_type_info()
|
||||
}
|
||||
}
|
||||
auto is_single_extruder = wxGetApp().preset_bundle->get_printer_extruder_count() == 1;
|
||||
if (!is_single_extruder) {
|
||||
m_allow_bed_type_in_double_nozzle.clear();
|
||||
bool use_double_extruder_texture = !is_single_extruder || use_double_extruder_default_texture == "true";
|
||||
if (use_double_extruder_texture) {
|
||||
pte_part1 = BedTextureInfo::TexturePart(57, 300, 236.12f, 10.f, "bbl_bed_pte_middle.svg");
|
||||
auto &middle_rect = middle_texture_rect;
|
||||
if (middle_rect[2] > 0.f) {
|
||||
@@ -6260,17 +6264,59 @@ void PartPlateList::init_bed_type_info()
|
||||
std::string pte_part2_name = "bbl_bed_pte_bottom_" + bottom_texture_end_name + ".svg";
|
||||
pte_part2 = BedTextureInfo::TexturePart(bottom_rect[0], bottom_rect[1], bottom_rect[2], bottom_rect[3], pte_part2_name);
|
||||
}
|
||||
|
||||
pei_part1 = BedTextureInfo::TexturePart(57, 300, 236.12f, 10.f, "bbl_bed_pei_middle.svg");
|
||||
if (middle_rect[2] > 0.f) {
|
||||
pei_part1 = BedTextureInfo::TexturePart(middle_rect[0], middle_rect[1], middle_rect[2], middle_rect[3], "bbl_bed_pte_middle.svg");
|
||||
pei_part1 = BedTextureInfo::TexturePart(middle_rect[0], middle_rect[1], middle_rect[2], middle_rect[3], "bbl_bed_pei_middle.svg");
|
||||
}
|
||||
pei_part2 = BedTextureInfo::TexturePart(45, -14.5, 70, 8, "bbl_bed_pei_left_bottom.svg");
|
||||
if (bottom_texture_end_name.size() > 0 && bottom_rect[2] > 0.f) {
|
||||
std::string pei_part2_name = "bbl_bed_pei_bottom_" + bottom_texture_end_name + ".svg";
|
||||
pei_part2 = BedTextureInfo::TexturePart(bottom_rect[0], bottom_rect[1], bottom_rect[2], bottom_rect[3], pei_part2_name);
|
||||
}
|
||||
m_allow_bed_type_in_double_nozzle[(int) btPEI] = true;
|
||||
m_allow_bed_type_in_double_nozzle[(int) btPTE] = true;
|
||||
|
||||
st_part1 = BedTextureInfo::TexturePart(57, 300, 236.12f, 10.f, "bbl_bed_st_middle.svg");
|
||||
if (middle_rect[2] > 0.f) {
|
||||
st_part1 = BedTextureInfo::TexturePart(middle_rect[0], middle_rect[1], middle_rect[2], middle_rect[3], "bbl_bed_st_middle.svg");
|
||||
}
|
||||
st_part2 = BedTextureInfo::TexturePart(45, -14.5, 260, 8, "bbl_bed_st_left_bottom.svg");
|
||||
if (bottom_texture_end_name.size() > 0 && bottom_rect[2] > 0.f) {
|
||||
std::string st_part2_name = "bbl_bed_st_bottom_" + bottom_texture_end_name + ".svg";
|
||||
st_part2 = BedTextureInfo::TexturePart(bottom_rect[0], bottom_rect[1], bottom_rect[2], bottom_rect[3], st_part2_name);
|
||||
}
|
||||
|
||||
ep_part1 = BedTextureInfo::TexturePart(57, 300, 236.12f, 10.f, "bbl_bed_ep_middle.svg");
|
||||
if (middle_rect[2] > 0.f) {
|
||||
ep_part1 = BedTextureInfo::TexturePart(middle_rect[0], middle_rect[1], middle_rect[2], middle_rect[3], "bbl_bed_ep_middle.svg");
|
||||
}
|
||||
ep_part2 = BedTextureInfo::TexturePart(45, -14.5, 260, 8, "bbl_bed_ep_left_bottom.svg");
|
||||
if (bottom_texture_end_name.size() > 0 && bottom_rect[2] > 0.f) {
|
||||
std::string ep_part2_name = "bbl_bed_ep_bottom_" + bottom_texture_end_name + ".svg";
|
||||
ep_part2 = BedTextureInfo::TexturePart(bottom_rect[0], bottom_rect[1], bottom_rect[2], bottom_rect[3], ep_part2_name);
|
||||
}
|
||||
|
||||
pc_part1 = BedTextureInfo::TexturePart(57, 300, 236.12f, 10.f, "bbl_bed_pc_middle.svg");
|
||||
if (middle_rect[2] > 0.f) {
|
||||
pc_part1 = BedTextureInfo::TexturePart(middle_rect[0], middle_rect[1], middle_rect[2], middle_rect[3], "bbl_bed_pc_middle.svg"); }
|
||||
pc_part2 = BedTextureInfo::TexturePart(45, -14.5, 70, 8, "bbl_bed_pc_left_bottom.svg");
|
||||
if (bottom_texture_end_name.size() > 0 && bottom_rect[2] > 0.f) {
|
||||
std::string pc_part2_name = "bbl_bed_pc_bottom_" + bottom_texture_end_name + ".svg";
|
||||
pc_part2 = BedTextureInfo::TexturePart(bottom_rect[0], bottom_rect[1], bottom_rect[2], bottom_rect[3], pc_part2_name);
|
||||
}
|
||||
|
||||
m_allow_bed_type_in_double_nozzle.clear();
|
||||
auto bed_types = wxGetApp().plater()->sidebar().get_cur_combox_bed_types();
|
||||
for (int i = 0; i < bed_types.size(); i++) {
|
||||
m_allow_bed_type_in_double_nozzle[bed_types[i]] = true;
|
||||
}
|
||||
} else {
|
||||
if (bottom_texture_end_name.size() > 0) {
|
||||
st_part2.update_file("bbl_bed_st_bottom_" + bottom_texture_end_name + ".svg");
|
||||
pc_part2.update_file("bbl_bed_pc_bottom_" + bottom_texture_end_name + ".svg");
|
||||
ep_part2.update_file("bbl_bed_ep_bottom_" + bottom_texture_end_name + ".svg");
|
||||
pei_part2.update_file("bbl_bed_pei_bottom_" + bottom_texture_end_name + ".svg");
|
||||
pte_part2.update_file("bbl_bed_pte_bottom_" + bottom_texture_end_name + ".svg");
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < btCount; i++) {
|
||||
@@ -6295,7 +6341,7 @@ void PartPlateList::init_bed_type_info()
|
||||
int bed_height = bed_ext.size()(1);
|
||||
float base_width = 256;//standard 256*256 for single_extruder
|
||||
float base_height = 256;
|
||||
if (!is_single_extruder) {//standard 350*325 for double_extruder
|
||||
if (use_double_extruder_texture) { // standard 350*325 for double_extruder
|
||||
base_width = bed_width;
|
||||
base_height = bed_height;
|
||||
}
|
||||
@@ -6384,9 +6430,13 @@ bool PartPlateList::init_extruder_only_area_info()
|
||||
extruder_only_area_info[i].parts.clear();
|
||||
}
|
||||
extruder_only_area_info[(unsigned char) ExtruderOnlyAreaType::Engilish].parts.push_back(left_part);
|
||||
extruder_only_area_info[(unsigned char) ExtruderOnlyAreaType::Engilish].parts.push_back(right_part);
|
||||
if (base_right[2]>5) {//width should >5
|
||||
extruder_only_area_info[(unsigned char) ExtruderOnlyAreaType::Engilish].parts.push_back(right_part);
|
||||
}
|
||||
extruder_only_area_info[(unsigned char) ExtruderOnlyAreaType::Chinese].parts.push_back(left_ch_part);
|
||||
extruder_only_area_info[(unsigned char) ExtruderOnlyAreaType::Chinese].parts.push_back(right_ch_part);
|
||||
if (base_right[2] > 5) { // width should >5
|
||||
extruder_only_area_info[(unsigned char) ExtruderOnlyAreaType::Chinese].parts.push_back(right_ch_part);
|
||||
}
|
||||
|
||||
for (int i = 0; i < (unsigned char) ExtruderOnlyAreaType::btAreaCount; i++) {
|
||||
for (int j = 0; j < extruder_only_area_info[i].parts.size(); j++) {
|
||||
|
||||
Reference in New Issue
Block a user