mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-04 14:20:58 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
245a94ab94 | ||
|
|
129e3526b8 | ||
|
|
64d78354e7 | ||
|
|
52ff374870 | ||
|
|
6e0f04815b | ||
|
|
c67b54b39d | ||
|
|
a6dbf2502d | ||
|
|
8a6377f087 | ||
|
|
c86e33db6d |
+4
-1
@@ -14,7 +14,9 @@ CheckOptions:
|
|||||||
# admesh's stl.h, which the include path also exposes without its directory.
|
# admesh's stl.h, which the include path also exposes without its directory.
|
||||||
# Clipper's own clipper.hpp is only included through libslic3r/clipper.hpp or
|
# Clipper's own clipper.hpp is only included through libslic3r/clipper.hpp or
|
||||||
# clipper_z.hpp, which configure it first, and Boost.Polygon's headers only
|
# clipper_z.hpp, which configure it first, and Boost.Polygon's headers only
|
||||||
# work through boost/polygon/polygon.hpp or voronoi.hpp. minilzo's config
|
# work through boost/polygon/polygon.hpp or voronoi.hpp. Clipper2's headers
|
||||||
|
# are included through clipper2/clipper.h, or clipper2_z.hpp, which defines
|
||||||
|
# USINGZ first. minilzo's config
|
||||||
# headers are internal to minilzo.h.
|
# headers are internal to minilzo.h.
|
||||||
# FFmpeg's C headers are left alone because they are only included inside
|
# FFmpeg's C headers are left alone because they are only included inside
|
||||||
# extern "C", which an inserted include would miss. OS-specific headers (GLib,
|
# extern "C", which an inserted include would miss. OS-specific headers (GLib,
|
||||||
@@ -59,4 +61,5 @@ CheckOptions:
|
|||||||
png(lib)?conf\.h;
|
png(lib)?conf\.h;
|
||||||
mcut[/\\]platform\.h;
|
mcut[/\\]platform\.h;
|
||||||
boost[/\\]polygon[/\\].*;
|
boost[/\\]polygon[/\\].*;
|
||||||
|
clipper2[/\\]clipper\.(core|engine|offset|minkowski|rectclip|export|triangulation|version)\.h;
|
||||||
lzo(conf|defs)\.h
|
lzo(conf|defs)\.h
|
||||||
|
|||||||
@@ -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:
|
Look things up in the source the app is built from — it beats memory, and 3.3 changed real behaviour:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
WX=$(find deps -maxdepth 5 -type d -path '*dep_wxWidgets-prefix/src/dep_wxWidgets' | head -1)
|
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: deps/build/dep_wxWidgets-prefix/...
|
# 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
|
# 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 -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
|
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
|
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
|
`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,
|
`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
|
the source is what runs — the references mark such facts **[source]**. Orca-side design docs live in
|
||||||
|
|||||||
@@ -331,6 +331,10 @@ OrcaSlicer: integer spinners are `::SpinInput` ([below](#spininput)); progress b
|
|||||||
Contract:
|
Contract:
|
||||||
- A page must be created with the book as its parent and added once; the book owns and deletes it
|
- A page must be created with the book as its parent and added once; the book owns and deletes it
|
||||||
(`interface/wx/bookctrl.h:253-254, 273`). `RemovePage` detaches without deleting, and you then own it (`:324-330`).
|
(`interface/wx/bookctrl.h:253-254, 273`). `RemovePage` detaches without deleting, and you then own it (`:324-330`).
|
||||||
|
- Removing the selected page selects the page before it (the new first page if it was first) through `SetSelection`,
|
||||||
|
so that page is shown and PAGE_CHANGING/CHANGED are sent; removing a page before the selection only shifts the
|
||||||
|
index. This is `wxBookCtrlBase::DoSetSelectionAfterRemoval` (`src/common/bookctrl.cpp:477-495` **[source]**),
|
||||||
|
called from `DoRemovePage` by `wxSimplebook`, `wxChoicebook`, `wxListbook`, `wxToolbook` and Orca's `Notebook`.
|
||||||
- `GetSelection()` inside a `PAGE_CHANGED` handler may return the old or the new page depending on the platform; use
|
- `GetSelection()` inside a `PAGE_CHANGED` handler may return the old or the new page depending on the platform; use
|
||||||
`event.GetSelection()` (`interface/wx/bookctrl.h:160-166`).
|
`event.GetSelection()` (`interface/wx/bookctrl.h:160-166`).
|
||||||
- `wxSimplebook` has no UI; switch with `ChangeSelection()`. `SetSelection()` sends PAGE_CHANGING/CHANGED
|
- `wxSimplebook` has no UI; switch with `ChangeSelection()`. `SetSelection()` sends PAGE_CHANGING/CHANGED
|
||||||
|
|||||||
@@ -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 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/`,
|
an opt-out build (`-DDEP_WX_GTK3=OFF`), noted where it differs. Paths starting `interface/`,
|
||||||
`include/`, `src/`, `docs/` are in the wx tree
|
`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/`.
|
relative to `src/slic3r/GUI/`.
|
||||||
|
|
||||||
Contents: [Rules](#rules) · [Mouse capture](#mouse-capture) · [Mouse events](#mouse-events) ·
|
Contents: [Rules](#rules) · [Mouse capture](#mouse-capture) · [Mouse events](#mouse-events) ·
|
||||||
|
|||||||
@@ -332,7 +332,9 @@ indices: pages come and go per printer and per feature flag.
|
|||||||
pages depending on the printer and on `use_printer_agents`; a removed page stays registered but is
|
pages depending on the printer and on `use_printer_agents`; a removed page stays registered but is
|
||||||
not prebuilt (its `LazyPage::in_book()` is false).
|
not prebuilt (its `LazyPage::in_book()` is false).
|
||||||
- Plugin pages are appended by `PluginPages::initialize` (`plugin/host/PluginPages.hpp`) with
|
- Plugin pages are appended by `PluginPages::initialize` (`plugin/host/PluginPages.hpp`) with
|
||||||
namespaced ids (`plugin.<plugin_key>.<name>`) that cannot collide with `TAB_ID_*`.
|
namespaced ids (`plugin.<plugin_key>.<name>`) that cannot collide with `TAB_ID_*`. Each is a
|
||||||
|
`LazyPage<PluginPage>` with order −1, destroyed when its capability goes away.
|
||||||
|
→ [Deferred construction](#deferred-construction-lazy-lazypage-stagedbuild-idlescheduler)
|
||||||
|
|
||||||
### Preset tabs
|
### Preset tabs
|
||||||
|
|
||||||
@@ -529,6 +531,32 @@ the main frame does nothing to a panel after creating it.
|
|||||||
m_idle.add(m_diff_dialog);
|
m_idle.add(m_diff_dialog);
|
||||||
```
|
```
|
||||||
Cite: `IdleScheduler::tick`, `docs/HLSD/deferred-page-construction.md`.
|
Cite: `IdleScheduler::tick`, `docs/HLSD/deferred-page-construction.md`.
|
||||||
|
- **Rule:** A lazy page that can be destroyed while the main frame lives takes a negative order and
|
||||||
|
stays out of `m_lazy_pages`.
|
||||||
|
**Why:** `m_lazy_pages` and `PrebuildQueue` hold raw `LazyBase*` and nothing removes one
|
||||||
|
(`PrebuildQueue` has only `add` and `clear`). The queue calls `pending()` on every task each slice,
|
||||||
|
and `prebuild_pages_when_idle` reads every entry of `m_lazy_pages`, so a page destroyed while still
|
||||||
|
listed can be read after it is freed. A page only taken out of the book is fine: it stays registered
|
||||||
|
and its `pending()` is false (`MainFrame::show_device`).
|
||||||
|
```cpp
|
||||||
|
// Right (PluginPages::create_page): order -1, and no m_lazy_pages.push_back
|
||||||
|
auto* page = new GUI::LazyPage<PluginPage>(m_parent, name, -1, [capability](wxWindow* parent) {
|
||||||
|
return new PluginPage(parent, capability);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
Cite: `PluginPages::create_page`, `PluginPages::remove_page`.
|
||||||
|
- **Rule:** Remove several lazy pages from a book left to right.
|
||||||
|
**Why:** removing the selected page selects and shows the page before it
|
||||||
|
(`references/controls-dataview.md` §Book controls), and showing an unbuilt `LazyPage` while the frame
|
||||||
|
is shown builds it. In any other order the page before the selected one can be one removed next,
|
||||||
|
built only to be destroyed; left to right it is one that stays (unless the selected page is the
|
||||||
|
book's first).
|
||||||
|
```cpp
|
||||||
|
// Right (PluginPages::shutdown): m_order is the tabs' left-to-right order
|
||||||
|
for (const PluginCapabilityId& id : std::vector<PluginCapabilityId>(m_order))
|
||||||
|
remove_page(id);
|
||||||
|
```
|
||||||
|
Cite: `PluginPages::shutdown`, `PluginPages::relayout`, `PluginPages::on_plugin_deregister`.
|
||||||
|
|
||||||
## Plater and Sidebar
|
## Plater and Sidebar
|
||||||
|
|
||||||
|
|||||||
@@ -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`
|
`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/`.
|
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
|
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
|
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.
|
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`.
|
`references/colours-dark-mode.md`.
|
||||||
- The checked-out source is the tree that every wx citation in this skill refers to:
|
- 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/<arch>/dep_wxWidgets-prefix/src/dep_wxWidgets` on macOS and
|
||||||
`deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets` on Linux. Find it with
|
`deps/<tree>/dep_wxWidgets-prefix/src/dep_wxWidgets` on Linux and Windows (`deps/build` for a
|
||||||
`find deps -maxdepth 5 -type d -path '*dep_wxWidgets-prefix/src/dep_wxWidgets'`. On macOS its
|
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.
|
`src/osx/cocoa/colour.mm` already has the patch applied.
|
||||||
- **Flatpak builds wx separately.** `deps/CMakeLists.txt` leaves `dep_wxWidgets` out of the deps
|
- **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
|
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
|
`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.
|
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.
|
**[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".
|
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`).
|
"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
|
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.
|
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`
|
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,
|
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
|
`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
|
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.
|
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
|
wx cites are relative to the pinned wx 3.3.2 tree (located as in `SKILL.md` §Ground truth). wx is
|
||||||
'*dep_wxWidgets-prefix/src/dep_wxWidgets'`). wx is built with `wxBUILD_DEBUG_LEVEL=0` and
|
built with `wxBUILD_DEBUG_LEVEL=0` and `libslic3r_gui` with `wxDEBUG_LEVEL=0`: every wx assert
|
||||||
`libslic3r_gui` with `wxDEBUG_LEVEL=0`: every wx assert quoted below is compiled out, so misuse
|
quoted below is compiled out, so misuse fails silently (dropped call, stuck loop, freed memory), never with an assert dialog. "GTK" below
|
||||||
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.
|
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) ·
|
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)
|
[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
|
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.
|
explicitly called Orca's (`deps/…`, Orca's `src/CMakeLists.txt`) and bare Orca file + symbol cites.
|
||||||
|
|
||||||
## Rules
|
## Rules
|
||||||
|
|||||||
+61
-169
@@ -685,162 +685,6 @@ static void load_default_gcodes_to_config(DynamicPrintConfig& config, Preset::Ty
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int load_assemble_plate_list(std::string config_file, std::vector<assemble_plate_info_t> &assemble_plate_info_list)
|
|
||||||
{
|
|
||||||
int ret = 0;
|
|
||||||
boost::filesystem::path directory_path(config_file);
|
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << boost::format("%1% enter, file %2%")%__FUNCTION__ % config_file;
|
|
||||||
if (!fs::exists(directory_path)) {
|
|
||||||
BOOST_LOG_TRIVIAL(error) << boost::format("directory %1% not exist.")%config_file;
|
|
||||||
return CLI_FILE_NOTFOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
json root_json;
|
|
||||||
boost::nowide::ifstream ifs(config_file);
|
|
||||||
ifs >> root_json;
|
|
||||||
ifs.close();
|
|
||||||
|
|
||||||
int plate_count = root_json[JSON_ASSEMPLE_PLATES].size();
|
|
||||||
if ((plate_count <= 0) || (plate_count > MAX_PLATE_COUNT)) {
|
|
||||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__<< boost::format(": invalid plate count %1%")%plate_count;
|
|
||||||
return CLI_CONFIG_FILE_ERROR;
|
|
||||||
}
|
|
||||||
assemble_plate_info_list.resize(plate_count);
|
|
||||||
|
|
||||||
for (int plate_index = 0; plate_index < plate_count; plate_index++)
|
|
||||||
{
|
|
||||||
assemble_plate_info_t &assemble_plate = assemble_plate_info_list[plate_index];
|
|
||||||
const json& plate_json = root_json[JSON_ASSEMPLE_PLATES][plate_index];
|
|
||||||
assemble_plate.plate_name = plate_json[JSON_ASSEMPLE_PLATE_NAME];
|
|
||||||
assemble_plate.need_arrange = plate_json[JSON_ASSEMPLE_PLATE_NEED_ARRANGE];
|
|
||||||
|
|
||||||
if (plate_json.contains(JSON_ASSEMPLE_PLATE_PARAMS)) {
|
|
||||||
assemble_plate.plate_params = plate_json[JSON_ASSEMPLE_PLATE_PARAMS].get<std::map<std::string, std::string>>();
|
|
||||||
BOOST_LOG_TRIVIAL(debug) << boost::format("Plate %1%, has %2% plate params") % (plate_index + 1) % assemble_plate.plate_params.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
int object_count = plate_json[JSON_ASSEMPLE_OBJECTS].size();
|
|
||||||
if (object_count <= 0) {
|
|
||||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__<< boost::format(": invalid object count %1% in plate %2%")%object_count %(plate_index+1);
|
|
||||||
return CLI_CONFIG_FILE_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
assemble_plate.assemble_obj_list.resize(object_count);
|
|
||||||
for (int object_index = 0; object_index < object_count; object_index++)
|
|
||||||
{
|
|
||||||
assemble_object_info_t& assemble_object = assemble_plate.assemble_obj_list[object_index];
|
|
||||||
const json& object_json = plate_json[JSON_ASSEMPLE_OBJECTS][object_index];
|
|
||||||
|
|
||||||
assemble_object.path = object_json[JSON_ASSEMPLE_OBJECT_PATH];
|
|
||||||
assemble_object.count = object_json[JSON_ASSEMPLE_OBJECT_COUNT];
|
|
||||||
|
|
||||||
if (assemble_object.count <= 0) {
|
|
||||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(": invalid object clone count %1% in plate %2% Object %3%") % assemble_object.count % (plate_index + 1) % assemble_object.path;
|
|
||||||
return CLI_CONFIG_FILE_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
assemble_object.filaments = object_json.at(JSON_ASSEMPLE_OBJECT_FILAMENTS).get<std::vector<int>>();
|
|
||||||
if ((assemble_object.filaments.size() > 0) && (assemble_object.filaments.size() != assemble_object.count) && (assemble_object.filaments.size() != 1))
|
|
||||||
{
|
|
||||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(": object %1%'s filaments count %2% not equal to clone count %3%, also not equal to 1") % assemble_object.path % assemble_object.filaments.size() % assemble_object.count;
|
|
||||||
return CLI_CONFIG_FILE_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (object_json.contains(JSON_ASSEMPLE_OBJECT_ASSEMBLE_INDEX)) {
|
|
||||||
assemble_object.assemble_index = object_json[JSON_ASSEMPLE_OBJECT_ASSEMBLE_INDEX].get<std::vector<int>>();
|
|
||||||
if ((assemble_object.assemble_index.size() > 0) && (assemble_object.assemble_index.size() != assemble_object.count) && (assemble_object.assemble_index.size() != 1))
|
|
||||||
{
|
|
||||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(": object %1%'s assemble_index count %2% not equal to clone count %3%, also not equal to 1") % assemble_object.path % assemble_object.assemble_index.size() % assemble_object.count;
|
|
||||||
return CLI_CONFIG_FILE_ERROR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (object_json.contains(JSON_ASSEMPLE_OBJECT_POS_X)) {
|
|
||||||
assemble_object.pos_x = object_json[JSON_ASSEMPLE_OBJECT_POS_X].get<std::vector<float>>();
|
|
||||||
if ((assemble_object.pos_x.size() > 0) && (assemble_object.pos_x.size() != assemble_object.count) && (assemble_object.pos_x.size() != 1))
|
|
||||||
{
|
|
||||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(": object %1%'s pos_x count %2% not equal to clone count %3%, also not equal to 1") % assemble_object.path % assemble_object.pos_x.size() % assemble_object.count;
|
|
||||||
return CLI_CONFIG_FILE_ERROR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (object_json.contains(JSON_ASSEMPLE_OBJECT_POS_Y)) {
|
|
||||||
assemble_object.pos_y = object_json[JSON_ASSEMPLE_OBJECT_POS_Y].get<std::vector<float>>();
|
|
||||||
if ((assemble_object.pos_y.size() > 0) && (assemble_object.pos_y.size() != assemble_object.count) && (assemble_object.pos_y.size() != 1))
|
|
||||||
{
|
|
||||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(": object %1%'s pos_y count %2% not equal to clone count %3%, also not equal to 1") % assemble_object.path % assemble_object.pos_y.size() % assemble_object.count;
|
|
||||||
return CLI_CONFIG_FILE_ERROR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (object_json.contains(JSON_ASSEMPLE_OBJECT_POS_Z)) {
|
|
||||||
assemble_object.pos_z = object_json[JSON_ASSEMPLE_OBJECT_POS_Z].get<std::vector<float>>();
|
|
||||||
if ((assemble_object.pos_z.size() > 0) && (assemble_object.pos_z.size() != assemble_object.count) && (assemble_object.pos_z.size() != 1))
|
|
||||||
{
|
|
||||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(": object %1%'s pos_z count %2% not equal to clone count %3%, also not equal to 1") % assemble_object.path % assemble_object.pos_z.size() % assemble_object.count;
|
|
||||||
return CLI_CONFIG_FILE_ERROR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (object_json.contains(JSON_ASSEMPLE_OBJECT_PRINT_PARAMS)) {
|
|
||||||
assemble_object.print_params = object_json[JSON_ASSEMPLE_OBJECT_PRINT_PARAMS].get<std::map<std::string, std::string>>();
|
|
||||||
BOOST_LOG_TRIVIAL(debug) << boost::format("Plate %1%, object %2% has %3% print params") % (plate_index + 1) %assemble_object.path % assemble_object.print_params.size();
|
|
||||||
}
|
|
||||||
if (object_json.contains(JSON_ASSEMPLE_OBJECT_HEIGHT_RANGES)) {
|
|
||||||
json height_range_json = object_json[JSON_ASSEMPLE_OBJECT_HEIGHT_RANGES];
|
|
||||||
int range_count = height_range_json.size();
|
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(debug) << boost::format("Plate %1%, object %2% has %3% height ranges") % (plate_index + 1) %assemble_object.path % range_count;
|
|
||||||
|
|
||||||
assemble_object.height_ranges.resize(range_count);
|
|
||||||
for (int range_index = 0; range_index < range_count; range_index++)
|
|
||||||
{
|
|
||||||
height_range_info_t& height_range = assemble_object.height_ranges[range_index];
|
|
||||||
height_range.min_z = height_range_json[range_index][JSON_ASSEMPLE_OBJECT_MIN_Z];
|
|
||||||
height_range.max_z = height_range_json[range_index][JSON_ASSEMPLE_OBJECT_MAX_Z];
|
|
||||||
height_range.range_params = height_range_json[range_index][JSON_ASSEMPLE_OBJECT_RANGE_PARAMS].get<std::map<std::string, std::string>>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (plate_json.contains(JSON_ASSEMPLE_ASSEMBLE_PARAMS)) {
|
|
||||||
json assemble_params_json = plate_json[JSON_ASSEMPLE_ASSEMBLE_PARAMS];
|
|
||||||
int assemble_count = assemble_params_json.size();
|
|
||||||
for (int i = 0; i < assemble_count; i++)
|
|
||||||
{
|
|
||||||
assembled_param_info_t assembled_param;
|
|
||||||
int assemble_index = assemble_params_json[i][JSON_ASSEMPLE_OBJECT_ASSEMBLE_INDEX];
|
|
||||||
if (assemble_params_json[i].contains(JSON_ASSEMPLE_OBJECT_PRINT_PARAMS)) {
|
|
||||||
assembled_param.print_params = assemble_params_json[i][JSON_ASSEMPLE_OBJECT_PRINT_PARAMS].get<std::map<std::string, std::string>>();
|
|
||||||
BOOST_LOG_TRIVIAL(debug) << boost::format("Plate %1%, assemble object %2% has %3% print params") % (plate_index + 1) %i % assembled_param.print_params.size();
|
|
||||||
}
|
|
||||||
if (assemble_params_json[i].contains(JSON_ASSEMPLE_OBJECT_HEIGHT_RANGES)) {
|
|
||||||
json height_range_json = assemble_params_json[i][JSON_ASSEMPLE_OBJECT_HEIGHT_RANGES];
|
|
||||||
int range_count = height_range_json.size();
|
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(debug) << boost::format("Plate %1%, assemble object %2% has %3% height ranges") % (plate_index + 1) %i % range_count;
|
|
||||||
|
|
||||||
assembled_param.height_ranges.resize(range_count);
|
|
||||||
for (int range_index = 0; range_index < range_count; range_index++)
|
|
||||||
{
|
|
||||||
height_range_info_t& height_range = assembled_param.height_ranges[range_index];
|
|
||||||
height_range.min_z = height_range_json[range_index][JSON_ASSEMPLE_OBJECT_MIN_Z];
|
|
||||||
height_range.max_z = height_range_json[range_index][JSON_ASSEMPLE_OBJECT_MAX_Z];
|
|
||||||
height_range.range_params = height_range_json[range_index][JSON_ASSEMPLE_OBJECT_RANGE_PARAMS].get<std::map<std::string, std::string>>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
assemble_plate.assembled_param_list.emplace(assemble_index, std::move(assembled_param));
|
|
||||||
}
|
|
||||||
BOOST_LOG_TRIVIAL(debug) << boost::format("Plate %1%, has %2% plate params") % (plate_index + 1) % assemble_plate.plate_params.size();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch(std::exception &err) {
|
|
||||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__<< ": parse file "<<config_file<<" got a generic exception, reason = " << err.what();
|
|
||||||
ret = CLI_CONFIG_FILE_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
void merge_or_add_object(assemble_plate_info_t& assemble_plate_info, Model &model, int assemble_index, std::map<int, ModelObject*> &merged_objects, ModelObject *ori_object)
|
void merge_or_add_object(assemble_plate_info_t& assemble_plate_info, Model &model, int assemble_index, std::map<int, ModelObject*> &merged_objects, ModelObject *ori_object)
|
||||||
{
|
{
|
||||||
if (assemble_index > 0) {
|
if (assemble_index > 0) {
|
||||||
@@ -1906,6 +1750,14 @@ int CLI::run(int argc, char **argv)
|
|||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << boost::format("current_printer_name %1%, current_process_name %2%")%current_printer_name %current_process_name;
|
BOOST_LOG_TRIVIAL(info) << boost::format("current_printer_name %1%, current_process_name %2%")%current_printer_name %current_process_name;
|
||||||
ConfigOptionStrings* option_strings = config.option<ConfigOptionStrings>("inherits_group");
|
ConfigOptionStrings* option_strings = config.option<ConfigOptionStrings>("inherits_group");
|
||||||
|
// One entry for the process, one per filament and one for the printer. A group of another
|
||||||
|
// length still has the process first and the printer last; one too short for that is ignored.
|
||||||
|
if (option_strings && option_strings->values.size() != current_filaments_name.size() + 2) {
|
||||||
|
boost::nowide::cerr << "Warning: inherits_group has " << option_strings->values.size() << " entries, expected "
|
||||||
|
<< current_filaments_name.size() + 2 << " for " << current_filaments_name.size() << " filaments" << std::endl;
|
||||||
|
if (option_strings->values.size() < 2)
|
||||||
|
option_strings = nullptr;
|
||||||
|
}
|
||||||
if (option_strings) {
|
if (option_strings) {
|
||||||
current_inherits_group = option_strings->values;
|
current_inherits_group = option_strings->values;
|
||||||
size_t size = current_inherits_group.size();
|
size_t size = current_inherits_group.size();
|
||||||
@@ -1927,14 +1779,11 @@ int CLI::run(int argc, char **argv)
|
|||||||
BOOST_LOG_TRIVIAL(info) << boost::format("inherits of process valid, current_process_system_name is %1%") %current_process_system_name;
|
BOOST_LOG_TRIVIAL(info) << boost::format("inherits of process valid, current_process_system_name is %1%") %current_process_system_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
current_filaments_system_name.resize(size - 2);
|
// A filament without an entry of its own counts as a system preset.
|
||||||
for (int index = 1; index < (size - 1); index++) {
|
current_filaments_system_name = current_filaments_name;
|
||||||
if (current_inherits_group[index].empty()) {
|
for (size_t index = 1; index < size - 1 && index <= current_filaments_name.size(); index++) {
|
||||||
current_filaments_system_name[index-1] = current_filaments_name[index-1];
|
if (!current_inherits_group[index].empty())
|
||||||
}
|
|
||||||
else {
|
|
||||||
current_filaments_system_name[index-1] = current_inherits_group[index];
|
current_filaments_system_name[index-1] = current_inherits_group[index];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -2067,7 +1916,12 @@ int CLI::run(int argc, char **argv)
|
|||||||
//parse the json and assemble object here
|
//parse the json and assemble object here
|
||||||
Model model;
|
Model model;
|
||||||
|
|
||||||
int ret = load_assemble_plate_list(load_assemble_list, assemble_plate_info_list);
|
AssembleListResult list_result = load_assemble_plate_list(load_assemble_list, assemble_plate_info_list, MAX_PLATE_COUNT);
|
||||||
|
int ret = CLI_SUCCESS;
|
||||||
|
if (list_result == AssembleListResult::FileNotFound)
|
||||||
|
ret = CLI_FILE_NOTFOUND;
|
||||||
|
else if (list_result == AssembleListResult::ConfigError)
|
||||||
|
ret = CLI_CONFIG_FILE_ERROR;
|
||||||
if (ret) {
|
if (ret) {
|
||||||
record_exit_reson(outfile_dir, ret, 0, cli_errors[ret], sliced_info);
|
record_exit_reson(outfile_dir, ret, 0, cli_errors[ret], sliced_info);
|
||||||
flush_and_exit(ret);
|
flush_and_exit(ret);
|
||||||
@@ -2823,6 +2677,37 @@ int CLI::run(int argc, char **argv)
|
|||||||
fetch_compatible_values = true;
|
fetch_compatible_values = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Refresh every project filament no loaded filament replaces from its current system preset, as the GUI
|
||||||
|
// does when it loads the project; the filament merge below keeps the keys the project lists as changed.
|
||||||
|
// Entries stay in slot order, which the merge's variant bookkeeping relies on.
|
||||||
|
std::vector<bool> load_filaments_refresh(load_filaments_config.size(), false);
|
||||||
|
if (is_bbl_3mf && new_printer_name.empty()) {
|
||||||
|
const ConfigOptionStrings *project_filament_ids = m_print_config.option<ConfigOptionStrings>("filament_ids");
|
||||||
|
for (size_t index = 0; index < current_filaments_system_name.size(); index++) {
|
||||||
|
const int slot = static_cast<int>(index) + 1;
|
||||||
|
if (std::find(load_filaments_index.begin(), load_filaments_index.end(), slot) != load_filaments_index.end())
|
||||||
|
continue;
|
||||||
|
std::string system_name = current_filaments_system_name[index];
|
||||||
|
if (system_name.empty())
|
||||||
|
continue;
|
||||||
|
PresetBundle::convert_filament_preset_name(current_printer_name, system_name);
|
||||||
|
DynamicPrintConfig config;
|
||||||
|
std::string error;
|
||||||
|
if (!ensure_system_preset_resolver().resolve_system_preset(config, Preset::TYPE_FILAMENT, system_name, config_substitution_rule, error)) {
|
||||||
|
BOOST_LOG_TRIVIAL(warning) << boost::format("CLI: system filament preset '%1%' not resolved (%2%); filament %3% keeps its values") % system_name % error % slot;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const size_t at = std::upper_bound(load_filaments_index.begin(), load_filaments_index.end(), slot) - load_filaments_index.begin();
|
||||||
|
load_filaments_id.insert(load_filaments_id.begin() + at,
|
||||||
|
project_filament_ids != nullptr && index < project_filament_ids->size() ? project_filament_ids->values[index] : std::string());
|
||||||
|
load_filaments_name.insert(load_filaments_name.begin() + at, system_name);
|
||||||
|
load_filaments_config.insert(load_filaments_config.begin() + at, std::move(config));
|
||||||
|
load_filaments_index.insert(load_filaments_index.begin() + at, slot);
|
||||||
|
load_filaments_inherit.insert(load_filaments_inherit.begin() + at, system_name);
|
||||||
|
load_filaments_refresh.insert(load_filaments_refresh.begin() + at, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//fetch upward_compatible_machine
|
//fetch upward_compatible_machine
|
||||||
if (fetch_upward_values) {
|
if (fetch_upward_values) {
|
||||||
if (!current_printer_system_name.empty()) {
|
if (!current_printer_system_name.empty()) {
|
||||||
@@ -3513,7 +3398,7 @@ int CLI::run(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//set the filament settings into print config
|
//set the filament settings into print config
|
||||||
if ((load_filament_count > 0) || (up_config_to_date))
|
if ((load_filament_count > 0) || (up_config_to_date) || !load_filaments_config.empty())
|
||||||
{
|
{
|
||||||
//std::vector<int> filament_variant_count(filament_count, 1);
|
//std::vector<int> filament_variant_count(filament_count, 1);
|
||||||
std::vector<int> old_start_indice(filament_count, 0);
|
std::vector<int> old_start_indice(filament_count, 0);
|
||||||
@@ -3572,6 +3457,8 @@ int CLI::run(int argc, char **argv)
|
|||||||
for (int index = 0; index < load_filaments_config.size(); index++) {
|
for (int index = 0; index < load_filaments_config.size(); index++) {
|
||||||
DynamicPrintConfig& config = load_filaments_config[index];
|
DynamicPrintConfig& config = load_filaments_config[index];
|
||||||
int filament_index = load_filaments_index[index];
|
int filament_index = load_filaments_index[index];
|
||||||
|
// A filament given with --load-filaments replaces the slot; a refreshed one keeps the project's changed keys.
|
||||||
|
const bool loaded = load_filament_count > 0 && !load_filaments_refresh[index];
|
||||||
std::vector<std::string> different_keys;
|
std::vector<std::string> different_keys;
|
||||||
|
|
||||||
//ORCA: diff before load_default_gcodes_to_config, the way the process and machine
|
//ORCA: diff before load_default_gcodes_to_config, the way the process and machine
|
||||||
@@ -3581,12 +3468,12 @@ int CLI::run(int argc, char **argv)
|
|||||||
// compared" to "compared as empty against the parent" and land in the column
|
// compared" to "compared as empty against the parent" and land in the column
|
||||||
// as an override the user never made.
|
// as an override the user never made.
|
||||||
std::string filament_different_settings;
|
std::string filament_different_settings;
|
||||||
if (load_filament_count > 0)
|
if (loaded)
|
||||||
filament_different_settings = cli_different_settings(config, load_filaments_inherit[index], Preset::TYPE_FILAMENT);
|
filament_different_settings = cli_different_settings(config, load_filaments_inherit[index], Preset::TYPE_FILAMENT);
|
||||||
|
|
||||||
load_default_gcodes_to_config(config, Preset::TYPE_FILAMENT);
|
load_default_gcodes_to_config(config, Preset::TYPE_FILAMENT);
|
||||||
|
|
||||||
if (load_filament_count > 0) {
|
if (loaded) {
|
||||||
ConfigOptionStrings *opt_filament_settings = static_cast<ConfigOptionStrings *> (m_print_config.option("filament_settings_id", true));
|
ConfigOptionStrings *opt_filament_settings = static_cast<ConfigOptionStrings *> (m_print_config.option("filament_settings_id", true));
|
||||||
std::string& filament_name = load_filaments_name[index];
|
std::string& filament_name = load_filaments_name[index];
|
||||||
ConfigOptionString* filament_name_setting = new ConfigOptionString(filament_name);
|
ConfigOptionString* filament_name_setting = new ConfigOptionString(filament_name);
|
||||||
@@ -3658,7 +3545,7 @@ int CLI::run(int argc, char **argv)
|
|||||||
flush_and_exit(CLI_CONFIG_FILE_ERROR);
|
flush_and_exit(CLI_CONFIG_FILE_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((load_filament_count == 0) && !different_keys_set.empty())
|
if (!loaded && !different_keys_set.empty())
|
||||||
{
|
{
|
||||||
std::set<std::string>::iterator iter = different_keys_set.find(opt_key);
|
std::set<std::string>::iterator iter = different_keys_set.find(opt_key);
|
||||||
if ( iter != different_keys_set.end()) {
|
if ( iter != different_keys_set.end()) {
|
||||||
@@ -4848,6 +4735,11 @@ int CLI::run(int argc, char **argv)
|
|||||||
record_exit_reson(outfile_dir, CLI_INVALID_PARAMS, 0, cli_errors[CLI_INVALID_PARAMS], sliced_info);
|
record_exit_reson(outfile_dir, CLI_INVALID_PARAMS, 0, cli_errors[CLI_INVALID_PARAMS], sliced_info);
|
||||||
flush_and_exit(CLI_INVALID_PARAMS);
|
flush_and_exit(CLI_INVALID_PARAMS);
|
||||||
}
|
}
|
||||||
|
if (m_models.empty()) {
|
||||||
|
boost::nowide::cerr << "Invalid params: --assemble needs at least one input model." << std::endl;
|
||||||
|
record_exit_reson(outfile_dir, CLI_INVALID_PARAMS, 0, cli_errors[CLI_INVALID_PARAMS], sliced_info);
|
||||||
|
flush_and_exit(CLI_INVALID_PARAMS);
|
||||||
|
}
|
||||||
Model m;
|
Model m;
|
||||||
ModelObject* new_object = m.add_object();
|
ModelObject* new_object = m.add_object();
|
||||||
new_object->name = _u8L("Assembly");
|
new_object->name = _u8L("Assembly");
|
||||||
@@ -5788,7 +5680,7 @@ int CLI::run(int argc, char **argv)
|
|||||||
float w = dynamic_cast<const ConfigOptionFloat *>(m_print_config.option("prime_tower_width"))->value;
|
float w = dynamic_cast<const ConfigOptionFloat *>(m_print_config.option("prime_tower_width"))->value;
|
||||||
float a = dynamic_cast<const ConfigOptionFloat *>(m_print_config.option("wipe_tower_rotation_angle"))->value;
|
float a = dynamic_cast<const ConfigOptionFloat *>(m_print_config.option("wipe_tower_rotation_angle"))->value;
|
||||||
float v = dynamic_cast<const ConfigOptionFloat *>(m_print_config.option("prime_volume"))->value;
|
float v = dynamic_cast<const ConfigOptionFloat *>(m_print_config.option("prime_volume"))->value;
|
||||||
unsigned int filaments_cnt = plate_data_src[plate_to_slice-1]->slice_filaments_info.size();
|
unsigned int filaments_cnt = (plate_data_src.size() >= static_cast<size_t>(plate_to_slice)) ? plate_data_src[plate_to_slice-1]->slice_filaments_info.size() : 0;
|
||||||
if ((filaments_cnt == 0) || need_skip)
|
if ((filaments_cnt == 0) || need_skip)
|
||||||
{
|
{
|
||||||
// slice filaments info invalid
|
// slice filaments info invalid
|
||||||
|
|||||||
+1
-58
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#include "libslic3r/Config.hpp"
|
#include "libslic3r/Config.hpp"
|
||||||
#include "libslic3r/Model.hpp"
|
#include "libslic3r/Model.hpp"
|
||||||
|
#include "libslic3r/Format/AssembleList.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
@@ -26,64 +27,6 @@ namespace IO {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#define JSON_ASSEMPLE_PLATES "plates"
|
|
||||||
#define JSON_ASSEMPLE_PLATE_PARAMS "plate_params"
|
|
||||||
#define JSON_ASSEMPLE_PLATE_NAME "plate_name"
|
|
||||||
#define JSON_ASSEMPLE_PLATE_NEED_ARRANGE "need_arrange"
|
|
||||||
#define JSON_ASSEMPLE_OBJECTS "objects"
|
|
||||||
#define JSON_ASSEMPLE_OBJECT_PATH "path"
|
|
||||||
#define JSON_ASSEMPLE_OBJECT_COUNT "count"
|
|
||||||
#define JSON_ASSEMPLE_OBJECT_FILAMENTS "filaments"
|
|
||||||
#define JSON_ASSEMPLE_OBJECT_POS_X "pos_x"
|
|
||||||
#define JSON_ASSEMPLE_OBJECT_POS_Y "pos_y"
|
|
||||||
#define JSON_ASSEMPLE_OBJECT_POS_Z "pos_z"
|
|
||||||
#define JSON_ASSEMPLE_OBJECT_ASSEMBLE_INDEX "assemble_index"
|
|
||||||
#define JSON_ASSEMPLE_OBJECT_PRINT_PARAMS "print_params"
|
|
||||||
#define JSON_ASSEMPLE_ASSEMBLE_PARAMS "assembled_params"
|
|
||||||
|
|
||||||
|
|
||||||
#define JSON_ASSEMPLE_OBJECT_MIN_Z "min_z"
|
|
||||||
#define JSON_ASSEMPLE_OBJECT_MAX_Z "max_z"
|
|
||||||
#define JSON_ASSEMPLE_OBJECT_HEIGHT_RANGES "height_ranges"
|
|
||||||
#define JSON_ASSEMPLE_OBJECT_RANGE_PARAMS "range_params"
|
|
||||||
|
|
||||||
typedef struct _height_range_info {
|
|
||||||
float min_z;
|
|
||||||
float max_z;
|
|
||||||
|
|
||||||
std::map<std::string, std::string> range_params;
|
|
||||||
}height_range_info_t;
|
|
||||||
|
|
||||||
typedef struct _assembled_param_info {
|
|
||||||
std::map<std::string, std::string> print_params;
|
|
||||||
std::vector<height_range_info_t> height_ranges;
|
|
||||||
}assembled_param_info_t;
|
|
||||||
|
|
||||||
typedef struct _assemble_object_info {
|
|
||||||
std::string path;
|
|
||||||
int count;
|
|
||||||
|
|
||||||
std::vector<int> filaments;
|
|
||||||
std::vector<int> assemble_index;
|
|
||||||
std::vector<float> pos_x;
|
|
||||||
std::vector<float> pos_y;
|
|
||||||
std::vector<float> pos_z;
|
|
||||||
std::map<std::string, std::string> print_params;
|
|
||||||
std::vector<height_range_info_t> height_ranges;
|
|
||||||
}assemble_object_info_t;
|
|
||||||
|
|
||||||
typedef struct _assemble_plate_info {
|
|
||||||
std::string plate_name;
|
|
||||||
bool need_arrange {false};
|
|
||||||
int filaments_count {0};
|
|
||||||
|
|
||||||
std::map<std::string, std::string> plate_params;
|
|
||||||
std::vector<assemble_object_info_t> assemble_obj_list;
|
|
||||||
std::vector<ModelObject *> loaded_obj_list;
|
|
||||||
std::map<int, assembled_param_info_t> assembled_param_list;
|
|
||||||
}assemble_plate_info_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _printer_plate_info {
|
typedef struct _printer_plate_info {
|
||||||
std::string printer_name;
|
std::string printer_name;
|
||||||
int printable_width{0};
|
int printable_width{0};
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
#include "AABBMesh.hpp"
|
#include "AABBMesh.hpp"
|
||||||
|
#include "Point.hpp"
|
||||||
|
#include <Eigen/Core>
|
||||||
#include <Execution/ExecutionTBB.hpp>
|
#include <Execution/ExecutionTBB.hpp>
|
||||||
|
|
||||||
|
#include <igl/Hit.h>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cassert>
|
||||||
|
#include <cmath>
|
||||||
|
#include <algorithm>
|
||||||
#include <libslic3r/AABBTreeIndirect.hpp>
|
#include <libslic3r/AABBTreeIndirect.hpp>
|
||||||
#include <libslic3r/TriangleMesh.hpp>
|
#include <libslic3r/TriangleMesh.hpp>
|
||||||
|
|
||||||
|
#include <limits>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#ifdef SLIC3R_HOLE_RAYCASTER
|
#ifdef SLIC3R_HOLE_RAYCASTER
|
||||||
#include <libslic3r/SLA/Hollowing.hpp>
|
#include <libslic3r/SLA/Hollowing.hpp>
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
#ifndef PRUSASLICER_AABBMESH_H
|
#ifndef PRUSASLICER_AABBMESH_H
|
||||||
#define PRUSASLICER_AABBMESH_H
|
#define PRUSASLICER_AABBMESH_H
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <limits>
|
||||||
|
#include <cmath>
|
||||||
|
#include <cassert>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|||||||
@@ -6,15 +6,20 @@
|
|||||||
#ifndef slic3r_AABBTreeIndirect_hpp_
|
#ifndef slic3r_AABBTreeIndirect_hpp_
|
||||||
#define slic3r_AABBTreeIndirect_hpp_
|
#define slic3r_AABBTreeIndirect_hpp_
|
||||||
|
|
||||||
|
#include <Eigen/Core>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cassert>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <Eigen/Geometry>
|
#include <Eigen/Geometry>
|
||||||
|
|
||||||
#include "BoundingBox.hpp"
|
#include "BoundingBox.hpp"
|
||||||
#include "Utils.hpp" // for next_highest_power_of_2()
|
#include "Utils.hpp" // for next_highest_power_of_2()
|
||||||
|
#include "libslic3r.h"
|
||||||
|
|
||||||
// Definition of the ray intersection hit structure.
|
// Definition of the ray intersection hit structure.
|
||||||
#include <igl/Hit.h>
|
#include <igl/Hit.h>
|
||||||
|
|||||||
@@ -6,9 +6,15 @@
|
|||||||
#include "libslic3r.h"
|
#include "libslic3r.h"
|
||||||
#include "libslic3r/AABBTreeIndirect.hpp"
|
#include "libslic3r/AABBTreeIndirect.hpp"
|
||||||
#include "libslic3r/Line.hpp"
|
#include "libslic3r/Line.hpp"
|
||||||
|
#include <Eigen/Core>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <tuple>
|
||||||
|
#include <limits>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
@@ -352,7 +358,7 @@ namespace AABBTreeLines {
|
|||||||
return dist;
|
return dist;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<size_t> all_lines_in_radius(const Vec<LineType::Dim, Scalar>& point, Floating radius)
|
std::vector<size_t> all_lines_in_radius(const Vec<LineType::Dim, Scalar>& point, Floating radius) const
|
||||||
{
|
{
|
||||||
return AABBTreeLines::all_lines_in_radius(this->lines, this->tree, point.template cast<Floating>(), radius * radius);
|
return AABBTreeLines::all_lines_in_radius(this->lines, this->tree, point.template cast<Floating>(), radius * radius);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef ASTAR_HPP
|
#ifndef ASTAR_HPP
|
||||||
#define ASTAR_HPP
|
#define ASTAR_HPP
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
#include <cmath> // std::isinf() is here
|
#include <cmath> // std::isinf() is here
|
||||||
|
#include <type_traits>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <limits>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "libslic3r/MutablePriorityQueue.hpp"
|
#include "libslic3r/MutablePriorityQueue.hpp"
|
||||||
|
|||||||
@@ -1,8 +1,20 @@
|
|||||||
#include "LineSplit.hpp"
|
#include "LineSplit.hpp"
|
||||||
|
|
||||||
#include "AABBTreeLines.hpp"
|
#include "AABBTreeLines.hpp"
|
||||||
|
#include "libslic3r/ClipperUtils.hpp"
|
||||||
|
#include "libslic3r/ClipperZUtils.hpp"
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
|
#include "libslic3r/Line.hpp"
|
||||||
|
#include "libslic3r/ExPolygon.hpp"
|
||||||
#include "SVG.hpp"
|
#include "SVG.hpp"
|
||||||
#include "Utils.hpp"
|
#include "Utils.hpp"
|
||||||
|
#include <limits>
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cassert>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
//#define DEBUG_SPLIT_LINE
|
//#define DEBUG_SPLIT_LINE
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,12 @@
|
|||||||
#define SRC_LIBSLIC3R_ALGORITHM_LINE_SPLIT_HPP_
|
#define SRC_LIBSLIC3R_ALGORITHM_LINE_SPLIT_HPP_
|
||||||
|
|
||||||
#include "ClipperZUtils.hpp"
|
#include "ClipperZUtils.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <vector>
|
||||||
|
#include "libslic3r/ExPolygon.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace Algorithm {
|
namespace Algorithm {
|
||||||
|
|||||||
@@ -1,11 +1,25 @@
|
|||||||
#include "RegionExpansion.hpp"
|
#include "RegionExpansion.hpp"
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
|
#include "libslic3r/ExPolygon.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
#include "libslic3r/Polyline.hpp"
|
||||||
|
#include "libslic3r/Polygon.hpp"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cmath>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cassert>
|
||||||
|
#include <iterator>
|
||||||
|
#include <cstdint>
|
||||||
#include <libslic3r/AABBTreeIndirect.hpp>
|
#include <libslic3r/AABBTreeIndirect.hpp>
|
||||||
#include <libslic3r/ClipperZUtils.hpp>
|
#include <libslic3r/ClipperZUtils.hpp>
|
||||||
#include <libslic3r/ClipperUtils.hpp>
|
#include <libslic3r/ClipperUtils.hpp>
|
||||||
#include <libslic3r/Utils.hpp>
|
#include <libslic3r/Utils.hpp>
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace Algorithm {
|
namespace Algorithm {
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
#ifndef SRC_LIBSLIC3R_ALGORITHM_REGION_EXPANSION_HPP_
|
#ifndef SRC_LIBSLIC3R_ALGORITHM_REGION_EXPANSION_HPP_
|
||||||
#define SRC_LIBSLIC3R_ALGORITHM_REGION_EXPANSION_HPP_
|
#define SRC_LIBSLIC3R_ALGORITHM_REGION_EXPANSION_HPP_
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <libslic3r/Point.hpp>
|
#include <libslic3r/Point.hpp>
|
||||||
#include <libslic3r/Polygon.hpp>
|
#include <libslic3r/Polygon.hpp>
|
||||||
#include <libslic3r/ExPolygon.hpp>
|
#include <libslic3r/ExPolygon.hpp>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace Algorithm {
|
namespace Algorithm {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#ifndef ANYPTR_HPP
|
#ifndef ANYPTR_HPP
|
||||||
#define ANYPTR_HPP
|
#define ANYPTR_HPP
|
||||||
|
|
||||||
|
#include <boost/variant/variant.hpp>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <boost/variant.hpp>
|
#include <boost/variant.hpp>
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
#include "Technologies.hpp"
|
||||||
|
#include "Config.hpp"
|
||||||
|
#include "PrintConfig.hpp"
|
||||||
|
#include "calib.hpp"
|
||||||
|
#include "Semver.hpp"
|
||||||
#include "libslic3r/libslic3r.h"
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "libslic3r/Format/DRC.hpp"
|
#include "libslic3r/Format/DRC.hpp"
|
||||||
@@ -9,9 +14,18 @@
|
|||||||
#include "LocalesUtils.hpp"
|
#include "LocalesUtils.hpp"
|
||||||
#include "Thread.hpp"
|
#include "Thread.hpp"
|
||||||
#include "format.hpp"
|
#include "format.hpp"
|
||||||
|
#include "libslic3r_version.h"
|
||||||
#include "nlohmann/json.hpp"
|
#include "nlohmann/json.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <string>
|
||||||
|
#include <exception>
|
||||||
|
#include <boost/none.hpp>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <system_error>
|
||||||
|
#include <chrono>
|
||||||
|
#include <map>
|
||||||
|
#include <cstring>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|||||||
@@ -5,8 +5,11 @@
|
|||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include "LocalesUtils.hpp"
|
||||||
#include "nlohmann/json.hpp"
|
#include "nlohmann/json.hpp"
|
||||||
#include <boost/algorithm/string/trim_all.hpp>
|
#include <boost/algorithm/string/trim_all.hpp>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "libslic3r/Config.hpp"
|
#include "libslic3r/Config.hpp"
|
||||||
#include "libslic3r/Semver.hpp"
|
#include "libslic3r/Semver.hpp"
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
//CuraEngine is released under the terms of the AGPLv3 or higher.
|
//CuraEngine is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
#include "BeadingStrategy.hpp"
|
#include "BeadingStrategy.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Point.hpp"
|
#include "libslic3r/Point.hpp"
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace Slic3r::Arachne
|
namespace Slic3r::Arachne
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include "DistributedBeadingStrategy.hpp"
|
#include "DistributedBeadingStrategy.hpp"
|
||||||
#include "RedistributeBeadingStrategy.hpp"
|
#include "RedistributeBeadingStrategy.hpp"
|
||||||
#include "OuterWallInsetBeadingStrategy.hpp"
|
#include "OuterWallInsetBeadingStrategy.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp"
|
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp"
|
||||||
|
|
||||||
namespace Slic3r::Arachne {
|
namespace Slic3r::Arachne {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include "DistributedBeadingStrategy.hpp"
|
#include "DistributedBeadingStrategy.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp"
|
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp"
|
||||||
|
|
||||||
namespace Slic3r::Arachne
|
namespace Slic3r::Arachne
|
||||||
|
|||||||
@@ -3,10 +3,12 @@
|
|||||||
|
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
#include "LimitedBeadingStrategy.hpp"
|
#include "LimitedBeadingStrategy.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Point.hpp"
|
#include "libslic3r/Point.hpp"
|
||||||
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp"
|
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp"
|
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp"
|
||||||
|
|
||||||
namespace Slic3r::Arachne
|
namespace Slic3r::Arachne
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp"
|
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp"
|
||||||
|
|
||||||
namespace Slic3r::Arachne
|
namespace Slic3r::Arachne
|
||||||
|
|||||||
@@ -4,8 +4,11 @@
|
|||||||
#include "WideningBeadingStrategy.hpp"
|
#include "WideningBeadingStrategy.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp"
|
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp"
|
||||||
|
|
||||||
namespace Slic3r::Arachne
|
namespace Slic3r::Arachne
|
||||||
|
|||||||
@@ -10,10 +10,18 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include <math.h>
|
||||||
|
#include <list>
|
||||||
|
#include <memory>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
#include "libslic3r/Polygon.hpp"
|
||||||
|
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp"
|
||||||
#include "libslic3r/Geometry/VoronoiUtils.hpp"
|
#include "libslic3r/Geometry/VoronoiUtils.hpp"
|
||||||
#include "ankerl/unordered_dense.h"
|
#include "ankerl/unordered_dense.h"
|
||||||
#include "libslic3r/Arachne/SkeletalTrapezoidationEdge.hpp"
|
#include "libslic3r/Arachne/SkeletalTrapezoidationEdge.hpp"
|
||||||
|
|||||||
@@ -4,10 +4,12 @@
|
|||||||
#ifndef SKELETAL_TRAPEZOIDATION_EDGE_H
|
#ifndef SKELETAL_TRAPEZOIDATION_EDGE_H
|
||||||
#define SKELETAL_TRAPEZOIDATION_EDGE_H
|
#define SKELETAL_TRAPEZOIDATION_EDGE_H
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
#include <memory> // smart pointers
|
#include <memory> // smart pointers
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "utils/ExtrusionJunction.hpp"
|
#include "utils/ExtrusionJunction.hpp"
|
||||||
|
|
||||||
namespace Slic3r::Arachne
|
namespace Slic3r::Arachne
|
||||||
|
|||||||
@@ -6,11 +6,17 @@
|
|||||||
#include <ankerl/unordered_dense.h>
|
#include <ankerl/unordered_dense.h>
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cstdint>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
#include <optional>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "../Line.hpp"
|
#include "../Line.hpp"
|
||||||
|
#include "libslic3r/Arachne/utils/HalfEdge.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
#include "libslic3r/Arachne/utils/HalfEdgeNode.hpp"
|
||||||
#include "libslic3r/Arachne/SkeletalTrapezoidationEdge.hpp"
|
#include "libslic3r/Arachne/SkeletalTrapezoidationEdge.hpp"
|
||||||
#include "libslic3r/Arachne/SkeletalTrapezoidationJoint.hpp"
|
#include "libslic3r/Arachne/SkeletalTrapezoidationJoint.hpp"
|
||||||
#include "libslic3r/Point.hpp"
|
#include "libslic3r/Point.hpp"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include <memory> // smart pointers
|
#include <memory> // smart pointers
|
||||||
|
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp"
|
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp"
|
||||||
|
|
||||||
namespace Slic3r::Arachne
|
namespace Slic3r::Arachne
|
||||||
|
|||||||
@@ -2,12 +2,31 @@
|
|||||||
// CuraEngine is released under the terms of the AGPLv3 or higher.
|
// CuraEngine is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
#include <algorithm> //For std::partition_copy and std::min_element.
|
#include <algorithm> //For std::partition_copy and std::min_element.
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <memory>
|
||||||
|
#include <cassert>
|
||||||
|
#include <cmath>
|
||||||
|
#include <math.h>
|
||||||
|
#include <limits>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
#include "WallToolPaths.hpp"
|
#include "WallToolPaths.hpp"
|
||||||
|
|
||||||
|
#include "libslic3r/PrintConfig.hpp"
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
|
#include "libslic3r/Polygon.hpp"
|
||||||
|
#include "libslic3r/Arachne/utils/ExtrusionLine.hpp"
|
||||||
|
#include "libslic3r/Line.hpp"
|
||||||
|
#include "libslic3r/Arachne/utils/PolygonsPointIndex.hpp"
|
||||||
|
#include "libslic3r/Flow.hpp"
|
||||||
|
#include "libslic3r/Arachne/BeadingStrategy/BeadingStrategyFactory.hpp"
|
||||||
|
#include "libslic3r/Arachne/utils/ExtrusionJunction.hpp"
|
||||||
|
#include "libslic3r/Arachne/utils/SparsePointGrid.hpp"
|
||||||
|
#include "libslic3r/Arachne/utils/SquareGrid.hpp"
|
||||||
#include "SkeletalTrapezoidation.hpp"
|
#include "SkeletalTrapezoidation.hpp"
|
||||||
#include "../ClipperUtils.hpp"
|
#include "../ClipperUtils.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "utils/linearAlg2D.hpp"
|
#include "utils/linearAlg2D.hpp"
|
||||||
#include "EdgeGrid.hpp"
|
#include "EdgeGrid.hpp"
|
||||||
#include "utils/SparseLineGrid.hpp"
|
#include "utils/SparseLineGrid.hpp"
|
||||||
@@ -17,6 +36,8 @@
|
|||||||
#include "Utils.hpp"
|
#include "Utils.hpp"
|
||||||
|
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
//#define ARACHNE_STITCH_PATCH_DEBUG
|
//#define ARACHNE_STITCH_PATCH_DEBUG
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,16 @@
|
|||||||
#ifndef CURAENGINE_WALLTOOLPATHS_H
|
#ifndef CURAENGINE_WALLTOOLPATHS_H
|
||||||
#define CURAENGINE_WALLTOOLPATHS_H
|
#define CURAENGINE_WALLTOOLPATHS_H
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <boost/container_hash/hash.hpp>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <ankerl/unordered_dense.h>
|
#include <ankerl/unordered_dense.h>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "BeadingStrategy/BeadingStrategyFactory.hpp"
|
#include "BeadingStrategy/BeadingStrategyFactory.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
#include "utils/ExtrusionLine.hpp"
|
#include "utils/ExtrusionLine.hpp"
|
||||||
#include "../Polygon.hpp"
|
#include "../Polygon.hpp"
|
||||||
#include "../PrintConfig.hpp"
|
#include "../PrintConfig.hpp"
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
#define UTILS_EXTRUSION_JUNCTION_H
|
#define UTILS_EXTRUSION_JUNCTION_H
|
||||||
|
|
||||||
#include "../../Point.hpp"
|
#include "../../Point.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
#include <cstddef>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace Slic3r::Arachne
|
namespace Slic3r::Arachne
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,11 +2,17 @@
|
|||||||
//CuraEngine is released under the terms of the AGPLv3 or higher.
|
//CuraEngine is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstdint>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "ExtrusionLine.hpp"
|
#include "ExtrusionLine.hpp"
|
||||||
#include "../../VariableWidth.hpp"
|
#include "../../VariableWidth.hpp"
|
||||||
|
#include "libslic3r/ClipperZUtils.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
#include "libslic3r/Arachne/utils/ExtrusionJunction.hpp"
|
#include "libslic3r/Arachne/utils/ExtrusionJunction.hpp"
|
||||||
#include "libslic3r/BoundingBox.hpp"
|
#include "libslic3r/BoundingBox.hpp"
|
||||||
#include "libslic3r/ExtrusionEntity.hpp"
|
#include "libslic3r/ExtrusionEntity.hpp"
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#include "../../BoundingBox.hpp"
|
#include "../../BoundingBox.hpp"
|
||||||
#include "../../ExtrusionEntity.hpp"
|
#include "../../ExtrusionEntity.hpp"
|
||||||
#include "../../Flow.hpp"
|
#include "../../Flow.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Point.hpp"
|
#include "libslic3r/Point.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
#ifndef UTILS_POLYGONS_POINT_INDEX_H
|
#ifndef UTILS_POLYGONS_POINT_INDEX_H
|
||||||
#define UTILS_POLYGONS_POINT_INDEX_H
|
#define UTILS_POLYGONS_POINT_INDEX_H
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
#include <functional>
|
||||||
|
#include <cstddef>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "../../Point.hpp"
|
#include "../../Point.hpp"
|
||||||
|
|||||||
@@ -6,7 +6,10 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "libslic3r/Polygon.hpp"
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
#include "PolygonsPointIndex.hpp"
|
#include "PolygonsPointIndex.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
|
||||||
namespace Slic3r::Arachne
|
namespace Slic3r::Arachne
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "PolylineStitcher.hpp"
|
#include "PolylineStitcher.hpp"
|
||||||
|
|
||||||
#include "ExtrusionLine.hpp"
|
#include "ExtrusionLine.hpp"
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
#include "libslic3r/Arachne/utils/PolygonsPointIndex.hpp"
|
#include "libslic3r/Arachne/utils/PolygonsPointIndex.hpp"
|
||||||
#include "libslic3r/Polygon.hpp"
|
#include "libslic3r/Polygon.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,14 @@
|
|||||||
#define UTILS_SPARSE_GRID_H
|
#define UTILS_SPARSE_GRID_H
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <unordered_map>
|
||||||
|
#include <cstddef>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
#include "../../Point.hpp"
|
#include "../../Point.hpp"
|
||||||
#include "SquareGrid.hpp"
|
#include "SquareGrid.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
|
||||||
namespace Slic3r::Arachne {
|
namespace Slic3r::Arachne {
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,15 @@
|
|||||||
#define UTILS_SPARSE_LINE_GRID_H
|
#define UTILS_SPARSE_LINE_GRID_H
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <utility>
|
||||||
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
#include "SparseGrid.hpp"
|
#include "SparseGrid.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
|
||||||
namespace Slic3r::Arachne {
|
namespace Slic3r::Arachne {
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,13 @@
|
|||||||
#define UTILS_SPARSE_POINT_GRID_H
|
#define UTILS_SPARSE_POINT_GRID_H
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
#include "SparseGrid.hpp"
|
#include "SparseGrid.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
|
||||||
namespace Slic3r::Arachne {
|
namespace Slic3r::Arachne {
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,11 @@
|
|||||||
#include "SquareGrid.hpp"
|
#include "SquareGrid.hpp"
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <utility>
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Point.hpp"
|
#include "libslic3r/Point.hpp"
|
||||||
|
|
||||||
using namespace Slic3r::Arachne;
|
using namespace Slic3r::Arachne;
|
||||||
|
|||||||
@@ -5,6 +5,9 @@
|
|||||||
#define UTILS_LINEAR_ALG_2D_H
|
#define UTILS_LINEAR_ALG_2D_H
|
||||||
|
|
||||||
#include "../../Point.hpp"
|
#include "../../Point.hpp"
|
||||||
|
#include <cstdint>
|
||||||
|
#include <math.h>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
namespace Slic3r::Arachne::LinearAlg2D
|
namespace Slic3r::Arachne::LinearAlg2D
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
#include "ArcFitter.hpp"
|
#include "ArcFitter.hpp"
|
||||||
|
#include "Point.hpp"
|
||||||
|
#include "Circle.hpp"
|
||||||
|
#include "MultiPoint.hpp"
|
||||||
#include "Polyline.hpp"
|
#include "Polyline.hpp"
|
||||||
|
#include "libslic3r.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <vector>
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
#define slic3r_ArcFitter_hpp_
|
#define slic3r_ArcFitter_hpp_
|
||||||
|
|
||||||
#include "Circle.hpp"
|
#include "Circle.hpp"
|
||||||
|
#include <cstddef>
|
||||||
|
#include "Point.hpp"
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,28 @@
|
|||||||
#include "Arrange.hpp"
|
#include "Arrange.hpp"
|
||||||
|
#include "ExPolygon.hpp"
|
||||||
|
#include "Point.hpp"
|
||||||
#include "Print.hpp"
|
#include "Print.hpp"
|
||||||
#include "BoundingBox.hpp"
|
#include "BoundingBox.hpp"
|
||||||
|
#include "PrintConfig.hpp"
|
||||||
#include "libslic3r.h"
|
#include "libslic3r.h"
|
||||||
|
|
||||||
|
#include <Eigen/Core>
|
||||||
|
#include <boost/geometry/index/parameters.hpp>
|
||||||
|
#include <functional>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cmath>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <boost/geometry/algorithms/convert.hpp>
|
||||||
|
#include <array>
|
||||||
|
#include <boost/geometry/index/predicates.hpp>
|
||||||
|
#include <iterator>
|
||||||
|
#include <exception>
|
||||||
#include <libnest2d/backends/libslic3r/geometries.hpp>
|
#include <libnest2d/backends/libslic3r/geometries.hpp>
|
||||||
|
#include "libnest2d/common.hpp"
|
||||||
|
#include "libnest2d/geometry_traits_nfp.hpp"
|
||||||
|
#include "libnest2d/nester.hpp"
|
||||||
|
#include "libnest2d/geometry_traits.hpp"
|
||||||
#include <libnest2d/optimizers/nlopt/subplex.hpp>
|
#include <libnest2d/optimizers/nlopt/subplex.hpp>
|
||||||
#include <libnest2d/placers/nfpplacer.hpp>
|
#include <libnest2d/placers/nfpplacer.hpp>
|
||||||
#include <libnest2d/selections/firstfit.hpp>
|
#include <libnest2d/selections/firstfit.hpp>
|
||||||
@@ -13,6 +32,11 @@
|
|||||||
#include <ClipperUtils.hpp>
|
#include <ClipperUtils.hpp>
|
||||||
|
|
||||||
#include <boost/geometry/index/rtree.hpp>
|
#include <boost/geometry/index/rtree.hpp>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
#include <tuple>
|
||||||
|
#include <set>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(__clang__)
|
#if defined(_MSC_VER) && defined(__clang__)
|
||||||
#define BOOST_NO_CXX17_HDR_STRING_VIEW
|
#define BOOST_NO_CXX17_HDR_STRING_VIEW
|
||||||
|
|||||||
@@ -2,8 +2,17 @@
|
|||||||
#define ARRANGE_HPP
|
#define ARRANGE_HPP
|
||||||
|
|
||||||
#include "ExPolygon.hpp"
|
#include "ExPolygon.hpp"
|
||||||
|
#include "Point.hpp"
|
||||||
|
#include "Polygon.hpp"
|
||||||
#include "PrintConfig.hpp"
|
#include "PrintConfig.hpp"
|
||||||
#include "Print.hpp"
|
#include "Print.hpp"
|
||||||
|
#include <cmath>
|
||||||
|
#include "libslic3r.h"
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
#include <functional>
|
||||||
|
#include <iostream>
|
||||||
|
#include <ostream>
|
||||||
|
|
||||||
#define BED_SHRINK_SEQ_PRINT 5
|
#define BED_SHRINK_SEQ_PRINT 5
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
#include "BoundingBox.hpp"
|
#include "BoundingBox.hpp"
|
||||||
|
#include "Point.hpp"
|
||||||
#include "Polygon.hpp"
|
#include "Polygon.hpp"
|
||||||
|
#include "libslic3r.h"
|
||||||
|
#include <Eigen/Core>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,10 @@
|
|||||||
#include "Exception.hpp"
|
#include "Exception.hpp"
|
||||||
#include "Point.hpp"
|
#include "Point.hpp"
|
||||||
#include "Polygon.hpp"
|
#include "Polygon.hpp"
|
||||||
|
#include <cassert>
|
||||||
|
#include <cstddef>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,18 @@
|
|||||||
#include "BridgeDetector.hpp"
|
#include "BridgeDetector.hpp"
|
||||||
|
#include "BoundingBox.hpp"
|
||||||
#include "ClipperUtils.hpp"
|
#include "ClipperUtils.hpp"
|
||||||
|
#include "ExPolygon.hpp"
|
||||||
#include "Geometry.hpp"
|
#include "Geometry.hpp"
|
||||||
|
#include "libslic3r.h"
|
||||||
|
#include "Polygon.hpp"
|
||||||
|
#include "Line.hpp"
|
||||||
|
#include "Polyline.hpp"
|
||||||
|
#include "Point.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,14 @@
|
|||||||
#include "PrincipalComponents2D.hpp"
|
#include "PrincipalComponents2D.hpp"
|
||||||
#include "libslic3r.h"
|
#include "libslic3r.h"
|
||||||
#include "ExPolygon.hpp"
|
#include "ExPolygon.hpp"
|
||||||
|
#include <cmath>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <limits>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <tuple>
|
||||||
|
#include <unordered_map>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,37 @@
|
|||||||
|
#include "BoundingBox.hpp"
|
||||||
|
#include "BrimEarsPoint.hpp"
|
||||||
#include "ClipperUtils.hpp"
|
#include "ClipperUtils.hpp"
|
||||||
#include "EdgeGrid.hpp"
|
#include "EdgeGrid.hpp"
|
||||||
|
#include "ExPolygon.hpp"
|
||||||
|
#include "Flow.hpp"
|
||||||
|
#include "Geometry.hpp"
|
||||||
|
#include "ExtrusionEntity.hpp"
|
||||||
#include "Layer.hpp"
|
#include "Layer.hpp"
|
||||||
|
#include "Point.hpp"
|
||||||
|
#include "ObjectID.hpp"
|
||||||
|
#include "Polygon.hpp"
|
||||||
|
#include "Line.hpp"
|
||||||
|
#include "MultiPoint.hpp"
|
||||||
|
#include "Polyline.hpp"
|
||||||
#include "Print.hpp"
|
#include "Print.hpp"
|
||||||
|
#include "PrintBase.hpp"
|
||||||
#include "ShortestPath.hpp"
|
#include "ShortestPath.hpp"
|
||||||
#include "libslic3r.h"
|
#include "libslic3r.h"
|
||||||
#include "PrintConfig.hpp"
|
#include "PrintConfig.hpp"
|
||||||
#include "MaterialType.hpp"
|
#include "MaterialType.hpp"
|
||||||
#include "Model.hpp"
|
#include "Model.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cmath>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include <map>
|
||||||
|
#include <string>
|
||||||
#include <tbb/parallel_for.h>
|
#include <tbb/parallel_for.h>
|
||||||
|
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
// #define BRIM_DEBUG_TO_SVG
|
// #define BRIM_DEBUG_TO_SVG
|
||||||
|
|||||||
@@ -4,8 +4,10 @@
|
|||||||
#include "ExPolygon.hpp"
|
#include "ExPolygon.hpp"
|
||||||
#include "ObjectID.hpp"
|
#include "ObjectID.hpp"
|
||||||
#include "Point.hpp"
|
#include "Point.hpp"
|
||||||
|
#include "Polygon.hpp"
|
||||||
|
|
||||||
#include<map>
|
#include<map>
|
||||||
|
#include <utility>
|
||||||
#include<vector>
|
#include<vector>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
#ifndef BRIMEARSPOINT_HPP
|
#ifndef BRIMEARSPOINT_HPP
|
||||||
#define BRIMEARSPOINT_HPP
|
#define BRIMEARSPOINT_HPP
|
||||||
|
|
||||||
|
#include <cstdlib>
|
||||||
|
#include "libslic3r.h"
|
||||||
#include <libslic3r/Point.hpp>
|
#include <libslic3r/Point.hpp>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|||||||
@@ -1,11 +1,24 @@
|
|||||||
#include "BuildVolume.hpp"
|
#include "BuildVolume.hpp"
|
||||||
|
#include "BoundingBox.hpp"
|
||||||
#include "ClipperUtils.hpp"
|
#include "ClipperUtils.hpp"
|
||||||
|
#include "Polygon.hpp"
|
||||||
|
#include "Geometry/Circle.hpp"
|
||||||
|
#include "ExtrusionEntity.hpp"
|
||||||
#include "TriangleMesh.hpp"
|
#include "TriangleMesh.hpp"
|
||||||
#include "Geometry/ConvexHull.hpp"
|
#include "Geometry/ConvexHull.hpp"
|
||||||
#include "GCode/GCodeProcessor.hpp"
|
#include "GCode/GCodeProcessor.hpp"
|
||||||
#include "Point.hpp"
|
#include "Point.hpp"
|
||||||
|
#include "libslic3r.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
|
#include <vector>
|
||||||
|
#include <cassert>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <limits>
|
||||||
|
#include <utility>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <string_view>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,13 @@
|
|||||||
#include "Geometry/Circle.hpp"
|
#include "Geometry/Circle.hpp"
|
||||||
#include "Polygon.hpp"
|
#include "Polygon.hpp"
|
||||||
#include "BoundingBox.hpp"
|
#include "BoundingBox.hpp"
|
||||||
|
#include "libslic3r.h"
|
||||||
#include <admesh/stl.h>
|
#include <admesh/stl.h>
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
#include "libslic3r/CAD/CadDocument.hpp"
|
#include "libslic3r/CAD/CadDocument.hpp"
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
|
#include "libslic3r/CAD/SketchEngine.hpp"
|
||||||
|
#include "libslic3r/CAD/GeometryEngine.hpp"
|
||||||
#include "libslic3r/CAD/SketchConstraints.hpp"
|
#include "libslic3r/CAD/SketchConstraints.hpp"
|
||||||
#include "libslic3r/CAD/SketchSolver.hpp"
|
#include "libslic3r/CAD/SketchSolver.hpp"
|
||||||
#include "libslic3r/CAD/SketchImport.hpp" // transform_regions for imported art
|
#include "libslic3r/CAD/SketchImport.hpp" // transform_regions for imported art
|
||||||
|
|
||||||
|
#include <Standard_Handle.hxx>
|
||||||
|
#include <TopAbs_ShapeEnum.hxx>
|
||||||
|
#include <Standard_TypeDef.hxx>
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include <Standard_Failure.hxx>
|
#include <Standard_Failure.hxx>
|
||||||
@@ -26,6 +32,10 @@
|
|||||||
#include <BRepOffsetAPI_DraftAngle.hxx>
|
#include <BRepOffsetAPI_DraftAngle.hxx>
|
||||||
#include <Bnd_Box.hxx>
|
#include <Bnd_Box.hxx>
|
||||||
#include <BRepBndLib.hxx>
|
#include <BRepBndLib.hxx>
|
||||||
|
#include <functional>
|
||||||
|
#include <exception>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cereal/cereal.hpp>
|
||||||
#include <gp_Pln.hxx>
|
#include <gp_Pln.hxx>
|
||||||
#include <TopTools_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <BRepPrimAPI_MakeCylinder.hxx>
|
#include <BRepPrimAPI_MakeCylinder.hxx>
|
||||||
@@ -69,12 +79,18 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#include <math.h>
|
||||||
|
#include <map>
|
||||||
|
#include <set>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include <cereal/archives/binary.hpp>
|
#include <cereal/archives/binary.hpp>
|
||||||
#include <BRepTools.hxx>
|
#include <BRepTools.hxx>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,20 @@
|
|||||||
#ifndef slic3r_CadDocument_hpp_
|
#ifndef slic3r_CadDocument_hpp_
|
||||||
#define slic3r_CadDocument_hpp_
|
#define slic3r_CadDocument_hpp_
|
||||||
|
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
#include "libslic3r/TriangleMesh.hpp"
|
#include "libslic3r/TriangleMesh.hpp"
|
||||||
#include "libslic3r/CAD/SketchEngine.hpp"
|
#include "libslic3r/CAD/SketchEngine.hpp"
|
||||||
#include "libslic3r/CAD/GeometryEngine.hpp" // FaceGroup
|
#include "libslic3r/CAD/GeometryEngine.hpp" // FaceGroup
|
||||||
#include "libslic3r/Color.hpp" // ColorRGBA (per-body display colour override)
|
#include "libslic3r/Color.hpp" // ColorRGBA (per-body display colour override)
|
||||||
|
|
||||||
|
#include <TopoDS_Face.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopoDS_Wire.hxx>
|
#include <TopoDS_Wire.hxx>
|
||||||
#include <cereal/cereal.hpp>
|
#include <cereal/cereal.hpp>
|
||||||
#include <cereal/types/vector.hpp>
|
#include <cereal/types/vector.hpp>
|
||||||
#include <cereal/types/string.hpp>
|
#include <cereal/types/string.hpp>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstddef>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <cereal/types/map.hpp>
|
#include <cereal/types/map.hpp>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|||||||
@@ -1,12 +1,25 @@
|
|||||||
#include "libslic3r/CAD/GeometryEngine.hpp"
|
#include "libslic3r/CAD/GeometryEngine.hpp"
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
|
#include "libslic3r/TriangleMesh.hpp"
|
||||||
|
|
||||||
#include <BRepMesh_IncrementalMesh.hxx>
|
#include <BRepMesh_IncrementalMesh.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <BRepAdaptor_Surface.hxx>
|
#include <BRepAdaptor_Surface.hxx>
|
||||||
#include <BRepLProp_SLProps.hxx>
|
#include <BRepLProp_SLProps.hxx>
|
||||||
|
#include <TopAbs_ShapeEnum.hxx>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <GeomAbs_SurfaceType.hxx>
|
||||||
|
#include <TopAbs_Orientation.hxx>
|
||||||
|
#include <Standard_Handle.hxx>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <Poly_Triangle.hxx>
|
||||||
|
#include <GeomAbs_CurveType.hxx>
|
||||||
#include <gp_Cylinder.hxx>
|
#include <gp_Cylinder.hxx>
|
||||||
#include <BRepFilletAPI_MakeFillet.hxx>
|
#include <BRepFilletAPI_MakeFillet.hxx>
|
||||||
#include <BRepFilletAPI_MakeChamfer.hxx>
|
#include <BRepFilletAPI_MakeChamfer.hxx>
|
||||||
|
#include <math.h>
|
||||||
|
#include <gp_Mat.hxx>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
@@ -43,6 +56,9 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#ifndef slic3r_GeometryEngine_hpp_
|
#ifndef slic3r_GeometryEngine_hpp_
|
||||||
#define slic3r_GeometryEngine_hpp_
|
#define slic3r_GeometryEngine_hpp_
|
||||||
|
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
#include "libslic3r/TriangleMesh.hpp"
|
#include "libslic3r/TriangleMesh.hpp"
|
||||||
|
|
||||||
#include <BRepPrimAPI_MakeBox.hxx>
|
#include <BRepPrimAPI_MakeBox.hxx>
|
||||||
@@ -8,6 +9,8 @@
|
|||||||
#include <BRepPrimAPI_MakeSphere.hxx>
|
#include <BRepPrimAPI_MakeSphere.hxx>
|
||||||
#include <BRepPrimAPI_MakeCone.hxx>
|
#include <BRepPrimAPI_MakeCone.hxx>
|
||||||
#include <BRepPrimAPI_MakeTorus.hxx>
|
#include <BRepPrimAPI_MakeTorus.hxx>
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
#include <array>
|
||||||
#include <gp_Ax2.hxx>
|
#include <gp_Ax2.hxx>
|
||||||
#include <TopoDS_Solid.hxx>
|
#include <TopoDS_Solid.hxx>
|
||||||
#include <TopoDS_Face.hxx>
|
#include <TopoDS_Face.hxx>
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
#include "libslic3r/CAD/SketchConstraints.hpp"
|
#include "libslic3r/CAD/SketchConstraints.hpp"
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
|
#include <Eigen/Core>
|
||||||
#include <Eigen/Dense>
|
#include <Eigen/Dense>
|
||||||
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#define slic3r_SketchConstraints_hpp_
|
#define slic3r_SketchConstraints_hpp_
|
||||||
|
|
||||||
#include "libslic3r/Point.hpp"
|
#include "libslic3r/Point.hpp"
|
||||||
|
#include <Eigen/Core>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <Eigen/Dense>
|
#include <Eigen/Dense>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,18 @@
|
|||||||
#include "libslic3r/CAD/SketchEngine.hpp"
|
#include "libslic3r/CAD/SketchEngine.hpp"
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
|
#include "libslic3r/TriangleMesh.hpp"
|
||||||
|
|
||||||
|
#include <Standard_Handle.hxx>
|
||||||
|
#include <GeomAbs_SurfaceType.hxx>
|
||||||
|
#include <GeomAbs_JoinType.hxx>
|
||||||
|
#include <TopAbs_ShapeEnum.hxx>
|
||||||
|
#include <Standard_TypeDef.hxx>
|
||||||
|
#include <TopAbs_Orientation.hxx>
|
||||||
|
#include <Poly_Triangle.hxx>
|
||||||
|
#include <TopAbs_State.hxx>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstddef>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
#include <BRepBuilderAPI_MakeWire.hxx>
|
#include <BRepBuilderAPI_MakeWire.hxx>
|
||||||
@@ -47,8 +58,11 @@
|
|||||||
#include <TopoDS_Wire.hxx>
|
#include <TopoDS_Wire.hxx>
|
||||||
#include <GeomAPI_IntCS.hxx>
|
#include <GeomAPI_IntCS.hxx>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <math.h>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
#include "libslic3r/CAD/SketchImport.hpp"
|
#include "libslic3r/CAD/SketchImport.hpp"
|
||||||
|
|
||||||
|
#include "libslic3r/Polygon.hpp"
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
|
#include "libslic3r/EmbossShape.hpp"
|
||||||
#include "libslic3r/Emboss.hpp"
|
#include "libslic3r/Emboss.hpp"
|
||||||
#include "libslic3r/NSVGUtils.hpp"
|
#include "libslic3r/NSVGUtils.hpp"
|
||||||
#include "libslic3r/ExPolygon.hpp"
|
#include "libslic3r/ExPolygon.hpp"
|
||||||
@@ -9,6 +12,11 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
#include <memory>
|
||||||
|
#include <utility>
|
||||||
|
#include <nanosvg/nanosvg.h>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
#include "libslic3r/CAD/SketchInference.hpp"
|
#include "libslic3r/CAD/SketchInference.hpp"
|
||||||
|
#include "libslic3r/CAD/SketchEngine.hpp"
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <vector>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <optional>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
#ifndef slic3r_SketchInference_hpp_
|
#ifndef slic3r_SketchInference_hpp_
|
||||||
#define slic3r_SketchInference_hpp_
|
#define slic3r_SketchInference_hpp_
|
||||||
|
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
#include "libslic3r/CAD/SketchEngine.hpp"
|
#include "libslic3r/CAD/SketchEngine.hpp"
|
||||||
|
#include <math.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#include "libslic3r/CAD/SketchSolver.hpp"
|
#include "libslic3r/CAD/SketchSolver.hpp"
|
||||||
|
#include "libslic3r/CAD/SketchEngine.hpp"
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
#include <slvs.h>
|
#include <slvs.h>
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
@@ -7,6 +9,8 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
#include "libslic3r/CAD/ThreadStandards.hpp"
|
#include "libslic3r/CAD/ThreadStandards.hpp"
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -202,6 +202,8 @@ set(lisbslic3r_sources
|
|||||||
Format/3mf.hpp
|
Format/3mf.hpp
|
||||||
Format/AMF.cpp
|
Format/AMF.cpp
|
||||||
Format/AMF.hpp
|
Format/AMF.hpp
|
||||||
|
Format/AssembleList.cpp
|
||||||
|
Format/AssembleList.hpp
|
||||||
Format/DRC.cpp
|
Format/DRC.cpp
|
||||||
Format/DRC.hpp
|
Format/DRC.hpp
|
||||||
Format/bbs_3mf.cpp
|
Format/bbs_3mf.cpp
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
#define CSGMESH_HPP
|
#define CSGMESH_HPP
|
||||||
|
|
||||||
#include <libslic3r/AnyPtr.hpp>
|
#include <libslic3r/AnyPtr.hpp>
|
||||||
|
#include <libslic3r/Point.hpp>
|
||||||
|
#include <libslic3r/TriangleMesh.hpp>
|
||||||
#include <admesh/stl.h>
|
#include <admesh/stl.h>
|
||||||
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace Slic3r { namespace csg {
|
namespace Slic3r { namespace csg {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef CSGMESHCOPY_HPP
|
#ifndef CSGMESHCOPY_HPP
|
||||||
#define CSGMESHCOPY_HPP
|
#define CSGMESHCOPY_HPP
|
||||||
|
|
||||||
|
#include "libslic3r/AnyPtr.hpp"
|
||||||
#include "CSGMesh.hpp"
|
#include "CSGMesh.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
#include <utility>
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
namespace Slic3r { namespace csg {
|
namespace Slic3r { namespace csg {
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,13 @@
|
|||||||
|
|
||||||
#include "CSGMesh.hpp"
|
#include "CSGMesh.hpp"
|
||||||
|
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
|
#include "libslic3r/TriangleMesh.hpp"
|
||||||
#include "libslic3r/Model.hpp"
|
#include "libslic3r/Model.hpp"
|
||||||
#include "libslic3r/SLA/Hollowing.hpp"
|
#include "libslic3r/SLA/Hollowing.hpp"
|
||||||
#include "libslic3r/MeshSplitImpl.hpp"
|
#include "libslic3r/MeshSplitImpl.hpp"
|
||||||
|
#include <utility>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace Slic3r { namespace csg {
|
namespace Slic3r { namespace csg {
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
#ifndef PERFORMCSGMESHBOOLEANS_HPP
|
#ifndef PERFORMCSGMESHBOOLEANS_HPP
|
||||||
#define PERFORMCSGMESHBOOLEANS_HPP
|
#define PERFORMCSGMESHBOOLEANS_HPP
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
#include <utility>
|
||||||
|
#include <tuple>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <boost/log/trivial.hpp>
|
||||||
|
|
||||||
#include "CSGMesh.hpp"
|
#include "CSGMesh.hpp"
|
||||||
|
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Execution/ExecutionTBB.hpp"
|
#include "libslic3r/Execution/ExecutionTBB.hpp"
|
||||||
//#include "libslic3r/Execution/ExecutionSeq.hpp"
|
//#include "libslic3r/Execution/ExecutionSeq.hpp"
|
||||||
#include "libslic3r/MeshBoolean.hpp"
|
#include "libslic3r/MeshBoolean.hpp"
|
||||||
|
|||||||
@@ -3,8 +3,16 @@
|
|||||||
|
|
||||||
#include "CSGMesh.hpp"
|
#include "CSGMesh.hpp"
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <functional>
|
||||||
|
#include <cassert>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
|
#include "libslic3r/ExPolygon.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
#include "libslic3r/Execution/Execution.hpp"
|
||||||
#include "libslic3r/TriangleMeshSlicer.hpp"
|
#include "libslic3r/TriangleMeshSlicer.hpp"
|
||||||
#include "libslic3r/ClipperUtils.hpp"
|
#include "libslic3r/ClipperUtils.hpp"
|
||||||
#include "libslic3r/Execution/ExecutionTBB.hpp"
|
#include "libslic3r/Execution/ExecutionTBB.hpp"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "CSGMesh.hpp"
|
#include "CSGMesh.hpp"
|
||||||
|
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
#include "libslic3r/TriangleMesh.hpp"
|
#include "libslic3r/TriangleMesh.hpp"
|
||||||
|
|
||||||
namespace Slic3r { namespace csg {
|
namespace Slic3r { namespace csg {
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
#ifndef slic3r_Channel_hpp_
|
#ifndef slic3r_Channel_hpp_
|
||||||
#define slic3r_Channel_hpp_
|
#define slic3r_Channel_hpp_
|
||||||
|
|
||||||
|
#include <boost/optional/optional.hpp>
|
||||||
|
#include <boost/none.hpp>
|
||||||
|
#include <cstddef>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
|
|||||||
@@ -2,8 +2,14 @@
|
|||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <utility>
|
||||||
|
#include <math.h>
|
||||||
#include "Geometry.hpp"
|
#include "Geometry.hpp"
|
||||||
|
#include "Point.hpp"
|
||||||
|
#include "Line.hpp"
|
||||||
#include "Polygon.hpp"
|
#include "Polygon.hpp"
|
||||||
|
#include "libslic3r.h"
|
||||||
|
|
||||||
|
|
||||||
//BBS: Refer to ArcWelderLib for the arc fitting functions
|
//BBS: Refer to ArcWelderLib for the arc fitting functions
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include "Point.hpp"
|
#include "Point.hpp"
|
||||||
#include "Line.hpp"
|
#include "Line.hpp"
|
||||||
|
#include "libslic3r.h"
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,29 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cassert>
|
||||||
|
#include <cmath>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "ClipperUtils.hpp"
|
#include "ClipperUtils.hpp"
|
||||||
|
#include "BoundingBox.hpp"
|
||||||
|
#include "ExPolygon.hpp"
|
||||||
#include "Geometry.hpp"
|
#include "Geometry.hpp"
|
||||||
|
#include "Point.hpp"
|
||||||
|
#include "Polygon.hpp"
|
||||||
|
#include "Polyline.hpp"
|
||||||
|
#include "Line.hpp"
|
||||||
#include "ShortestPath.hpp"
|
#include "ShortestPath.hpp"
|
||||||
|
#include "libslic3r.h"
|
||||||
|
#include "Surface.hpp"
|
||||||
|
|
||||||
#include <clipper2/clipper.h>
|
#include <clipper2/clipper.h>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
// #define CLIPPER_UTILS_DEBUG
|
// #define CLIPPER_UTILS_DEBUG
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
#ifndef slic3r_ClipperUtils_hpp_
|
#ifndef slic3r_ClipperUtils_hpp_
|
||||||
#define slic3r_ClipperUtils_hpp_
|
#define slic3r_ClipperUtils_hpp_
|
||||||
|
|
||||||
|
#include "Point.hpp"
|
||||||
|
#include "Polyline.hpp"
|
||||||
|
#include "Line.hpp"
|
||||||
#include "libslic3r.h"
|
#include "libslic3r.h"
|
||||||
#include "ExPolygon.hpp"
|
#include "ExPolygon.hpp"
|
||||||
#include "Polygon.hpp"
|
#include "Polygon.hpp"
|
||||||
#include "Surface.hpp"
|
#include "Surface.hpp"
|
||||||
|
#include <cstddef>
|
||||||
|
#include <iterator>
|
||||||
|
#include <cassert>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#include "ClipperZUtils.hpp"
|
#include "ClipperZUtils.hpp"
|
||||||
|
#include "ClipperUtils.hpp"
|
||||||
|
|
||||||
#include <clipper2/clipper2_z.hpp>
|
#include <clipper2/clipper2_z.hpp>
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace ClipperZUtils {
|
namespace ClipperZUtils {
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
#ifndef slic3r_ClipperZUtils_hpp_
|
#ifndef slic3r_ClipperZUtils_hpp_
|
||||||
#define slic3r_ClipperZUtils_hpp_
|
#define slic3r_ClipperZUtils_hpp_
|
||||||
|
|
||||||
|
#include "libslic3r.h"
|
||||||
|
#include <cstddef>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cassert>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <libslic3r/ClipperUtils.hpp>
|
#include <libslic3r/ClipperUtils.hpp>
|
||||||
|
|||||||
@@ -1,7 +1,15 @@
|
|||||||
#include "libslic3r.h"
|
#include "libslic3r.h"
|
||||||
#include "Color.hpp"
|
#include "Color.hpp"
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cassert>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cmath>
|
||||||
|
#include <cstdio>
|
||||||
#include <random>
|
#include <random>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
static const float INV_255 = 1.0f / 255.0f;
|
static const float INV_255 = 1.0f / 255.0f;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,9 @@
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace {
|
namespace {
|
||||||
|
|||||||
+22
-13
@@ -1,4 +1,6 @@
|
|||||||
#include "Config.hpp"
|
#include "Config.hpp"
|
||||||
|
#include "Exception.hpp"
|
||||||
|
#include "Point.hpp"
|
||||||
#include "format.hpp"
|
#include "format.hpp"
|
||||||
#include "Utils.hpp"
|
#include "Utils.hpp"
|
||||||
#include "LocalesUtils.hpp"
|
#include "LocalesUtils.hpp"
|
||||||
@@ -6,7 +8,20 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <cmath>
|
||||||
|
#include <boost/algorithm/string/join.hpp>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <exception>
|
||||||
|
#include <cctype>
|
||||||
|
#include <boost/algorithm/string/trim.hpp>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <functional>
|
||||||
|
#include <set>
|
||||||
|
#include <initializer_list>
|
||||||
|
#include <map>
|
||||||
|
#include <list>
|
||||||
|
#include <optional>
|
||||||
|
#include <memory>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
@@ -26,8 +41,15 @@
|
|||||||
#include <boost/nowide/fstream.hpp>
|
#include <boost/nowide/fstream.hpp>
|
||||||
#include <boost/property_tree/ini_parser.hpp>
|
#include <boost/property_tree/ini_parser.hpp>
|
||||||
#include <boost/format.hpp>
|
#include <boost/format.hpp>
|
||||||
|
#include <stdexcept>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <system_error>
|
||||||
//BBS: add json support
|
//BBS: add json support
|
||||||
|
#include "libslic3r.h"
|
||||||
|
#include "libslic3r_version.h"
|
||||||
#include "nlohmann/json.hpp"
|
#include "nlohmann/json.hpp"
|
||||||
|
|
||||||
using namespace nlohmann;
|
using namespace nlohmann;
|
||||||
@@ -849,19 +871,6 @@ ConfigSubstitutions ConfigBase::load_from_json(const std::string &file, ForwardC
|
|||||||
return std::move(substitutions_ctxt.substitutions);
|
return std::move(substitutions_ctxt.substitutions);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Case-insensitive compare of a JSON key against a fixed ASCII one, without
|
|
||||||
// boost::iequals, whose std::locale() takes a lock the whole process shares in the
|
|
||||||
// MSVC runtime.
|
|
||||||
static bool ascii_iequals(const std::string &key, const char *literal)
|
|
||||||
{
|
|
||||||
auto lower = [](char c) { return (c >= 'A' && c <= 'Z') ? char(c - 'A' + 'a') : c; };
|
|
||||||
size_t i = 0;
|
|
||||||
for (; i < key.size() && literal[i] != '\0'; ++ i)
|
|
||||||
if (lower(key[i]) != lower(literal[i]))
|
|
||||||
return false;
|
|
||||||
return i == key.size() && literal[i] == '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
int ConfigBase::load_from_json(const std::string &file, ConfigSubstitutionContext& substitution_context, bool load_inherits_to_config, std::map<std::string, std::string>& key_values, std::string& reason)
|
int ConfigBase::load_from_json(const std::string &file, ConfigSubstitutionContext& substitution_context, bool load_inherits_to_config, std::map<std::string, std::string>& key_values, std::string& reason)
|
||||||
{
|
{
|
||||||
json j;
|
json j;
|
||||||
|
|||||||
@@ -3,6 +3,11 @@
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <boost/container_hash/hash.hpp>
|
||||||
|
#include <cctype>
|
||||||
|
#include <initializer_list>
|
||||||
|
#include <limits>
|
||||||
|
#include <cmath>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <climits>
|
#include <climits>
|
||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
@@ -10,10 +15,15 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <memory>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
#include <sstream>
|
||||||
|
#include <set>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include "LocalesUtils.hpp"
|
||||||
#include "libslic3r.h"
|
#include "libslic3r.h"
|
||||||
#include "clonable_ptr.hpp"
|
#include "clonable_ptr.hpp"
|
||||||
#include "Exception.hpp"
|
#include "Exception.hpp"
|
||||||
|
|||||||
@@ -2,14 +2,18 @@
|
|||||||
#include "ExtrusionEntity.hpp"
|
#include "ExtrusionEntity.hpp"
|
||||||
#include "ExtrusionEntityCollection.hpp"
|
#include "ExtrusionEntityCollection.hpp"
|
||||||
#include "Layer.hpp"
|
#include "Layer.hpp"
|
||||||
|
#include "Line.hpp"
|
||||||
#include "Point.hpp"
|
#include "Point.hpp"
|
||||||
#include "Print.hpp"
|
#include "Print.hpp"
|
||||||
#include "SLA/IndexedMesh.hpp"
|
#include "SLA/IndexedMesh.hpp"
|
||||||
#include "libslic3r.h"
|
#include "libslic3r.h"
|
||||||
|
#include <Eigen/Core>
|
||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <initializer_list>
|
#include <initializer_list>
|
||||||
|
#include <math.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
#include "Config.hpp"
|
#include "Config.hpp"
|
||||||
#include "GCode.hpp"
|
#include "GCode.hpp"
|
||||||
#include "GCodeWriter.hpp"
|
#include "GCodeWriter.hpp"
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
#ifndef slic3r_CustomGCode_hpp_
|
#ifndef slic3r_CustomGCode_hpp_
|
||||||
#define slic3r_CustomGCode_hpp_
|
#define slic3r_CustomGCode_hpp_
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
#include <cstddef>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,38 @@
|
|||||||
#include "CutSurface.hpp"
|
#include "CutSurface.hpp"
|
||||||
|
#include "libslic3r/Emboss.hpp"
|
||||||
|
#include <vector>
|
||||||
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
|
#include <CGAL/Surface_mesh/Surface_mesh.h>
|
||||||
|
#include "libslic3r/Point.hpp"
|
||||||
|
#include "libslic3r/ExPolygon.hpp"
|
||||||
|
#include <cstdint>
|
||||||
|
#include <limits>
|
||||||
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
#include "libslic3r/BoundingBox.hpp"
|
||||||
|
#include <cstddef>
|
||||||
|
#include "libslic3r/Polygon.hpp"
|
||||||
|
#include <cassert>
|
||||||
|
#include <array>
|
||||||
|
#include <cmath>
|
||||||
|
#include <math.h>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <queue>
|
||||||
|
#include <CGAL/enum.h>
|
||||||
|
#include <CGAL/Kernel/global_functions_3.h>
|
||||||
|
#include <CGAL/Named_function_parameters.h>
|
||||||
|
#include "libslic3r/AABBTreeIndirect.hpp"
|
||||||
|
#include <cstdlib>
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
#include <boost/property_map/property_map.hpp>
|
||||||
|
#include <CGAL/Polygon_mesh_processing/self_intersections.h>
|
||||||
|
#include <CGAL/AABB_face_graph_triangle_primitive.h>
|
||||||
|
#include <CGAL/AABB_traits.h>
|
||||||
|
#include <CGAL/AABB_tree.h>
|
||||||
|
#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
|
||||||
|
#include <iterator>
|
||||||
|
#include <optional>
|
||||||
|
#include <CGAL/Surface_mesh/IO/OFF.h>
|
||||||
|
|
||||||
/// models_input.obj - Check transormation of model to each others
|
/// models_input.obj - Check transormation of model to each others
|
||||||
/// projection_center.obj - circle representing center of projection with correct distance
|
/// projection_center.obj - circle representing center of projection with correct distance
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#ifndef slic3r_CutSurface_hpp_
|
#ifndef slic3r_CutSurface_hpp_
|
||||||
#define slic3r_CutSurface_hpp_
|
#define slic3r_CutSurface_hpp_
|
||||||
|
|
||||||
|
#include "libslic3r/BoundingBox.hpp"
|
||||||
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <admesh/stl.h> // indexed_triangle_set
|
#include <admesh/stl.h> // indexed_triangle_set
|
||||||
#include "ExPolygon.hpp"
|
#include "ExPolygon.hpp"
|
||||||
|
|||||||
@@ -1,13 +1,24 @@
|
|||||||
|
|
||||||
#include "CutUtils.hpp"
|
#include "CutUtils.hpp"
|
||||||
#include "Geometry.hpp"
|
#include "Geometry.hpp"
|
||||||
|
#include "Point.hpp"
|
||||||
|
#include "TriangleMesh.hpp"
|
||||||
#include "libslic3r.h"
|
#include "libslic3r.h"
|
||||||
#include "Model.hpp"
|
#include "Model.hpp"
|
||||||
#include "TriangleMeshSlicer.hpp"
|
#include "TriangleMeshSlicer.hpp"
|
||||||
#include "TriangleSelector.hpp"
|
#include "TriangleSelector.hpp"
|
||||||
#include "ObjectID.hpp"
|
#include "ObjectID.hpp"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
|
#include <cassert>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <optional>
|
||||||
|
#include <math.h>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "Point.hpp"
|
#include "Point.hpp"
|
||||||
#include "Model.hpp"
|
#include "Model.hpp"
|
||||||
|
|
||||||
|
#include <optional>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|||||||
@@ -1,10 +1,21 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <utility>
|
||||||
|
#include <cmath>
|
||||||
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include <png.h>
|
#include <png.h>
|
||||||
|
|
||||||
|
#include "Polygon.hpp"
|
||||||
|
#include "Point.hpp"
|
||||||
|
#include "Polyline.hpp"
|
||||||
|
#include "ExPolygon.hpp"
|
||||||
|
#include "Line.hpp"
|
||||||
#include "libslic3r.h"
|
#include "libslic3r.h"
|
||||||
#include "ClipperUtils.hpp"
|
#include "ClipperUtils.hpp"
|
||||||
#include "EdgeGrid.hpp"
|
#include "EdgeGrid.hpp"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user