diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp index adb19eba9..c5b0d6044 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp @@ -366,8 +366,8 @@ private: float m_angle_deg = 0.f; float m_y_shift = 0.f; WipeTower::xy m_wipe_tower_pos; - float m_wipe_tower_width; - float m_wipe_tower_depth; + float m_wipe_tower_width = 0.f; + float m_wipe_tower_depth = 0.f; float m_last_fan_speed = 0.f; std::string diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp index 9ed7ae128..ea704694a 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp @@ -183,7 +183,7 @@ private: xy m_wipe_tower_pos; // Left front corner of the wipe tower in mm. float m_wipe_tower_width; // Width of the wipe tower. float m_wipe_tower_depth = 0.f; // Depth of the wipe tower - float m_wipe_tower_rotation_angle; // Wipe tower rotation angle in degrees (with respect to x axis + float m_wipe_tower_rotation_angle = 0.f; // Wipe tower rotation angle in degrees (with respect to x axis float m_y_shift = 0.f; // y shift passed to writer float m_z_pos = 0.f; // Current Z position. float m_layer_height = 0.f; // Current layer height. diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index cfc0947fe..74ec515c1 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -321,11 +321,11 @@ int GLVolumeCollection::load_wipe_tower_preview( Point origin_of_rotation(0.f,0.f); mesh.rotate(rotation_angle,&origin_of_rotation); - v.indexed_vertex_array.load_mesh_flat_shading(mesh); - v.origin = Pointf3(pos_x, pos_y, 0.); + v.indexed_vertex_array.load_mesh_flat_shading(mesh); + v.origin = Pointf3(pos_x, pos_y, 0.); // finalize_geometry() clears the vertex arrays, therefore the bounding box has to be computed before finalize_geometry(). v.bounding_box = v.indexed_vertex_array.bounding_box(); - v.indexed_vertex_array.finalize_geometry(use_VBOs); + v.indexed_vertex_array.finalize_geometry(use_VBOs); v.composite_id = obj_idx * 1000000; v.select_group_id = obj_idx * 1000000; v.drag_group_id = obj_idx * 1000; @@ -2291,7 +2291,7 @@ void _3DScene::_load_shells(const Print& print, GLVolumeCollection& volumes, boo const PrintConfig& config = print.config; unsigned int extruders_count = config.nozzle_diameter.size(); if ((extruders_count > 1) && config.single_extruder_multi_material && config.wipe_tower && !config.complete_objects) - volumes.load_wipe_tower_preview(1000, config.wipe_tower_x, config.wipe_tower_y, config.wipe_tower_width, config.wipe_tower_per_color_wipe * (extruders_count - 1), max_z, use_VBOs); + volumes.load_wipe_tower_preview(1000, config.wipe_tower_x, config.wipe_tower_y, config.wipe_tower_width, config.wipe_tower_per_color_wipe * (extruders_count - 1), max_z, config.wipe_tower_rotation_angle, use_VBOs); } }