mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
ENH: add ANYCUIC profile which based on SoftFever
Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: I85fc64a25dbb761377c63574b3d3ec10fda9dfd6
This commit is contained in:
@@ -1406,7 +1406,6 @@ 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);
|
||||
|
||||
// resets analyzer's tracking data
|
||||
m_last_height = 0.f;
|
||||
m_last_layer_z = 0.f;
|
||||
@@ -1742,6 +1741,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
|
||||
//BBS: open spaghetti detector
|
||||
// if (print.config().spaghetti_detector.value)
|
||||
if (print.is_BBL_Printer())
|
||||
file.write("M981 S1 P20000 ;open spaghetti detector\n");
|
||||
|
||||
// Do all objects for each layer.
|
||||
@@ -1806,7 +1806,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
this->process_layers(print, tool_ordering, collect_layers_to_print(object), *print_object_instance_sequential_active - object.instances().data(), file, prime_extruder);
|
||||
//BBS: close powerlost recovery
|
||||
{
|
||||
if (m_second_layer_things_done) {
|
||||
if (m_second_layer_things_done && print.is_BBL_Printer()) {
|
||||
file.write("; close powerlost recovery\n");
|
||||
file.write("M1003 S0\n");
|
||||
}
|
||||
@@ -1877,7 +1877,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
this->process_layers(print, tool_ordering, print_object_instances_ordering, layers_to_print, file);
|
||||
//BBS: close powerlost recovery
|
||||
{
|
||||
if (m_second_layer_things_done) {
|
||||
if (m_second_layer_things_done && print.is_BBL_Printer()) {
|
||||
file.write("; close powerlost recovery\n");
|
||||
file.write("M1003 S0\n");
|
||||
}
|
||||
@@ -1900,7 +1900,8 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
//BBS: close spaghetti detector
|
||||
//Note: M981 is also used to tell xcam the last layer is finished, so we need always send it even if spaghetti option is disabled.
|
||||
//if (print.config().spaghetti_detector.value)
|
||||
file.write("M981 S0 P20000 ; close spaghetti detector\n");
|
||||
if (print.is_BBL_Printer())
|
||||
file.write("M981 S0 P20000 ; close spaghetti detector\n");
|
||||
|
||||
// adds tag for processor
|
||||
file.write_format(";%s%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role).c_str(), ExtrusionEntity::role_to_string(erCustom).c_str());
|
||||
@@ -2629,8 +2630,10 @@ GCode::LayerResult GCode::process_layer(
|
||||
if (! first_layer && ! m_second_layer_things_done) {
|
||||
//BBS: open powerlost recovery
|
||||
{
|
||||
gcode += "; open powerlost recovery\n";
|
||||
gcode += "M1003 S1\n";
|
||||
if (print.is_BBL_Printer()) {
|
||||
gcode += "; open powerlost recovery\n";
|
||||
gcode += "M1003 S1\n";
|
||||
}
|
||||
}
|
||||
// BBS: open first layer inspection at second layer
|
||||
if (print.config().scan_first_layer.value) {
|
||||
|
||||
@@ -714,7 +714,8 @@ public:
|
||||
int get_modified_count() const {return m_modified_count;}
|
||||
//BBS: add status for whether support used
|
||||
bool is_support_used() const {return m_support_used;}
|
||||
|
||||
bool is_BBL_Printer() const { return m_isBBLPrinter;}
|
||||
void set_BBL_Printer(const bool isBBL) { m_isBBLPrinter = isBBL;}
|
||||
//BBS
|
||||
static StringObjectException sequential_print_clearance_valid(const Print &print, Polygons *polygons = nullptr, std::vector<std::pair<Polygon, float>>* height_polygons = nullptr);
|
||||
|
||||
@@ -743,7 +744,8 @@ private:
|
||||
PrintRegionConfig m_default_region_config;
|
||||
PrintObjectPtrs m_objects;
|
||||
PrintRegionPtrs m_print_regions;
|
||||
|
||||
//BBS.
|
||||
bool m_isBBLPrinter = false;
|
||||
// Ordered collections of extrusion paths to build skirt loops and brim.
|
||||
ExtrusionEntityCollection m_skirt;
|
||||
// BBS: collecting extrusion paths to build brim by objs
|
||||
|
||||
@@ -185,7 +185,9 @@ std::string BackgroundSlicingProcess::output_filepath_for_project(const boost::f
|
||||
// from the G-code generator.
|
||||
void BackgroundSlicingProcess::process_fff()
|
||||
{
|
||||
assert(m_print == m_fff_print);
|
||||
assert(m_print == m_fff_print);
|
||||
PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
|
||||
m_fff_print->set_BBL_Printer(preset_bundle.printers.get_edited_preset().is_bbl_vendor_preset(&preset_bundle));
|
||||
//BBS: add the logic to process from an existed gcode file
|
||||
if (m_print->finished()) {
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(" %1%: skip slicing, to process previous gcode file")%__LINE__;
|
||||
|
||||
Reference in New Issue
Block a user