mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-31 14:52:06 +00:00
Fix issues with non-bbl multi-head printers
This commit is contained in:
@@ -17,6 +17,7 @@ static const wxColour BackGroundColor = wxColour("#FFFFFF");
|
||||
static bool should_pop_up()
|
||||
{
|
||||
const auto &preset_bundle = wxGetApp().preset_bundle;
|
||||
if (!preset_bundle->is_bbl_vendor()) return false;
|
||||
const auto &full_config = preset_bundle->full_config();
|
||||
const auto nozzle_diameters = full_config.option<ConfigOptionFloats>("nozzle_diameter");
|
||||
return nozzle_diameters->size() > 1;
|
||||
|
||||
@@ -990,6 +990,8 @@ void GCodeViewer::load(const GCodeProcessorResult& gcode_result, const Print& pr
|
||||
|
||||
// BBS: data for rendering color arrangement recommendation
|
||||
m_nozzle_nums = print.config().option<ConfigOptionFloats>("nozzle_diameter")->values.size();
|
||||
// Orca hack: Hide filament group for non-bbl printers
|
||||
if (!print.is_BBL_printer()) m_nozzle_nums = 1;
|
||||
std::vector<int> filament_maps = print.get_filament_maps();
|
||||
std::vector<std::string> color_opt = print.config().option<ConfigOptionStrings>("filament_colour")->values;
|
||||
std::vector<std::string> type_opt = print.config().option<ConfigOptionStrings>("filament_type")->values;
|
||||
|
||||
@@ -15523,7 +15523,7 @@ void Plater::update_flush_volume_matrix(size_t old_nozzle_size, size_t new_nozzl
|
||||
if (first_flush_volume_mtx.size() == filament_nums * filament_nums * new_nozzle_size) { // load file
|
||||
set_flush_volumes_matrix(project_config->option<ConfigOptionFloats>("flush_volumes_matrix")->values, first_flush_volume_mtx, -1, new_nozzle_size);
|
||||
} else {
|
||||
first_flush_volume_mtx.resize(filament_nums * filament_nums);
|
||||
first_flush_volume_mtx.resize(filament_nums * filament_nums, 0);
|
||||
std::vector<double> flush_volume_mtx;
|
||||
for (size_t i = 0; i < new_nozzle_size; ++i) {
|
||||
flush_volume_mtx.insert(flush_volume_mtx.end(), first_flush_volume_mtx.begin(), first_flush_volume_mtx.end());
|
||||
@@ -15538,7 +15538,7 @@ void Plater::update_flush_volume_matrix(size_t old_nozzle_size, size_t new_nozzl
|
||||
std::vector<double> new_flush_volume_mtx;
|
||||
for (size_t i = 0; i < new_nozzle_size; ++i) {
|
||||
std::vector<double> flush_volume_mtx = get_flush_volumes_matrix(project_config->option<ConfigOptionFloats>("flush_volumes_matrix")->values, -1, old_nozzle_size);
|
||||
flush_volume_mtx.resize(filament_nums * filament_nums);
|
||||
flush_volume_mtx.resize(filament_nums * filament_nums, 0);
|
||||
new_flush_volume_mtx.insert(new_flush_volume_mtx.end(), flush_volume_mtx.begin(), flush_volume_mtx.end());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user