Fixed wrong generation of Adaptive Cubic and Support Cubic infill when infill extrusion width is set in percent.

This commit is contained in:
Lukáš Hejl 2020-12-21 14:14:06 +01:00
parent 78a3d8b63e
commit dc2e7aeb4e

View File

@ -301,11 +301,12 @@ std::pair<double, double> adaptive_fill_line_spacing(const PrintObject &print_ob
bool nonempty = config.fill_density > 0;
bool has_adaptive_infill = nonempty && config.fill_pattern == ipAdaptiveCubic;
bool has_support_infill = nonempty && config.fill_pattern == ipSupportCubic;
double infill_extrusion_width = config.infill_extrusion_width.percent ? default_infill_extrusion_width * 0.01 * config.infill_extrusion_width : config.infill_extrusion_width;
region_fill_data.push_back(RegionFillData({
has_adaptive_infill ? Tristate::Maybe : Tristate::No,
has_support_infill ? Tristate::Maybe : Tristate::No,
config.fill_density,
config.infill_extrusion_width != 0. ? config.infill_extrusion_width : default_infill_extrusion_width
infill_extrusion_width != 0. ? infill_extrusion_width : default_infill_extrusion_width
}));
build_octree |= has_adaptive_infill || has_support_infill;
}