Compare commits

..
Author SHA1 Message Date
Hanif Koh 26e8cf358a Remove Unused Project Includes and Forward-Declare Where a Type Is Only Referenced
Generated with include-what-you-use and applied conservatively. Only OrcaSlicer's own headers, the ones under src/ and tests/, are removed or forward-declared; standard-library and third-party includes are left alone. An include is removed only when both the Release and the Debug configuration leave it unused, never from inside a conditional block, and never from a file with platform-specific blocks, which only gain includes. Files whose only use of a header sits behind a feature or debug macro (libvgcode's OpenGL ES and marker code, the ARACHNE/TESTS_EXPORT_SVGS debug output) keep their includes.

clonable_ptr.hpp gains #pragma once; it had no include guard and was only safe while Config.hpp was its sole includer.
2026-10-03 21:27:55 +08:00
HanifKoh 8a6377f087 Add Missing Includes Across src/libslic3r (#16068)
* Add Missing Includes Across src/libslic3r

Every libslic3r source and header now directly includes the headers declaring what it uses, rather than relying on the precompiled header or transitive includes. Generated with clang-tidy misc-include-cleaner, with libslic3r headers spelled libslic3r/... so they resolve outside the library's private include paths. MultiMaterialSegmentation.hpp, Support/SupportParameters.hpp and Format/STEP.hpp are made self-contained by hand.

* Make the libslic3r Headers Compile on Their Own

Each now includes, or forward-declares, what it uses instead of relying on what its includers happened to include first. Left out: I18N.hpp, which errors on purpose when included from GUI code, and VoxelizeCSGMesh.hpp and SLA/bicubic.h, which nothing includes and which no longer compile at all.

* Add the Includes Missing From the Hand-Fixed libslic3r Headers

clang-tidy would not edit these headers while they failed to compile on their own, so the first pass skipped them. With the headers now self-contained, a second pass adds the rest.

* Keep Windows Setup Ahead of the Added libslic3r Includes

Print.cpp and Thread.cpp open with a _WIN32 block that has to come first; without the precompiled header, Print.cpp otherwise reaches windows.h through OCCT with NONLS defined and boost/regex fails. OpenVDBUtils.cpp and SLA/SupportTreeBuilder.cpp had includes inside #ifndef NOMINMAX, which libslic3r defines on Windows, so those were skipped there. .clang-tidy also ignores the MSVC STL and UCRT internals, Boost.Multiprecision's fwd.hpp and CPython's Windows include directory.

* Re-Add libslic3r Includes After the Clipper2 2.0.1 Migration

Rebasing onto main took main's version of the files the Clipper2 migration rewrote, so their added includes are restored here, along with includes for main's new code. Clipper2's individual headers are now ignored by clang-tidy: they only build the Z variant through clipper2_z.hpp, which defines USINGZ first, so including clipper.core.h and the like directly broke ClipperZUtils.cpp.
2026-10-03 15:31:11 +08:00
SoftFever c86e33db6d Make the orca-wxwidgets skill find the wx source on Windows and in worktrees 2026-10-03 14:11:21 +08:00
574 changed files with 1448 additions and 578 deletions
+10 -2
View File
@@ -30,8 +30,9 @@ how you read the wx docs:
Look things up in the source the app is built from — it beats memory, and 3.3 changed real behaviour:
```bash
WX=$(find deps -maxdepth 5 -type d -path '*dep_wxWidgets-prefix/src/dep_wxWidgets' | head -1)
# macOS: deps/build/<arch>/dep_wxWidgets-prefix/src/dep_wxWidgets Linux: deps/build/dep_wxWidgets-prefix/...
WX=$(find -L deps -maxdepth 5 -type d -path '*dep_wxWidgets-prefix/src/dep_wxWidgets' 2>/dev/null | head -1)
# macOS: deps/build/<arch>/dep_wxWidgets-prefix/src/dep_wxWidgets Linux, Windows: deps/<tree>/dep_wxWidgets-prefix/...
# -L follows a worktree's deps/<tree> symlinked to the main checkout. Not a glob: zsh aborts on one that matches nothing.
# If deps are not built: git clone --depth 1 -b v3.3.2 https://github.com/SoftFever/Orca-deps-wxWidgets
grep -n "CaptureMouse" -A 30 $WX/interface/wx/window.h # documented contract (doxygen source)
grep -rn "@onlyfor\|not implemented" $WX/interface/wx/popupwin.h # documented platform limits
@@ -40,6 +41,13 @@ grep -n "IsDark" $WX/docs/changes.txt # what changed in
grep -n "NotifyCaptureLost" -r $WX/src/osx $WX/src/gtk $WX/src/msw # what each port actually does
```
On Windows these lookups are bash: run them from Git Bash. PowerShell has no `grep`, and its `find` is
Windows' text-search `find.exe`. To locate the wx tree from PowerShell:
```powershell
$WX = Resolve-Path deps\*\dep_wxWidgets-prefix\src\dep_wxWidgets, deps\*\*\dep_wxWidgets-prefix\src\dep_wxWidgets -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty Path
```
`interface/wx/<class>.h` is the documentation; `src/common` holds shared behaviour and
`src/{msw,osx,gtk,unix,generic}` the per-port implementation. When the docs and the source disagree,
the source is what runs — the references mark such facts **[source]**. Orca-side design docs live in
@@ -10,7 +10,7 @@ wx asserts are compiled out in Orca (`wxDEBUG_LEVEL=0`), so every misuse below t
an assert fails silently. "GTK" means wxGTK3, Orca's Linux default (X11 and Wayland); GTK2 is only
an opt-out build (`-DDEP_WX_GTK3=OFF`), noted where it differs. Paths starting `interface/`,
`include/`, `src/`, `docs/` are in the wx tree
(`find deps -maxdepth 5 -type d -path '*dep_wxWidgets-prefix/src/dep_wxWidgets'`); Orca paths are
(located as in `SKILL.md` §Ground truth); Orca paths are
relative to `src/slic3r/GUI/`.
Contents: [Rules](#rules) · [Mouse capture](#mouse-capture) · [Mouse events](#mouse-events) ·
@@ -6,7 +6,7 @@ to write a custom control on the wx side and how to author an Orca widget on the
`StaticBox`/`StateHandler` foundation. Read it before writing or reviewing any `wxEVT_PAINT`
handler, `render`/`doRender` method, `messureSize`, or a new class under `src/slic3r/GUI/Widgets/`.
wx cites are relative to the pinned wx 3.3.2 tree (`deps/build/<arch>/dep_wxWidgets-prefix/src/dep_wxWidgets`).
wx cites are relative to the pinned wx 3.3.2 tree (located as in `SKILL.md` §Ground truth).
Orca builds wx with `wxBUILD_DEBUG_LEVEL=0` and `libslic3r_gui` with `wxDEBUG_LEVEL=0`: every
wx assert below is compiled out and `wxCHECK*` returns silently, so paint misuse shows up only as
wrong, missing or stale pixels, never as an assert dialog.
@@ -78,8 +78,9 @@ Contents: [Rules](#rules) · [The wx build Orca uses](#the-wx-build-orca-uses)
`references/colours-dark-mode.md`.
- The checked-out source is the tree that every wx citation in this skill refers to:
`deps/build/<arch>/dep_wxWidgets-prefix/src/dep_wxWidgets` on macOS and
`deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets` on Linux. Find it with
`find deps -maxdepth 5 -type d -path '*dep_wxWidgets-prefix/src/dep_wxWidgets'`. On macOS its
`deps/<tree>/dep_wxWidgets-prefix/src/dep_wxWidgets` on Linux and Windows (`deps/build` for a
release build; `build_win.bat` names the others). Locate it with the bash or PowerShell lookup in
`SKILL.md` §Ground truth. On macOS its
`src/osx/cocoa/colour.mm` already has the patch applied.
- **Flatpak builds wx separately.** `deps/CMakeLists.txt` leaves `dep_wxWidgets` out of the deps
target when `FLATPAK` is set. Instead, `scripts/flatpak/com.orcaslicer.OrcaSlicer.yml` has its own
@@ -5,7 +5,7 @@ How wx 3.3.2 popups and menus behave on each port, and the Orca wrappers built o
`append_menu_item`, `Plater::PopupMenu` and the macOS menubar versus `BBLTopbar`. Read it before you add
or change anything that opens over other UI and must close by itself, or any context menu or menubar item.
wx cites are relative to the wx tree root (`deps/build/<arch>/dep_wxWidgets-prefix/src/dep_wxWidgets`).
wx cites are relative to the wx tree root (located as in `SKILL.md` §Ground truth).
**[source]** marks behaviour derived from the implementation that the wx docs do not state or contradict.
Orca builds wx with `wxBUILD_DEBUG_LEVEL=0`, so every "asserts" below means "fails silently in Orca".
"GTK" means wxGTK3 (X11 and Wayland), the default Linux build; GTK2 is only an opt-out (`-DDEP_WX_GTK3=OFF`).
@@ -7,7 +7,7 @@ yields and nested event loops, progress dialogs, startup, shutdown and exception
screen, and the access rules for `wxGetApp()` and `app_config`. Read it whenever code runs off the
main thread, defers work, starts a timer, yields, shows progress, or runs during startup or shutdown.
wx cites are relative to the pinned wx 3.3.2 tree (`deps/build/<arch>/dep_wxWidgets-prefix/src/dep_wxWidgets`).
wx cites are relative to the pinned wx 3.3.2 tree (located as in `SKILL.md` §Ground truth).
Orca builds wx with `wxBUILD_DEBUG_LEVEL=0` and `libslic3r_gui` with `wxDEBUG_LEVEL=0`, so `wxASSERT`
is compiled out and `wxCHECK*` returns silently: a timer started off the main thread never fires on macOS,
`Exit()` on a loop that is not the active one is ignored, `Start(0)` on macOS fails — all without
@@ -6,10 +6,9 @@ port; what Orca's `DPIDialog`/`DPIFrame` add; the Orca dialog recipe; and the `M
Read it before writing or reviewing any dialog, frame, close handler, `Destroy()`/`delete`, or code
that keeps a pointer to a window across an event, a `CallAfter` or a modal loop.
wx cites are relative to the pinned wx 3.3.2 tree (`find deps -maxdepth 5 -type d -path
'*dep_wxWidgets-prefix/src/dep_wxWidgets'`). wx is built with `wxBUILD_DEBUG_LEVEL=0` and
`libslic3r_gui` with `wxDEBUG_LEVEL=0`: every wx assert quoted below is compiled out, so misuse
fails silently (dropped call, stuck loop, freed memory), never with an assert dialog. "GTK" below
wx cites are relative to the pinned wx 3.3.2 tree (located as in `SKILL.md` §Ground truth). wx is
built with `wxBUILD_DEBUG_LEVEL=0` and `libslic3r_gui` with `wxDEBUG_LEVEL=0`: every wx assert
quoted below is compiled out, so misuse fails silently (dropped call, stuck loop, freed memory), never with an assert dialog. "GTK" below
means wxGTK as Orca builds it on Linux: GTK3 by default (X11 or Wayland); GTK2 is only an opt-out.
Contents: [Rules](#rules) · [1 Creating and parenting](#1-creating-and-parenting-windows) ·
@@ -14,7 +14,7 @@ Contents: [Rules](#rules) · [1 Reading the change logs](#1-reading-the-change-l
[8 Migration done in Orca](#8-migration-already-done-in-orca)
All `docs/`, `interface/`, `include/`, `src/`, `build/` cites are relative to the pinned wx tree
(`find deps -maxdepth 5 -type d -path '*dep_wxWidgets-prefix/src/dep_wxWidgets'`), except paths
(located as in `SKILL.md` §Ground truth), except paths
explicitly called Orca's (`deps/…`, Orca's `src/CMakeLists.txt`) and bare Orca file + symbol cites.
## Rules
+12
View File
@@ -140,6 +140,18 @@ using namespace nlohmann;
#include "slic3r/GUI/Plater.hpp"
#include "slic3r/GUI/GuiColor.hpp"
#include <GLFW/glfw3.h>
#include "libslic3r/AppConfig.hpp"
#include "libslic3r/BuildVolume.hpp"
#include "libslic3r/ExPolygon.hpp"
#include "libslic3r/Exception.hpp"
#include "libslic3r/GCode/GCodeProcessor.hpp"
#include "libslic3r/GCode/ToolOrdering.hpp"
#include "libslic3r/ObjectID.hpp"
#include "libslic3r/PresetBundle.hpp"
#include "libslic3r/ProjectTask.hpp"
#include "slic3r/GUI/GUI_ObjectList.hpp"
#include "slic3r/GUI/I18N.hpp"
#include "slic3r/GUI/Jobs/SendJob.hpp"
#ifdef __WXGTK__
#if __has_include(<X11/Xlib.h>)
+4 -1
View File
@@ -5,7 +5,6 @@
#include "libslic3r/BoundingBox.hpp"
#include "libslic3r/PrintConfig.hpp"
#include "libslic3r/Format/bbs_3mf.hpp"
#include "libslic3r/GCode/ThumbnailData.hpp"
#include <set>
#include <string>
#include <vector>
@@ -13,6 +12,10 @@
#include "libslic3r/Config.hpp"
#include "libslic3r/Model.hpp"
namespace Slic3r { class Preset; }
namespace Slic3r { struct PlateBBoxData; }
namespace Slic3r { struct ThumbnailData; }
namespace Slic3r {
namespace IO {
@@ -57,6 +57,8 @@
#include <iostream>
#include <set>
#include <string>
#include "libslic3r/AppConfig.hpp"
#include "libslic3r/Format/STEP.hpp"
using namespace Slic3r;
namespace po = boost::program_options;
+1
View File
@@ -26,6 +26,7 @@
#include <stdexcept>
#include <string>
#include <vector>
#include "libslic3r/PrintConfig.hpp"
using namespace Slic3r;
namespace fs = boost::filesystem;
@@ -20,6 +20,7 @@
#include <numeric>
#include <vector>
#include <utility>
#include "libslic3r/BoundingBox.hpp"
namespace Slic3r {
namespace Algorithm {
@@ -28,6 +28,8 @@
#include "libslic3r/Arachne/SkeletalTrapezoidationJoint.hpp"
#include "libslic3r/Arachne/utils/ExtrusionJunction.hpp"
#include "libslic3r/Arachne/utils/ExtrusionLine.hpp"
#include "libslic3r/Arachne/SkeletalTrapezoidationGraph.hpp"
#include "libslic3r/Arachne/utils/PolygonsSegmentIndex.hpp"
#ifndef NDEBUG
#include "libslic3r/EdgeGrid.hpp"
@@ -11,7 +11,6 @@
#include <list>
#include <vector>
#include "utils/HalfEdgeGraph.hpp"
#include "utils/PolygonsSegmentIndex.hpp"
#include "utils/ExtrusionJunction.hpp"
#include "utils/ExtrusionLine.hpp"
-1
View File
@@ -11,7 +11,6 @@
#include <vector>
#include <utility>
#include "BeadingStrategy/BeadingStrategyFactory.hpp"
#include "libslic3r/libslic3r.h"
#include "libslic3r/Point.hpp"
#include "utils/ExtrusionLine.hpp"
@@ -14,7 +14,6 @@
#include "libslic3r/libslic3r.h"
#include "libslic3r/Point.hpp"
#include "libslic3r/Arachne/utils/ExtrusionJunction.hpp"
#include "libslic3r/BoundingBox.hpp"
#include "libslic3r/ExtrusionEntity.hpp"
#include "libslic3r/Line.hpp"
#include "libslic3r/Polygon.hpp"
@@ -19,9 +19,7 @@
#include "ExtrusionJunction.hpp"
#include "../../Polyline.hpp"
#include "../../Polygon.hpp"
#include "../../BoundingBox.hpp"
#include "../../ExtrusionEntity.hpp"
#include "../../Flow.hpp"
#include "libslic3r/libslic3r.h"
#include "libslic3r/Point.hpp"
@@ -4,7 +4,6 @@
#include "PolylineStitcher.hpp"
#include "ExtrusionLine.hpp"
#include "libslic3r/Point.hpp"
#include "libslic3r/Arachne/utils/PolygonsPointIndex.hpp"
#include "libslic3r/Polygon.hpp"
@@ -15,7 +15,6 @@
#include "SparsePointGrid.hpp"
#include "PolygonsPointIndex.hpp"
#include "../../Polygon.hpp"
#include "libslic3r/Point.hpp"
#include "libslic3r/libslic3r.h"
+1
View File
@@ -45,6 +45,7 @@
#include <boost/log/trivial.hpp>
#include <boost/multiprecision/integer.hpp>
#include <boost/rational.hpp>
#include "MultiMaterialSegmentation.hpp"
namespace libnest2d {
#if !defined(_MSC_VER) && defined(__SIZEOF_INT128__) && !defined(__APPLE__)
+5
View File
@@ -32,6 +32,11 @@
#include <boost/log/trivial.hpp>
#include <utility>
#include <vector>
#include "Config.hpp"
#include "ExtrusionEntityCollection.hpp"
#include "MultiMaterialSegmentation.hpp"
#include "SurfaceCollection.hpp"
#include "TriangleMesh.hpp"
#ifndef NDEBUG
// #define BRIM_DEBUG_TO_SVG
+4
View File
@@ -91,6 +91,10 @@
#include <string>
#include <vector>
#include <utility>
#include "libslic3r/Color.hpp"
#include "libslic3r/TriangleMesh.hpp"
class Geom2d_TrimmedCurve;
namespace Slic3r {
+2
View File
@@ -64,6 +64,8 @@
#include <vector>
#include <utility>
class Geom_TrimmedCurve;
namespace Slic3r {
// Single source of truth for the weld tolerance the viewport and the kernel share.
+1
View File
@@ -11,6 +11,7 @@
#include <unordered_map>
#include <vector>
#include <utility>
#include "libslic3r/Point.hpp"
namespace Slic3r {
+4 -1
View File
@@ -6,9 +6,12 @@
// hand-rolled SketchConstraints: full constraint set, real DoF counting, and
// over-constrained (bad-constraint) detection. Solves on a fixed 2D XY workplane.
#include "libslic3r/CAD/SketchEngine.hpp"
#include <vector>
namespace Slic3r { enum class SketchPointRole; }
namespace Slic3r { struct SketchEntity; }
namespace Slic3r { struct SketchEntityConstraintDef; }
namespace Slic3r {
struct SketchSolveResult {
-2
View File
@@ -5,10 +5,8 @@
#include <cstddef>
#include <utility>
#include <math.h>
#include "Geometry.hpp"
#include "Point.hpp"
#include "Line.hpp"
#include "Polygon.hpp"
#include "libslic3r.h"
+2 -1
View File
@@ -2,10 +2,11 @@
#define slic3r_Circle_hpp_
#include "Point.hpp"
#include "Line.hpp"
#include "libslic3r.h"
#include <cmath>
namespace Slic3r { class Line; }
namespace Slic3r {
constexpr double ZERO_TOLERANCE = 0.000005;
+1 -1
View File
@@ -12,7 +12,6 @@
#include "ClipperUtils.hpp"
#include "BoundingBox.hpp"
#include "ExPolygon.hpp"
#include "Geometry.hpp"
#include "Point.hpp"
#include "Polygon.hpp"
#include "Polyline.hpp"
@@ -24,6 +23,7 @@
#include <clipper2/clipper.h>
#include <utility>
#include <vector>
#include "ExtrusionEntity.hpp"
// #define CLIPPER_UTILS_DEBUG
+1
View File
@@ -3,6 +3,7 @@
#include <clipper2/clipper2_z.hpp>
#include <cstddef>
#include "Point.hpp"
namespace Slic3r {
namespace ClipperZUtils {
+1
View File
@@ -13,6 +13,7 @@
#include <libslic3r/ClipperUtils.hpp>
#include <libslic3r/Point.hpp>
#include <libslic3r/ExPolygon.hpp>
#include "Polygon.hpp"
namespace Slic3r {
+3
View File
@@ -14,6 +14,9 @@
#include <math.h>
#include <string>
#include <utility>
#include "Config.hpp"
#include "Polyline.hpp"
#include "PrintConfig.hpp"
namespace Slic3r {
-3
View File
@@ -1,7 +1,4 @@
#include "CustomGCode.hpp"
#include "Config.hpp"
#include "GCode.hpp"
#include "GCodeWriter.hpp"
#include <vector>
#include <utility>
#include <cstddef>
+3 -1
View File
@@ -6,7 +6,9 @@
#include <vector>
#include <admesh/stl.h> // indexed_triangle_set
#include "ExPolygon.hpp"
#include "Emboss.hpp" // IProjection
namespace Slic3r::Emboss { class IProject3d; }
namespace Slic3r::Emboss { class IProjection; }
namespace Slic3r{
+1
View File
@@ -19,6 +19,7 @@
#include <optional>
#include <math.h>
#include <cmath>
#include "BoundingBox.hpp"
namespace Slic3r {
+1 -1
View File
@@ -8,7 +8,6 @@
#include "ElephantFootCompensation.hpp"
#include "Flow.hpp"
#include "Geometry.hpp"
#include "SVG.hpp"
#include "Utils.hpp"
#include <algorithm>
@@ -19,6 +18,7 @@
#include <utility>
#include <math.h>
#include <limits>
#include "ExtrusionEntity.hpp"
// #define CONTOUR_DISTANCE_DEBUG_SVG
@@ -1,7 +1,6 @@
#ifndef slic3r_ElephantFootCompensation_hpp_
#define slic3r_ElephantFootCompensation_hpp_
#include "libslic3r.h"
#include "ExPolygon.hpp"
#include <vector>
-2
View File
@@ -1,6 +1,5 @@
#include "BoundingBox.hpp"
#include "ExPolygon.hpp"
#include "Exception.hpp"
#include "Geometry/MedialAxis.hpp"
#include "Point.hpp"
#include "MultiPoint.hpp"
@@ -8,7 +7,6 @@
#include "Line.hpp"
#include "ClipperUtils.hpp"
#include "Polyline.hpp"
#include "SVG.hpp"
#include "libslic3r.h"
#include <algorithm>
#include <cassert>
+1
View File
@@ -5,6 +5,7 @@
#include <vector>
#include <utility>
#include <algorithm>
#include "Polygon.hpp"
using namespace Slic3r;
// IMPROVE: use one dimensional vector for polygons offset with searching by std::lower_bound
+1
View File
@@ -6,6 +6,7 @@
#include <cassert>
#include <algorithm>
#include <cmath>
#include "Config.hpp"
namespace Slic3r {
-1
View File
@@ -2,7 +2,6 @@
#define slic3r_Extruder_hpp_
#include "libslic3r.h"
#include "Point.hpp"
#include <vector>
namespace Slic3r {
+1 -1
View File
@@ -2,7 +2,6 @@
#include "ExtrusionEntityCollection.hpp"
#include "ExPolygon.hpp"
#include "ClipperUtils.hpp"
#include "Extruder.hpp"
#include "Flow.hpp"
#include <algorithm>
#include <cassert>
@@ -21,6 +20,7 @@
#include <string_view>
#include "Utils.hpp"
#include "libslic3r.h"
#include "ArcFitter.hpp"
#define L(s) (s)
@@ -1,6 +1,5 @@
#include "ExtrusionEntityCollection.hpp"
#include "ExtrusionEntity.hpp"
#include "Point.hpp"
#include "Polygon.hpp"
#include "ShortestPath.hpp"
#include <algorithm>
+1
View File
@@ -25,6 +25,7 @@
#include "ExtrusionEntity.hpp"
#include "libslic3r.h"
#include "ExtrusionSimulator.hpp"
#include "Polyline.hpp"
#ifndef M_PI
#define M_PI 3.1415926535897932384626433832795
-1
View File
@@ -2,7 +2,6 @@
#define slic3r_ExtrusionSimulator_hpp_
#include "Point.hpp"
#include "libslic3r.h"
#include "ExtrusionEntity.hpp"
#include "BoundingBox.hpp"
-1
View File
@@ -2,7 +2,6 @@
#include "BoundingBox.hpp"
#include "TriangleMesh.hpp"
#include "SLA/IndexedMesh.hpp"
#include "Model.hpp"
#include <cstdint>
#include <cstddef>
#include <unordered_set>
@@ -5,10 +5,12 @@
#include "libslic3r/libslic3r.h"
#include "libslic3r/Polygon.hpp"
#include "libslic3r/Arachne/utils/ExtrusionJunction.hpp"
#include "libslic3r/Arachne/utils/ExtrusionLine.hpp"
#include "libslic3r/PerimeterGenerator.hpp"
#include <cstddef>
namespace Slic3r { class PerimeterGenerator; }
namespace Slic3r { struct FuzzySkinConfig; }
namespace Slic3r::Arachne { struct ExtrusionLine; }
namespace Slic3r::Feature::FuzzySkin {
void fuzzy_polyline(Points& poly, bool closed, coordf_t slice_z, const FuzzySkinConfig& cfg);
@@ -18,6 +18,10 @@
#include <algorithm>
#include <unordered_set>
#include <vector>
#include "libslic3r/Config.hpp"
#include "libslic3r/Print.hpp"
#include "libslic3r/PrintConfig.hpp"
#include "libslic3r/SurfaceCollection.hpp"
namespace std {
template<> struct hash<Slic3r::GridPoint3>
@@ -6,14 +6,15 @@
#include "libslic3r/libslic3r.h"
#include "libslic3r/Point.hpp"
#include "libslic3r/ExPolygon.hpp"
#include "libslic3r/Print.hpp"
#include "VoxelUtils.hpp"
#include <functional>
#include <cstddef>
#include <utility>
#include <unordered_set>
#include <vector>
#include "libslic3r/MultiMaterialSegmentation.hpp"
namespace Slic3r { class PrintObject; }
namespace Slic3r {
@@ -10,13 +10,13 @@
#include "libslic3r/PrintConfig.hpp"
#include "libslic3r/Polyline.hpp"
#include "libslic3r/Geometry.hpp"
#include "libslic3r/Fill/FillRectilinear.hpp"
#include "libslic3r/Surface.hpp"
#include <functional>
#include <limits>
#include <cassert>
#include <memory>
#include <utility>
#include "libslic3r/BoundingBox.hpp"
namespace Slic3r
{
+7
View File
@@ -41,6 +41,13 @@
#include "libslic3r/Polygon.hpp"
#include "libslic3r/Polyline.hpp"
#include "libslic3r.h"
#include "libslic3r/ExtrusionEntityCollection.hpp"
#include "libslic3r/MultiMaterialSegmentation.hpp"
#include "libslic3r/Slicing.hpp"
#include "libslic3r/SurfaceCollection.hpp"
namespace Slic3r::FillAdaptive { struct Octree; }
namespace Slic3r::FillLightning { class Generator; }
namespace Slic3r {
+1
View File
@@ -16,6 +16,7 @@
#include "libslic3r/Polyline.hpp"
#include <utility>
#include "Fill3DHoneycomb.hpp"
#include "libslic3r/Polygon.hpp"
namespace Slic3r {
+2
View File
@@ -11,6 +11,8 @@
#include "libslic3r/Point.hpp"
#include "libslic3r/Polyline.hpp"
namespace Slic3r { class Point; }
namespace Slic3r {
class Fill3DHoneycomb : public Fill
+4
View File
@@ -49,6 +49,10 @@
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/segment.hpp>
#include <boost/geometry/index/rtree.hpp>
#include "libslic3r/Fill/FillAdaptive.hpp"
#include "libslic3r/Config.hpp"
#include "libslic3r/Polygon.hpp"
#include "libslic3r/SurfaceCollection.hpp"
namespace Slic3r {
+1
View File
@@ -48,6 +48,7 @@
#include "libslic3r/Line.hpp"
#include "libslic3r/Polygon.hpp"
#include "libslic3r/Utils.hpp"
#include "libslic3r/Flow.hpp"
// #define INFILL_DEBUG_OUTPUT
namespace Slic3r {
+3 -2
View File
@@ -24,10 +24,11 @@
#include "../PrintConfig.hpp"
#include "../Flow.hpp"
#include "../ExtrusionEntity.hpp"
#include "../ExtrusionEntityCollection.hpp"
#include "../ShortestPath.hpp"
#include "libslic3r/Polyline.hpp"
#include "libslic3r/Polygon.hpp"
#include "libslic3r/Point.hpp"
namespace Slic3r { class ExtrusionEntityCollection; }
namespace Slic3r {
+1
View File
@@ -20,6 +20,7 @@
#include <libslic3r/ShortestPath.hpp>
#include <utility>
#include <vector>
#include "libslic3r/ExtrusionEntity.hpp"
namespace Slic3r {
+2 -1
View File
@@ -4,9 +4,10 @@
#include "libslic3r/ExPolygon.hpp"
#include "FillBase.hpp"
#include <utility>
#include "libslic3r/Point.hpp"
#include "libslic3r/Polyline.hpp"
namespace Slic3r { class Point; }
namespace Slic3r {
class FillConcentric : public Fill
@@ -19,6 +19,11 @@
#include <libslic3r/ShortestPath.hpp>
#include <vector>
#include <utility>
#include "libslic3r/BoundingBox.hpp"
#include "libslic3r/Flow.hpp"
#include "libslic3r/PrintConfig.hpp"
namespace Slic3r { class Surface; }
namespace Slic3r {
@@ -4,6 +4,8 @@
#include "libslic3r/ExtrusionEntity.hpp"
#include "FillBase.hpp"
namespace Slic3r { class Surface; }
namespace Slic3r {
class FillConcentricInternal : public Fill
@@ -7,7 +7,6 @@
#include <utility>
#include <vector>
#include "../libslic3r.h"
#include "../Point.hpp"
#include "../Polygon.hpp"
#include "../Polyline.hpp"
+1 -2
View File
@@ -1,6 +1,4 @@
#include "../ClipperUtils.hpp"
#include "../ShortestPath.hpp"
#include "../Surface.hpp"
#include <algorithm>
#include <cmath>
#include <cstddef>
@@ -13,6 +11,7 @@
#include "libslic3r/libslic3r.h"
#include "libslic3r/Polyline.hpp"
#include "FillCrossHatch.hpp"
#include "libslic3r/Polygon.hpp"
namespace Slic3r {
+2 -2
View File
@@ -4,13 +4,13 @@
#include <map>
#include <utility>
#include "../libslic3r.h"
#include "libslic3r/ExPolygon.hpp"
#include "FillBase.hpp"
#include "libslic3r/Point.hpp"
#include "libslic3r/Polyline.hpp"
namespace Slic3r { class Point; }
namespace Slic3r {
class FillCrossHatch : public Fill
+1 -2
View File
@@ -1,7 +1,5 @@
#include "../ClipperUtils.hpp"
#include "../MarchingSquares.hpp"
#include "../ShortestPath.hpp"
#include "../Surface.hpp"
#include <cmath>
#include <algorithm>
#include <cstddef>
@@ -18,6 +16,7 @@
#include "libslic3r/libslic3r.h"
#include "libslic3r/Polyline.hpp"
#include "FillGyroid.hpp"
#include "libslic3r/Polygon.hpp"
// ---------------------------------------------------------------------------
// Marching-squares scalar field for the optimized gyroid branch.
+2 -2
View File
@@ -1,14 +1,14 @@
#ifndef slic3r_FillGyroid_hpp_
#define slic3r_FillGyroid_hpp_
#include "../libslic3r.h"
#include "libslic3r/ExPolygon.hpp"
#include "FillBase.hpp"
#include <utility>
#include "libslic3r/Point.hpp"
#include "libslic3r/Polyline.hpp"
namespace Slic3r { class Point; }
namespace Slic3r {
class FillGyroid : public Fill
+1 -2
View File
@@ -1,6 +1,4 @@
#include "../ClipperUtils.hpp"
#include "../ShortestPath.hpp"
#include "../Surface.hpp"
#include "libslic3r/Fill/FillBase.hpp"
#include "libslic3r/ExPolygon.hpp"
@@ -14,6 +12,7 @@
#include <cstddef>
#include <algorithm>
#include "FillHoneycomb.hpp"
#include "libslic3r/Polygon.hpp"
namespace Slic3r {
+1 -1
View File
@@ -1,6 +1,5 @@
#include "../ClipperUtils.hpp"
#include "../Print.hpp"
#include "../ShortestPath.hpp"
#include "libslic3r/ExPolygon.hpp"
#include "libslic3r/Fill/Lightning/Layer.hpp"
#include "FillBase.hpp"
@@ -13,6 +12,7 @@
#include "libslic3r/libslic3r.h"
#include <algorithm>
#include <functional>
#include "libslic3r/Fill/FillLightning.hpp"
namespace Slic3r::FillLightning {
+2 -1
View File
@@ -6,9 +6,10 @@
#include <memory>
#include <functional>
#include <utility>
#include "libslic3r/Point.hpp"
#include "libslic3r/Polyline.hpp"
namespace Slic3r { class Point; }
namespace Slic3r {
class PrintObject;
+2 -1
View File
@@ -1,7 +1,6 @@
#include "../ClipperUtils.hpp"
#include "../ExPolygon.hpp"
#include "../ShortestPath.hpp"
#include "../Surface.hpp"
#include "libslic3r/Fill/FillBase.hpp"
#include <utility>
#include "libslic3r/Point.hpp"
@@ -15,6 +14,8 @@
#include <cstdlib>
#include "FillLine.hpp"
#include "libslic3r/ExtrusionEntity.hpp"
#include "libslic3r/Polygon.hpp"
namespace Slic3r {
+1 -1
View File
@@ -1,6 +1,5 @@
#include "../ClipperUtils.hpp"
#include "../ShortestPath.hpp"
#include "../Surface.hpp"
#include "libslic3r/BoundingBox.hpp"
#include "libslic3r/Fill/FillBase.hpp"
@@ -18,6 +17,7 @@
#include <cstddef>
#include <type_traits>
#include "FillPlanePath.hpp"
#include "libslic3r/Config.hpp"
namespace Slic3r {
-1
View File
@@ -24,7 +24,6 @@
#include "../Geometry.hpp"
#include "../Surface.hpp"
#include "../ShortestPath.hpp"
#include "../VariableWidth.hpp"
#include "libslic3r/BoundingBox.hpp"
#include "libslic3r/Fill/FillBase.hpp"
+2 -1
View File
@@ -12,10 +12,11 @@
#include <cstddef>
#include <vector>
#include <utility>
#include "libslic3r/Flow.hpp"
#include "libslic3r/Point.hpp"
#include "libslic3r/Polygon.hpp"
namespace Slic3r { class Flow; }
namespace Slic3r {
class PrintRegionConfig;
+3 -2
View File
@@ -1,7 +1,5 @@
#include "../ClipperUtils.hpp"
#include "../ExPolygon.hpp"
#include "../Surface.hpp"
#include "../VariableWidth.hpp"
#include "Arachne/WallToolPaths.hpp"
#include "libslic3r/Polygon.hpp"
#include "libslic3r/Point.hpp"
@@ -22,6 +20,9 @@
#include <math.h>
#include <utility>
#include <vector>
#include "libslic3r/Arachne/utils/ExtrusionJunction.hpp"
#include "libslic3r/ExtrusionEntity.hpp"
#include "libslic3r/Line.hpp"
namespace Slic3r {
+2 -1
View File
@@ -4,9 +4,10 @@
#include "libslic3r/ExPolygon.hpp"
#include "FillBase.hpp"
#include <utility>
#include "libslic3r/Point.hpp"
#include "libslic3r/Polyline.hpp"
namespace Slic3r { class Point; }
namespace Slic3r {
class FillSpiralInset : public Fill
-1
View File
@@ -3,7 +3,6 @@
#include <utility>
#include "libslic3r/libslic3r.h"
#include "FillBase.hpp"
#include "libslic3r/ExPolygon.hpp"
#include "libslic3r/Polyline.hpp"
+1
View File
@@ -16,6 +16,7 @@
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include "libslic3r/Polygon.hpp"
namespace marchsq {
using namespace Slic3r;
-1
View File
@@ -3,7 +3,6 @@
#include <utility>
#include "libslic3r/libslic3r.h"
#include "FillBase.hpp"
#include "libslic3r/ExPolygon.hpp"
#include "libslic3r/Polyline.hpp"
@@ -30,6 +30,9 @@
#include <cmath>
#include <utility>
#include <cassert>
#include "libslic3r/Config.hpp"
#include "libslic3r/MultiMaterialSegmentation.hpp"
#include "libslic3r/SurfaceCollection.hpp"
/* Possible future tasks/optimizations,etc.:
* - Improve connecting heuristic to favor connecting to shorter trees
-1
View File
@@ -14,7 +14,6 @@
#include "../../ClipperUtils.hpp"
#include "../../Geometry.hpp"
#include "Utils.hpp"
#include "libslic3r/libslic3r.h"
#include <cassert>
@@ -19,6 +19,7 @@
#include "libslic3r/BoundingBox.hpp"
#include "SVG.hpp"
#include "libslic3r/libslic3r.h"
#include "libslic3r/Line.hpp"
//#define LIGHTNING_TREE_NODE_DEBUG_OUTPUT
+1 -1
View File
@@ -1,7 +1,6 @@
#include "Flow.hpp"
#include "Exception.hpp"
#include "Config.hpp"
#include "I18N.hpp"
#include "Print.hpp"
#include "libslic3r.h"
#include <cmath>
@@ -10,6 +9,7 @@
#include <boost/algorithm/string/predicate.hpp>
#include <string>
#include <math.h>
#include "PrintConfig.hpp"
// Mark string for localization and translate.
#define L(s) Slic3r::I18N::translate(s)
-1
View File
@@ -4,7 +4,6 @@
#include <math.h>
#include "FlushVolPredictor.hpp"
#include "slic3r/Utils/ColorSpaceConvert.hpp"
#include "Utils.hpp"
#include "FlushVolCalc.hpp"
-2
View File
@@ -3,11 +3,9 @@
#include "../Model.hpp"
#include "../Utils.hpp"
#include "../LocalesUtils.hpp"
#include "../GCode.hpp"
#include "../Geometry.hpp"
#include "../GCode/ThumbnailData.hpp"
#include "../Semver.hpp"
#include "../Time.hpp"
#include "../I18N.hpp"
#include "libslic3r/Point.hpp"
-7
View File
@@ -12,17 +12,10 @@
#include <boost/nowide/cstdio.hpp>
#include "../libslic3r.h"
#include "../Exception.hpp"
#include "../Model.hpp"
#include "../GCode.hpp"
#include "../PrintConfig.hpp"
#include "../Utils.hpp"
#include "../I18N.hpp"
#include "../Geometry.hpp"
#include "../CustomGCode.hpp"
#include "../LocalesUtils.hpp"
#include "libslic3r/Config.hpp"
#include "libslic3r/Point.hpp"
#include "libslic3r/TriangleMesh.hpp"
+1
View File
@@ -32,6 +32,7 @@
//Translation
#include "I18N.hpp"
#include "libslic3r/Format/OBJ.hpp"
#define _L(s) Slic3r::I18N::translate(s)
namespace Slic3r {
+1 -2
View File
@@ -1,7 +1,6 @@
#include "SL1.hpp"
#include "libslic3r/ExPolygon.hpp"
#include "libslic3r/Config.hpp"
#include "GCode/ThumbnailData.hpp"
#include "libslic3r/libslic3r.h"
#include "libslic3r/Polygon.hpp"
#include "libslic3r/Point.hpp"
@@ -35,7 +34,6 @@
#include "libslic3r/SlicesToTriangleMesh.hpp"
#include "libslic3r/MarchingSquares.hpp"
#include "libslic3r/ClipperUtils.hpp"
#include "libslic3r/MTUtils.hpp"
#include "libslic3r/PrintConfig.hpp"
#include "libslic3r/SLA/RasterBase.hpp"
#include "libslic3r/miniz_extension.hpp"
@@ -50,6 +48,7 @@
#include <string>
#include <utility>
#include <string_view>
#include "libslic3r/SLA/Pad.hpp"
namespace marchsq {
+1
View File
@@ -7,6 +7,7 @@
#include <cstring>
#include <string>
#include <utility>
#include "libslic3r/Format/STL.hpp"
#ifdef _WIN32
#define DIR_SEPARATOR '\\'
+2
View File
@@ -113,6 +113,8 @@ namespace pt = boost::property_tree;
#include "NSVGUtils.hpp"
#include <fast_float/fast_float.h>
#include "libslic3r/Format/bbs_3mf.hpp"
#include "libslic3r/ProjectTask.hpp"
// Slightly faster than sprintf("%.9g"), but there is an issue with the karma floating point formatter,
// https://github.com/boostorg/spirit/pull/586
+1
View File
@@ -37,6 +37,7 @@
#include "TopoDS.hxx"
#include "BRepExtrema_SelfIntersection.hxx"
#include "libslic3r/Polygon.hpp"
#include "libslic3r/Polyline.hpp"
namespace Slic3r {
const double STEP_TRANS_CHORD_ERROR = 0.005;
+8
View File
@@ -132,6 +132,14 @@ using namespace std::literals::string_view_literals;
#endif
#include <assert.h>
#include "AABBTreeLines.hpp"
#include "Extruder.hpp"
#include "ExtrusionEntityCollection.hpp"
#include "FilamentMixer.hpp"
#include "Format/STEP.hpp"
#include "Model.hpp"
#include "MultiNozzleUtils.hpp"
#include "Slicing.hpp"
namespace Slic3r {
+4 -3
View File
@@ -4,10 +4,8 @@
#include "ExtrusionEntity.hpp"
#include "Polygon.hpp"
#include "Config.hpp"
#include "ExtrusionEntityCollection.hpp"
#include "Print.hpp"
#include "libslic3r.h"
#include "ExPolygon.hpp"
#include "GCodeWriter.hpp"
#include "Layer.hpp"
#include "Point.hpp"
@@ -22,7 +20,6 @@
#include "GCode/WipeTower.hpp"
#include "GCode/SeamPlacer.hpp"
#include "GCode/GCodeProcessor.hpp"
#include "EdgeGrid.hpp"
#include "GCode/ThumbnailData.hpp"
#include "libslic3r/ObjectID.hpp"
#include "GCode/ExtrusionProcessor.hpp"
@@ -47,6 +44,10 @@
#include <cfloat>
#include <vector>
#include <utility>
#include "BoundingBox.hpp"
#include "Polyline.hpp"
namespace Slic3r { class ExtrusionEntityCollection; }
namespace Slic3r {
@@ -18,6 +18,10 @@
#include <cmath>
#include <cctype>
#include <string>
#include "libslic3r/GCode/AdaptivePAProcessor.hpp"
#include "libslic3r/Config.hpp"
#include "libslic3r/GCodeWriter.hpp"
#include "libslic3r/PrintConfig.hpp"
namespace Slic3r {
@@ -31,6 +31,11 @@
#include <boost/range/adaptor/reversed.hpp>
#include <vector>
#include <utility>
#include "libslic3r/GCode/AvoidCrossingPerimeters.hpp"
#include "libslic3r/Extruder.hpp"
#include "libslic3r/GCodeWriter.hpp"
#include "libslic3r/PrintConfig.hpp"
#include "libslic3r/SurfaceCollection.hpp"
namespace Slic3r {
@@ -1,13 +1,13 @@
#ifndef slic3r_AvoidCrossingPerimeters_hpp_
#define slic3r_AvoidCrossingPerimeters_hpp_
#include "../libslic3r.h"
#include "../ExPolygon.hpp"
#include "../EdgeGrid.hpp"
#include "libslic3r/Polyline.hpp"
#include "libslic3r/Polygon.hpp"
#include "libslic3r/BoundingBox.hpp"
#include <vector>
#include "libslic3r/MultiMaterialSegmentation.hpp"
namespace Slic3r {
+1
View File
@@ -23,6 +23,7 @@
#include <atomic>
#include <utility>
#include <vector>
#include "libslic3r/Model.hpp"
namespace Slic3r {
+2 -3
View File
@@ -1,15 +1,12 @@
#ifndef slic3r_ConflictChecker_hpp_
#define slic3r_ConflictChecker_hpp_
#include "../Utils.hpp"
#include "../Model.hpp"
#include "../Print.hpp"
#include "../Layer.hpp"
#include "libslic3r/Line.hpp"
#include "libslic3r/ExtrusionEntity.hpp"
#include "libslic3r/Point.hpp"
#include "libslic3r/Polyline.hpp"
#include "libslic3r/ExtrusionEntityCollection.hpp"
#include "libslic3r/GCode/GCodeProcessor.hpp"
#include <queue>
@@ -20,6 +17,8 @@
#include <vector>
#include <optional>
namespace Slic3r { class ExtrusionEntityCollection; }
namespace Slic3r {
struct LineWithID
+4
View File
@@ -29,6 +29,10 @@
#endif
#include <assert.h>
#include "libslic3r/GCode/CoolingBuffer.hpp"
#include "libslic3r/Config.hpp"
#include "libslic3r/GCodeWriter.hpp"
#include "libslic3r/PrintConfig.hpp"
namespace Slic3r {
-1
View File
@@ -1,7 +1,6 @@
#ifndef slic3r_CoolingBuffer_hpp_
#define slic3r_CoolingBuffer_hpp_
#include "../libslic3r.h"
#include "../Point.hpp"
#include <cstddef>
#include <map>
+2
View File
@@ -33,6 +33,8 @@
#include <boost/log/trivial.hpp>
#include <string>
#include <string_view>
#include "libslic3r/Config.hpp"
#include "libslic3r/GCodeWriter.hpp"
*/
-3
View File
@@ -2,11 +2,8 @@
#define slic3r_GCode_FanMover_hpp_
#include "../libslic3r.h"
#include "../PrintConfig.hpp"
#include "../ExtrusionEntity.hpp"
#include "../Point.hpp"
#include "../GCodeReader.hpp"
#include "../GCodeWriter.hpp"
#include <cstdint>

Some files were not shown because too many files have changed in this diff Show More