mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
Initial integration of the Prusa MultiMatrial Wipe Tower.
This commit is contained in:
parent
74346efccb
commit
c22b6edeeb
11 changed files with 922 additions and 439 deletions
38
xs/src/libslic3r/GCode/ToolOrdering.hpp
Normal file
38
xs/src/libslic3r/GCode/ToolOrdering.hpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
// Ordering of the tools to minimize tool switches.
|
||||
|
||||
#ifndef slic3r_ToolOrdering_hpp_
|
||||
#define slic3r_ToolOrdering_hpp_
|
||||
|
||||
#include "libslic3r.h"
|
||||
#include "Print.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
namespace ToolOrdering {
|
||||
|
||||
struct LayerTools
|
||||
{
|
||||
LayerTools(const coordf_t z) : print_z(z), wipe_tower_partitions(0) {}
|
||||
|
||||
bool operator< (const LayerTools &rhs) const { return print_z < rhs.print_z; }
|
||||
bool operator==(const LayerTools &rhs) const { return print_z == rhs.print_z; }
|
||||
|
||||
coordf_t print_z;
|
||||
// Zero based extruder IDs, ordered to minimize tool switches.
|
||||
std::vector<unsigned int> extruders;
|
||||
// Number of wipe tower partitions to support the required number of tool switches
|
||||
// and to support the wipe tower partitions above this one.
|
||||
size_t wipe_tower_partitions;
|
||||
};
|
||||
|
||||
// For the use case when each object is printed separately
|
||||
// (print.config.complete_objects is true).
|
||||
extern std::vector<LayerTools> tool_ordering(PrintObject &object);
|
||||
|
||||
// For the use case when all objects are printed at once.
|
||||
// (print.config.complete_objects is false).
|
||||
extern std::vector<LayerTools> tool_ordering(const Print &print);
|
||||
|
||||
} // namespace ToolOrdering
|
||||
} // namespace SLic3r
|
||||
|
||||
#endif /* slic3r_ToolOrdering_hpp_ */
|
Loading…
Add table
Add a link
Reference in a new issue