mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-03 05:00:37 +08:00
Prevent variable-width logic from causing negative extrusion. #3220
This commit is contained in:
parent
546312a18d
commit
f352406c33
@ -492,16 +492,20 @@ PerimeterGenerator::_variable_width(const ThickPolylines &polylines, ExtrusionRo
|
||||
const double w = fmax(line.a_width, line.b_width);
|
||||
|
||||
if (path.polyline.points.empty()) {
|
||||
path.polyline.append(line.a);
|
||||
path.polyline.append(line.b);
|
||||
|
||||
flow.width = unscale(w);
|
||||
#ifdef SLIC3R_DEBUG
|
||||
printf(" filling %f gap\n", flow.width);
|
||||
#endif
|
||||
|
||||
// make sure we don't include too thin segments which
|
||||
// may cause even slightly negative mm3_per_mm because of floating point math
|
||||
path.mm3_per_mm = flow.mm3_per_mm();
|
||||
if (path.mm3_per_mm < EPSILON) continue;
|
||||
|
||||
path.width = flow.width;
|
||||
path.height = flow.height;
|
||||
path.polyline.append(line.a);
|
||||
path.polyline.append(line.b);
|
||||
} else {
|
||||
thickness_delta = fabs(scale_(flow.width) - w);
|
||||
if (thickness_delta <= tolerance) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user