mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 10:51:22 +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
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "GCode.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
// Belt-printer-specific GCode export.
|
||||
//
|
||||
// Inherits from GCode and overrides virtual hooks to:
|
||||
// - Create a BeltGCodeWriter instead of a plain GCodeWriter
|
||||
// - Write belt configuration to the G-code header
|
||||
// - Update per-axis origin snap when switching instances
|
||||
// - Disable arc fitting (G2/G3 not supported on belt printers)
|
||||
class BeltGCode : public GCode
|
||||
{
|
||||
protected:
|
||||
void init_belt_writer(Print &print, bool is_bbl_printers) override;
|
||||
void write_belt_header(GCodeOutputStream &file, const Print &print) override;
|
||||
void on_set_origin(const PrintObject *obj, const Point &inst_shift) override;
|
||||
bool should_disable_arc_fitting() const override { return true; }
|
||||
|
||||
private:
|
||||
// Per-axis origin snap config (set during init, used in on_set_origin).
|
||||
bool m_origin_snap[3] = {false, false, false};
|
||||
double m_origin_snap_offset[3] = {0., 0., 0.};
|
||||
};
|
||||
|
||||
} // namespace Slic3r
|
||||
Reference in New Issue
Block a user