mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-14 03:11:19 +00:00
Part 3.1: refactor BeltTransform pipeline
add BeltGCodeWriter add BeltGCode consolidate changes into shared classes for BeltGcode
This commit is contained in:
committed by
Joseph Robertson
parent
b297f68921
commit
c7aa4ca3ef
+10
-4
@@ -12,6 +12,7 @@
|
||||
#include "Thread.hpp"
|
||||
#include "Time.hpp"
|
||||
#include "GCode.hpp"
|
||||
#include "BeltGCode.hpp"
|
||||
#include "GCode/WipeTower.hpp"
|
||||
#include "GCode/WipeTower2.hpp"
|
||||
#include "Utils.hpp"
|
||||
@@ -2551,12 +2552,17 @@ std::string Print::export_gcode(const std::string& path_template, GCodeProcessor
|
||||
this->set_status(80, message);
|
||||
|
||||
// The following line may die for multiple reasons.
|
||||
GCode gcode;
|
||||
// Factory: use BeltGCode for belt printers, plain GCode otherwise.
|
||||
std::unique_ptr<GCode> gcode;
|
||||
if (m_config.belt_printer.value)
|
||||
gcode = std::make_unique<BeltGCode>();
|
||||
else
|
||||
gcode = std::make_unique<GCode>();
|
||||
//BBS: compute plate offset for gcode-generator
|
||||
const Vec3d origin = this->get_plate_origin();
|
||||
gcode.set_gcode_offset(origin(0), origin(1));
|
||||
gcode.do_export(this, path.c_str(), result, thumbnail_cb);
|
||||
gcode.export_layer_filaments(result);
|
||||
gcode->set_gcode_offset(origin(0), origin(1));
|
||||
gcode->do_export(this, path.c_str(), result, thumbnail_cb);
|
||||
gcode->export_layer_filaments(result);
|
||||
//BBS
|
||||
result->conflict_result = m_conflict_result;
|
||||
return path.c_str();
|
||||
|
||||
Reference in New Issue
Block a user