diff --git a/README.md b/README.md index 194e5b29c2..733ab66784 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,8 @@ Prebuilt binaries are available through the [github releases page](https://githu **Mac**: > 1. Download the right binaries for your computer: `arm64` version for Apple Silicon and `x86_64` for Intel CPU. > 2. Double click to unzip the package, move OrcaSlicer.app to Application folder. -> 3. Run the following command in the terminal to allow running unsigned applications: `xattr -d com.apple.quarantine /Applications/OrcaSlicer.app`. +> 3. Run the following command in the terminal to allow running unsigned applications: +>>>> `xattr -d com.apple.quarantine /Applications/OrcaSlicer.app`. **Linux(Ubuntu)**: > Run the downlaoded AppImage. diff --git a/resources/profiles/BBL.json b/resources/profiles/BBL.json index 8cd6772411..f9e4543cc2 100644 --- a/resources/profiles/BBL.json +++ b/resources/profiles/BBL.json @@ -1,7 +1,7 @@ { "name": "Bambulab", "url": "http://www.bambulab.com/Parameters/vendor/BBL.json", - "version": "01.05.00.19", + "version": "01.05.00.20", "force_update": "0", "description": "the initial version of BBL configurations", "machine_model_list": [ diff --git a/resources/profiles/BBL/process/fdm_process_bbl_common.json b/resources/profiles/BBL/process/fdm_process_bbl_common.json index 77ba0173e5..9115d69522 100644 --- a/resources/profiles/BBL/process/fdm_process_bbl_common.json +++ b/resources/profiles/BBL/process/fdm_process_bbl_common.json @@ -106,5 +106,6 @@ "wipe_tower_no_sparse_layers": "0", "prime_tower_width": "35", "xy_hole_compensation": "0", - "xy_contour_compensation": "0" + "xy_contour_compensation": "0", + "gcode_label_objects": "0" } diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index d5b3cf13bc..bc35aafc90 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -80,8 +80,6 @@ static const float g_min_purge_volume = 100.f; static const float g_purge_volume_one_time = 135.f; static const int g_max_flush_count = 4; -bool GCode::gcode_label_objects = true; - Vec2d travel_point_1; Vec2d travel_point_2; Vec2d travel_point_3; @@ -1036,6 +1034,7 @@ void GCode::do_export(Print* print, const char* path, GCodeProcessorResult* resu // BBS m_curr_print = print; + GCodeWriter::full_gcode_comment = print->config().gcode_comments; CNumericLocalesSetter locales_setter; // Does the file exist? If so, we hope that it is still valid. @@ -1046,11 +1045,6 @@ void GCode::do_export(Print* print, const char* path, GCodeProcessorResult* resu GCodeProcessor::s_IsBBLPrinter = print->is_BBL_printer(); print->set_started(psGCodeExport); - if (print->is_BBL_printer()) - gcode_label_objects = false; - else - gcode_label_objects = true; - // check if any custom gcode contains keywords used by the gcode processor to // produce time estimation and gcode toolpaths @@ -3189,7 +3183,7 @@ GCode::LayerResult GCode::process_layer( m_object_layer_over_raft = object_layer_over_raft; if (m_config.reduce_crossing_wall) m_avoid_crossing_perimeters.init_layer(*m_layer); - if (GCode::gcode_label_objects) { + if (this->config().gcode_label_objects) { gcode += std::string("; printing object ") + instance_to_print.print_object.model_object()->name + " id:" + std::to_string(instance_to_print.layer_id) + " copy " + std::to_string(instance_to_print.instance_id) + "\n"; if (!m_config.use_relative_e_distances) gcode += m_writer.reset_e(true); @@ -3281,7 +3275,7 @@ GCode::LayerResult GCode::process_layer( // ironing gcode += this->extrude_infill(print,by_region_specific, true); } - if (GCode::gcode_label_objects) { + if (this->config().gcode_label_objects) { gcode += std::string("; stop printing object ") + instance_to_print.print_object.model_object()->name + " id:" + std::to_string(instance_to_print.layer_id) + " copy " + std::to_string(instance_to_print.instance_id) + "\n"; if (!m_config.use_relative_e_distances) gcode += m_writer.reset_e(true); diff --git a/src/libslic3r/GCode.hpp b/src/libslic3r/GCode.hpp index 080a20ebd3..9c5716499e 100644 --- a/src/libslic3r/GCode.hpp +++ b/src/libslic3r/GCode.hpp @@ -492,8 +492,6 @@ private: coordf_t m_nominal_z; bool m_need_change_layer_lift_z = false; - static bool gcode_label_objects; - // BBS int get_bed_temperature(const int extruder_id, const bool is_first_layer, const BedType bed_type) const; diff --git a/src/libslic3r/GCodeWriter.cpp b/src/libslic3r/GCodeWriter.cpp index 7cafec1b14..04214f91b5 100644 --- a/src/libslic3r/GCodeWriter.cpp +++ b/src/libslic3r/GCodeWriter.cpp @@ -15,7 +15,7 @@ namespace Slic3r { -const bool GCodeWriter::full_gcode_comment = true; +bool GCodeWriter::full_gcode_comment = true; const double GCodeWriter::slope_threshold = 3 * PI / 180; void GCodeWriter::apply_print_config(const PrintConfig &print_config) diff --git a/src/libslic3r/GCodeWriter.hpp b/src/libslic3r/GCodeWriter.hpp index eb3d31e575..b2b6e6d9a7 100644 --- a/src/libslic3r/GCodeWriter.hpp +++ b/src/libslic3r/GCodeWriter.hpp @@ -92,7 +92,7 @@ public: void set_current_position_clear(bool clear) { m_is_current_pos_clear = clear; }; bool is_current_position_clear() const { return m_is_current_pos_clear; }; //BBS: - static const bool full_gcode_comment; + static bool full_gcode_comment; //Radian threshold of slope for lazy lift and spiral lift; static const double slope_threshold; //SoftFever diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 32e5a91a3a..130332eb43 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -754,7 +754,8 @@ static std::vector s_Preset_print_options { "top_solid_infill_flow_ratio","bottom_solid_infill_flow_ratio","only_one_wall_first_layer", "print_flow_ratio", "seam_gap", "role_based_wipe_speed", "wipe_speed", "accel_to_decel_enable", "accel_to_decel_factor", "wipe_on_loops", "bridge_density", "precise_outer_wall", "overhang_speed_classic", "bridge_acceleration", - "sparse_infill_acceleration", "internal_solid_infill_acceleration", "tree_support_adaptive_layer_height" + "sparse_infill_acceleration", "internal_solid_infill_acceleration", "tree_support_adaptive_layer_height", + "gcode_comments", "gcode_label_objects" }; diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index a18e824b0b..77d5176388 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -158,7 +158,9 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n "use_relative_e_distances", "accel_to_decel_enable", "accel_to_decel_factor", - "wipe_on_loops" + "wipe_on_loops", + "gcode_comments", + "gcode_label_objects" }; static std::unordered_set steps_ignore; @@ -3325,4 +3327,4 @@ int Print::load_cached_data(const std::string& directory) return ret; } -} // namespace Slic3r \ No newline at end of file +} // namespace Slic3r diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index d07a0dec98..bfae8ce9de 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -1795,6 +1795,22 @@ void PrintConfigDef::init_fff_params() def->readonly = false; def->set_default_value(new ConfigOptionEnum(gcfMarlinLegacy)); + def = this->add("gcode_label_objects", coBool); + def->label = L("Label objects"); + def->tooltip = L("Enable this to add comments into the G-Code labeling print moves with what object they belong to," + " which is useful for the Octoprint CancelObject plugin. This settings is NOT compatible with " + "Single Extruder Multi Material setup and Wipe into Object / Wipe into Infill."); + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionBool(1)); + + def = this->add("gcode_comments", coBool); + def->label = L("Verbose G-code"); + def->tooltip = L("Enable this to get a commented G-code file, with each line explained by a descriptive text. " + "If you print from SD card, the additional weight of the file could make your firmware " + "slow down."); + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionBool(0)); + //BBS def = this->add("infill_combination", coBool); def->label = L("Infill combination"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 77b3df5a59..24fb73b65a 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -844,6 +844,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionBool, gcode_add_line_number)) ((ConfigOptionBool, bbl_bed_temperature_gcode)) ((ConfigOptionEnum, gcode_flavor)) + ((ConfigOptionString, layer_change_gcode)) //#ifdef HAS_PRESSURE_EQUALIZER // ((ConfigOptionFloat, max_volumetric_extrusion_rate_slope_positive)) @@ -997,6 +998,8 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionBool, independent_support_layer_height)) // SoftFever ((ConfigOptionPercents, filament_shrink)) + ((ConfigOptionBool, gcode_label_objects)) + ((ConfigOptionBool, gcode_comments)) ) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index ad2a29f8d6..07db8b82e9 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2053,6 +2053,8 @@ void TabPrint::build() optgroup = page->new_optgroup(L("G-code output"), L"param_gcode"); optgroup->append_single_option_line("reduce_infill_retraction"); optgroup->append_single_option_line("gcode_add_line_number"); + optgroup->append_single_option_line("gcode_comments"); + optgroup->append_single_option_line("gcode_label_objects"); Option option = optgroup->get_option("filename_format"); // option.opt.full_width = true; option.opt.is_code = true;