mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 08:41:11 -06:00
Ported the G-code generator from Perl to C++.
Removed GCode.pm Removed the Perl bindigns for AvoidCrossingPerimeters, OozePrevention, SpiralVase, Wipe Changed the std::set of extruder IDs to vector of IDs. Removed some MSVC compiler warnings, removed obnoxious compiler warnings when compiling the Perl bindings.
This commit is contained in:
parent
72ae3585e4
commit
e90279c513
52 changed files with 1362 additions and 1632 deletions
|
@ -9,7 +9,7 @@ namespace Slic3r {
|
|||
|
||||
class Extruder
|
||||
{
|
||||
public:
|
||||
public:
|
||||
unsigned int id;
|
||||
double E;
|
||||
double absolute_E;
|
||||
|
@ -17,10 +17,11 @@ class Extruder
|
|||
double restart_extra;
|
||||
double e_per_mm3;
|
||||
double retract_speed_mm_min;
|
||||
|
||||
|
||||
Extruder(unsigned int id, GCodeConfig *config);
|
||||
virtual ~Extruder() {}
|
||||
void reset();
|
||||
|
||||
void reset();
|
||||
double extrude(double dE);
|
||||
double retract(double length, double restart_extra);
|
||||
double unretract();
|
||||
|
@ -34,15 +35,26 @@ class Extruder
|
|||
double extrusion_multiplier() const;
|
||||
double retract_length() const;
|
||||
double retract_lift() const;
|
||||
int retract_speed() const;
|
||||
int retract_speed() const;
|
||||
double retract_restart_extra() const;
|
||||
double retract_length_toolchange() const;
|
||||
double retract_restart_extra_toolchange() const;
|
||||
|
||||
private:
|
||||
GCodeConfig *config;
|
||||
|
||||
static Extruder key(unsigned int id) { return Extruder(id); }
|
||||
|
||||
private:
|
||||
// Private constructor to create a key for a search in std::set.
|
||||
Extruder(unsigned int id) : id(id) {}
|
||||
|
||||
GCodeConfig *m_config;
|
||||
};
|
||||
|
||||
// Sort Extruder objects by the extruder id by default.
|
||||
inline bool operator==(const Extruder &e1, const Extruder &e2) { return e1.id == e2.id; }
|
||||
inline bool operator!=(const Extruder &e1, const Extruder &e2) { return e1.id != e2.id; }
|
||||
inline bool operator< (const Extruder &e1, const Extruder &e2) { return e1.id < e2.id; }
|
||||
inline bool operator> (const Extruder &e1, const Extruder &e2) { return e1.id > e2.id; }
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue