Revert "Fix Compile Warnings (#5963)"

This reverts commit b83e16dbdd.

Found regressions like auto orientation didn't work anymore after this change, revert it
This commit is contained in:
SoftFever
2024-08-12 00:00:20 +08:00
parent 0286c36f42
commit 7082e945b1
184 changed files with 1091 additions and 461 deletions

View File

@@ -28,6 +28,7 @@ inline Grids line_rasterization(const Line &line, int64_t xdist = scale_(1), int
Point rayStart = line.a;
Point rayEnd = line.b;
IndexPair currentVoxel = point_map_grid_index(rayStart, xdist, ydist);
IndexPair firstVoxel = currentVoxel;
IndexPair lastVoxel = point_map_grid_index(rayEnd, xdist, ydist);
Point ray = rayEnd - rayStart;

View File

@@ -3451,6 +3451,7 @@ void GCodeProcessor::process_G2_G3(const GCodeReader::GCodeLine& line)
arc_length = ((int)line.p()) * 2 * PI * (start_point - m_arc_center).norm();
//BBS: Attention! arc_onterpolation does not support P mode while P is not 1.
arc_interpolation(start_point, end_point, m_arc_center, (m_move_path_type == EMovePathType::Arc_move_ccw));
float radian = ArcSegment::calc_arc_radian(start_point, end_point, m_arc_center, (m_move_path_type == EMovePathType::Arc_move_ccw));
Vec3f start_dir = Circle::calc_tangential_vector(start_point, m_arc_center, (m_move_path_type == EMovePathType::Arc_move_ccw));
Vec3f end_dir = Circle::calc_tangential_vector(end_point, m_arc_center, (m_move_path_type == EMovePathType::Arc_move_ccw));

View File

@@ -1,5 +1,6 @@
#include "../ClipperUtils.hpp"
#include "../Layer.hpp"
#include "../Polyline.hpp"
#include "RetractWhenCrossingPerimeters.hpp"

View File

@@ -325,6 +325,7 @@ ToolOrdering::ToolOrdering(const Print &print, unsigned int first_extruder, bool
std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const Print& print)
{
std::vector<unsigned int> tool_order;
int initial_extruder_id = -1;
std::map<int, double> min_areas_per_extruder;
for (auto object : print.objects()) {
@@ -353,6 +354,7 @@ std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const Pr
}
}
double max_minimal_area = 0.;
for (auto ape : min_areas_per_extruder) {
auto iter = tool_order.begin();
for (; iter != tool_order.end(); iter++) {
@@ -385,6 +387,7 @@ std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const Pr
std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const PrintObject& object)
{
std::vector<unsigned int> tool_order;
int initial_extruder_id = -1;
std::map<int, double> min_areas_per_extruder;
auto first_layer = object.get_layer(0);
for (auto layerm : first_layer->regions()) {
@@ -409,6 +412,7 @@ std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const Pr
}
}
double max_minimal_area = 0.;
for (auto ape : min_areas_per_extruder) {
auto iter = tool_order.begin();
for (; iter != tool_order.end(); iter++) {

View File

@@ -1072,6 +1072,8 @@ void WipeTower::toolchange_Wipe(
const float target_speed = is_first_layer() ? std::min(m_first_layer_speed * 60.f, 4800.f) : 4800.f;
float wipe_speed = 0.33f * target_speed;
float start_y = writer.y();
#if 0
// if there is less than 2.5*m_perimeter_width to the edge, advance straightaway (there is likely a blob anyway)
if ((m_left_to_right ? xr-writer.x() : writer.x()-xl) < 2.5f*m_perimeter_width) {
@@ -1130,6 +1132,8 @@ void WipeTower::toolchange_Wipe(
m_left_to_right = !m_left_to_right;
}
float end_y = writer.y();
// We may be going back to the model - wipe the nozzle. If this is followed
// by finish_layer, this wipe path will be overwritten.
//writer.add_wipe_point(writer.x(), writer.y())
@@ -1418,6 +1422,7 @@ void WipeTower::plan_tower()
// If wipe tower height is between the current and next member, set the min_depth as linear interpolation between them
auto next_height_to_depth = *iter;
if (next_height_to_depth.first > m_wipe_tower_height) {
float height_base = curr_height_to_depth.first;
float height_diff = next_height_to_depth.first - curr_height_to_depth.first;
float min_depth_base = curr_height_to_depth.second;
float depth_diff = next_height_to_depth.second - curr_height_to_depth.second;