diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 57dca539b6..8f68631cab 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -3025,7 +3025,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato } } // wipe tower area - if (has_wipe_tower) { + if (has_wipe_tower && print.wipe_tower_data().wipe_tower_mesh_data) { Polygon temp_Expoly = print.wipe_tower_data().wipe_tower_mesh_data->bottom; area_sum_temp += temp_Expoly.area(); } diff --git a/src/libslic3r/GCode/WipeTower2.hpp b/src/libslic3r/GCode/WipeTower2.hpp index 8864ae9ea1..7060eefa4a 100644 --- a/src/libslic3r/GCode/WipeTower2.hpp +++ b/src/libslic3r/GCode/WipeTower2.hpp @@ -72,6 +72,8 @@ public: // 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(); } + float get_rib_width() const { return m_rib_width; } + float get_rib_length() const { return m_rib_length; } // Switch to a next layer. void set_layer( diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 2f6bafe869..6371608a5e 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -3396,6 +3396,11 @@ void Print::_make_wipe_tower() m_wipe_tower_data.used_filament = wipe_tower.get_used_filament(); m_wipe_tower_data.number_of_toolchanges = wipe_tower.get_number_of_toolchanges(); + m_wipe_tower_data.construct_mesh(wipe_tower.width(), wipe_tower.get_depth(), + wipe_tower.get_wipe_tower_height(), wipe_tower.get_brim_width(), + config().wipe_tower_wall_type.value == WipeTowerWallType::wtwRib, + wipe_tower.get_rib_width(), wipe_tower.get_rib_length(), + config().wipe_tower_fillet_wall.value); const Vec3d origin = Vec3d::Zero(); m_fake_wipe_tower.set_fake_extrusion_data(wipe_tower.position(), wipe_tower.width(), wipe_tower.get_wipe_tower_height(), config().initial_layer_print_height, m_wipe_tower_data.depth, diff --git a/src/libslic3r/Print.hpp b/src/libslic3r/Print.hpp index dafca39387..80755d1821 100644 --- a/src/libslic3r/Print.hpp +++ b/src/libslic3r/Print.hpp @@ -770,6 +770,7 @@ struct WipeTowerData number_of_toolchanges = -1; depth = 0.f; brim_width = 0.f; + rib_offset = Vec2f::Zero(); wipe_tower_mesh_data = std::nullopt; } void construct_mesh(float width, float depth, float height, float brim_width, bool is_rib_wipe_tower, float rib_width, float rib_length, bool fillet_wall);