Merge pull request #3691 from lordofhyphens/max_width_3x_nozzle

Reduces the maximum flow for internal infill to 3x nozzle diameter
This commit is contained in:
Alessandro Ranellucci 2017-03-12 00:35:59 +01:00 committed by GitHub
commit 6feaef72ed

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 width = ((nozzle_diameter*nozzle_diameter) * PI + (height*height) * (4.0 - PI)) / (4.0 * height);
float min = nozzle_diameter * 1.05; 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) { if (role == frExternalPerimeter || role == frSupportMaterial || role == frSupportMaterialInterface) {
min = max = nozzle_diameter; min = max = nozzle_diameter;
} else if (role != frInfill) { } else if (role != frInfill) {
// do not limit width for sparse infill so that we use full native flow for it // do not limit width for sparse infill so that we use full native flow for it
max = nozzle_diameter * 1.7; max = nozzle_diameter * 1.7;
} }
if (max != -1 && width > max) width = max; if (width > max) width = max;
if (width < min) width = min; if (width < min) width = min;
return width; return width;