mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Replaced this->m_xxx with just m_xxx
This commit is contained in:
		
							parent
							
								
									fca7c8abfe
								
							
						
					
					
						commit
						49697ed6aa
					
				
					 10 changed files with 25 additions and 24 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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(); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -131,7 +131,7 @@ bool BackgroundSlicingProcess::stop()
 | 
			
		|||
bool BackgroundSlicingProcess::apply_config(const DynamicPrintConfig &config)
 | 
			
		||||
{
 | 
			
		||||
	this->stop();
 | 
			
		||||
	bool invalidated = this->m_print->apply_config(config);
 | 
			
		||||
	bool invalidated = m_print->apply_config(config);
 | 
			
		||||
	return invalidated;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -66,12 +66,12 @@ const t_field& OptionsGroup::build_field(const t_config_option_key& id, const Co
 | 
			
		|||
	field->m_on_change = [this](std::string opt_id, boost::any value){
 | 
			
		||||
			//! This function will be called from Field.					
 | 
			
		||||
			//! Call OptionGroup._on_change(...)
 | 
			
		||||
			if (!this->m_disabled) 
 | 
			
		||||
			if (!m_disabled) 
 | 
			
		||||
				this->on_change_OG(opt_id, value);
 | 
			
		||||
	};
 | 
			
		||||
	field->m_on_kill_focus = [this](){
 | 
			
		||||
			//! This function will be called from Field.					
 | 
			
		||||
			if (!this->m_disabled) 
 | 
			
		||||
			if (!m_disabled) 
 | 
			
		||||
				this->on_kill_focus();
 | 
			
		||||
	};
 | 
			
		||||
    field->m_parent = parent();
 | 
			
		||||
| 
						 | 
				
			
			@ -79,7 +79,7 @@ const t_field& OptionsGroup::build_field(const t_config_option_key& id, const Co
 | 
			
		|||
	//! Label to change background color, when option is modified
 | 
			
		||||
	field->m_Label = label;
 | 
			
		||||
	field->m_back_to_initial_value = [this](std::string opt_id){
 | 
			
		||||
		if (!this->m_disabled)
 | 
			
		||||
		if (!m_disabled)
 | 
			
		||||
			this->back_to_initial_value(opt_id);
 | 
			
		||||
	};
 | 
			
		||||
	if (!m_is_tab_opt) field->m_Undo_btn->Hide();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -399,10 +399,10 @@ Preset* PresetCollection::find_preset(const std::string &name, bool first_visibl
 | 
			
		|||
size_t PresetCollection::first_visible_idx() const
 | 
			
		||||
{
 | 
			
		||||
    size_t idx = m_default_suppressed ? 1 : 0;
 | 
			
		||||
    for (; idx < this->m_presets.size(); ++ idx)
 | 
			
		||||
    for (; idx < m_presets.size(); ++ idx)
 | 
			
		||||
        if (m_presets[idx].is_visible)
 | 
			
		||||
            break;
 | 
			
		||||
    if (idx == this->m_presets.size())
 | 
			
		||||
    if (idx == m_presets.size())
 | 
			
		||||
        idx = 0;
 | 
			
		||||
    return idx;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -411,10 +411,10 @@ size_t PresetCollection::first_visible_idx() const
 | 
			
		|||
size_t PresetCollection::first_compatible_idx() const
 | 
			
		||||
{
 | 
			
		||||
    size_t idx = m_default_suppressed ? 1 : 0;
 | 
			
		||||
    for (; idx < this->m_presets.size(); ++ idx)
 | 
			
		||||
    for (; idx < m_presets.size(); ++ idx)
 | 
			
		||||
        if (m_presets[idx].is_compatible)
 | 
			
		||||
            break;
 | 
			
		||||
    if (idx == this->m_presets.size())
 | 
			
		||||
    if (idx == m_presets.size())
 | 
			
		||||
        idx = 0;
 | 
			
		||||
    return idx;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -465,8 +465,8 @@ void PresetCollection::update_platter_ui(wxBitmapComboBox *ui)
 | 
			
		|||
    // Otherwise fill in the list from scratch.
 | 
			
		||||
    ui->Freeze();
 | 
			
		||||
    ui->Clear();
 | 
			
		||||
    for (size_t i = this->m_presets.front().is_visible ? 0 : 1; i < this->m_presets.size(); ++ i) {
 | 
			
		||||
        const Preset &preset = this->m_presets[i];
 | 
			
		||||
    for (size_t i = m_presets.front().is_visible ? 0 : 1; i < m_presets.size(); ++ i) {
 | 
			
		||||
        const Preset &preset = m_presets[i];
 | 
			
		||||
        if (! preset.is_visible || (! preset.is_compatible && i != m_idx_selected))
 | 
			
		||||
            continue;
 | 
			
		||||
        const wxBitmap *bmp = (i == 0 || preset.is_compatible) ? m_bitmap_main_frame : m_bitmap_incompatible;
 | 
			
		||||
| 
						 | 
				
			
			@ -484,8 +484,8 @@ void PresetCollection::update_tab_ui(wxBitmapComboBox *ui, bool show_incompatibl
 | 
			
		|||
        return;
 | 
			
		||||
    ui->Freeze();
 | 
			
		||||
    ui->Clear();
 | 
			
		||||
    for (size_t i = this->m_presets.front().is_visible ? 0 : 1; i < this->m_presets.size(); ++ i) {
 | 
			
		||||
        const Preset &preset = this->m_presets[i];
 | 
			
		||||
    for (size_t i = m_presets.front().is_visible ? 0 : 1; i < m_presets.size(); ++ i) {
 | 
			
		||||
        const Preset &preset = m_presets[i];
 | 
			
		||||
        if (! preset.is_visible || (! show_incompatible && ! preset.is_compatible && i != m_idx_selected))
 | 
			
		||||
            continue;
 | 
			
		||||
        const wxBitmap *bmp = preset.is_compatible ? m_bitmap_compatible : m_bitmap_incompatible;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -181,7 +181,7 @@ public:
 | 
			
		|||
    const Preset&   first_compatible() const    { return this->preset(this->first_compatible_idx()); }
 | 
			
		||||
 | 
			
		||||
    // Return number of presets including the "- default -" preset.
 | 
			
		||||
    size_t          size() const                { return this->m_presets.size(); }
 | 
			
		||||
    size_t          size() const                { return m_presets.size(); }
 | 
			
		||||
 | 
			
		||||
    // For Print / Filament presets, disable those, which are not compatible with the printer.
 | 
			
		||||
    void            update_compatible_with_printer(const Preset &active_printer, bool select_other_if_incompatible);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue