Multi-color code compatible with QIDI models (#11185)

* The 0.30mm layer height configuration for the 0.4 nozzle of the QIDI model has been removed

* Merge branch 'main' into main

* Merge branch 'SoftFever:main' into main

* Revert "The 0.30mm layer height configuration for the 0.4 nozzle of the QIDI model has been removed"

This reverts commit 8d296720b8.

* Update Qidi Q2 0.4 nozzle.json

修改Q2打印高度

* Merge branch 'SoftFever:main' into main

* Merge branch 'SoftFever:main' into main

* change machine_gcode

* Merge branch 'main' of https://github.com/HYzd766/OrcaSlicer

* Merge branch 'SoftFever:main' into main

* Multi-color code compatible with QIDI models

* Merge branch 'main' into main

* toggle axis visibility on canvas (#9666)

* toggle axis visibility on canvas

* set show_axes config on toggle

* fix: Add pause and filament change to machine gcodes for Sovol SV08 MAX (#11214)

* Add fixed Ironing Angle setting for uniform surface finish (#11195)

* Initial working fixed ironing angle implemented with new Fixed ironing angle setting

* update documentation

* Combine Fill.is_using_template_angle and Fill.alternate_fill_direction into Fill.fixed_angle

* Rename SurfaceFillParams.is_using_template_angle to SurfaceFillParam.fixed_angle.
This commit is contained in:
HYzd766
2025-11-03 21:34:11 +08:00
committed by GitHub
parent c6e4ac1c4d
commit a351aa8cb0
8 changed files with 33 additions and 9 deletions

View File

@@ -1268,7 +1268,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
std::string WipeTowerIntegration::prime(GCode &gcodegen)
{
std::string gcode;
if (!gcodegen.is_BBL_Printer()) {
if (!gcodegen.is_BBL_Printer() && !gcodegen.is_QIDI_Printer()) {
for (const WipeTower::ToolChangeResult &tcr : m_priming) {
if (!tcr.extrusions.empty())
gcode += append_tcr2(gcodegen, tcr, tcr.new_tool);
@@ -1284,7 +1284,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
assert(m_layer_idx >= 0);
if (m_layer_idx >= (int) m_tool_changes.size())
return gcode;
if (!gcodegen.is_BBL_Printer()) {
if (!gcodegen.is_BBL_Printer() && !gcodegen.is_QIDI_Printer()) {
if (gcodegen.writer().need_toolchange(extruder_id) || finish_layer) {
if (m_layer_idx < (int) m_tool_changes.size()) {
if (!(size_t(m_tool_change_idx) < m_tool_changes[m_layer_idx].size()))
@@ -1373,7 +1373,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
std::string WipeTowerIntegration::finalize(GCode &gcodegen)
{
std::string gcode;
if (!gcodegen.is_BBL_Printer()) {
if (!gcodegen.is_BBL_Printer() && !gcodegen.is_QIDI_Printer()) {
if (std::abs(gcodegen.writer().get_position().z() - m_final_purge.print_z) > EPSILON)
gcode += gcodegen.change_layer(m_final_purge.print_z);
gcode += append_tcr2(gcodegen, m_final_purge, -1);
@@ -1795,6 +1795,13 @@ bool GCode::is_BBL_Printer()
return false;
}
bool GCode::is_QIDI_Printer()
{
if (m_curr_print)
return m_curr_print->is_QIDI_printer();
return false;
}
void GCode::do_export(Print* print, const char* path, GCodeProcessorResult* result, ThumbnailsGeneratorCallback thumbnail_cb)
{
PROFILE_CLEAR();
@@ -2205,6 +2212,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
// modifies m_silent_time_estimator_enabled
DoExport::init_gcode_processor(print.config(), m_processor, m_silent_time_estimator_enabled);
const bool is_bbl_printers = print.is_BBL_printer();
const bool is_qidi_printers = print.is_QIDI_printer();
m_calib_config.clear();
// resets analyzer's tracking data
m_last_height = 0.f;
@@ -2487,7 +2495,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
throw Slic3r::SlicingError(_(L("No object can be printed. Maybe too small")));
has_wipe_tower = print.has_wipe_tower() && tool_ordering.has_wipe_tower();
// Orca: support all extruder priming
initial_extruder_id = (!is_bbl_printers && has_wipe_tower && !print.config().single_extruder_multi_material_priming) ?
initial_extruder_id = (!is_bbl_printers && has_wipe_tower && !print.config().single_extruder_multi_material_priming && !is_qidi_printers) ?
// The priming towers will be skipped.
tool_ordering.all_extruders().back() :
// Don't skip the priming towers.

View File

@@ -250,6 +250,7 @@ public:
std::string unretract() { return m_writer.unlift() + m_writer.unretract(); }
std::string set_extruder(unsigned int extruder_id, double print_z, bool by_object=false);
bool is_BBL_Printer();
bool is_QIDI_Printer();
// SoftFever
std::string set_object_info(Print* print);

View File

@@ -535,6 +535,9 @@ VendorType PresetBundle::get_current_vendor_type()
{
if(vendor_name.compare("BBL") == 0)
t = VendorType::Marlin_BBL;
if(vendor_name.compare("Qidi") == 0)
t = VendorType::Klipper_Qidi;
}
return t;
}

View File

@@ -25,7 +25,8 @@ enum class VendorType {
Unknown = 0,
Klipper,
Marlin,
Marlin_BBL
Marlin_BBL,
Klipper_Qidi
};
namespace Slic3r {
@@ -144,6 +145,8 @@ public:
VendorType get_current_vendor_type();
// Vendor related handy functions
bool is_bbl_vendor() { return get_current_vendor_type() == VendorType::Marlin_BBL; }
bool is_qidi_vendor() { return get_current_vendor_type() == VendorType::Klipper_Qidi; }
// Whether using bbl network for print upload
bool use_bbl_network();
// Whether using bbl's device tab

View File

@@ -3077,7 +3077,7 @@ void Print::_make_wipe_tower()
// BBS
const unsigned int number_of_extruders = (unsigned int)(m_config.filament_colour.values.size());
const auto bUseWipeTower2 = is_BBL_printer() ? false : true;
const auto bUseWipeTower2 = is_BBL_printer() || is_QIDI_printer() ? false : true;
// Let the ToolOrdering class know there will be initial priming extrusions at the start of the print.
m_wipe_tower_data.tool_ordering = ToolOrdering(*this, (unsigned int) -1, bUseWipeTower2 ? true : false);
m_wipe_tower_data.tool_ordering.sort_and_build_data(*this, (unsigned int)-1, bUseWipeTower2 ? true : false);
@@ -3261,7 +3261,7 @@ void Print::_make_wipe_tower()
wipe_volumes.push_back(std::vector<float>(flush_matrix.begin()+i*number_of_extruders, flush_matrix.begin()+(i+1)*number_of_extruders));
// Orca: itertate over wipe_volumes and change the non-zero values to the prime_volume
if ((!m_config.purge_in_prime_tower || !m_config.single_extruder_multi_material) && !is_BBL_printer()) {
if ((!m_config.purge_in_prime_tower || !m_config.single_extruder_multi_material) && !is_BBL_printer() && !is_QIDI_printer()) {
for (unsigned int i = 0; i < number_of_extruders; ++i) {
for (unsigned int j = 0; j < number_of_extruders; ++j) {
if (wipe_volumes[i][j] > 0) {

View File

@@ -1065,6 +1065,8 @@ public:
//SoftFever
bool &is_BBL_printer() { return m_isBBLPrinter; }
const bool is_BBL_printer() const { return m_isBBLPrinter; }
bool &is_QIDI_printer() { return m_isQIDIPrinter; }
const bool is_QIDI_printer() const { return m_isQIDIPrinter; }
CalibMode& calib_mode() { return m_calib_params.mode; }
const CalibMode calib_mode() const { return m_calib_params.mode; }
void set_calib_params(const Calib_Params& params);
@@ -1132,6 +1134,7 @@ private:
//SoftFever
bool m_isBBLPrinter;
bool m_isQIDIPrinter;
// Ordered collections of extrusion paths to build skirt loops and brim.
ExtrusionEntityCollection m_skirt;

View File

@@ -681,6 +681,7 @@ StringObjectException BackgroundSlicingProcess::validate(StringObjectException *
assert(m_print == m_fff_print);
m_fff_print->is_BBL_printer() = wxGetApp().preset_bundle->is_bbl_vendor();
m_fff_print->is_QIDI_printer() = wxGetApp().preset_bundle->is_qidi_vendor();
return m_print->validate(warning, collison_polygons, height_polygons);
}

View File

@@ -5045,6 +5045,11 @@ void TabPrinter::toggle_options()
is_BBL_printer = wxGetApp().preset_bundle->is_bbl_vendor();
}
bool is_QIDI_printer = false;
if (m_preset_bundle) {
is_QIDI_printer = wxGetApp().preset_bundle->is_qidi_vendor();
}
bool have_multiple_extruders = true;
//m_extruders_count > 1;
//if (m_active_page->title() == "Custom G-code") {
@@ -5077,7 +5082,7 @@ void TabPrinter::toggle_options()
"extra_loading_move",
"high_current_on_filament_swap",
})
toggle_option(el, !is_BBL_printer);
toggle_option(el, !is_BBL_printer && !is_QIDI_printer);
auto bSEMM = m_config->opt_bool("single_extruder_multi_material");
if (!bSEMM && m_config->opt_bool("manual_filament_change")) {
@@ -5087,7 +5092,7 @@ void TabPrinter::toggle_options()
}
toggle_option("extruders_count", !bSEMM);
toggle_option("manual_filament_change", bSEMM);
toggle_option("purge_in_prime_tower", bSEMM && !is_BBL_printer);
toggle_option("purge_in_prime_tower", bSEMM && (!is_BBL_printer && !is_QIDI_printer));
}
wxString extruder_number;
long val = 1;