mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-15 12:25:40 -07:00
Fix non bambu wipe tower issues (skirt overlapping with tower, extreme travel moves outside plate boundary) (#11748)
* Fix prime/purge tower extreme travel for non BBL printers * Fix wipe tower skirt not generating correctly for non bambu printers
This commit is contained in:
parent
e8af78d032
commit
0f397492e7
3 changed files with 18 additions and 4 deletions
|
|
@ -1215,6 +1215,10 @@ WipeTower::ToolChangeResult WipeTower2::construct_tcr(WipeTowerWriter2& writer,
|
|||
result.extrusions = std::move(writer.extrusions());
|
||||
result.wipe_path = std::move(writer.wipe_path());
|
||||
result.is_finish_first = is_finish;
|
||||
// ORCA: Always initialize the tool_change_start_pos with a valid position
|
||||
// to avoid undefined variable travel on X in Gcode.cpp function std::string WipeTowerIntegration::post_process_wipe_tower_moves
|
||||
result.tool_change_start_pos = result.start_pos; // always valid fallback
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,10 +58,18 @@ public:
|
|||
std::vector<std::pair<float, float>> get_z_and_depth_pairs() const;
|
||||
float get_brim_width() const { return m_wipe_tower_brim_width_real; }
|
||||
float get_wipe_tower_height() const { return m_wipe_tower_height; }
|
||||
|
||||
|
||||
|
||||
|
||||
// ORCA: Match WipeTower API used by Print skirt/brim planning.
|
||||
// Returned bounding box is in WIPE-TOWER-LOCAL coordinates (before placement on the bed).
|
||||
// Include brim and y-shift to match what WT gcode actually prints.
|
||||
BoundingBoxf get_bbx() const{
|
||||
const float brim = m_wipe_tower_brim_width_real;
|
||||
const Vec2d min(-brim, -brim + double(m_y_shift));
|
||||
const Vec2d max(double(m_wipe_tower_width) + brim, double(m_wipe_tower_depth) + brim + double(m_y_shift));
|
||||
return BoundingBoxf(min, max);
|
||||
}
|
||||
// WT2 doesn't currently compute a rib-origin compensation like WipeTower (m_rib_offset),
|
||||
// so expose a zero offset for consistency purposes (to maintain API parity).
|
||||
Vec2f get_rib_offset() const { return Vec2f::Zero(); }
|
||||
|
||||
// Switch to a next layer.
|
||||
void set_layer(
|
||||
|
|
|
|||
|
|
@ -3333,6 +3333,8 @@ void Print::_make_wipe_tower()
|
|||
m_wipe_tower_data.z_and_depth_pairs = wipe_tower.get_z_and_depth_pairs();
|
||||
m_wipe_tower_data.brim_width = wipe_tower.get_brim_width();
|
||||
m_wipe_tower_data.height = wipe_tower.get_wipe_tower_height();
|
||||
m_wipe_tower_data.bbx = wipe_tower.get_bbx();
|
||||
m_wipe_tower_data.rib_offset = wipe_tower.get_rib_offset();
|
||||
|
||||
// Unload the current filament over the purge tower.
|
||||
coordf_t layer_height = m_objects.front()->config().layer_height.value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue