diff options
author | bubnikv <bubnikv@gmail.com> | 2018-09-10 10:11:49 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2018-09-10 10:11:49 +0300 |
commit | 49697ed6aaa5155461be37be82f3b6bf58635a08 (patch) | |
tree | 31c81588602e489c3bef82277f246cec1e5b040f /xs/src/libslic3r | |
parent | fca7c8abfeb08a4c3e1108cd19d4713dccbd8d2e (diff) |
Replaced this->m_xxx with just m_xxx
Diffstat (limited to 'xs/src/libslic3r')
-rw-r--r-- | xs/src/libslic3r/EdgeGrid.cpp | 2 | ||||
-rw-r--r-- | xs/src/libslic3r/ExtrusionEntity.hpp | 4 | ||||
-rw-r--r-- | xs/src/libslic3r/GCode.hpp | 1 | ||||
-rw-r--r-- | xs/src/libslic3r/GCode/PressureEqualizer.cpp | 10 | ||||
-rw-r--r-- | xs/src/libslic3r/GCodeReader.cpp | 2 | ||||
-rw-r--r-- | xs/src/libslic3r/GCodeWriter.cpp | 4 |
6 files changed, 12 insertions, 11 deletions
diff --git a/xs/src/libslic3r/EdgeGrid.cpp b/xs/src/libslic3r/EdgeGrid.cpp index 733ff2ad7..752243407 100644 --- a/xs/src/libslic3r/EdgeGrid.cpp +++ b/xs/src/libslic3r/EdgeGrid.cpp @@ -614,7 +614,7 @@ bool EdgeGrid::Grid::inside(const Point &pt_src) return false; coord_t ix = p.x / m_resolution; coord_t iy = p.y / m_resolution; - if (ix >= this->m_cols || iy >= this->m_rows) + if (ix >= m_cols || iy >= m_rows) return false; size_t i_closest = (size_t)-1; diff --git a/xs/src/libslic3r/ExtrusionEntity.hpp b/xs/src/libslic3r/ExtrusionEntity.hpp index 16ef51c1f..9d34aced8 100644 --- a/xs/src/libslic3r/ExtrusionEntity.hpp +++ b/xs/src/libslic3r/ExtrusionEntity.hpp @@ -117,8 +117,8 @@ public: ExtrusionPath(ExtrusionPath &&rhs) : polyline(std::move(rhs.polyline)), mm3_per_mm(rhs.mm3_per_mm), width(rhs.width), height(rhs.height), feedrate(rhs.feedrate), extruder_id(rhs.extruder_id), m_role(rhs.m_role) {} // ExtrusionPath(ExtrusionRole role, const Flow &flow) : m_role(role), mm3_per_mm(flow.mm3_per_mm()), width(flow.width), height(flow.height), feedrate(0.0f), extruder_id(0) {}; - ExtrusionPath& operator=(const ExtrusionPath &rhs) { this->m_role = rhs.m_role; this->mm3_per_mm = rhs.mm3_per_mm; this->width = rhs.width; this->height = rhs.height; this->feedrate = rhs.feedrate, this->extruder_id = rhs.extruder_id, this->polyline = rhs.polyline; return *this; } - ExtrusionPath& operator=(ExtrusionPath &&rhs) { this->m_role = rhs.m_role; this->mm3_per_mm = rhs.mm3_per_mm; this->width = rhs.width; this->height = rhs.height; this->feedrate = rhs.feedrate, this->extruder_id = rhs.extruder_id, this->polyline = std::move(rhs.polyline); return *this; } + ExtrusionPath& operator=(const ExtrusionPath &rhs) { m_role = rhs.m_role; this->mm3_per_mm = rhs.mm3_per_mm; this->width = rhs.width; this->height = rhs.height; this->feedrate = rhs.feedrate, this->extruder_id = rhs.extruder_id, this->polyline = rhs.polyline; return *this; } + ExtrusionPath& operator=(ExtrusionPath &&rhs) { m_role = rhs.m_role; this->mm3_per_mm = rhs.mm3_per_mm; this->width = rhs.width; this->height = rhs.height; this->feedrate = rhs.feedrate, this->extruder_id = rhs.extruder_id, this->polyline = std::move(rhs.polyline); return *this; } ExtrusionPath* clone() const { return new ExtrusionPath (*this); } void reverse() { this->polyline.reverse(); } diff --git a/xs/src/libslic3r/GCode.hpp b/xs/src/libslic3r/GCode.hpp index 5c3a6ffb3..0e5305cb5 100644 --- a/xs/src/libslic3r/GCode.hpp +++ b/xs/src/libslic3r/GCode.hpp @@ -151,6 +151,7 @@ public: const Layer* layer() const { return m_layer; } GCodeWriter& writer() { return m_writer; } PlaceholderParser& placeholder_parser() { return m_placeholder_parser; } + const PlaceholderParser& placeholder_parser() const { return m_placeholder_parser; } // Process a template through the placeholder parser, collect error messages to be reported // inside the generated string and after the G-code export finishes. std::string placeholder_parser_process(const std::string &name, const std::string &templ, unsigned int current_extruder_id, const DynamicConfig *config_override = nullptr); diff --git a/xs/src/libslic3r/GCode/PressureEqualizer.cpp b/xs/src/libslic3r/GCode/PressureEqualizer.cpp index 68e642f3c..3b2a58a88 100644 --- a/xs/src/libslic3r/GCode/PressureEqualizer.cpp +++ b/xs/src/libslic3r/GCode/PressureEqualizer.cpp @@ -49,10 +49,10 @@ void PressureEqualizer::reset() // Volumetric rate of a 0.45mm x 0.2mm extrusion at 60mm/s XY movement: 0.45*0.2*60*60=5.4*60 = 324 mm^3/min // Volumetric rate of a 0.45mm x 0.2mm extrusion at 20mm/s XY movement: 0.45*0.2*20*60=1.8*60 = 108 mm^3/min // Slope of the volumetric rate, changing from 20mm/s to 60mm/s over 2 seconds: (5.4-1.8)*60*60/2=60*60*1.8 = 6480 mm^3/min^2 = 1.8 mm^3/s^2 - m_max_volumetric_extrusion_rate_slope_positive = (this->m_config == NULL) ? 6480.f : - this->m_config->max_volumetric_extrusion_rate_slope_positive.value * 60.f * 60.f; - m_max_volumetric_extrusion_rate_slope_negative = (this->m_config == NULL) ? 6480.f : - this->m_config->max_volumetric_extrusion_rate_slope_negative.value * 60.f * 60.f; + m_max_volumetric_extrusion_rate_slope_positive = (m_config == NULL) ? 6480.f : + m_config->max_volumetric_extrusion_rate_slope_positive.value * 60.f * 60.f; + m_max_volumetric_extrusion_rate_slope_negative = (m_config == NULL) ? 6480.f : + m_config->max_volumetric_extrusion_rate_slope_negative.value * 60.f * 60.f; for (size_t i = 0; i < numExtrusionRoles; ++ i) { m_max_volumetric_extrusion_rate_slopes[i].negative = m_max_volumetric_extrusion_rate_slope_negative; @@ -171,7 +171,7 @@ bool PressureEqualizer::process_line(const char *line, const size_t len, GCodeLi if (strncmp(line, EXTRUSION_ROLE_TAG, strlen(EXTRUSION_ROLE_TAG)) == 0) { line += strlen(EXTRUSION_ROLE_TAG); int role = atoi(line); - this->m_current_extrusion_role = ExtrusionRole(role); + m_current_extrusion_role = ExtrusionRole(role); ++ line_idx; return false; } diff --git a/xs/src/libslic3r/GCodeReader.cpp b/xs/src/libslic3r/GCodeReader.cpp index 965b7ef8e..c1e1e98be 100644 --- a/xs/src/libslic3r/GCodeReader.cpp +++ b/xs/src/libslic3r/GCodeReader.cpp @@ -101,7 +101,7 @@ void GCodeReader::update_coordinates(GCodeLine &gline, std::pair<const char*, co (cmd_len == 3 && command.first[1] == '9' && command.first[2] == '2')) { for (size_t i = 0; i < NUM_AXES; ++ i) if (gline.has(Axis(i))) - this->m_position[i] = gline.value(Axis(i)); + m_position[i] = gline.value(Axis(i)); } } } diff --git a/xs/src/libslic3r/GCodeWriter.cpp b/xs/src/libslic3r/GCodeWriter.cpp index cbe94f317..9876a3fac 100644 --- a/xs/src/libslic3r/GCodeWriter.cpp +++ b/xs/src/libslic3r/GCodeWriter.cpp @@ -18,7 +18,7 @@ void GCodeWriter::apply_print_config(const PrintConfig &print_config) { this->config.apply(print_config, true); m_extrusion_axis = this->config.get_extrusion_axis(); - this->m_single_extruder_multi_material = print_config.single_extruder_multi_material.value; + m_single_extruder_multi_material = print_config.single_extruder_multi_material.value; } void GCodeWriter::set_extruders(const std::vector<unsigned int> &extruder_ids) @@ -85,7 +85,7 @@ std::string GCodeWriter::set_temperature(unsigned int temperature, bool wait, in } gcode << temperature; if (tool != -1 && - ( (this->multiple_extruders && ! this->m_single_extruder_multi_material) || + ( (this->multiple_extruders && ! m_single_extruder_multi_material) || FLAVOR_IS(gcfMakerWare) || FLAVOR_IS(gcfSailfish)) ) { gcode << " T" << tool; } |