ENH: normalize comment from OrcaSlicer

Mark code from OrcaSlicer with same comment tag for follow easily

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: If4db502a1b0e6d0648c73f2f383b6d1cc8e1aa01
This commit is contained in:
salt.wei 2023-06-20 19:50:06 +08:00 committed by Lane.Wei
parent e9ad8374bc
commit 2fe7629388
16 changed files with 30 additions and 32 deletions

View file

@ -3174,7 +3174,7 @@ void FillMonotonicLineWGapFill::fill_surface_extrusion(const Surface* surface, c
if (!polylines.empty() && !is_bridge(params.extrusion_role)) {
ExtrusionEntityCollection gap_fill;
// SoftFever: filter out tiny gap fills
// OrcaSlicer: filter out tiny gap fills
polylines.erase(std::remove_if(polylines.begin(), polylines.end(), [&](const ThickPolyline &p) {
return p.length() < scale_(params.filter_out_gap_fill);
}), polylines.end());

View file

@ -292,7 +292,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
/* Reduce feedrate a bit; travel speed is often too high to move on existing material.
Too fast = ripping of existing material; too slow = short wipe path, thus more blob. */
//softFever
//OrcaSlicer
double wipe_speed = gcodegen.writer().config.travel_speed.value * gcodegen.config().wipe_speed.value / 100;
// get the retraction length
@ -581,7 +581,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
gcode += tcr_gcode;
check_add_eol(toolchange_gcode_str);
//SoftFever: set new PA for new filament. BBS: never use for Bambu Printer
//OrcaSlicer: set new PA for new filament. BBS: never use for Bambu Printer
if (!gcodegen.is_BBL_Printer() && gcodegen.config().enable_pressure_advance.get_at(new_extruder_id))
gcode += gcodegen.writer().set_pressure_advance(gcodegen.config().pressure_advance.get_at(new_extruder_id));
@ -1587,7 +1587,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
file.write_format("; EXECUTABLE_BLOCK_START\n");
// SoftFever: Orca's implementation for skipping object, for klipper firmware printer only
// OrcaSlicer: Orca's implementation for skipping object, for klipper firmware printer only
if (this->config().exclude_object && print.config().gcode_flavor.value == gcfKlipper)
file.write(set_object_info(&print));
@ -1871,7 +1871,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
}
if (this->m_objsWithBrim.empty() && this->m_objSupportsWithBrim.empty()) m_brim_done = true;
// SoftFever: calib
// OrcaSlicer: calib
if (print.calib_params().mode == CalibMode::Calib_PA_Line) {
std::string gcode;
if ((m_config.default_acceleration.value > 0 && m_config.outer_wall_acceleration.value > 0)) {
@ -4199,7 +4199,7 @@ std::string GCode::travel_to(const Point &point, ExtrusionRole role, std::string
// use G1 because we rely on paths being straight (G0 may make round paths)
if (travel.size() >= 2) {
// SoftFever
// OrcaSlicer
if (this->on_first_layer()) {
if (m_config.default_jerk.value > 0 && m_config.initial_layer_jerk.value > 0 && !this->is_BBL_Printer())
gcode += m_writer.set_jerk_xy(m_config.initial_layer_jerk.value);

View file

@ -195,7 +195,7 @@ public:
void set_layer_count(unsigned int value) { m_layer_count = value; }
void apply_print_config(const PrintConfig &print_config);
// SoftFever
// OrcaSlicer
std::string set_object_info(Print* print);
// append full config to the given string

View file

@ -1659,7 +1659,7 @@ void GCodeProcessor::process_gcode_line(const GCodeReader::GCodeLine& line, bool
m_start_position = m_end_position;
const std::string_view cmd = line.cmd();
//softfever
//OrcaSlicer
if (m_flavor == gcfKlipper)
{
if (boost::iequals(cmd, "SET_VELOCITY_LIMIT"))

View file

@ -196,7 +196,7 @@ std::string GCodeWriter::set_pressure_advance(double pa) const
std::ostringstream gcode;
if (pa < 0) return gcode.str();
if (false) { // todo: bbl printer
// SoftFever: set L1000 to use linear model
// OrcaSlicer: set L1000 to use linear model
gcode << "M900 K" << std::setprecision(4) << pa << " L1000 M10 ; Override pressure advance value\n";
} else {
if (this->config.gcode_flavor == gcfKlipper)

View file

@ -1194,7 +1194,7 @@ void PerimeterGenerator::process_classic()
++ irun;
}
#endif
// SoftFever: filter out tiny gap fills
// OrcaSlicer: filter out tiny gap fills
polylines.erase(std::remove_if(polylines.begin(), polylines.end(), [&](const ThickPolyline &p) {
return p.length()< scale_(this->config->filter_out_gap_fill.value);
}), polylines.end());

View file

@ -810,7 +810,7 @@ static std::vector<std::string> s_Preset_filament_options {
//BBS
"filament_wipe_distance", "additional_cooling_fan_speed",
"bed_temperature_difference", "nozzle_temperature_range_low", "nozzle_temperature_range_high",
//softfever
//OrcaSlicer
"enable_pressure_advance", "pressure_advance", "chamber_temperature"
};
@ -832,7 +832,7 @@ static std::vector<std::string> s_Preset_printer_options {
// BBS
"scan_first_layer", "machine_load_filament_time", "machine_unload_filament_time", "machine_pause_gcode", "template_custom_gcode",
"nozzle_type", "nozzle_hrc","auxiliary_fan", "nozzle_volume","upward_compatible_machine", "z_hop_types",
//SoftFever
//OrcaSlicer
"host_type", "print_host", "printhost_apikey",
"print_host_webui",
"printhost_cafile","printhost_port","printhost_authorization_type",
@ -1725,7 +1725,7 @@ std::pair<Preset*, bool> PresetCollection::load_external_preset(
{
// Load the preset over a default preset, so that the missing fields are filled in from the default preset.
DynamicPrintConfig cfg(this->default_preset_for(combined_config).config);
// SoftFever: ignore print connection info from project
// OrcaSlicer: ignore print connection info from project
cfg.erase("print_host");
cfg.erase("print_host_webui");
cfg.erase("printhost_apikey");

View file

@ -149,7 +149,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
"nozzle_hrc",
"required_nozzle_HRC",
"upward_compatible_machine",
//SoftFever
//OrcaSlicer
"seam_gap",
"wipe_speed"
"default_jerk",
@ -2005,7 +2005,7 @@ std::vector<Point> Print::first_layer_wipe_tower_corners(bool check_wipe_tower_e
return corners;
}
//SoftFever
//OrcaSlicer
Vec2d Print::translate_to_print_space(const Vec2d& point) const {
//const BoundingBoxf bed_bbox(config().printable_area.values);
return Vec2d(point(0) - m_origin(0), point(1) - m_origin(1));

View file

@ -197,7 +197,7 @@ struct PrintInstance
BoundingBoxf3 get_bounding_box();
Polygon get_convex_hull_2d();
// SoftFever
// OrcaSlicer
//
// instance id
size_t id;
@ -429,7 +429,7 @@ public:
// BBS: Boundingbox of the first layer
BoundingBox firstLayerObjectBrimBoundingBox;
// SoftFever
// OrcaSlicer
size_t get_klipper_object_id() const { return m_klipper_object_id; }
void set_klipper_object_id(size_t id) { m_klipper_object_id = id; }
@ -517,7 +517,7 @@ private:
PrintObject* m_shared_object{ nullptr };
// SoftFever
// OrcaSlicer
//
// object id for klipper firmware only
size_t m_klipper_object_id;
@ -807,7 +807,7 @@ public:
// Return 4 wipe tower corners in the world coordinates (shifted and rotated), including the wipe tower brim.
std::vector<Point> first_layer_wipe_tower_corners(bool check_wipe_tower_existance=true) const;
//SoftFever
//OrcaSlicer
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);
@ -869,7 +869,7 @@ private:
ConflictResultOpt m_conflict_result;
FakeWipeTower m_fake_wipe_tower;
// SoftFever: calibration
// OrcaSlicer: calibration
Calib_Params m_calib_params;
// To allow GCode to set the Print's GCodeExport step status.

View file

@ -700,7 +700,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionPercent, min_bead_width))
((ConfigOptionBool, only_one_wall_top))
((ConfigOptionBool, only_one_wall_first_layer))
// SoftFever
// OrcaSlicer
((ConfigOptionFloat, seam_gap))
((ConfigOptionPercent, wipe_speed))
)
@ -764,7 +764,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloat, overhang_4_4_speed))
((ConfigOptionFloatOrPercent, sparse_infill_anchor))
((ConfigOptionFloatOrPercent, sparse_infill_anchor_max))
//SoftFever
//OrcaSlicer
((ConfigOptionFloat, top_solid_infill_flow_ratio))
((ConfigOptionFloat, bottom_solid_infill_flow_ratio))
((ConfigOptionFloat, filter_out_gap_fill))