Silence warnings in ExtrusionSimulator about unused variables that were there just for debugging purposes.

This commit is contained in:
Lukáš Hejl 2024-01-04 14:42:51 +01:00
parent 141ae5a916
commit f9825bb6f4

View File

@ -699,13 +699,16 @@ void gcode_spread_points(
}
}
*/
float area_total = 0;
float volume_total = 0;
float volume_excess = 0;
float volume_deficit = 0;
size_t n_cells = 0;
float area_circle_total = 0;
float area_total = 0;
float volume_total = 0;
size_t n_cells = 0;
#if 0
float volume_excess = 0;
float volume_deficit = 0;
float area_circle_total = 0;
// The intermediate lines.
for (int j = row_first; j < row_last; ++ j) {
const std::pair<float, float> &span1 = spans[j];
@ -759,7 +762,11 @@ void gcode_spread_points(
cell.volume = acc[j][i];
cell.area = mask[j][i];
assert(cell.area >= 0.f && cell.area <= 1.000001f);
area_circle_total += area;
#if 0
area_circle_total += area;
#endif
if (cell.area < area)
cell.area = area;
cell.fraction_covered = std::clamp((cell.area > 0) ? (area / cell.area) : 0, 0.f, 1.f);
@ -769,10 +776,15 @@ void gcode_spread_points(
}
float cell_height = cell.volume / cell.area;
cell.excess_height = cell_height - height_target;
#if 0
area_circle_total += area;
if (cell.excess_height > 0.f)
volume_excess += cell.excess_height * cell.area * cell.fraction_covered;
else
volume_deficit -= cell.excess_height * cell.area * cell.fraction_covered;
#endif
volume_total += cell.volume * cell.fraction_covered;
area_total += cell.area * cell.fraction_covered;
}