update to latest version

This commit is contained in:
QIDI TECH
2023-06-27 11:07:34 +08:00
parent afe5c54367
commit dd0d4c8c4a
80 changed files with 1931 additions and 599 deletions

View File

@@ -82,6 +82,22 @@ namespace Slic3r {
}
};
struct ConflictResult
{
std::string _objName1;
std::string _objName2;
double _height;
const void* _obj1; // nullptr means wipe tower
const void* _obj2;
int layer = -1;
ConflictResult(const std::string& objName1, const std::string& objName2, double height, const void* obj1, const void* obj2)
: _objName1(objName1), _objName2(objName2), _height(height), _obj1(obj1), _obj2(obj2)
{}
ConflictResult() = default;
};
using ConflictResultOpt = std::optional<ConflictResult>;
struct GCodeProcessorResult
{
struct SettingsIds
@@ -137,6 +153,8 @@ namespace Slic3r {
std::vector<CustomGCode::Item> custom_gcode_per_print_z;
std::vector<std::pair<float, std::pair<size_t, size_t>>> spiral_vase_layers;
ConflictResultOpt conflict_result;
#if ENABLE_GCODE_VIEWER_STATISTICS
int64_t time{ 0 };
#endif // ENABLE_GCODE_VIEWER_STATISTICS
@@ -621,6 +639,11 @@ namespace Slic3r {
// Streaming interface, for processing G-codes just generated by QIDISlicer in a pipelined fashion.
void initialize(const std::string& filename);
void initialize_result_moves() {
// 1st move must be a dummy move
assert(m_result.moves.empty());
m_result.moves.emplace_back(GCodeProcessorResult::MoveVertex());
}
void process_buffer(const std::string& buffer);
void finalize(bool post_process);
@@ -657,6 +680,8 @@ namespace Slic3r {
// Move
void process_G0(const GCodeReader::GCodeLine& line);
void process_G1(const GCodeReader::GCodeLine& line);
void process_G1(const std::array<std::optional<double>, 4>& axes = { std::nullopt, std::nullopt, std::nullopt, std::nullopt },
std::optional<double> feedrate = std::nullopt, std::optional<std::string> cmt = std::nullopt);
// Arc Move
void process_G2_G3(const GCodeReader::GCodeLine& line, bool clockwise);