mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
Ported the cooling changes from @alexrj: Don't slow down the external
perimeters if not necessary, don't take the bridging time into account when slowing down the print. Removed Extruder & GCodeWriter Perl bindings. Improved Extruder for constness. Refactored GCode::m_elapsed_time to struct ElapsedTime.
This commit is contained in:
parent
c1146e298b
commit
0454cc95f9
17 changed files with 156 additions and 220 deletions
|
@ -12,7 +12,6 @@ namespace Slic3r {
|
|||
class GCodeWriter {
|
||||
public:
|
||||
GCodeConfig config;
|
||||
std::set<Extruder> extruders;
|
||||
bool multiple_extruders;
|
||||
|
||||
GCodeWriter() :
|
||||
|
@ -26,12 +25,14 @@ public:
|
|||
const Extruder* extruder() const { return m_extruder; }
|
||||
std::string extrusion_axis() const { return m_extrusion_axis; }
|
||||
void apply_print_config(const PrintConfig &print_config);
|
||||
// Extruders are expected to be sorted in an increasing order.
|
||||
void set_extruders(const std::vector<unsigned int> &extruder_ids);
|
||||
const std::vector<Extruder>& extruders() const { return m_extruders; }
|
||||
std::vector<unsigned int> extruder_ids() const {
|
||||
std::vector<unsigned int> out;
|
||||
out.reserve(extruders.size());
|
||||
for (const auto e : extruders)
|
||||
out.push_back(e.id);
|
||||
out.reserve(m_extruders.size());
|
||||
for (const Extruder &e : m_extruders)
|
||||
out.push_back(e.id());
|
||||
return out;
|
||||
}
|
||||
std::string preamble();
|
||||
|
@ -44,7 +45,7 @@ public:
|
|||
std::string update_progress(unsigned int num, unsigned int tot, bool allow_100 = false) const;
|
||||
// return false if this extruder was already selected
|
||||
bool need_toolchange(unsigned int extruder_id) const
|
||||
{ return m_extruder == nullptr || m_extruder->id != extruder_id; }
|
||||
{ return m_extruder == nullptr || m_extruder->id() != extruder_id; }
|
||||
std::string set_extruder(unsigned int extruder_id)
|
||||
{ return this->need_toolchange(extruder_id) ? this->toolchange(extruder_id) : ""; }
|
||||
std::string toolchange(unsigned int extruder_id);
|
||||
|
@ -63,6 +64,7 @@ public:
|
|||
Pointf3 get_position() const { return m_pos; }
|
||||
|
||||
private:
|
||||
std::vector<Extruder> m_extruders;
|
||||
std::string m_extrusion_axis;
|
||||
bool m_single_extruder_multi_material;
|
||||
Extruder* m_extruder;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue