From b4577dbdc4b948f8dc6355641ba96dcced363316 Mon Sep 17 00:00:00 2001 From: Rodrigo Faselli <162915171+RF47@users.noreply.github.com> Date: Mon, 5 Oct 2026 20:27:37 -0300 Subject: [PATCH 1/6] Hide smooth factor if there is no infill. (#16172) --- src/slic3r/GUI/ConfigManipulation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 48c0cd0d5f..61bbdcc863 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -840,7 +840,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, in bool has_top_shell = has_top_shell_layers && config->option("top_surface_density")->value > 0; bool has_bottom_shell = config->opt_int("bottom_shell_layers") > 0; bool has_solid_infill = has_top_shell_layers || has_bottom_shell; - toggle_line("sparse_infill_smooth_factor", is_smoothable_infill_pattern(pattern, config->opt_int("fill_multiline"))); + toggle_line("sparse_infill_smooth_factor", have_infill && is_smoothable_infill_pattern(pattern, config->opt_int("fill_multiline"))); toggle_field("top_surface_pattern", has_top_shell); toggle_field("bottom_surface_pattern", has_bottom_shell); toggle_field("top_surface_density", has_top_shell_layers); From 1dcbb2c02a50e6334a867e6d781ab84e7c2c72c0 Mon Sep 17 00:00:00 2001 From: "David Eccles (gringer)" Date: Tue, 6 Oct 2026 12:32:18 +1300 Subject: [PATCH 2/6] Fill in truncated octahedron tops (optional setting) (#12541) Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com> --- src/libslic3r/Fill/Fill.cpp | 8 + src/libslic3r/Fill/Fill3DHoneycomb.cpp | 370 ++++++++++++++++--------- src/libslic3r/Fill/FillBase.hpp | 1 + src/libslic3r/Preset.cpp | 1 + src/libslic3r/PrintConfig.cpp | 7 + src/libslic3r/PrintConfig.hpp | 1 + src/slic3r/GUI/ConfigManipulation.cpp | 4 + src/slic3r/GUI/Tab.cpp | 1 + 8 files changed, 266 insertions(+), 127 deletions(-) diff --git a/src/libslic3r/Fill/Fill.cpp b/src/libslic3r/Fill/Fill.cpp index 254dd109f8..e95fe2741d 100644 --- a/src/libslic3r/Fill/Fill.cpp +++ b/src/libslic3r/Fill/Fill.cpp @@ -301,6 +301,9 @@ struct SurfaceFillParams float skin_infill_depth = 0; bool symmetric_infill_y_axis = false; + // Top fill for 3D honeycomb + bool infill_complete_top = false; + // Params for Lateral honeycomb float infill_overhang_angle = 60.f; @@ -344,6 +347,7 @@ struct SurfaceFillParams RETURN_COMPARE_NON_EQUAL(lateral_lattice_angle_1); RETURN_COMPARE_NON_EQUAL(lateral_lattice_angle_2); RETURN_COMPARE_NON_EQUAL(symmetric_infill_y_axis); + RETURN_COMPARE_NON_EQUAL(infill_complete_top); RETURN_COMPARE_NON_EQUAL(infill_lock_depth); RETURN_COMPARE_NON_EQUAL(skin_infill_depth); RETURN_COMPARE_NON_EQUAL(infill_overhang_angle); @@ -931,6 +935,8 @@ std::vector group_fills(const Layer &layer, LockRegionParam &lock_p params.symmetric_infill_y_axis = region_config.symmetric_infill_y_axis; } else if (params.pattern == ipZigZag) { params.symmetric_infill_y_axis = region_config.symmetric_infill_y_axis; + } else if (params.pattern == ip3DHoneycomb) { + params.infill_complete_top = region_config.infill_complete_top; } if (surface.is_solid()) { @@ -1430,6 +1436,8 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive: } else if (surface_fill.params.pattern == ipZigZag) { params.symmetric_infill_y_axis = surface_fill.params.symmetric_infill_y_axis; + } else if (surface_fill.params.pattern == ip3DHoneycomb) { + params.infill_complete_top = surface_fill.params.infill_complete_top; } if (surface_fill.params.pattern == ipGrid) params.can_reverse = false; diff --git a/src/libslic3r/Fill/Fill3DHoneycomb.cpp b/src/libslic3r/Fill/Fill3DHoneycomb.cpp index 15e3ee6d21..3612608301 100644 --- a/src/libslic3r/Fill/Fill3DHoneycomb.cpp +++ b/src/libslic3r/Fill/Fill3DHoneycomb.cpp @@ -61,7 +61,7 @@ static coordf_t troctWave(coordf_t pos, coordf_t gridSize, coordf_t Zpos) // Identify the important points of curve change within a truncated // octahedron wave (as waveform fraction t): -// 1. Start of wave (always 0.0) +// 1. Start of wave (always 0.0; not needed if the pattern base starts here) // 2. Transition to upper "horizontal" part // 3. Transition from upper "horizontal" part // 4. Transition to lower "horizontal" part @@ -73,17 +73,11 @@ static coordf_t troctWave(coordf_t pos, coordf_t gridSize, coordf_t Zpos) * \ / * o---o */ -static std::vector getCriticalPoints(coordf_t Zpos, coordf_t gridSize) + static std::vector getCriticalPoints(coordf_t Zpos, coordf_t gridSize) { - std::vector res = {0.}; + std::vector res; coordf_t perpOffset = abs(triWave(Zpos, gridSize) / 2.); - coordf_t normalisedOffset = perpOffset / gridSize; - // // for debugging: just generate evenly-distributed points - // for(coordf_t i = 0; i < 2; i += 0.05){ - // res.push_back(gridSize * i); - // } - // note: 0 == straight line if(normalisedOffset > 0){ res.push_back(gridSize * (0. + normalisedOffset)); res.push_back(gridSize * (1. - normalisedOffset)); @@ -93,113 +87,251 @@ static std::vector getCriticalPoints(coordf_t Zpos, coordf_t gridSize) return(res); } -// Generate an array of points that are in the same direction as the -// basic printing line (i.e. Y points for columns, X points for rows) -// Note: a negative offset only causes a change in the perpendicular -// direction -static std::vector colinearPoints(const coordf_t Zpos, coordf_t gridSize, std::vector critPoints, - const size_t baseLocation, size_t gridLength) +// Add additional dense fill in line with the pattern direction to +// cover the top squares of the pattern +static Polylines addTops(coordf_t Zpos, coordf_t gridSize, coordf_t lengthX, coordf_t lengthY, coordf_t spacing, + size_t multiline_count, size_t topDistance) { - std::vector points; - points.push_back(baseLocation); - for (coordf_t cLoc = baseLocation; cLoc < gridLength; cLoc+= (gridSize*2)) { - for(size_t pi = 0; pi < critPoints.size(); pi++){ - points.push_back(baseLocation + cLoc + critPoints[pi]); + coordf_t zCycle = fmod(Zpos + gridSize/2, gridSize * 2.) / (gridSize * 2.); + coordf_t zHalfCycle = fmod(zCycle, 0.5) * 2.; + bool printVert = zCycle < 0.5; + coordf_t offsetX = multiline_count; + coordf_t offsetY = multiline_count; + coordf_t perpOffset = abs(triWave(Zpos, gridSize) / 2.); + coordf_t gridPoint = gridSize * (0. + perpOffset / gridSize); + coordf_t topOffset = gridSize / 2.0 - abs(troctWave(gridPoint, gridSize, Zpos)); + coordf_t multilineAdjust = (sqrt(2) - 1.0) / 2.; + Polylines lines; + size_t pointCount = 0; + coordf_t gridStartL = gridSize * 0.5 - topOffset; + coordf_t gridEndL = gridSize * 0.5 + topOffset; + if((topDistance == 0) && (multiline_count == 1)){ + // extend out a little bit on the first layer to help fuse the cover + gridStartL -= spacing; + gridEndL += spacing; + } else if(multiline_count > 1) { + // match start point to the corner edge + gridStartL -= spacing * multiline_count * multilineAdjust; + gridEndL += spacing * multiline_count * multilineAdjust; + } + // top cover extents perpendicular to the direction of travel + coordf_t gridStartP = gridSize * 0.5 - topOffset + spacing * multiline_count / 2. + spacing / 2.; + coordf_t gridEndP = gridSize * 0.5 + topOffset - spacing * multiline_count / 2. - spacing / 2.; + coordf_t x, y; + int xm, ym; + // if the print direction needs to be rotated, then swap the extents + if((topDistance % 2) == 0){ + std::swap(gridStartL, gridStartP); + std::swap(gridEndL, gridEndP); + } + // adjust spacing so that it starts and ends on exactly the right place + // and increase fill density slightly to reduce gaps + coordf_t region_count = floor((gridEndP - gridStartP) / (spacing / sqrt(2))); + if(region_count <= 0){ + return lines; + } + spacing = (gridEndP - gridStartP) / region_count; + for (x = offsetX, xm = 0; x <= (lengthX); x+= gridSize, xm = xm ^ 1) { + for (y = offsetY, ym = 0; y <= (lengthY); y += gridSize, ym = ym ^ 1) { + if(((xm ^ ym) == 1) == printVert){ + continue; + } + // // For debugging: remove 0,0 -> 1,1 top to help understand orientation + // if((x <= (gridSize + EPSILON)) && (y <= (gridSize + EPSILON)) && ((y - x) < EPSILON)){ + // continue; + // } + Polyline newPoints; + int dirMod = xm ^ ym; + if(printVert == (topDistance % 2)){ + if(y < (lengthY - spacing * multiline_count * 1.5)){ + coordf_t endPMod = std::min(lengthX - (multiline_count * (spacing + 1) / 2.), x + gridEndP) - x; + coordf_t endLMod = std::min(lengthY - (multiline_count * (spacing + 1) / 2.), y + gridEndL) - y; + for(coordf_t xi = gridStartP; xi < (endPMod + EPSILON); xi += spacing, dirMod = dirMod ^ 1){ + newPoints.points.push_back((dirMod == 0) ? Point(x + xi, y + gridStartL) : Point(x + xi, y + endLMod)); + newPoints.points.push_back((dirMod == 0) ? Point(x + xi, y + endLMod) : Point(x + xi, y + gridStartL)); + pointCount += 2; + } + } + } else { + if(x < (lengthX - spacing * multiline_count * 1.5)){ + coordf_t endPMod = std::min(lengthY - (multiline_count * (spacing + 1) / 2.), y + gridEndP) - y; + coordf_t endLMod = std::min(lengthX - (multiline_count * (spacing + 1) / 2.), x + gridEndL) - x; + for(coordf_t yi = gridStartP; yi < (endPMod + EPSILON); yi += spacing, dirMod = dirMod ^ 1){ + newPoints.points.push_back((dirMod == 0) ? Point(x + gridStartL, y + yi) : Point(x + endLMod, y + yi)); + newPoints.points.push_back((dirMod == 0) ? Point(x + endLMod, y + yi) : Point(x + gridStartL, y + yi)); + pointCount += 2; + } + } + } + lines.push_back(newPoints); } } - points.push_back(gridLength); - return points; + return lines; } -// Generate an array of points for the dimension that is perpendicular to -// the basic printing line (i.e. X points for columns, Y points for rows) - static std::vector perpendPoints(const coordf_t Zpos, coordf_t gridSize, std::vector critPoints, - size_t baseLocation, size_t gridLength, - size_t offsetBase, coordf_t perpDir) +// Generate a set of polylines that complete octahedron curves on the +// extremities of a pattern +static Polylines makeEndPoints(const coordf_t Zpos, coordf_t gridSize, std::vector critPoints, + coordf_t lengthX, coordf_t lengthY, coordf_t spacing, size_t multiline_count) { - std::vector points; - points.push_back(offsetBase); - for (coordf_t cLoc = baseLocation; cLoc < gridLength; cLoc+= gridSize*2) { - for(size_t pi = 0; pi < critPoints.size(); pi++){ + Polylines lines; + coordf_t zCycle = fmod(Zpos + gridSize/2, gridSize * 2.) / (gridSize * 2.); + bool printVert = zCycle < 0.5; + bool printHoriz = zCycle >= 0.5; + int zFlipOffset = ((sgn(fmod(zCycle, 0.5) - 0.25) > 0) == printVert) ? 0 : 1; + // create templates for copying + Polylines startLines, endLines; + for(size_t li = 0; li < multiline_count; li++){ + coordf_t oAdj = (li - ((multiline_count - 1) / 2.)) * spacing; // orthogonal line adjustment + coordf_t dAdj = oAdj * sqrt(2); // diagonal line adjustment + Polyline startLine, endLine; + // Left Bottom; Bottom Left + startLine.points.push_back(printHoriz ? Point(oAdj, -dAdj) : Point(-dAdj, oAdj)); + // Right Bottom; Top Left + endLine.points.push_back(printHoriz ? Point(-oAdj, -dAdj) : Point(-dAdj, -oAdj)); + for(size_t pi = 0; pi < 2; pi++){ + int pDir = pi * 2 - 1; + coordf_t pAdj = pDir * (sqrt(2) - 1) * oAdj; + coordf_t troctOffset = abs(troctWave(critPoints[pi], gridSize, Zpos)); + startLine.points.push_back(printHoriz ? + Point(-troctOffset, critPoints[pi] + pAdj) : + Point(critPoints[pi] + pAdj, -troctOffset)); + endLine.points.push_back(printHoriz ? + Point(troctOffset, critPoints[pi] + pAdj) : + Point(critPoints[pi] + pAdj, troctOffset)); + } + // Left Top; Bottom Right + startLine.points.push_back(printHoriz ? Point(oAdj, gridSize + dAdj) : Point(gridSize + dAdj, oAdj)); + // Right Top; Top Right + endLine.points.push_back(printHoriz ? Point(-oAdj, gridSize + dAdj) : Point(gridSize + dAdj, -oAdj)); + startLines.push_back(startLine); + endLines.push_back(endLine); + } + coordf_t gridMaxX = ceil((lengthX - EPSILON) / gridSize) * gridSize; + coordf_t gridMaxY = ceil((lengthY - EPSILON) / gridSize) * gridSize; + for(size_t li = 0; li < multiline_count; li++){ + coordf_t mlFactor = (li - ((multiline_count - 1) / 2.)) * spacing; + for (coordf_t cLoc = zFlipOffset * gridSize; cLoc < ((printHoriz ? gridMaxY : gridMaxX) - EPSILON); cLoc += gridSize * 2) { + Polyline tsLine(startLines[li]); + Polyline teLine(endLines[li]); + tsLine.translate(printVert ? Point(cLoc, -mlFactor) : Point(-mlFactor, cLoc)); + teLine.translate(printVert ? Point(cLoc, gridMaxY + mlFactor) : Point(gridMaxX + mlFactor, cLoc)); + lines.push_back(tsLine); + lines.push_back(teLine); + } + } + return lines; +} + +// Generate a polyline that describes a single path segment through +// the infill in the same direction as the basic printing line (i.e. X +// points for columns, Y points for rows) +static Polyline patternPoints(const coordf_t Zpos, coordf_t gridSize, std::vector critPoints, + coordf_t gridLength, coordf_t perpDir, int print_dir, coordf_t oAdj) +{ + Polyline line; + coordf_t dAdj = oAdj * (sqrt(2) - 1); // additional diagonal adjustment + coordf_t zCycle = fmod(Zpos + gridSize/2, gridSize * 2.) / (gridSize * 2.); + int zFlipDirection = sgn(fmod(zCycle, 0.5) - 0.25); + bool hitEnd = false; + int endPi = -1; + size_t pi = 0; + size_t piOfs = 0; + line.points.push_back((print_dir == 1) ? Point(dAdj, 0.) : Point(0., dAdj)); + coordf_t gridMax = ceil((gridLength - EPSILON) / gridSize) * gridSize; + for (coordf_t cLoc = 0; cLoc < gridMax; cLoc += gridSize, piOfs = (piOfs + 2) % 4) { + for(pi = piOfs; pi < (piOfs + 2); pi++){ coordf_t offset = troctWave(critPoints[pi], gridSize, Zpos); - points.push_back(offsetBase + (offset * perpDir)); + coordf_t offsetFlip = sgn(offset); + coordf_t posFlip = floor(((pi + 1) % 4) / 2) * 2 - 1; + coordf_t posLin = cLoc - (piOfs * gridSize / 2.) + critPoints[pi]; + coordf_t posPerp = offset * perpDir; + line.points.push_back((print_dir == 1) ? + Point(posPerp, posLin + posFlip * dAdj * perpDir * zFlipDirection * print_dir) : + Point(posLin + posFlip * dAdj * perpDir * zFlipDirection * print_dir, posPerp)); } } - points.push_back(offsetBase); - return points; -} - -static inline Pointfs zip(const std::vector &x, const std::vector &y) -{ - assert(x.size() == y.size()); - Pointfs out; - out.reserve(x.size()); - for (size_t i = 0; i < x.size(); ++ i) - out.push_back(Vec2d(x[i], y[i])); - return out; + line.points.push_back((print_dir == 1) ? Point(dAdj, gridMax) : Point(gridMax, dAdj)); + return line; } // Generate a set of curves (array of array of 2d points) that describe a // horizontal slice of a truncated regular octahedron. -static std::vector makeActualGrid(coordf_t Zpos, coordf_t gridSize, size_t boundsX, size_t boundsY) + static Polylines makeZigZag(coordf_t Zpos, coordf_t gridSize, coordf_t lengthX, coordf_t lengthY, + coordf_t spacing, size_t multiline_count) { - std::vector points; + Polylines lines; std::vector critPoints = getCriticalPoints(Zpos, gridSize); coordf_t zCycle = fmod(Zpos + gridSize/2, gridSize * 2.) / (gridSize * 2.); bool printVert = zCycle < 0.5; - if (printVert) { - int perpDir = -1; - for (coordf_t x = 0; x <= (boundsX); x+= gridSize, perpDir *= -1) { - points.push_back(Pointfs()); - Pointfs &newPoints = points.back(); - newPoints = zip( - perpendPoints(Zpos, gridSize, critPoints, 0, boundsY, x, perpDir), - colinearPoints(Zpos, gridSize, critPoints, 0, boundsY)); + BoundingBox extents; + int perpDir = -1; + int perpDirPattern = -1; + coordf_t gridMax = ceil(((printVert ? lengthX : lengthY) - EPSILON) / gridSize) * gridSize; + for (coordf_t pPos = 0; pPos < gridMax; pPos += gridSize, perpDirPattern *= -1) { + for (size_t li = 0; li < multiline_count; li++){ + coordf_t oAdj = (li - ((multiline_count - 1) / 2.)) * spacing; // orthogonal line adjustment + Polyline newPoints; + newPoints = patternPoints(Zpos, gridSize, critPoints, + printVert ? lengthY : lengthX, + perpDirPattern, printVert ? 1 : -1, oAdj); if (perpDir == 1) - std::reverse(newPoints.begin(), newPoints.end()); - } - } else { - int perpDir = 1; - for (coordf_t y = gridSize; y <= (boundsY); y+= gridSize, perpDir *= -1) { - points.push_back(Pointfs()); - Pointfs &newPoints = points.back(); - newPoints = zip( - colinearPoints(Zpos, gridSize, critPoints, 0, boundsX), - perpendPoints(Zpos, gridSize, critPoints, 0, boundsX, y, perpDir)); - if (perpDir == -1) - std::reverse(newPoints.begin(), newPoints.end()); + std::reverse(newPoints.points.begin(), newPoints.points.end()); + newPoints.translate(printVert ? Point(pPos + oAdj, 0.) : Point(0., pPos + oAdj)); + extents.merge(newPoints.points); + lines.push_back(newPoints); + perpDir *= -1; } } - return points; + return lines; } // Generate a set of curves (array of array of 2d points) that describe a // horizontal slice of a truncated regular octahedron with a specified // grid square size. // gridWidth and gridHeight define the width and height of the bounding box respectively -static Polylines makeGrid(coordf_t z, coordf_t gridSize, coordf_t boundWidth, coordf_t boundHeight, bool fillEvenly) +// Note: this uses the 'complete' infill parameter to determine if the +// square tops should be enclosed (true) or open (false). Alternatively, +// a rotation angle of 180 degrees or greater can be used. +static Polylines makeGrid(coordf_t z, coordf_t zLast, coordf_t gridSize, + coordf_t lengthX, coordf_t lengthY, + bool completeTops, coordf_t spacing, size_t multiline_count, size_t layer_count) { - std::vector polylines = makeActualGrid(z, gridSize, boundWidth, boundHeight); + coordf_t zCycle = fmod(z + gridSize/2, gridSize * 2.) / (gridSize * 2.); + bool printVert = zCycle < 0.5; + coordf_t zCycleLast = fmod(zLast + gridSize/2, gridSize * 2.) / (gridSize * 2.); + bool printVertLast = zCycleLast < 0.5; Polylines result; - result.reserve(polylines.size()); - for (std::vector::const_iterator it_polylines = polylines.begin(); - it_polylines != polylines.end(); ++ it_polylines) { - result.push_back(Polyline()); - Polyline &polyline = result.back(); - for (Pointfs::const_iterator it = it_polylines->begin(); it != it_polylines->end(); ++ it) - polyline.points.push_back(Point(coord_t((*it)(0)), coord_t((*it)(1)))); + Polylines polyZag = makeZigZag(z, gridSize, lengthX, lengthY, spacing, multiline_count); + result.insert(result.end(), polyZag.begin(), polyZag.end()); + // add end connectors + std::vector critPoints = getCriticalPoints(z, gridSize); + Polylines endPoints = makeEndPoints(z, gridSize, critPoints, lengthX, lengthY, spacing, multiline_count); + result.insert(result.end(), endPoints.begin(), endPoints.end()); + // add tops for the first layers in each cycle + if(completeTops && (printVert != printVertLast)){ + coordf_t layerHeight = (z - zLast) / (multiline_count * layer_count); + size_t top_distance = 0; + for(coordf_t zCheck = z; zCheck >= (zLast + EPSILON); zCheck -= layerHeight * layer_count, top_distance++){ + coordf_t zCheckCycle = fmod(zCheck + gridSize/2, gridSize * 2.) / (gridSize * 2.); + if(printVert != (zCheckCycle < 0.5)){ + break; + } + } + Polylines polytops = addTops(z, gridSize, lengthX, lengthY, spacing, multiline_count, top_distance); + result.insert(result.end(), polytops.begin(), polytops.end()); } return result; } // FillParams has the following useful information: // density <0 .. 1> [proportion of space to fill] -// anchor_length [???] -// anchor_length_max [???] // dont_connect() [avoid connect lines] // dont_adjust [avoid filling space evenly] // monotonic [fill strictly left to right] // complete [complete each loop] +// multiline [number of lines to draw for each pattern line] +// complete_top [should the top surfaces of the pattern be filled] void Fill3DHoneycomb::_fill_surface_single( const FillParams ¶ms, @@ -208,78 +340,62 @@ void Fill3DHoneycomb::_fill_surface_single( ExPolygon expolygon, Polylines &polylines_out) { - // no rotation is supported for this infill pattern // Support infill angle auto infill_angle = float(this->angle); if (std::abs(infill_angle) >= EPSILON) expolygon.rotate(-infill_angle); BoundingBox bb = expolygon.contour.bounding_box(); - // Expand the bounding box to avoid artifacts at the edges - coord_t expand = 5 * (scale_(this->spacing)); - bb.offset(expand); + // Increase the bounding box outwards to avoid edge clipping artefacts + coord_t expandSize = 5. * scale_(this->spacing); + bb.offset(expandSize); + + // Adjustment for combining infill setting + size_t layersPerSlice = 1; + if(thickness_layers > 0){ + layersPerSlice = thickness_layers; + } // Note: with equally-scaled X/Y/Z, the pattern will create a vertically-stretched // truncated octahedron; so Z is pre-adjusted first by scaling by sqrt(2) coordf_t zScale = sqrt(2); - // adjustment to account for the additional distance of octagram curves - // note: this only strictly applies for a rectangular area where the total - // Z travel distance is a multiple of the spacing... but it should - // be at least better than the prevous estimate which assumed straight - // lines + // Density adjustment to account for the additional distance of + // octagram curves. [This only strictly applies for a rectangular + // area where the total Z travel distance is a multiple of the + // spacing] // = 4 * integrate(func=4*x(sqrt(2) - 1) + 1, from=0, to=0.25) // = (sqrt(2) + 1) / 2 [... I think] - // make a first guess at the preferred grid Size - coordf_t gridSize = (scale_(this->spacing) * ((zScale + 1.) / 2.) * params.multiline / params.density); - - // This density calculation is incorrect for many values > 25%, possibly - // due to quantisation error, so this value is used as a first guess, then the - // Z scale is adjusted to make the layer patterns consistent / symmetric - // This means that the resultant infill won't be an ideal truncated octahedron, - // but it should look better than the equivalent quantised version - - //Orca: uses a fixed layer height to avoid inconsistent bridges and variable layer height artifacts. - //coordf_t layerHeight = scale_(thickness_layers); - coordf_t layerHeight = scale_(1.0); - // ceiling to an integer value of layers per Z - // (with a little nudge in case it's close to perfect) + // make a first guess at the preferred grid Size (in unscaled units) + coordf_t gridSize = (scale_(this->spacing) * + ((zScale + 1.) / 2.) * params.multiline / params.density); + coordf_t layerHeight = scale_(params.layer_height); coordf_t layersPerModule = floor((gridSize * 2) / (zScale * layerHeight) + 0.05); - if(params.density > 0.42){ // exact layer pattern for >42% density + // If a density over 42% is requested, set an exact layer pattern + if((params.density > 0.42) || (layersPerModule < 2)){ layersPerModule = 2; // re-adjust the grid size for a partial octahedral path // (scale of 1.1 guessed based on modeling) gridSize = (scale_(this->spacing) * 1.1 * params.multiline / params.density); // re-adjust zScale to make layering consistent zScale = (gridSize * 2) / (layersPerModule * layerHeight); - } else { - if(layersPerModule < 2){ - layersPerModule = 2; - } - // re-adjust zScale to make layering consistent - zScale = (gridSize * 2) / (layersPerModule * layerHeight); - // re-adjust the grid size to account for the new zScale - gridSize = (scale_(this->spacing) * ((zScale + 1.) / 2.) * params.multiline / params.density); - // re-calculate layersPerModule and zScale - layersPerModule = floor((gridSize * 2) / (zScale * layerHeight) + 0.05); - if(layersPerModule < 2){ - layersPerModule = 2; - } - zScale = (gridSize * 2) / (layersPerModule * layerHeight); } - // align bounding box to a multiple of our honeycomb grid module - // (a module is 2*$gridSize since one $gridSize half-module is - // growing while the other $gridSize half-module is shrinking) - bb.merge(align_to_grid(bb.min, Point(gridSize*4, gridSize*4))); + // align bounding box to a multiple of the octahedron grid so that + // layers with different starting points have matching origins + bb.merge(align_to_grid(bb.min, Point(gridSize * 2., gridSize * 2.))); + // Z adjustment to start at the widest point for the lowest layer + coordf_t startOffset = gridSize / 2. + scale_(params.layer_height / 2.); // generate pattern Polylines polylines = makeGrid( - scale_(this->z) * zScale, - gridSize, - bb.size()(0), - bb.size()(1), - !params.dont_adjust); + scale_(this->z) * zScale + startOffset, + scale_(this->z - (params.layer_height * params.multiline * layersPerSlice)) * zScale + startOffset, + gridSize, bb.size()(0), bb.size()(1), + params.infill_complete_top, + scale_(this->spacing), + params.multiline, + layersPerSlice); // move pattern in place for (Polyline &pl : polylines){ @@ -290,8 +406,8 @@ void Fill3DHoneycomb::_fill_surface_single( smooth_polyline_corners(pl, params.smooth_factor, scaled(params.resolution)); } - // Apply multiline offset if needed - multiline_fill(polylines, params, spacing); + // Note: multiline fill adjustment is carried out in this code, + // rather than using the multiline_fill function // clip pattern to boundaries, chain the clipped polylines polylines = intersection_pl(std::move(polylines), to_polygons(expolygon)); diff --git a/src/libslic3r/Fill/FillBase.hpp b/src/libslic3r/Fill/FillBase.hpp index 0b775acf58..7599b2a0d2 100644 --- a/src/libslic3r/Fill/FillBase.hpp +++ b/src/libslic3r/Fill/FillBase.hpp @@ -118,6 +118,7 @@ struct FillParams float horiz_move{0.0}; //move infill to get cross zag pattern bool symmetric_infill_y_axis{false}; + bool infill_complete_top{false}; coord_t symmetric_y_axis{0}; bool locked_zag{false}; float infill_lock_depth{0.0}; diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index b47a0f4695..a6936d70a9 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -1209,6 +1209,7 @@ static std::vector s_Preset_print_options{ "infill_lock_depth", "skin_infill_depth", "skin_infill_density", + "infill_complete_top", "align_infill_direction_to_model", "extra_solid_infills", "center_of_surface_pattern", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 4c8f45158d..832ff9b3b4 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -4574,6 +4574,13 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false)); + def = this->add("infill_complete_top", coBool); + def->label = L("Fill pattern tops"); + def->category = L("Strength"); + def->tooltip = L("Choose this option if you want to completely fill in the tops of the infill pattern"); + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionBool(false)); + // Orca: max layer height for combined infill def = this->add("infill_combination_max_layer_height", coFloatOrPercent); def->label = L("Infill combination - Max layer height"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 68e35db40d..acf6bd5335 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -1358,6 +1358,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionFloat, bottom_layer_direction)) ((ConfigOptionString, solid_infill_rotate_template)) ((ConfigOptionBool, symmetric_infill_y_axis)) + ((ConfigOptionBool, infill_complete_top)) ((ConfigOptionFloat, infill_shift_step)) ((ConfigOptionString, sparse_infill_rotate_template)) ((ConfigOptionPercent, sparse_infill_density)) diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 61bbdcc863..df00a6a8b5 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -777,6 +777,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, in bool have_infill = config->option("sparse_infill_density")->value > 0; // sparse_infill_filament_id uses the same logic as in Print::extruders() for (auto el : { "sparse_infill_pattern", "infill_combination", "fill_multiline","infill_direction", + "infill_complete_top", "minimum_sparse_infill_area", "sparse_infill_filament_id","infill_shift_step","sparse_infill_rotate_template","symmetric_infill_y_axis"}) toggle_line(el, have_infill); @@ -831,6 +832,9 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, in toggle_line("symmetric_infill_y_axis", is_zig_zag || is_cross_zag || is_locked_zig); + bool is_3Dhoneycomb = config->option>("sparse_infill_pattern")->value == InfillPattern::ip3DHoneycomb; + toggle_line("infill_complete_top", have_infill && is_3Dhoneycomb); + bool has_spiral_vase = config->opt_bool("spiral_mode"); toggle_line("spiral_mode_smooth", has_spiral_vase); toggle_line("spiral_mode_max_xy_smoothing", has_spiral_vase && config->opt_bool("spiral_mode_smooth")); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index f593fcd8f5..c1d2b2129b 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2927,6 +2927,7 @@ void TabPrint::build() optgroup->append_single_option_line("skin_infill_line_width", "strength_settings_patterns#locked-zag"); optgroup->append_single_option_line("skeleton_infill_line_width", "strength_settings_patterns#locked-zag"); optgroup->append_single_option_line("symmetric_infill_y_axis", "strength_settings_infill#symmetric-infill-y-axis"); + optgroup->append_single_option_line("infill_complete_top", "strength_settings_infill#infill-complete-top"); optgroup->append_single_option_line("infill_shift_step", "strength_settings_patterns#cross-hatch"); optgroup->append_single_option_line("lateral_lattice_angle_1", "strength_settings_patterns#lateral-lattice"); optgroup->append_single_option_line("lateral_lattice_angle_2", "strength_settings_patterns#lateral-lattice"); From fefedb66c48c3c36da78e8eefbfb392a113f5a9f Mon Sep 17 00:00:00 2001 From: Kiss Lorand <50251547+kisslorand@users.noreply.github.com> Date: Tue, 6 Oct 2026 03:17:20 +0300 Subject: [PATCH 3/6] Fix overlapping internal bridges (#16177) --- src/libslic3r/PrintObject.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 104b2f2bd7..4229ceca73 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -3450,14 +3450,14 @@ void PrintObject::bridge_over_infill() const bool turning_pattern = region_config.sparse_infill_pattern == ipHilbertCurve || region_config.sparse_infill_pattern == ipOctagramSpiral; const Flow &flow = candidate.region->bridging_flow(frSolidInfill, true); - Polygons area_to_be_bridge = expand(candidate.new_polys, flow.scaled_spacing()); - area_to_be_bridge = intersection(area_to_be_bridge, deep_infill_area); - - area_to_be_bridge.erase(std::remove_if(area_to_be_bridge.begin(), area_to_be_bridge.end(), - [internal_unsupported_area](const Polygon &p) { - return intersection({p}, internal_unsupported_area).empty(); + ExPolygons bridge_components = intersection_ex(expand(candidate.new_polys, flow.scaled_spacing()), deep_infill_area); + // Orca: Filter whole bridge areas so their holes remain holes. + bridge_components.erase(std::remove_if(bridge_components.begin(), bridge_components.end(), + [&internal_unsupported_area](const ExPolygon &component) { + return intersection_ex(component, internal_unsupported_area).empty(); }), - area_to_be_bridge.end()); + bridge_components.end()); + Polygons area_to_be_bridge = to_polygons(std::move(bridge_components)); Polygons limiting_area = union_(area_to_be_bridge, expansion_area); From 9e5bfc272c5f0463812fa5fe39e8d9244c2bcd06 Mon Sep 17 00:00:00 2001 From: Kris Austin Date: Mon, 5 Oct 2026 19:20:12 -0500 Subject: [PATCH 4/6] fix: Compare Presets crash on filaments with different variant counts (#16176) --- src/slic3r/GUI/ConfigValueFormatter.cpp | 4 ++ tests/slic3rutils/CMakeLists.txt | 1 + .../test_config_value_formatter.cpp | 40 +++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 tests/slic3rutils/test_config_value_formatter.cpp diff --git a/src/slic3r/GUI/ConfigValueFormatter.cpp b/src/slic3r/GUI/ConfigValueFormatter.cpp index 2ae515b0e2..8536e6731d 100644 --- a/src/slic3r/GUI/ConfigValueFormatter.cpp +++ b/src/slic3r/GUI/ConfigValueFormatter.cpp @@ -53,6 +53,8 @@ wxString get_string_from_enum(const std::string& opt_key, const DynamicPrintConf } return _L("Undefined"); } + if (val < 0 || val >= int(names.size())) + return _L("Undefined"); return from_u8(_utf8(names[val])); } @@ -215,6 +217,8 @@ wxString get_string_value(const std::string& opt_key, const DynamicPrintConfig& ; } case coEnums: { + if (!opt_vector || opt_idx >= opt_vector->size()) + return _L("Undefined"); return get_string_from_enum(pure_key, config, pure_key == "top_surface_pattern" || pure_key == "bottom_surface_pattern" || diff --git a/tests/slic3rutils/CMakeLists.txt b/tests/slic3rutils/CMakeLists.txt index 566835f495..b495f35526 100644 --- a/tests/slic3rutils/CMakeLists.txt +++ b/tests/slic3rutils/CMakeLists.txt @@ -2,6 +2,7 @@ get_filename_component(_TEST_NAME ${CMAKE_CURRENT_LIST_DIR} NAME) add_executable(${_TEST_NAME}_tests ${_TEST_NAME}_tests_main.cpp test_bambu_filament_ids.cpp + test_config_value_formatter.cpp test_creality_cfs_match.cpp test_dev_mapping.cpp test_filament_bitmap_utils.cpp diff --git a/tests/slic3rutils/test_config_value_formatter.cpp b/tests/slic3rutils/test_config_value_formatter.cpp new file mode 100644 index 0000000000..671e898ff5 --- /dev/null +++ b/tests/slic3rutils/test_config_value_formatter.cpp @@ -0,0 +1,40 @@ +#include + +#include + +#include "libslic3r/Config.hpp" +#include "libslic3r/PrintConfig.hpp" +#include "slic3r/GUI/ConfigValueFormatter.hpp" + +using namespace Slic3r; +using namespace Slic3r::GUI; + +TEST_CASE("An enum vector index past the end of the vector reads as undefined", "[ConfigValueFormatter][Regression]") +{ + const std::string key = "filament_retract_lift_enforce"; + const ConfigOptionDef* def = print_config_def.get(key); + DynamicPrintConfig config; + config.set_key_value(key, new ConfigOptionEnumsGenericNullable(def->enum_keys_map, 1, ConfigOptionEnumsGenericNullable::nil_value())); + + CHECK(get_string_value(key + "#1", config) == "Undefined"); +} + +TEST_CASE("An enum vector index inside the vector reads as its label", "[ConfigValueFormatter]") +{ + const std::string key = "filament_retract_lift_enforce"; + const ConfigOptionDef* def = print_config_def.get(key); + DynamicPrintConfig config; + config.set_key_value(key, new ConfigOptionEnumsGenericNullable(def->enum_keys_map, 1, def->enum_keys_map->at("Top Only"))); + + CHECK(get_string_value(key + "#0", config).utf8_string() == "Top Only"); +} + +TEST_CASE("An enum value outside the label list reads as undefined", "[ConfigValueFormatter]") +{ + const std::string key = "filament_retract_lift_enforce"; + const ConfigOptionDef* def = print_config_def.get(key); + DynamicPrintConfig config; + config.set_key_value(key, new ConfigOptionEnumsGenericNullable(def->enum_keys_map, 1, int(def->enum_labels.size()))); + + CHECK(get_string_value(key + "#0", config) == "Undefined"); +} From 2bd868ecd0d1ee0c4a96dfaa16e5130c1f2dd107 Mon Sep 17 00:00:00 2001 From: Kris Austin Date: Mon, 5 Oct 2026 19:21:13 -0500 Subject: [PATCH 5/6] perf: avoid print config copies to speed up slicing by up to 5% (#16183) --- src/libslic3r/Layer.cpp | 6 +++--- src/libslic3r/LayerRegion.cpp | 6 +++--- src/libslic3r/Support/TreeSupport.cpp | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libslic3r/Layer.cpp b/src/libslic3r/Layer.cpp index 5439e0fa7a..610dd959d2 100644 --- a/src/libslic3r/Layer.cpp +++ b/src/libslic3r/Layer.cpp @@ -378,7 +378,7 @@ void Layer::simplify_support_entity_collection(ExtrusionEntityCollection* entity //BBS: method to simplify support path void Layer::simplify_support_path(ExtrusionPath * path) { - const auto print_config = this->object()->print()->config(); + const auto &print_config = this->object()->print()->config(); const bool spiral_mode = print_config.spiral_mode; const bool enable_arc_fitting = print_config.enable_arc_fitting; const auto scaled_resolution = scaled(print_config.resolution.value); @@ -393,7 +393,7 @@ void Layer::simplify_support_path(ExtrusionPath * path) //BBS: method to simplify support path void Layer::simplify_support_multi_path(ExtrusionMultiPath* multipath) { - const auto print_config = this->object()->print()->config(); + const auto &print_config = this->object()->print()->config(); const bool spiral_mode = print_config.spiral_mode; const bool enable_arc_fitting = print_config.enable_arc_fitting; const auto scaled_resolution = scaled(print_config.resolution.value); @@ -410,7 +410,7 @@ void Layer::simplify_support_multi_path(ExtrusionMultiPath* multipath) //BBS: method to simplify support path void Layer::simplify_support_loop(ExtrusionLoop* loop) { - const auto print_config = this->object()->print()->config(); + const auto &print_config = this->object()->print()->config(); const bool spiral_mode = print_config.spiral_mode; const bool enable_arc_fitting = print_config.enable_arc_fitting; const auto scaled_resolution = scaled(print_config.resolution.value); diff --git a/src/libslic3r/LayerRegion.cpp b/src/libslic3r/LayerRegion.cpp index 99b20e50f3..5bc68c4ca5 100644 --- a/src/libslic3r/LayerRegion.cpp +++ b/src/libslic3r/LayerRegion.cpp @@ -1101,7 +1101,7 @@ void LayerRegion::simplify_entity_collection(ExtrusionEntityCollection* entity_c void LayerRegion::simplify_path(ExtrusionPath* path) { - const auto print_config = this->layer()->object()->print()->config(); + const auto &print_config = this->layer()->object()->print()->config(); const bool spiral_mode = print_config.spiral_mode; const bool enable_arc_fitting = print_config.enable_arc_fitting; const auto scaled_resolution = scaled(print_config.resolution.value); @@ -1119,7 +1119,7 @@ void LayerRegion::simplify_path(ExtrusionPath* path) void LayerRegion::simplify_multi_path(ExtrusionMultiPath* multipath) { - const auto print_config = this->layer()->object()->print()->config(); + const auto &print_config = this->layer()->object()->print()->config(); const bool spiral_mode = print_config.spiral_mode; const bool enable_arc_fitting = print_config.enable_arc_fitting; const auto scaled_resolution = scaled(print_config.resolution.value); @@ -1139,7 +1139,7 @@ void LayerRegion::simplify_multi_path(ExtrusionMultiPath* multipath) void LayerRegion::simplify_loop(ExtrusionLoop* loop) { - const auto print_config = this->layer()->object()->print()->config(); + const auto &print_config = this->layer()->object()->print()->config(); const bool spiral_mode = print_config.spiral_mode; const bool enable_arc_fitting = print_config.enable_arc_fitting; const auto scaled_resolution = scaled(print_config.resolution.value); diff --git a/src/libslic3r/Support/TreeSupport.cpp b/src/libslic3r/Support/TreeSupport.cpp index 26838de593..a92b3196cc 100644 --- a/src/libslic3r/Support/TreeSupport.cpp +++ b/src/libslic3r/Support/TreeSupport.cpp @@ -1944,7 +1944,7 @@ Polygons TreeSupport::get_trim_support_regions( static const double no_overlap_xy_gap = 0.2f; double gap_xy_scaled = scale_(gap_xy); SupportLayer& support_layer = *support_layer_ptr; - auto m_print_config = object.print()->config(); + const PrintConfig& print_config = object.print()->config(); size_t idx_object_layer_overlapping = size_t(-1); @@ -1991,7 +1991,7 @@ Polygons TreeSupport::get_trim_support_regions( const Layer& object_layer = *object.layers()[i]; bool some_region_overlaps = false; for (LayerRegion* region : object_layer.regions()) { - coordf_t bridging_height = region->region().bridging_height_avg(m_print_config); + coordf_t bridging_height = region->region().bridging_height_avg(print_config); if (object_layer.print_z - bridging_height > support_layer.print_z + gap_extra_above - EPSILON) break; some_region_overlaps = true; From 1d577ea4e219d3fcd56ed52648c5d0b1cb8dce8e Mon Sep 17 00:00:00 2001 From: Kris Austin Date: Mon, 5 Oct 2026 19:49:32 -0500 Subject: [PATCH 6/6] build: add the missing includes only a Windows build reports (#16110) --- .clang-tidy | 1 + src/OrcaSlicer.cpp | 2 ++ src/OrcaSlicer_app_msvc.cpp | 1 + src/dev-utils/BaseException.cpp | 8 ++++++++ src/dev-utils/BaseException.h | 2 ++ src/dev-utils/StackWalker.cpp | 3 +++ src/dev-utils/StackWalker.h | 1 + src/libslic3r/AppConfig.cpp | 3 +++ src/libslic3r/BlacklistedLibraryCheck.cpp | 3 +++ src/libslic3r/Emboss.cpp | 1 + src/libslic3r/Feature/FuzzySkin/FuzzySkin.cpp | 1 + src/libslic3r/GCode.cpp | 1 + src/libslic3r/InstanceLock.cpp | 1 + src/libslic3r/LocalesUtils.cpp | 1 + src/libslic3r/Thread.cpp | 1 + src/libslic3r/utils.cpp | 1 + src/slic3r/GUI/Auxiliary.cpp | 2 ++ src/slic3r/GUI/BackgroundSlicingProcess.cpp | 3 +++ src/slic3r/GUI/ConfigWizard_private.hpp | 1 + src/slic3r/GUI/Downloader.cpp | 1 + src/slic3r/GUI/ExtraRenderers.cpp | 1 + src/slic3r/GUI/Field.cpp | 1 + src/slic3r/GUI/FilamentPickerDialog.cpp | 1 + src/slic3r/GUI/GUI_App.cpp | 6 ++++++ src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp | 1 + src/slic3r/GUI/Gizmos/GLGizmoFuzzySkin.cpp | 1 + src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp | 1 + src/slic3r/GUI/Gizmos/GLGizmoSeam.cpp | 1 + src/slic3r/GUI/Gizmos/GLGizmoUtils.cpp | 1 + src/slic3r/GUI/Gizmos/GizmoObjectManipulation.cpp | 1 + src/slic3r/GUI/InstanceCheck.cpp | 2 ++ src/slic3r/GUI/InstanceCheck.hpp | 1 + src/slic3r/GUI/MainFrame.cpp | 3 +++ src/slic3r/GUI/MediaPlayCtrl.cpp | 1 + src/slic3r/GUI/Mouse3DController.cpp | 2 ++ src/slic3r/GUI/MultiMachineManagerPage.cpp | 1 + src/slic3r/GUI/MultiMachinePage.cpp | 1 + src/slic3r/GUI/MultiTaskManagerPage.cpp | 1 + src/slic3r/GUI/PostProcessor.cpp | 4 ++++ src/slic3r/GUI/PresetComboBoxes.cpp | 1 + src/slic3r/GUI/PrinterWebViewHandler.cpp | 1 + src/slic3r/GUI/RemovableDriveManager.cpp | 1 + src/slic3r/GUI/RemovableDriveManager.hpp | 1 + src/slic3r/GUI/SelectMachinePop.cpp | 1 + src/slic3r/GUI/SendMultiMachinePage.cpp | 1 + src/slic3r/GUI/SendSystemInfoDialog.cpp | 3 +++ src/slic3r/GUI/StatusPanel.cpp | 1 + src/slic3r/GUI/Tab.cpp | 1 + src/slic3r/GUI/TextureImportDialog.cpp | 1 + src/slic3r/GUI/WebViewDialog.cpp | 1 + src/slic3r/GUI/Widgets/LabeledStaticBox.cpp | 1 + src/slic3r/GUI/Widgets/ProgressDialog.cpp | 3 +++ src/slic3r/GUI/Widgets/TextCtrl.h | 1 + src/slic3r/GUI/Widgets/WebView.cpp | 6 ++++++ src/slic3r/GUI/dark_mode.cpp | 3 +++ src/slic3r/GUI/dark_mode/IatHook.hpp | 3 +++ src/slic3r/GUI/dark_mode/dark_mode.hpp | 1 + src/slic3r/GUI/format.hpp | 1 + src/slic3r/GUI/wxExtensions.cpp | 1 + src/slic3r/GUI/wxMediaCtrl3.cpp | 1 + src/slic3r/Utils/BBLNetworkPlugin.cpp | 3 +++ src/slic3r/Utils/ElegooLink.cpp | 1 + src/slic3r/Utils/OctoPrint.cpp | 2 ++ tests/libslic3r/test_instance_lock.cpp | 1 + 64 files changed, 110 insertions(+) diff --git a/.clang-tidy b/.clang-tidy index 0acb13bb49..ed2378536e 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -61,6 +61,7 @@ CheckOptions: termios\.h; [/\\](um|shared)[/\\].*; sal\.h; + tchar\.h; clipper[/\\]clipper\.hpp; png(lib)?conf\.h; mcut[/\\]platform\.h; diff --git a/src/OrcaSlicer.cpp b/src/OrcaSlicer.cpp index 62ccfb7675..ed6b0c1714 100644 --- a/src/OrcaSlicer.cpp +++ b/src/OrcaSlicer.cpp @@ -153,6 +153,8 @@ using namespace nlohmann; #include "slic3r/GUI/GUI_ObjectList.hpp" #include "slic3r/GUI/I18N.hpp" #include "slic3r/GUI/Jobs/SendJob.hpp" +#include +#include namespace fs = boost::filesystem; diff --git a/src/OrcaSlicer_app_msvc.cpp b/src/OrcaSlicer_app_msvc.cpp index 265047fa34..14295b27c3 100644 --- a/src/OrcaSlicer_app_msvc.cpp +++ b/src/OrcaSlicer_app_msvc.cpp @@ -35,6 +35,7 @@ extern "C" #include #include +#include #ifdef SLIC3R_GUI class OpenGLVersionCheck diff --git a/src/dev-utils/BaseException.cpp b/src/dev-utils/BaseException.cpp index 048eadf151..ac2e37d1ff 100644 --- a/src/dev-utils/BaseException.cpp +++ b/src/dev-utils/BaseException.cpp @@ -11,6 +11,14 @@ #include "git_commit_hash.h" #include "libslic3r_version.h" +#include "StackWalker.h" +#include +#include +#include +#include +#include +#include +#include static std::string g_log_folder; static std::atomic g_crash_log_count = 0; diff --git a/src/dev-utils/BaseException.h b/src/dev-utils/BaseException.h index 20b6fb0c89..6e7a05eb1a 100644 --- a/src/dev-utils/BaseException.h +++ b/src/dev-utils/BaseException.h @@ -3,6 +3,8 @@ #include #include "StackWalker.h" #include +#include +#include class CBaseException : public CStackWalker { diff --git a/src/dev-utils/StackWalker.cpp b/src/dev-utils/StackWalker.cpp index 3ef983cd86..15c63c324d 100644 --- a/src/dev-utils/StackWalker.cpp +++ b/src/dev-utils/StackWalker.cpp @@ -2,6 +2,9 @@ #include //#include #include +#include +#include +#include #pragma comment(lib, "version.lib") #pragma comment( lib, "dbghelp.lib" ) diff --git a/src/dev-utils/StackWalker.h b/src/dev-utils/StackWalker.h index 7795bf7124..4113e391a0 100644 --- a/src/dev-utils/StackWalker.h +++ b/src/dev-utils/StackWalker.h @@ -2,6 +2,7 @@ #include #include #include +#include namespace textconv_helper { diff --git a/src/libslic3r/AppConfig.cpp b/src/libslic3r/AppConfig.cpp index 663072d866..ebaa17a4b7 100644 --- a/src/libslic3r/AppConfig.cpp +++ b/src/libslic3r/AppConfig.cpp @@ -42,6 +42,9 @@ #include #include #include +#include +#include +#include #ifdef WIN32 //FIXME replace the two following includes with after it becomes mainstream. diff --git a/src/libslic3r/BlacklistedLibraryCheck.cpp b/src/libslic3r/BlacklistedLibraryCheck.cpp index cf7e6da2aa..19cee86dd0 100644 --- a/src/libslic3r/BlacklistedLibraryCheck.cpp +++ b/src/libslic3r/BlacklistedLibraryCheck.cpp @@ -3,6 +3,9 @@ #include #include #include +#include +#include +#include #ifdef WIN32 #include diff --git a/src/libslic3r/Emboss.cpp b/src/libslic3r/Emboss.cpp index ae13cbf54e..2506c26f61 100644 --- a/src/libslic3r/Emboss.cpp +++ b/src/libslic3r/Emboss.cpp @@ -43,6 +43,7 @@ #include "libslic3r/AABBTreeLines.hpp" // search structure for found close points #include "libslic3r/Line.hpp" #include "libslic3r/BoundingBox.hpp" +#include // Experimentaly suggested ration of font ascent by multiple fonts // to get approx center of normal text line diff --git a/src/libslic3r/Feature/FuzzySkin/FuzzySkin.cpp b/src/libslic3r/Feature/FuzzySkin/FuzzySkin.cpp index c580cc3c0f..ae8d50edb7 100644 --- a/src/libslic3r/Feature/FuzzySkin/FuzzySkin.cpp +++ b/src/libslic3r/Feature/FuzzySkin/FuzzySkin.cpp @@ -28,6 +28,7 @@ #include "FuzzySkin.hpp" #include "libnoise/noise.h" +#include // #define DEBUG_FUZZY diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 6ae5394ac2..7317676240 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -119,6 +119,7 @@ #endif #include +#include using namespace std::literals::string_view_literals; diff --git a/src/libslic3r/InstanceLock.cpp b/src/libslic3r/InstanceLock.cpp index 7cacdef0cb..9ab49b1f12 100644 --- a/src/libslic3r/InstanceLock.cpp +++ b/src/libslic3r/InstanceLock.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #ifdef _WIN32 #include #include diff --git a/src/libslic3r/LocalesUtils.cpp b/src/libslic3r/LocalesUtils.cpp index d792692cd2..fd6afb0018 100644 --- a/src/libslic3r/LocalesUtils.cpp +++ b/src/libslic3r/LocalesUtils.cpp @@ -12,6 +12,7 @@ #include #include +#include // Defined where the floating point std::to_chars can be called, which with Apple's libc++ runtime is from macOS 13.3. #if defined(_LIBCPP_VERSION) diff --git a/src/libslic3r/Thread.cpp b/src/libslic3r/Thread.cpp index ce3e5e8bdd..1297849945 100644 --- a/src/libslic3r/Thread.cpp +++ b/src/libslic3r/Thread.cpp @@ -22,6 +22,7 @@ #include #include "Thread.hpp" +#include namespace Slic3r { diff --git a/src/libslic3r/utils.cpp b/src/libslic3r/utils.cpp index a8e47ddded..8d5ab732be 100644 --- a/src/libslic3r/utils.cpp +++ b/src/libslic3r/utils.cpp @@ -119,6 +119,7 @@ // We are using quite an old TBB 2017 U7, which does not support global control API officially. // Before we update our build servers, let's use the old API, which is deprecated in up to date TBB. #include +#include namespace boost::posix_time { class ptime; } #if ! defined(TBB_VERSION_MAJOR) diff --git a/src/slic3r/GUI/Auxiliary.cpp b/src/slic3r/GUI/Auxiliary.cpp index d523b7eae3..bb952e8ae0 100644 --- a/src/slic3r/GUI/Auxiliary.cpp +++ b/src/slic3r/GUI/Auxiliary.cpp @@ -65,6 +65,8 @@ #include "Widgets/Label.hpp" #include "slic3r/GUI/I18N.hpp" #include "slic3r/GUI/Plater.hpp" +#include +#include namespace fs = boost::filesystem; diff --git a/src/slic3r/GUI/BackgroundSlicingProcess.cpp b/src/slic3r/GUI/BackgroundSlicingProcess.cpp index f2da864a4d..e9417782db 100644 --- a/src/slic3r/GUI/BackgroundSlicingProcess.cpp +++ b/src/slic3r/GUI/BackgroundSlicingProcess.cpp @@ -60,6 +60,9 @@ #include "libslic3r/PresetBundle.hpp" #include "slic3r/GUI/PartPlate.hpp" #include "slic3r/Utils/PrintHost.hpp" +#ifdef _WIN32 +#include +#endif namespace Slic3r { diff --git a/src/slic3r/GUI/ConfigWizard_private.hpp b/src/slic3r/GUI/ConfigWizard_private.hpp index c1371f5316..a1f9b61b00 100644 --- a/src/slic3r/GUI/ConfigWizard_private.hpp +++ b/src/slic3r/GUI/ConfigWizard_private.hpp @@ -40,6 +40,7 @@ #include "GUI.hpp" #include "wxExtensions.hpp" #include "Widgets/Button.hpp" +#include namespace fs = boost::filesystem; diff --git a/src/slic3r/GUI/Downloader.cpp b/src/slic3r/GUI/Downloader.cpp index 8f252e4604..9724f291fc 100644 --- a/src/slic3r/GUI/Downloader.cpp +++ b/src/slic3r/GUI/Downloader.cpp @@ -22,6 +22,7 @@ #include "slic3r/GUI/I18N.hpp" #include "slic3r/GUI/Gizmos/GLGizmoBase.hpp" #include +#include namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/ExtraRenderers.cpp b/src/slic3r/GUI/ExtraRenderers.cpp index 7cd488e664..92f39145f0 100644 --- a/src/slic3r/GUI/ExtraRenderers.cpp +++ b/src/slic3r/GUI/ExtraRenderers.cpp @@ -22,6 +22,7 @@ #include #include "slic3r/GUI/GUI_App.hpp" #include "slic3r/GUI/Widgets/DropDown.hpp" +#include #ifdef wxHAS_GENERIC_DATAVIEWCTRL #include "wx/generic/private/markuptext.h" #include "wx/generic/private/rowheightcache.h" diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp index 1ea5309042..05ab99bae1 100644 --- a/src/slic3r/GUI/Field.cpp +++ b/src/slic3r/GUI/Field.cpp @@ -81,6 +81,7 @@ #include "../Utils/ColorSpaceConvert.hpp" #include "../Utils/NetworkAgentFactory.hpp" +#include #ifdef __WXOSX__ #define wxOSX true #else diff --git a/src/slic3r/GUI/FilamentPickerDialog.cpp b/src/slic3r/GUI/FilamentPickerDialog.cpp index b5e85ab72b..61db61bac2 100644 --- a/src/slic3r/GUI/FilamentPickerDialog.cpp +++ b/src/slic3r/GUI/FilamentPickerDialog.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #ifdef _WIN32 #include diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index eb9237b864..62e780afef 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -255,6 +255,11 @@ #include "slic3r/GUI/wxExtensions.hpp" #include "slic3r/plugin/host/PluginPages.hpp" #include +#include "slic3r/GUI/Widgets/WebView.hpp" +#include +#include +#include +#include //#ifdef WIN32 //#include "BaseException.h" @@ -283,6 +288,7 @@ typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS2)( #endif #ifdef _WIN32 #include +#include #endif #ifdef WIN32 diff --git a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp index 95faae41a9..fb2137982a 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp @@ -57,6 +57,7 @@ #include "slic3r/GUI/Gizmos/GLGizmosManager.hpp" #include "slic3r/GUI/I18N.hpp" #include "slic3r/GUI/Selection.hpp" +#include "slic3r/GUI/GUI_Utils.hpp" namespace Slic3r::GUI { diff --git a/src/slic3r/GUI/Gizmos/GLGizmoFuzzySkin.cpp b/src/slic3r/GUI/Gizmos/GLGizmoFuzzySkin.cpp index 0ddf665c06..d38927dd47 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoFuzzySkin.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoFuzzySkin.cpp @@ -38,6 +38,7 @@ #include "libslic3r/TriangleSelector.hpp" #include "slic3r/GUI/Gizmos/GLGizmosCommon.hpp" #include "slic3r/GUI/I18N.hpp" +#include "slic3r/GUI/GUI_Utils.hpp" namespace Slic3r::GUI { diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp b/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp index f4f8dc0151..80a87b26c5 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp @@ -46,6 +46,7 @@ #include "slic3r/GUI/I18N.hpp" #include "slic3r/GUI/PartPlate.hpp" #include "slic3r/GUI/Selection.hpp" +#include "slic3r/GUI/GUI_Utils.hpp" namespace Slic3r::GUI { diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSeam.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSeam.cpp index 1d6d31a047..0f71ee546a 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSeam.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSeam.cpp @@ -28,6 +28,7 @@ #include "libslic3r/Color.hpp" #include "slic3r/GUI/3DScene.hpp" #include +#include "slic3r/GUI/GUI_Utils.hpp" namespace Slic3r::GUI { diff --git a/src/slic3r/GUI/Gizmos/GLGizmoUtils.cpp b/src/slic3r/GUI/Gizmos/GLGizmoUtils.cpp index d5aab16808..19bd47fb6c 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoUtils.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoUtils.cpp @@ -11,6 +11,7 @@ #include #include #include +#include "slic3r/GUI/GUI_Utils.hpp" #ifdef WIN32 #include diff --git a/src/slic3r/GUI/Gizmos/GizmoObjectManipulation.cpp b/src/slic3r/GUI/Gizmos/GizmoObjectManipulation.cpp index 9d655b8c6a..72f08318c6 100644 --- a/src/slic3r/GUI/Gizmos/GizmoObjectManipulation.cpp +++ b/src/slic3r/GUI/Gizmos/GizmoObjectManipulation.cpp @@ -39,6 +39,7 @@ #include "libslic3r/TriangleMesh.hpp" #include "slic3r/GUI/3DScene.hpp" #include "slic3r/GUI/I18N.hpp" +#include "slic3r/GUI/GUI_Utils.hpp" #define MAX_NUM 9999.99 #define MAX_SIZE std::string_view{"9999.99"} diff --git a/src/slic3r/GUI/InstanceCheck.cpp b/src/slic3r/GUI/InstanceCheck.cpp index 8205b5edc3..d8365be97e 100644 --- a/src/slic3r/GUI/InstanceCheck.cpp +++ b/src/slic3r/GUI/InstanceCheck.cpp @@ -35,6 +35,8 @@ #include #include #include +#include +#include #ifdef _WIN32 #include diff --git a/src/slic3r/GUI/InstanceCheck.hpp b/src/slic3r/GUI/InstanceCheck.hpp index 47b26cd868..635004e2eb 100644 --- a/src/slic3r/GUI/InstanceCheck.hpp +++ b/src/slic3r/GUI/InstanceCheck.hpp @@ -14,6 +14,7 @@ #include #include +#include #if __linux__ #include diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 1da22366aa..689f9eb87c 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -150,6 +150,9 @@ #include "slic3r/plugin/host/PluginPages.hpp" #include "slic3r/Utils/NetworkAgent.hpp" #include +#include +#include +#include namespace Slic3r { diff --git a/src/slic3r/GUI/MediaPlayCtrl.cpp b/src/slic3r/GUI/MediaPlayCtrl.cpp index 1ee7400882..c16731793b 100644 --- a/src/slic3r/GUI/MediaPlayCtrl.cpp +++ b/src/slic3r/GUI/MediaPlayCtrl.cpp @@ -73,6 +73,7 @@ #include #include "wx/evtloop.h" +#include class wxImage; diff --git a/src/slic3r/GUI/Mouse3DController.cpp b/src/slic3r/GUI/Mouse3DController.cpp index 161bfa7730..b517e36841 100644 --- a/src/slic3r/GUI/Mouse3DController.cpp +++ b/src/slic3r/GUI/Mouse3DController.cpp @@ -33,6 +33,8 @@ #include "I18N.hpp" #include +#include +#include //unofficial linux lib #ifdef HAVE_SPNAV diff --git a/src/slic3r/GUI/MultiMachineManagerPage.cpp b/src/slic3r/GUI/MultiMachineManagerPage.cpp index 8e9b8dadf4..9788b025a8 100644 --- a/src/slic3r/GUI/MultiMachineManagerPage.cpp +++ b/src/slic3r/GUI/MultiMachineManagerPage.cpp @@ -31,6 +31,7 @@ #include #include #include +#include namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/MultiMachinePage.cpp b/src/slic3r/GUI/MultiMachinePage.cpp index 3238a7a723..0bcca06b18 100644 --- a/src/slic3r/GUI/MultiMachinePage.cpp +++ b/src/slic3r/GUI/MultiMachinePage.cpp @@ -26,6 +26,7 @@ #include "slic3r/GUI/MsgDialog.hpp" #include #include +#include namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/MultiTaskManagerPage.cpp b/src/slic3r/GUI/MultiTaskManagerPage.cpp index 4fd6c341a3..d8fde019c3 100644 --- a/src/slic3r/GUI/MultiTaskManagerPage.cpp +++ b/src/slic3r/GUI/MultiTaskManagerPage.cpp @@ -44,6 +44,7 @@ #include #include "DeviceCore/DevManager.h" +#include namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/PostProcessor.cpp b/src/slic3r/GUI/PostProcessor.cpp index 67449573f7..4aa498ad74 100644 --- a/src/slic3r/GUI/PostProcessor.cpp +++ b/src/slic3r/GUI/PostProcessor.cpp @@ -42,6 +42,10 @@ #include #include #include +#include +#include +#include +#include #ifdef WIN32 diff --git a/src/slic3r/GUI/PresetComboBoxes.cpp b/src/slic3r/GUI/PresetComboBoxes.cpp index 3dfd5e3b0a..29e34d98a0 100644 --- a/src/slic3r/GUI/PresetComboBoxes.cpp +++ b/src/slic3r/GUI/PresetComboBoxes.cpp @@ -72,6 +72,7 @@ #include "wxExtensions.hpp" #include "DeviceCore/DevManager.h" +#include "slic3r/GUI/Widgets/Label.hpp" // A workaround for a set of issues related to text fitting into gtk widgets: #if defined(__WXGTK20__) || defined(__WXGTK3__) diff --git a/src/slic3r/GUI/PrinterWebViewHandler.cpp b/src/slic3r/GUI/PrinterWebViewHandler.cpp index d2ab640ef8..bf16070c6a 100644 --- a/src/slic3r/GUI/PrinterWebViewHandler.cpp +++ b/src/slic3r/GUI/PrinterWebViewHandler.cpp @@ -22,6 +22,7 @@ #include #include #include +#include using json = nlohmann::json; diff --git a/src/slic3r/GUI/RemovableDriveManager.cpp b/src/slic3r/GUI/RemovableDriveManager.cpp index 8cbe89813a..f628a9a312 100644 --- a/src/slic3r/GUI/RemovableDriveManager.cpp +++ b/src/slic3r/GUI/RemovableDriveManager.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #if _WIN32 #include diff --git a/src/slic3r/GUI/RemovableDriveManager.hpp b/src/slic3r/GUI/RemovableDriveManager.hpp index 72e15b5807..94d33a8669 100644 --- a/src/slic3r/GUI/RemovableDriveManager.hpp +++ b/src/slic3r/GUI/RemovableDriveManager.hpp @@ -12,6 +12,7 @@ // Custom wxWidget events #include "Event.hpp" +#include namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/SelectMachinePop.cpp b/src/slic3r/GUI/SelectMachinePop.cpp index 7a847ec9d0..47c05143d2 100644 --- a/src/slic3r/GUI/SelectMachinePop.cpp +++ b/src/slic3r/GUI/SelectMachinePop.cpp @@ -55,6 +55,7 @@ #include "BindDialog.hpp" #include "DeviceCore/DevManager.h" +#include namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/SendMultiMachinePage.cpp b/src/slic3r/GUI/SendMultiMachinePage.cpp index 95baec3199..c66a0f6055 100644 --- a/src/slic3r/GUI/SendMultiMachinePage.cpp +++ b/src/slic3r/GUI/SendMultiMachinePage.cpp @@ -74,6 +74,7 @@ #include "slic3r/GUI/Widgets/CheckBox.hpp" #include "slic3r/GUI/wxExtensions.hpp" #include +#include namespace fs = boost::filesystem; diff --git a/src/slic3r/GUI/SendSystemInfoDialog.cpp b/src/slic3r/GUI/SendSystemInfoDialog.cpp index 5d20e9e478..ec32273443 100644 --- a/src/slic3r/GUI/SendSystemInfoDialog.cpp +++ b/src/slic3r/GUI/SendSystemInfoDialog.cpp @@ -73,6 +73,9 @@ #include #include +#include "slic3r/GUI/GUI.hpp" +#include +#include class wxWindow; diff --git a/src/slic3r/GUI/StatusPanel.cpp b/src/slic3r/GUI/StatusPanel.cpp index 510bdbb3e9..c720494dff 100644 --- a/src/slic3r/GUI/StatusPanel.cpp +++ b/src/slic3r/GUI/StatusPanel.cpp @@ -117,6 +117,7 @@ #include "SafetyOptionsDialog.hpp" #include "ThermalPreconditioningDialog.hpp" +#include namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index c1d2b2129b..ace8646927 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -116,6 +116,7 @@ #include #include #include +#include "slic3r/GUI/GUI_Utils.hpp" namespace Slic3r { diff --git a/src/slic3r/GUI/TextureImportDialog.cpp b/src/slic3r/GUI/TextureImportDialog.cpp index 4233a7aac7..bc50cabc8c 100644 --- a/src/slic3r/GUI/TextureImportDialog.cpp +++ b/src/slic3r/GUI/TextureImportDialog.cpp @@ -71,6 +71,7 @@ #include #include +#include static constexpr const char* DEFAULT_VIRTUAL_FILAMENT_BASIC_TYPE = "PLA Basic"; static constexpr const char* DEFAULT_VIRTUAL_FILAMENT_SHORT_TYPE = "PLA"; diff --git a/src/slic3r/GUI/WebViewDialog.cpp b/src/slic3r/GUI/WebViewDialog.cpp index 656f250efb..d46615328b 100644 --- a/src/slic3r/GUI/WebViewDialog.cpp +++ b/src/slic3r/GUI/WebViewDialog.cpp @@ -41,6 +41,7 @@ #include #include #include +#include namespace pt = boost::property_tree; diff --git a/src/slic3r/GUI/Widgets/LabeledStaticBox.cpp b/src/slic3r/GUI/Widgets/LabeledStaticBox.cpp index 0bc7d198ed..c5076a6f2c 100644 --- a/src/slic3r/GUI/Widgets/LabeledStaticBox.cpp +++ b/src/slic3r/GUI/Widgets/LabeledStaticBox.cpp @@ -13,6 +13,7 @@ #include #include #include "slic3r/GUI/Widgets/StateColor.hpp" +#include LabeledStaticBox::LabeledStaticBox() : state_handler(this) diff --git a/src/slic3r/GUI/Widgets/ProgressDialog.cpp b/src/slic3r/GUI/Widgets/ProgressDialog.cpp index e7bef2e518..96288d3bc7 100644 --- a/src/slic3r/GUI/Widgets/ProgressDialog.cpp +++ b/src/slic3r/GUI/Widgets/ProgressDialog.cpp @@ -31,6 +31,9 @@ #include "ProgressDialog.hpp" #include "wx/evtloop.h" #include "Label.hpp" +#include +#include +#include #ifdef __WXGTK__ #include "slic3r/GUI/Widgets/StateColor.hpp" diff --git a/src/slic3r/GUI/Widgets/TextCtrl.h b/src/slic3r/GUI/Widgets/TextCtrl.h index 2d57c38146..f616b177f0 100644 --- a/src/slic3r/GUI/Widgets/TextCtrl.h +++ b/src/slic3r/GUI/Widgets/TextCtrl.h @@ -1,4 +1,5 @@ #include +#include #ifdef __WXMSW__ class TextCtrl : public wxTextCtrl diff --git a/src/slic3r/GUI/Widgets/WebView.cpp b/src/slic3r/GUI/Widgets/WebView.cpp index ec10dd03b3..498fa4ec43 100644 --- a/src/slic3r/GUI/Widgets/WebView.cpp +++ b/src/slic3r/GUI/Widgets/WebView.cpp @@ -35,6 +35,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include namespace fs = boost::filesystem; #if defined(__WIN32__) || defined(__WXMAC__) diff --git a/src/slic3r/GUI/dark_mode.cpp b/src/slic3r/GUI/dark_mode.cpp index 01725aae1b..0fc8e31f66 100644 --- a/src/slic3r/GUI/dark_mode.cpp +++ b/src/slic3r/GUI/dark_mode.cpp @@ -12,6 +12,9 @@ #include #include "windowsx.h" #include "stdlib.h" +#include +#include +#include #ifdef __GNUC__ #include diff --git a/src/slic3r/GUI/dark_mode/IatHook.hpp b/src/slic3r/GUI/dark_mode/IatHook.hpp index ba042d86bb..84364845b5 100644 --- a/src/slic3r/GUI/dark_mode/IatHook.hpp +++ b/src/slic3r/GUI/dark_mode/IatHook.hpp @@ -6,6 +6,9 @@ #pragma once #include +#include +#include +#include template constexpr T RVA2VA(T1 base, T2 rva) diff --git a/src/slic3r/GUI/dark_mode/dark_mode.hpp b/src/slic3r/GUI/dark_mode/dark_mode.hpp index 56aa154a5a..c8dd3c867a 100644 --- a/src/slic3r/GUI/dark_mode/dark_mode.hpp +++ b/src/slic3r/GUI/dark_mode/dark_mode.hpp @@ -8,6 +8,7 @@ #include #include +#include enum IMMERSIVE_HC_CACHE_MODE { diff --git a/src/slic3r/GUI/format.hpp b/src/slic3r/GUI/format.hpp index e4bbd4d98d..c76b935579 100644 --- a/src/slic3r/GUI/format.hpp +++ b/src/slic3r/GUI/format.hpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp index 29c540fcaf..5d38e87f4d 100644 --- a/src/slic3r/GUI/wxExtensions.cpp +++ b/src/slic3r/GUI/wxExtensions.cpp @@ -43,6 +43,7 @@ #include "FilamentBitmapUtils.hpp" #include "../Utils/ColorSpaceConvert.hpp" #include "libslic3r_version.h" +#include #ifndef __linux__ // msw_menuitem_bitmaps is used for MSW and OSX static std::map msw_menuitem_bitmaps; diff --git a/src/slic3r/GUI/wxMediaCtrl3.cpp b/src/slic3r/GUI/wxMediaCtrl3.cpp index 31a8df55d7..db9b627fb3 100644 --- a/src/slic3r/GUI/wxMediaCtrl3.cpp +++ b/src/slic3r/GUI/wxMediaCtrl3.cpp @@ -18,6 +18,7 @@ #include #include #include +#include extern "C" { #include #include diff --git a/src/slic3r/Utils/BBLNetworkPlugin.cpp b/src/slic3r/Utils/BBLNetworkPlugin.cpp index 94ac57aaf0..5cffe6468d 100644 --- a/src/slic3r/Utils/BBLNetworkPlugin.cpp +++ b/src/slic3r/Utils/BBLNetworkPlugin.cpp @@ -19,6 +19,9 @@ #include #include "libslic3r/Utils.hpp" #include "slic3r/Utils/FileTransferUtils.hpp" +#include +#include +#include #if !defined(_MSC_VER) && !defined(_WIN32) #include diff --git a/src/slic3r/Utils/ElegooLink.cpp b/src/slic3r/Utils/ElegooLink.cpp index fb74a384d1..d6b40578aa 100644 --- a/src/slic3r/Utils/ElegooLink.cpp +++ b/src/slic3r/Utils/ElegooLink.cpp @@ -48,6 +48,7 @@ #include "libslic3r/AppConfig.hpp" #include "Bonjour.hpp" #include "slic3r/GUI/BonjourDialog.hpp" +#include namespace fs = boost::filesystem; namespace pt = boost::property_tree; diff --git a/src/slic3r/Utils/OctoPrint.cpp b/src/slic3r/Utils/OctoPrint.cpp index a39b300d79..63199c8781 100644 --- a/src/slic3r/Utils/OctoPrint.cpp +++ b/src/slic3r/Utils/OctoPrint.cpp @@ -34,6 +34,8 @@ #include "libslic3r/AppConfig.hpp" #include "Bonjour.hpp" #include "slic3r/GUI/BonjourDialog.hpp" +#include +#include namespace fs = boost::filesystem; namespace pt = boost::property_tree; diff --git a/tests/libslic3r/test_instance_lock.cpp b/tests/libslic3r/test_instance_lock.cpp index 5ee14c665f..790657298a 100644 --- a/tests/libslic3r/test_instance_lock.cpp +++ b/tests/libslic3r/test_instance_lock.cpp @@ -10,6 +10,7 @@ #include #include "libslic3r/InstanceLock.hpp" #include "test_utils.hpp" +#include #ifdef _WIN32 #include