mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 15:46:00 +08:00
Silence warnings in ExtrusionSimulator about unused variables that were there just for debugging purposes.
This commit is contained in:
parent
141ae5a916
commit
f9825bb6f4
@ -699,13 +699,16 @@ void gcode_spread_points(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
float area_total = 0;
|
|
||||||
float volume_total = 0;
|
float area_total = 0;
|
||||||
float volume_excess = 0;
|
float volume_total = 0;
|
||||||
float volume_deficit = 0;
|
size_t n_cells = 0;
|
||||||
size_t n_cells = 0;
|
|
||||||
float area_circle_total = 0;
|
|
||||||
#if 0
|
#if 0
|
||||||
|
float volume_excess = 0;
|
||||||
|
float volume_deficit = 0;
|
||||||
|
float area_circle_total = 0;
|
||||||
|
|
||||||
// The intermediate lines.
|
// The intermediate lines.
|
||||||
for (int j = row_first; j < row_last; ++ j) {
|
for (int j = row_first; j < row_last; ++ j) {
|
||||||
const std::pair<float, float> &span1 = spans[j];
|
const std::pair<float, float> &span1 = spans[j];
|
||||||
@ -759,7 +762,11 @@ void gcode_spread_points(
|
|||||||
cell.volume = acc[j][i];
|
cell.volume = acc[j][i];
|
||||||
cell.area = mask[j][i];
|
cell.area = mask[j][i];
|
||||||
assert(cell.area >= 0.f && cell.area <= 1.000001f);
|
assert(cell.area >= 0.f && cell.area <= 1.000001f);
|
||||||
area_circle_total += area;
|
|
||||||
|
#if 0
|
||||||
|
area_circle_total += area;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (cell.area < area)
|
if (cell.area < area)
|
||||||
cell.area = area;
|
cell.area = area;
|
||||||
cell.fraction_covered = std::clamp((cell.area > 0) ? (area / cell.area) : 0, 0.f, 1.f);
|
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;
|
float cell_height = cell.volume / cell.area;
|
||||||
cell.excess_height = cell_height - height_target;
|
cell.excess_height = cell_height - height_target;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
area_circle_total += area;
|
||||||
if (cell.excess_height > 0.f)
|
if (cell.excess_height > 0.f)
|
||||||
volume_excess += cell.excess_height * cell.area * cell.fraction_covered;
|
volume_excess += cell.excess_height * cell.area * cell.fraction_covered;
|
||||||
else
|
else
|
||||||
volume_deficit -= cell.excess_height * cell.area * cell.fraction_covered;
|
volume_deficit -= cell.excess_height * cell.area * cell.fraction_covered;
|
||||||
|
#endif
|
||||||
|
|
||||||
volume_total += cell.volume * cell.fraction_covered;
|
volume_total += cell.volume * cell.fraction_covered;
|
||||||
area_total += cell.area * cell.fraction_covered;
|
area_total += cell.area * cell.fraction_covered;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user