mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-15 20:01:31 +00:00
Guard the layer count and the per-object layer collection against an object that is left without a layer to print on a belt (the counting loop stepped before begin() and front() was taken of an empty vector). Check the belt temperature tower's embossed model before the current project is replaced, not after. Only invalidate the support step of objects that own a belt brim when an object is added or removed. The empty-layers test now counts an extrusion only where material is laid down along a move. The BeltBrim.cpp SEQUENCING note says exactly which layers are read, and the machine-frame scale is 1/|sin|. Remove more code that nothing calls: the kinematics inverse (to_logical, apply_axis_remap_inverse, to_build_volume and the state kept for them), the world_coordinates(), is_active() and belt_brim_areas_by_layer() accessors, the PrintConfig overload of physical_tilt() and the DynamicPrintConfig overload of compute_belt_height_and_floor(). Comments in GCode.hpp, BeltSliceStrategy.hpp/.cpp and PrintObjectSlice.cpp that described the retired pre-slice remap and plane-evaluator still did; the purge-tower width tooltip named the wrong switch. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
60 lines
2.4 KiB
C++
60 lines
2.4 KiB
C++
#ifndef slic3r_BeltKinematics_hpp_
|
|
#define slic3r_BeltKinematics_hpp_
|
|
|
|
#include "MachineKinematics.hpp"
|
|
#include "BeltBackTransform.hpp"
|
|
#include "MachineFrameTransform.hpp"
|
|
#include "../Point.hpp"
|
|
|
|
namespace Slic3r {
|
|
|
|
class PrintConfig;
|
|
class GCodeWriter;
|
|
|
|
// Belt-printer machine frame.
|
|
//
|
|
// Forward order, as applied per emitted point:
|
|
// machine = MachineFrameTransform( axis_remap( BeltBackTransform( logical ) ) )
|
|
//
|
|
// i.e. the slicer->world back-transform runs FIRST and the machine-frame
|
|
// shear/scale LAST, so the latter acts as a global linear transform on the
|
|
// already-placed coordinates.
|
|
//
|
|
// world_coordinates mode (the PA line / PA pattern calibration generators)
|
|
// treats the incoming point as already relative to the belt surface -- X across,
|
|
// Y along the belt, Z above it -- and therefore skips the back-transform while
|
|
// keeping the remap and the machine frame. It is a different coordinate map, not
|
|
// a writer mode, which is why it is fixed at construction.
|
|
class BeltKinematics : public CartesianKinematics
|
|
{
|
|
public:
|
|
explicit BeltKinematics(const PrintConfig &config, bool world_coordinates = false);
|
|
|
|
Vec3d to_machine(const Vec3d &p) const override;
|
|
|
|
// A belt writer has always emitted full XYZ on every move, whether or not any
|
|
// individual stage reports itself active. Making this conditional would change
|
|
// emitted G-code for an identity-transform belt configuration.
|
|
bool must_emit_all_axes() const override { return true; }
|
|
bool suppress_lift_at_unknown_position() const override { return true; }
|
|
// The machine frame shears and scales, so a circle is an ellipse in machine
|
|
// coordinates and G2/G3 cannot describe it.
|
|
bool supports_arc_moves() const override { return false; }
|
|
|
|
private:
|
|
BeltBackTransform m_back_transform;
|
|
MachineFrameTransform m_machine_frame;
|
|
bool m_world_coordinates { false };
|
|
};
|
|
|
|
// Install a belt machine frame on any GCodeWriter. Any axis remap and build
|
|
// volume already configured on the writer are carried over, so this may be
|
|
// called before or after those setters. Re-calling it with a different
|
|
// world_coordinates value swaps the map (used around the PA line generator).
|
|
void install_belt_kinematics(GCodeWriter &writer, const PrintConfig &config,
|
|
bool world_coordinates = false);
|
|
|
|
} // namespace Slic3r
|
|
|
|
#endif // slic3r_BeltKinematics_hpp_
|