mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-09 00:31:19 +00:00
belt: adapt BeltGCodeWriter to upstream's per-extruder speed options
Upstream retyped travel_speed and travel_speed_z to ConfigOptionFloatsNullable and initial_layer_travel_speed to ConfigOptionFloatsOrPercentsNullable, so the scalar .value / get_abs_value() accessors no longer compile. BeltGCodeWriter.cpp is belt-only and merged without conflict, so this only surfaced at build time. Index them the way the base GCodeWriter does -- .get_at(m_cached_extruder_idx) and get_abs_value_at(..., m_cached_extruder_idx) -- keeping belt's per-point first_layer_for_point test rather than the base class's m_is_first_layer. m_cached_extruder_idx moves from private to the existing protected block that already exposes writer state to subclasses, so the belt writer resolves the per-extruder index identically to the base writer instead of guessing one.
This commit is contained in:
@@ -167,14 +167,17 @@ protected:
|
||||
// Apply axis remap to a point. Returns pos unchanged if remap is identity.
|
||||
Vec3d apply_axis_remap(const Vec3d &pos) const;
|
||||
|
||||
// Motion uses the global/base process variant until a filament becomes active.
|
||||
// Protected so BeltGCodeWriter indexes the per-extruder speed options (travel_speed,
|
||||
// travel_speed_z, initial_layer_travel_speed) exactly as the base writer does.
|
||||
size_t m_cached_extruder_idx;
|
||||
|
||||
private:
|
||||
// Extruders are sorted by their ID, so that binary search is possible.
|
||||
std::vector<Extruder> m_filament_extruders;
|
||||
bool m_single_extruder_multi_material;
|
||||
std::vector<Extruder*> m_curr_filament_extruder;
|
||||
int m_curr_extruder_id;
|
||||
// Motion uses the global/base process variant until a filament becomes active.
|
||||
size_t m_cached_extruder_idx;
|
||||
unsigned int m_last_acceleration;
|
||||
unsigned int m_last_travel_acceleration;
|
||||
std::vector<unsigned int> m_max_travel_acceleration;
|
||||
|
||||
Reference in New Issue
Block a user