GCodeWriter - made tiny methods inline.
This commit is contained in:
parent
4ab972b87a
commit
817d827f7a
2 changed files with 4 additions and 24 deletions
|
@ -13,18 +13,6 @@
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
Extruder*
|
|
||||||
GCodeWriter::extruder()
|
|
||||||
{
|
|
||||||
return this->_extruder;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string
|
|
||||||
GCodeWriter::extrusion_axis() const
|
|
||||||
{
|
|
||||||
return this->_extrusion_axis;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
GCodeWriter::apply_print_config(const PrintConfig &print_config)
|
GCodeWriter::apply_print_config(const PrintConfig &print_config)
|
||||||
{
|
{
|
||||||
|
@ -35,9 +23,8 @@ GCodeWriter::apply_print_config(const PrintConfig &print_config)
|
||||||
void
|
void
|
||||||
GCodeWriter::set_extruders(const std::vector<unsigned int> &extruder_ids)
|
GCodeWriter::set_extruders(const std::vector<unsigned int> &extruder_ids)
|
||||||
{
|
{
|
||||||
for (std::vector<unsigned int>::const_iterator i = extruder_ids.begin(); i != extruder_ids.end(); ++i) {
|
for (std::vector<unsigned int>::const_iterator i = extruder_ids.begin(); i != extruder_ids.end(); ++i)
|
||||||
this->extruders.insert( std::pair<unsigned int,Extruder>(*i, Extruder(*i, &this->config)) );
|
this->extruders.insert( std::pair<unsigned int,Extruder>(*i, Extruder(*i, &this->config)) );
|
||||||
}
|
|
||||||
|
|
||||||
/* we enable support for multiple extruder if any extruder greater than 0 is used
|
/* we enable support for multiple extruder if any extruder greater than 0 is used
|
||||||
(even if prints only uses that one) since we need to output Tx commands
|
(even if prints only uses that one) since we need to output Tx commands
|
||||||
|
@ -523,10 +510,4 @@ GCodeWriter::unlift()
|
||||||
return gcode;
|
return gcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
Pointf3
|
|
||||||
GCodeWriter::get_position() const
|
|
||||||
{
|
|
||||||
return this->_pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,8 @@ public:
|
||||||
: multiple_extruders(false), _extrusion_axis("E"), _extruder(NULL),
|
: multiple_extruders(false), _extrusion_axis("E"), _extruder(NULL),
|
||||||
_last_acceleration(0), _last_fan_speed(0), _lifted(0)
|
_last_acceleration(0), _last_fan_speed(0), _lifted(0)
|
||||||
{};
|
{};
|
||||||
Extruder* extruder();
|
Extruder* extruder() const { return this->_extruder; }
|
||||||
std::string extrusion_axis() const;
|
std::string extrusion_axis() const { return this->_extrusion_axis; }
|
||||||
void apply_print_config(const PrintConfig &print_config);
|
void apply_print_config(const PrintConfig &print_config);
|
||||||
void set_extruders(const std::vector<unsigned int> &extruder_ids);
|
void set_extruders(const std::vector<unsigned int> &extruder_ids);
|
||||||
std::string preamble();
|
std::string preamble();
|
||||||
|
@ -46,8 +46,7 @@ public:
|
||||||
std::string unretract();
|
std::string unretract();
|
||||||
std::string lift();
|
std::string lift();
|
||||||
std::string unlift();
|
std::string unlift();
|
||||||
Pointf3 get_position() const;
|
Pointf3 get_position() const { return this->_pos; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string _extrusion_axis;
|
std::string _extrusion_axis;
|
||||||
Extruder* _extruder;
|
Extruder* _extruder;
|
||||||
|
|
Loading…
Reference in a new issue