mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Refactored the Slic3r::GCode logic for speeds
This commit is contained in:
		
							parent
							
								
									5d12a03b82
								
							
						
					
					
						commit
						ee2c1c6127
					
				
					 5 changed files with 131 additions and 148 deletions
				
			
		| 
						 | 
				
			
			@ -1394,15 +1394,6 @@ class PrintConfig : public virtual StaticPrintConfig
 | 
			
		|||
        
 | 
			
		||||
        return NULL;
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    std::string get_extrusion_axis() {
 | 
			
		||||
        if (this->gcode_flavor == gcfMach3) {
 | 
			
		||||
            return std::string("A");
 | 
			
		||||
        } else if (this->gcode_flavor == gcfNoExtrusion) {
 | 
			
		||||
            return std::string("");
 | 
			
		||||
        }
 | 
			
		||||
        return this->extrusion_axis;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class FullPrintConfig : public PrintObjectConfig, public PrintRegionConfig, public PrintConfig {
 | 
			
		||||
| 
						 | 
				
			
			@ -1414,6 +1405,15 @@ class FullPrintConfig : public PrintObjectConfig, public PrintRegionConfig, publ
 | 
			
		|||
        if ((opt = PrintConfig::option(opt_key, create)) != NULL) return opt;
 | 
			
		||||
        return NULL;
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    std::string get_extrusion_axis() {
 | 
			
		||||
        if (this->gcode_flavor == gcfMach3) {
 | 
			
		||||
            return std::string("A");
 | 
			
		||||
        } else if (this->gcode_flavor == gcfNoExtrusion) {
 | 
			
		||||
            return std::string("");
 | 
			
		||||
        }
 | 
			
		||||
        return this->extrusion_axis;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -45,7 +45,6 @@
 | 
			
		|||
        %code{% THIS->apply(*other, true); %};
 | 
			
		||||
    std::vector<std::string> get_keys()
 | 
			
		||||
        %code{% THIS->keys(&RETVAL); %};
 | 
			
		||||
    std::string get_extrusion_axis();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
%name{Slic3r::Config::PrintRegion} class PrintRegionConfig {
 | 
			
		||||
| 
						 | 
				
			
			@ -103,10 +102,17 @@
 | 
			
		|||
    double get_abs_value(t_config_option_key opt_key);
 | 
			
		||||
    %name{get_abs_value_over}
 | 
			
		||||
        double get_abs_value(t_config_option_key opt_key, double ratio_over);
 | 
			
		||||
    void apply_print_config(PrintConfig* other)
 | 
			
		||||
        %code{% THIS->apply(*other, true); %};
 | 
			
		||||
    void apply_object_config(PrintObjectConfig* other)
 | 
			
		||||
        %code{% THIS->apply(*other, true); %};
 | 
			
		||||
    void apply_region_config(PrintRegionConfig* other)
 | 
			
		||||
        %code{% THIS->apply(*other, true); %};
 | 
			
		||||
    void apply_dynamic(DynamicPrintConfig* other)
 | 
			
		||||
        %code{% THIS->apply(*other, true); %};
 | 
			
		||||
    std::vector<std::string> get_keys()
 | 
			
		||||
        %code{% THIS->keys(&RETVAL); %};
 | 
			
		||||
    std::string get_extrusion_axis();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
%package{Slic3r::Config};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue