Reduces the maximum flow for internal infill to 3x nozzle diameter (avoid absurdly wide traces at small layer heights).

Fixes #3688
Fixes #2599
This commit is contained in:
Joseph Lenox 2017-01-26 20:03:42 -06:00
parent d41e3c1ee4
commit a42c16450b

View File

@ -91,14 +91,14 @@ Flow::_auto_width(FlowRole role, float nozzle_diameter, float height) {
float width = ((nozzle_diameter*nozzle_diameter) * PI + (height*height) * (4.0 - PI)) / (4.0 * height);
float min = nozzle_diameter * 1.05;
float max = -1;
float max = nozzle_diameter * 3; // cap width to 3x nozzle diameter
if (role == frExternalPerimeter || role == frSupportMaterial || role == frSupportMaterialInterface) {
min = max = nozzle_diameter;
} else if (role != frInfill) {
// do not limit width for sparse infill so that we use full native flow for it
max = nozzle_diameter * 1.7;
}
if (max != -1 && width > max) width = max;
if (width > max) width = max;
if (width < min) width = min;
return width;