Compare commits

..
Author SHA1 Message Date
HanifKoh 6c044ae087 Merge branch 'main' into hanif/using-dead-cleanup 2026-10-07 02:38:02 +08:00
Hanif Koh 82ff014287 Remove Unused Usings and the Includes Kept Only for Them
151 using-directives, using-declarations, type aliases and namespace
aliases in source and test files that nothing refers to: the name is
never used, it duplicates a using already in scope, or the code sits
inside the namespace it names. Each one was removed on its own and the
file still compiled, both as it is and with every header-level using
taken away, so none of them was only redundant because a header leaks
the same name.

With the using gone, 28 #include lines and one forward declaration had
no other reference left in their file (boost/optional.hpp without any
optional, property_tree headers without any ptree) and go with it.

No header is touched.
2026-10-07 01:38:53 +08:00
159 changed files with 5789 additions and 11479 deletions
+4 -9
View File
@@ -1,15 +1,10 @@
# clang-tidy configuration, enforced by the clang-tidy CI job on the lines a pull
# request changes (scripts/clang_tidy_diff.py). Two things are reported.
# Missing includes: a file should include the header for every symbol it uses, not
# rely on the precompiled header or another header's includes. Run with --fix to
# add them.
# Using-directives and using-declarations in the global namespace of a header:
# they reach every file that includes the header, and a using-declaration also
# makes the header look like the one to include for that name. Qualify the name
# in the header, and put the using in the source files that want it.
# request changes (scripts/clang_tidy_diff.py). Only missing includes are reported
# for now: a file should include the header for every symbol it uses, not rely on
# the precompiled header or another header's includes. Run with --fix to add them.
# Every check listed here gates pull requests, so enable a new one only once the
# code it flags on touched lines is reasonable to fix in passing.
Checks: '-*,misc-include-cleaner,google-global-names-in-headers'
Checks: '-*,misc-include-cleaner'
WarningsAsErrors: '*'
CheckOptions:
# Missing includes only. Builds without the precompiled header break on these.
+1 -1
View File
@@ -303,7 +303,7 @@ jobs:
- name: Mint profiles-repo token
id: token
if: steps.vendors.outputs.vendors != ''
uses: actions/create-github-app-token@v3
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.PROFILES_APP_ID }}
private-key: ${{ secrets.PROFILES_APP_PRIVATE_KEY }}
+22 -22
View File
@@ -96,7 +96,7 @@ jobs:
issues: write
runs-on: ubuntu-latest
steps:
- name: Auto-label localization changes and remind contributors about the glossary
- name: Auto-label and remind about the localization glossary
uses: actions/github-script@v9
with:
script: |
@@ -106,37 +106,37 @@ jobs:
const pr = context.payload.pull_request;
// Mirrors the `localization/**` paths filter in check_locale.yml
// List changed files once (mirrors the `localization/**` paths filter in check_locale.yml)
const files = await github.paginate(github.rest.pulls.listFiles, {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
per_page: 100
});
if (!files.some((file) => file.filename.startsWith('localization/'))) {
core.info('No localization changes detected; skipping Localization label.');
return;
}
const touchesLocalization = files.some((file) => file.filename.startsWith('localization/'));
const onlyPoFiles = files.length > 0 && files.every((file) => file.filename.endsWith('.po'));
try {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: ['Localization']
});
core.info('Applied Localization label.');
} catch (error) {
if (isPermissionDenied(error)) {
core.warning('Cannot add Localization label because token cannot write.');
} else {
throw error;
// If the PR changes only .po files, automatically apply the Localization label
if (onlyPoFiles) {
try {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: ['Localization']
});
core.info('Applied Localization label (PR changes only .po files).');
} catch (error) {
if (isPermissionDenied(error)) {
core.warning('Cannot add Localization label because token cannot write.');
} else {
throw error;
}
}
}
// Collaborators know the glossary; only remind outside contributors
if (['COLLABORATOR', 'OWNER', 'MEMBER'].includes(pr.author_association)) {
core.info('Author is a collaborator; skipping glossary reminder.');
if (!touchesLocalization) {
core.info('No localization changes detected; skipping glossary reminder.');
return;
}
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
uses: actions/checkout@v7
- name: Setup Python
uses: actions/setup-python@v7
uses: actions/setup-python@v6
with:
python-version: '3.12'
+52 -92
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-10-06 15:16-0300\n"
"POT-Creation-Date: 2026-10-05 10:49-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -3168,7 +3168,7 @@ msgstr ""
msgid "Remove parameter"
msgstr ""
msgid "Range"
msgid "to"
msgstr ""
msgid "Add height range"
@@ -5064,6 +5064,9 @@ msgstr ""
msgid "layers"
msgstr ""
msgid "Range"
msgstr ""
msgid "Empty string"
msgstr ""
@@ -9461,6 +9464,14 @@ msgstr ""
msgid "Show incompatible/unsupported presets in the printer and filament dropdown lists. These presets cannot be selected."
msgstr ""
msgid "(Experimental) Use printer agents instead of print hosts"
msgstr ""
msgid ""
"Route print jobs for non-Bambu printers through printer plug-in agents instead of the classic print-host upload flow.\n"
"When disabled, OrcaSlicer uses the legacy print-host behavior."
msgstr ""
msgid "Experimental Features"
msgstr ""
@@ -9472,14 +9483,6 @@ msgid ""
"Highly experimental! Slow and may create artifact."
msgstr ""
msgid "Use printer agents instead of print hosts"
msgstr ""
msgid ""
"Route print jobs for non-Bambu printers through printer plug-in agents instead of the classic print-host upload flow.\n"
"When disabled, OrcaSlicer uses the legacy print-host behavior."
msgstr ""
msgid "Allow Abnormal Storage"
msgstr ""
@@ -9642,9 +9645,6 @@ msgstr ""
msgid "Please input layer value (>= 2)."
msgstr ""
msgid "to"
msgstr ""
msgid "Plate name"
msgstr ""
@@ -14779,12 +14779,6 @@ msgstr ""
msgid "If the model has two parts that are symmetric about the Y axis, and you want these parts to have symmetric textures, please click this option on one of the parts."
msgstr ""
msgid "Fill pattern tops"
msgstr ""
msgid "Choose this option if you want to completely fill in the tops of the infill pattern"
msgstr ""
msgid "Infill combination - Max layer height"
msgstr ""
@@ -20427,21 +20421,6 @@ msgstr ""
msgid "The filament model is unknown. A random filament preset will be used."
msgstr ""
msgid "Hide reference planes and axes"
msgstr ""
msgid "Show reference planes and axes"
msgstr ""
msgid "Hide the printer bed and its plate grid"
msgstr ""
msgid "Show the printer bed and its plate grid"
msgstr ""
msgid "Click a reference plane or a flat face to sketch on it — Esc cancels"
msgstr ""
msgid "Construction"
msgstr ""
@@ -20527,10 +20506,26 @@ msgstr ""
msgid "Bed hidden"
msgstr ""
msgid "Reference planes shown"
msgid "FEATURES"
msgstr ""
msgid "Reference planes hidden"
msgid "Sketch"
msgstr ""
#, possible-c-format, possible-boost-format
msgid "Sketch plane: %s — pick a tool"
msgstr ""
msgid "Click a face or a reference plane in the viewport, then a sketch tool"
msgstr ""
#, possible-c-format, possible-boost-format
msgid ""
"Sketch plane: %s.\n"
"Pick a tool, or press Menu for the list."
msgstr ""
msgid "Click a face or a reference plane, then a sketch tool."
msgstr ""
msgid "Add material (extrude / revolve / sweep / loft / thicken / rib)"
@@ -20798,6 +20793,12 @@ msgstr ""
msgid "Pick a cylindrical surface (bore / outer) or a circular edge for a thread"
msgstr ""
msgid "Import STEP (editable B-rep solid)"
msgstr ""
msgid "Import mesh (STL/OBJ) as an editable B-rep solid"
msgstr ""
msgid "Constrain selected sketch"
msgstr ""
@@ -21110,16 +21111,10 @@ msgstr ""
msgid "New Design — clear the feature tree"
msgstr ""
msgid "Import STEP (editable B-rep solid)"
msgstr ""
msgid "Import mesh (STL/OBJ) as an editable B-rep solid"
msgstr ""
msgid "Export STEP…"
msgstr ""
msgid "Create a new sketch"
msgid "Show the printer bed and its plate grid"
msgstr ""
msgid "Place on Face (F) — lay the picked face on the bed"
@@ -21152,9 +21147,6 @@ msgstr ""
msgid "Height / Y"
msgstr ""
msgid "Sketch"
msgstr ""
msgid "Distance X"
msgstr ""
@@ -21633,9 +21625,6 @@ msgstr ""
msgid "Value"
msgstr ""
msgid "Pick a tool, or press Menu for the list."
msgstr ""
msgid "Constraints"
msgstr ""
@@ -21665,9 +21654,6 @@ msgstr ""
msgid "Show / hide"
msgstr ""
msgid "Zoom to selection"
msgstr ""
msgid "Check interference — find overlapping bodies"
msgstr ""
@@ -21725,9 +21711,6 @@ msgstr ""
msgid "Sketch selected — right-click to Extrude, or double-click to edit"
msgstr ""
msgid "That face is not flat — click a flat face or a reference plane"
msgstr ""
#, possible-c-format, possible-boost-format
msgid "Body %d: vertex selected — click again for the whole body"
msgstr ""
@@ -21770,6 +21753,10 @@ msgstr ""
msgid "Edge %d selected — Shift+click to add edges, or click again for the whole body"
msgstr ""
#, possible-c-format, possible-boost-format
msgid "%s plane selected — right-click for the drawing tools"
msgstr ""
#, possible-c-format, possible-boost-format
msgid "%s plane selected — right-click to sketch on it, or click an object to select it"
msgstr ""
@@ -21824,7 +21811,7 @@ msgstr ""
msgid "Text unchanged"
msgstr ""
msgid "Text canceled"
msgid "Text cancelled"
msgstr ""
msgid "Import SVG"
@@ -22444,7 +22431,7 @@ msgstr ""
msgid ""
"Nothing yet — import a STEP or a mesh from the toolbar,\n"
"or press Sketch and click a reference plane to start a sketch."
"or click a reference plane and right-click it to start a sketch."
msgstr ""
msgid "No solid yet — select a sketch and right-click it to Extrude."
@@ -22476,25 +22463,12 @@ msgstr ""
msgid "Finding the feature's faces…"
msgstr ""
msgid "The model is being rebuilt — zoom again when it finishes"
msgstr ""
#, possible-c-format, possible-boost-format
msgid "%s has nothing on show to zoom to"
msgid "Select a body first — click it in the viewport or the Bodies list"
msgstr ""
msgid "That body has no display mesh yet — recompute first"
msgstr ""
msgid "Select something to zoom to"
msgstr ""
msgid "Finish or cancel what is open first"
msgstr ""
msgid "Select a body first — click it in the viewport or the Bodies list"
msgstr ""
msgid "Drag the arrows to move, the rings to rotate — then Confirm (Esc cancels)"
msgstr ""
@@ -22514,6 +22488,9 @@ msgstr ""
msgid "Placed on face — body laid flat on the bed"
msgstr ""
msgid "Finish or cancel what is open first"
msgstr ""
#, possible-c-format, possible-boost-format
msgid "Edit rejected: %s"
msgstr ""
@@ -22862,16 +22839,6 @@ msgstr ""
msgid "Line E%d"
msgstr ""
#, possible-c-format, possible-boost-format
msgid "Sketch plane: %s — pick a tool"
msgstr ""
#, possible-c-format, possible-boost-format
msgid ""
"Sketch plane: %s.\n"
"Pick a tool, or press Menu for the list."
msgstr ""
msgid "Plane ready"
msgstr ""
@@ -23088,10 +23055,7 @@ msgctxt "Design"
msgid "Sketch"
msgstr ""
msgid "Select a flat face or a reference plane to sketch on"
msgstr ""
msgid "Sketch on the selected flat face or plane, or click one next"
msgid "Click a face or a reference plane, then pick a drawing tool"
msgstr ""
msgctxt "Design"
@@ -23161,6 +23125,9 @@ msgctxt "Design"
msgid "Hole"
msgstr ""
msgid "Drill a hole, centerd on a picked face or placed on a plane"
msgstr ""
msgctxt "Design"
msgid "Thread"
msgstr ""
@@ -23323,13 +23290,6 @@ msgstr ""
msgid "Set the selected body's display color"
msgstr ""
msgctxt "Design"
msgid "Zoom to selection"
msgstr ""
msgid "Frame the selection in the view, keeping the view direction"
msgstr ""
msgctxt "Design"
msgid "Delete"
msgstr ""
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+52 -92
View File
@@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Orca Slicer\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-10-06 15:16-0300\n"
"POT-Creation-Date: 2026-10-05 10:49-0300\n"
"PO-Revision-Date: 2026-06-17 15:44-0300\n"
"Last-Translator: Alexandre Folle de Menezes\n"
"Language-Team: \n"
@@ -3164,7 +3164,7 @@ msgstr ""
msgid "Remove parameter"
msgstr ""
msgid "Range"
msgid "to"
msgstr ""
msgid "Add height range"
@@ -5060,6 +5060,9 @@ msgstr ""
msgid "layers"
msgstr ""
msgid "Range"
msgstr ""
msgid "Empty string"
msgstr ""
@@ -9457,6 +9460,14 @@ msgstr ""
msgid "Show incompatible/unsupported presets in the printer and filament dropdown lists. These presets cannot be selected."
msgstr ""
msgid "(Experimental) Use printer agents instead of print hosts"
msgstr ""
msgid ""
"Route print jobs for non-Bambu printers through printer plug-in agents instead of the classic print-host upload flow.\n"
"When disabled, OrcaSlicer uses the legacy print-host behavior."
msgstr ""
msgid "Experimental Features"
msgstr ""
@@ -9468,14 +9479,6 @@ msgid ""
"Highly experimental! Slow and may create artifact."
msgstr ""
msgid "Use printer agents instead of print hosts"
msgstr ""
msgid ""
"Route print jobs for non-Bambu printers through printer plug-in agents instead of the classic print-host upload flow.\n"
"When disabled, OrcaSlicer uses the legacy print-host behavior."
msgstr ""
msgid "Allow Abnormal Storage"
msgstr ""
@@ -9638,9 +9641,6 @@ msgstr ""
msgid "Please input layer value (>= 2)."
msgstr ""
msgid "to"
msgstr ""
msgid "Plate name"
msgstr ""
@@ -14775,12 +14775,6 @@ msgstr ""
msgid "If the model has two parts that are symmetric about the Y axis, and you want these parts to have symmetric textures, please click this option on one of the parts."
msgstr ""
msgid "Fill pattern tops"
msgstr ""
msgid "Choose this option if you want to completely fill in the tops of the infill pattern"
msgstr ""
msgid "Infill combination - Max layer height"
msgstr ""
@@ -20423,21 +20417,6 @@ msgstr ""
msgid "The filament model is unknown. A random filament preset will be used."
msgstr ""
msgid "Hide reference planes and axes"
msgstr ""
msgid "Show reference planes and axes"
msgstr ""
msgid "Hide the printer bed and its plate grid"
msgstr ""
msgid "Show the printer bed and its plate grid"
msgstr ""
msgid "Click a reference plane or a flat face to sketch on it — Esc cancels"
msgstr ""
msgid "Construction"
msgstr ""
@@ -20523,10 +20502,26 @@ msgstr ""
msgid "Bed hidden"
msgstr ""
msgid "Reference planes shown"
msgid "FEATURES"
msgstr ""
msgid "Reference planes hidden"
msgid "Sketch"
msgstr ""
#, c-format, boost-format
msgid "Sketch plane: %s — pick a tool"
msgstr ""
msgid "Click a face or a reference plane in the viewport, then a sketch tool"
msgstr ""
#, c-format, boost-format
msgid ""
"Sketch plane: %s.\n"
"Pick a tool, or press Menu for the list."
msgstr ""
msgid "Click a face or a reference plane, then a sketch tool."
msgstr ""
msgid "Add material (extrude / revolve / sweep / loft / thicken / rib)"
@@ -20794,6 +20789,12 @@ msgstr ""
msgid "Pick a cylindrical surface (bore / outer) or a circular edge for a thread"
msgstr ""
msgid "Import STEP (editable B-rep solid)"
msgstr ""
msgid "Import mesh (STL/OBJ) as an editable B-rep solid"
msgstr ""
msgid "Constrain selected sketch"
msgstr ""
@@ -21106,16 +21107,10 @@ msgstr ""
msgid "New Design — clear the feature tree"
msgstr ""
msgid "Import STEP (editable B-rep solid)"
msgstr ""
msgid "Import mesh (STL/OBJ) as an editable B-rep solid"
msgstr ""
msgid "Export STEP…"
msgstr ""
msgid "Create a new sketch"
msgid "Show the printer bed and its plate grid"
msgstr ""
msgid "Place on Face (F) — lay the picked face on the bed"
@@ -21148,9 +21143,6 @@ msgstr ""
msgid "Height / Y"
msgstr ""
msgid "Sketch"
msgstr ""
msgid "Distance X"
msgstr ""
@@ -21629,9 +21621,6 @@ msgstr ""
msgid "Value"
msgstr ""
msgid "Pick a tool, or press Menu for the list."
msgstr ""
msgid "Constraints"
msgstr ""
@@ -21661,9 +21650,6 @@ msgstr ""
msgid "Show / hide"
msgstr ""
msgid "Zoom to selection"
msgstr ""
msgid "Check interference — find overlapping bodies"
msgstr ""
@@ -21721,9 +21707,6 @@ msgstr ""
msgid "Sketch selected — right-click to Extrude, or double-click to edit"
msgstr ""
msgid "That face is not flat — click a flat face or a reference plane"
msgstr ""
#, c-format, boost-format
msgid "Body %d: vertex selected — click again for the whole body"
msgstr ""
@@ -21766,6 +21749,10 @@ msgstr ""
msgid "Edge %d selected — Shift+click to add edges, or click again for the whole body"
msgstr ""
#, c-format, boost-format
msgid "%s plane selected — right-click for the drawing tools"
msgstr ""
#, c-format, boost-format
msgid "%s plane selected — right-click to sketch on it, or click an object to select it"
msgstr ""
@@ -21820,7 +21807,7 @@ msgstr ""
msgid "Text unchanged"
msgstr ""
msgid "Text canceled"
msgid "Text cancelled"
msgstr ""
msgid "Import SVG"
@@ -22440,7 +22427,7 @@ msgstr ""
msgid ""
"Nothing yet — import a STEP or a mesh from the toolbar,\n"
"or press Sketch and click a reference plane to start a sketch."
"or click a reference plane and right-click it to start a sketch."
msgstr ""
msgid "No solid yet — select a sketch and right-click it to Extrude."
@@ -22472,25 +22459,12 @@ msgstr ""
msgid "Finding the feature's faces…"
msgstr ""
msgid "The model is being rebuilt — zoom again when it finishes"
msgstr ""
#, c-format, boost-format
msgid "%s has nothing on show to zoom to"
msgid "Select a body first — click it in the viewport or the Bodies list"
msgstr ""
msgid "That body has no display mesh yet — recompute first"
msgstr ""
msgid "Select something to zoom to"
msgstr ""
msgid "Finish or cancel what is open first"
msgstr ""
msgid "Select a body first — click it in the viewport or the Bodies list"
msgstr ""
msgid "Drag the arrows to move, the rings to rotate — then Confirm (Esc cancels)"
msgstr ""
@@ -22510,6 +22484,9 @@ msgstr ""
msgid "Placed on face — body laid flat on the bed"
msgstr ""
msgid "Finish or cancel what is open first"
msgstr ""
#, c-format, boost-format
msgid "Edit rejected: %s"
msgstr ""
@@ -22858,16 +22835,6 @@ msgstr ""
msgid "Line E%d"
msgstr ""
#, c-format, boost-format
msgid "Sketch plane: %s — pick a tool"
msgstr ""
#, c-format, boost-format
msgid ""
"Sketch plane: %s.\n"
"Pick a tool, or press Menu for the list."
msgstr ""
msgid "Plane ready"
msgstr ""
@@ -23084,10 +23051,7 @@ msgctxt "Design"
msgid "Sketch"
msgstr ""
msgid "Select a flat face or a reference plane to sketch on"
msgstr ""
msgid "Sketch on the selected flat face or plane, or click one next"
msgid "Click a face or a reference plane, then pick a drawing tool"
msgstr ""
msgctxt "Design"
@@ -23157,6 +23121,9 @@ msgctxt "Design"
msgid "Hole"
msgstr ""
msgid "Drill a hole, centerd on a picked face or placed on a plane"
msgstr ""
msgctxt "Design"
msgid "Thread"
msgstr ""
@@ -23319,13 +23286,6 @@ msgstr ""
msgid "Set the selected body's display color"
msgstr ""
msgctxt "Design"
msgid "Zoom to selection"
msgstr ""
msgid "Frame the selection in the view, keeping the view direction"
msgstr ""
msgctxt "Design"
msgid "Delete"
msgstr ""
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -513,7 +513,7 @@
"gui": true,
"action": "key:S+H",
"icon": "design_hole",
"hint": "Drill a hole, centered on a picked face or placed on a plane"
"hint": "Drill a hole, centerd on a picked face or placed on a plane"
},
{
"id": "thread",
+2 -3
View File
@@ -311,12 +311,11 @@ def main():
for path in fixed:
print(f" {path}")
if failed and fixed:
print(f"\nclang-tidy still fails on {len(failed)} file(s); the findings above are what --fix could not fix.")
print(f"\nclang-tidy still fails on {len(failed)} file(s); the findings above are what --fix could not add.")
return 1
if failed:
print(f"\nclang-tidy failed on {len(failed)} file(s). Add the includes it names, or apply its "
"suggestions locally with scripts/run_clang_tidy.sh --fix (scripts\\run_clang_tidy.ps1 -Fix on Windows). "
"Other findings need a manual fix.")
"suggestions locally with scripts/run_clang_tidy.sh --fix (scripts\\run_clang_tidy.ps1 -Fix on Windows).")
return 1
print("clang-tidy passed.")
return 0
+7 -5
View File
@@ -23,6 +23,7 @@
#include <map>
#include <vector>
#include "libslic3r/PrintBase.hpp"
#include "slic3r/Utils/json_diff.hpp"
#include <boost/date_time/posix_time/posix_time_duration.hpp>
#include <cerrno>
#include <utility>
@@ -77,10 +78,12 @@
#include <condition_variable>
#include <mutex>
#include <boost/thread.hpp>
#endif
//add json logic
#include "nlohmann/json.hpp"
using namespace nlohmann;
#endif
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem.hpp>
#include <boost/nowide/args.hpp>
@@ -154,7 +157,6 @@
#include <stdio.h>
namespace fs = boost::filesystem;
using json = nlohmann::json;
#ifdef __WXGTK__
#if __has_include(<X11/Xlib.h>)
@@ -3522,7 +3524,7 @@ int CLI::run(int argc, char **argv)
ConfigOptionStrings *curr_variant_opt = m_print_config.option<ConfigOptionStrings>("filament_extruder_variant");
if (!curr_variant_opt) {
curr_variant_opt = m_print_config.option<ConfigOptionStrings>("filament_extruder_variant", true);
std::vector<std::string>& filament_variants = curr_variant_opt->values;
std::vector<string>& filament_variants = curr_variant_opt->values;
filament_variants.resize(filament_count, get_extruder_variant_string(etDirectDrive, nvtStandard));
}
const ConfigOptionStrings *new_variant_opt = dynamic_cast<const ConfigOptionStrings*>(config.option("filament_extruder_variant", true));
@@ -6552,7 +6554,7 @@ int CLI::run(int argc, char **argv)
std::vector<int> result_filaments;
//result_filaments.reserve(conflict_filaments.size());
std::set_intersection(conflict_filament_vector.begin(), conflict_filament_vector.end(), unprintable_filament_vec[index].begin(),
unprintable_filament_vec[index].end(), std::insert_iterator<std::vector<int>>(result_filaments, result_filaments.begin()));
unprintable_filament_vec[index].end(), insert_iterator<vector<int>>(result_filaments, result_filaments.begin()));
conflict_filament_vector = result_filaments;
}
}
+2
View File
@@ -15,6 +15,8 @@
#include "libslic3r/Semver.hpp"
#include "calib.hpp"
using namespace nlohmann;
#define ENV_DEV_HOST "0"
#define ENV_QAT_HOST "1"
#define ENV_PRE_HOST "2"
+5
View File
@@ -23,6 +23,11 @@ enum ClipType { ctIntersection, ctUnion, ctDifference, ctXor };
} // namespace Slic3r
// import these wherever we're included
using Slic3r::jtMiter;
using Slic3r::jtRound;
using Slic3r::jtSquare;
namespace Slic3r {
static constexpr const float ClipperSafetyOffset = 10.f;
-1
View File
@@ -16,7 +16,6 @@
namespace Slic3r::Geometry {
using VD = VoronoiDiagram;
using PolygonsSegmentIndexConstIt = std::vector<Arachne::PolygonsSegmentIndex>::const_iterator;
using LinesIt = Lines::iterator;
using ColoredLinesConstIt = ColoredLines::const_iterator;
-1
View File
@@ -20,7 +20,6 @@
namespace Slic3r::Geometry {
using VD = VoronoiDiagram;
using PolygonsSegmentIndexConstIt = std::vector<Arachne::PolygonsSegmentIndex>::const_iterator;
using LinesIt = Lines::iterator;
using ColoredLinesIt = ColoredLines::iterator;
+16 -14
View File
@@ -10,6 +10,8 @@
#include "libslic3r/Point.hpp"
#include "libslic3r/libslic3r.h"
using VD = Slic3r::Geometry::VoronoiDiagram;
namespace Slic3r::Geometry {
// Represent trapezoid Voronoi cell around segment.
@@ -17,8 +19,8 @@ template<typename PT> struct SegmentCellRange
{
const PT source_segment_start_point; // The start point of the source segment of this cell.
const PT source_segment_end_point; // The end point of the source segment of this cell.
const VoronoiDiagram::edge_type *edge_begin = nullptr; // The edge of the Voronoi diagram where the loop around the cell starts.
const VoronoiDiagram::edge_type *edge_end = nullptr; // The edge of the Voronoi diagram where the loop around the cell ends.
const VD::edge_type *edge_begin = nullptr; // The edge of the Voronoi diagram where the loop around the cell starts.
const VD::edge_type *edge_end = nullptr; // The edge of the Voronoi diagram where the loop around the cell ends.
SegmentCellRange() = delete;
explicit SegmentCellRange(const PT &source_segment_start_point, const PT &source_segment_end_point)
@@ -32,8 +34,8 @@ template<typename PT> struct SegmentCellRange
template<typename PT> struct PointCellRange
{
const PT source_point; // The source point of this cell.
const VoronoiDiagram::edge_type *edge_begin = nullptr; // The edge of the Voronoi diagram where the loop around the cell starts.
const VoronoiDiagram::edge_type *edge_end = nullptr; // The edge of the Voronoi diagram where the loop around the cell ends.
const VD::edge_type *edge_begin = nullptr; // The edge of the Voronoi diagram where the loop around the cell starts.
const VD::edge_type *edge_end = nullptr; // The edge of the Voronoi diagram where the loop around the cell ends.
PointCellRange() = delete;
explicit PointCellRange(const PT &source_point) : source_point(source_point) {}
@@ -44,20 +46,20 @@ template<typename PT> struct PointCellRange
class VoronoiUtils
{
public:
static Vec2i64 to_point(const VoronoiDiagram::vertex_type *vertex);
static Vec2i64 to_point(const VD::vertex_type *vertex);
static Vec2i64 to_point(const VoronoiDiagram::vertex_type &vertex);
static Vec2i64 to_point(const VD::vertex_type &vertex);
static bool is_finite(const VoronoiDiagram::vertex_type &vertex);
static bool is_finite(const VD::vertex_type &vertex);
static VoronoiDiagram::vertex_type make_rotated_vertex(VoronoiDiagram::vertex_type &vertex, double angle);
static VD::vertex_type make_rotated_vertex(VD::vertex_type &vertex, double angle);
template<typename SegmentIterator>
static typename boost::polygon::enable_if<
typename boost::polygon::gtl_if<typename boost::polygon::is_segment_concept<
typename boost::polygon::geometry_concept<typename std::iterator_traits<SegmentIterator>::value_type>::type>::type>::type,
typename std::iterator_traits<SegmentIterator>::reference>::type
get_source_segment(const VoronoiDiagram::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end);
get_source_segment(const VD::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end);
template<typename SegmentIterator>
static typename boost::polygon::enable_if<
@@ -71,7 +73,7 @@ public:
typename boost::polygon::gtl_if<typename boost::polygon::is_segment_concept<
typename boost::polygon::geometry_concept<typename std::iterator_traits<SegmentIterator>::value_type>::type>::type>::type,
Arachne::PolygonsPointIndex>::type
get_source_point_index(const VoronoiDiagram::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end);
get_source_point_index(const VD::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end);
/**
* Discretize a parabola based on (approximate) step size.
@@ -111,7 +113,7 @@ public:
typename boost::polygon::geometry_concept<typename std::iterator_traits<SegmentIterator>::value_type>::type>::type>::type,
Geometry::SegmentCellRange<
typename boost::polygon::segment_point_type<typename std::iterator_traits<SegmentIterator>::value_type>::type>>::type
compute_segment_cell_range(const VoronoiDiagram::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end);
compute_segment_cell_range(const VD::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end);
/**
* Compute the range of line segments that surround a cell of the skeletal
@@ -138,19 +140,19 @@ public:
typename boost::polygon::geometry_concept<typename std::iterator_traits<SegmentIterator>::value_type>::type>::type>::type,
Geometry::PointCellRange<
typename boost::polygon::segment_point_type<typename std::iterator_traits<SegmentIterator>::value_type>::type>>::type
compute_point_cell_range(const VoronoiDiagram::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end);
compute_point_cell_range(const VD::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end);
template<typename T> static bool is_in_range(double value)
{
return double(std::numeric_limits<T>::lowest()) <= value && value <= double(std::numeric_limits<T>::max());
}
template<typename T> static bool is_in_range(const VoronoiDiagram::vertex_type &vertex)
template<typename T> static bool is_in_range(const VD::vertex_type &vertex)
{
return VoronoiUtils::is_finite(vertex) && is_in_range<T>(vertex.x()) && is_in_range<T>(vertex.y());
}
template<typename T> static bool is_in_range(const VoronoiDiagram::edge_type &edge)
template<typename T> static bool is_in_range(const VD::edge_type &edge)
{
if (edge.vertex0() == nullptr || edge.vertex1() == nullptr)
return false;
@@ -63,7 +63,6 @@ namespace Slic3r { enum class EnforcerBlockerType : int8_t; }
namespace Slic3r {
using boost::polygon::voronoi_diagram;
using VD = Geometry::VoronoiDiagram;
static inline Point mk_point(const Voronoi::VD::vertex_type *point) { return {coord_t(point->x()), coord_t(point->y())}; }
-1
View File
@@ -87,7 +87,6 @@
#include "libslic3r/GCode/Thumbnails.hpp"
namespace fs = boost::filesystem;
using json = nlohmann::json;
using boost::property_tree::ptree;
-4
View File
@@ -80,8 +80,6 @@
#include <vector>
#include <utility>
namespace fs = boost::filesystem;
// Mark string for localization and translate.
#define L(s) Slic3r::I18N::translate(s)
@@ -89,8 +87,6 @@ namespace fs = boost::filesystem;
// This breaks compatibility with the upstream Slic3r if the --datadir is used to switch between the two versions.
//#define SLIC3R_PROFILE_USE_PRESETS_SUBDIR
using json = nlohmann::json;
namespace Slic3r {
// Project-level options imported from a loaded 3MF into project_config. s_project_options_published
+4 -2
View File
@@ -11,6 +11,8 @@
#include <boost/filesystem/path.hpp>
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
namespace Slic3r {
class BBLProject;
@@ -206,7 +208,7 @@ public:
std::string task_profile_id; /* profile id*/
std::string task_name; /* task name, generally filename as task name */
std::string task_file; /* local full file path of 3mf or gcode */
boost::filesystem::path task_path; /* local path of 3mf or gcode */
fs::path task_path; /* local path of 3mf or gcode */
std::string task_gcode_in_3mf; /* gcode in 3mf */
std::string task_create_time; /* time created by cloud */
std::string task_thumbnail_url; /* url of task thumbnail */
@@ -324,7 +326,7 @@ public:
std::string project_url_md5; /* md5 of project url file */
std::string project_name;
std::string project_3mf_file;
boost::filesystem::path project_path;
fs::path project_path;
std::string project_content;
std::string project_country_code;
+1 -1
View File
@@ -1587,7 +1587,7 @@ bool GLVolumeCollection::check_outside_state(const BuildVolume &build_volume, Mo
{
std::vector<int> result_filaments;
//result_filaments.reserve(conflict_filaments.size());
std::set_intersection (conflict_filament_vector.begin(), conflict_filament_vector.end(), unprintable_filament_vec[index].begin(), unprintable_filament_vec[index].end(), std::insert_iterator<std::vector<int>>(result_filaments, result_filaments.begin()));
std::set_intersection (conflict_filament_vector.begin(), conflict_filament_vector.end(), unprintable_filament_vec[index].begin(), unprintable_filament_vec[index].end(), insert_iterator<vector<int>>(result_filaments, result_filaments.begin()));
conflict_filament_vector = result_filaments;
}
}
-1
View File
@@ -69,7 +69,6 @@
#include <wx/dcmemory.h>
namespace fs = boost::filesystem;
using json = nlohmann::json;
namespace Slic3r { namespace GUI {
+2 -2
View File
@@ -11,7 +11,7 @@
#include "slic3r/GUI/Widgets/Button.hpp"
#include "slic3r/GUI/Widgets/ComboBox.hpp"
#include <string>
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <wx/notebook.h>
#include <wx/scrolwin.h>
#include <wx/sizer.h>
@@ -246,7 +246,7 @@ public:
void create_folder(wxString name = wxEmptyString);
std::string replaceSpace(std::string s, std::string ts, std::string ns);
void on_import_file(wxCommandEvent &event);
void Reload(wxString aux_path, std::map<std::string, std::vector<nlohmann::json>> paths);
void Reload(wxString aux_path, std::map<std::string, std::vector<json>> paths);
void update_all_panel();
void update_all_cover();
@@ -18,6 +18,8 @@
class AuxiliaryModelNode;
WX_DEFINE_ARRAY_PTR(AuxiliaryModelNode*, AuxiliaryModelNodePtrArray);
namespace fs = boost::filesystem;
class AuxiliaryModelNode
{
public:
+4
View File
@@ -73,6 +73,10 @@ private:
CancelFn m_cancel_cb;
};
namespace GUI {
using Slic3r::BBLStatusBar;
}
}
#endif // BBLSTATUSBAR_HPP
+4
View File
@@ -80,6 +80,10 @@ private:
CancelFn m_cancel_cb_fina;
};
namespace GUI {
using Slic3r::BBLStatusBarBind;
}
} // namespace Slic3r
#endif // BBLSTATUSBAR_HPP
+4
View File
@@ -97,6 +97,10 @@ private:
CancelFn m_cancel_cb_fina;
};
namespace GUI {
using Slic3r::BBLStatusBarPrint;
}
wxDECLARE_EVENT(EVT_SHOW_ERROR_INFO, wxCommandEvent);
} // namespace Slic3r
+4
View File
@@ -99,6 +99,10 @@ private:
CancelFn m_cancel_cb_fina;
};
namespace GUI {
using Slic3r::BBLStatusBarSend;
}
wxDECLARE_EVENT(EVT_SHOW_ERROR_INFO_SEND, wxCommandEvent);
wxDECLARE_EVENT(EVT_SHOW_ERROR_FAIL_SEND, wxCommandEvent);
} // namespace Slic3r
-1
View File
@@ -41,7 +41,6 @@
#define TOPBAR_TITLE_WIDTH 300
using namespace Slic3r;
using namespace Slic3r::GUI;
enum CUSTOM_ID
{
+2
View File
@@ -18,6 +18,8 @@ class wxMouseCaptureLostEvent;
class wxMouseEvent;
class wxWindow;
using namespace Slic3r::GUI;
class CenteredTitle : public wxControl
{
public:
+2 -2
View File
@@ -218,7 +218,7 @@ std::string BackgroundSlicingProcess::output_filepath_for_project(const boost::f
void BackgroundSlicingProcess::process_fff()
{
assert(m_print == m_fff_print);
PresetBundle& preset_bundle = *GUI::wxGetApp().preset_bundle;
PresetBundle& preset_bundle = *wxGetApp().preset_bundle;
m_fff_print->is_BBL_printer() = preset_bundle.is_bbl_vendor();
// BBS: add the logic to process from an existed gcode file
if (m_print->finished()) {
@@ -727,7 +727,7 @@ StringObjectException BackgroundSlicingProcess::validate(std::vector<StringObjec
assert(m_print != nullptr);
assert(m_print == m_fff_print);
m_fff_print->is_BBL_printer() = GUI::wxGetApp().preset_bundle->is_bbl_vendor();
m_fff_print->is_BBL_printer() = wxGetApp().preset_bundle->is_bbl_vendor();
return m_print->validate(warnings, collison_polygons, height_polygons);
}
+1 -3
View File
@@ -26,7 +26,7 @@
#include <memory>
#include "slic3r/GUI/BBLStatusBarBind.hpp"
#include "slic3r/GUI/Jobs/BindJob.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include "slic3r/GUI/DeviceCore/DevDefs.h"
#include "slic3r/GUI/Jobs/Worker.hpp"
#include <utility>
@@ -54,8 +54,6 @@
#include "DeviceCore/DevManager.h"
using json = nlohmann::json;
namespace Slic3r {
namespace GUI {
+1 -1
View File
@@ -117,7 +117,7 @@ static const OfferVerb kOfferVerbs[] = {
{"surf_loft", L_CONTEXT("Surface Loft", "Design"), 1, nullptr, "fly:surface#2", L("Create at least two profile sketches to loft"), 0x00004000u, 0, 2, false, false, nullptr, "design_loft", L("Loft (skin) between 2+ profiles, open (no end caps)")},
{"surf_fill", L_CONTEXT("Surface Fill", "Design"), 1, nullptr, "fly:surface#3", L("Create a closed sketch first"), 0x00004000u, 0, 0, false, false, nullptr, "design_surface", L("Fill a sketch boundary with a smooth face")},
{"thicken_surf", L_CONTEXT("Thicken Surface", "Design"), 1, nullptr, "fly:surface#5", L("Thicken Surface needs a surface body — make one with a Surface tool first"), 0x00000100u, 0, 0, true, false, nullptr, "design_thicken", L("Thicken a sheet body into a solid")},
{"hole", L_CONTEXT("Hole", "Design"), 2, "Shift+H", "key:S+H", L("Pick a face or a plane to drill into"), 0x00000402u, 1, 0, false, false, nullptr, "design_hole", L("Drill a hole, centered on a picked face or placed on a plane")},
{"hole", L_CONTEXT("Hole", "Design"), 2, "Shift+H", "key:S+H", L("Pick a face or a plane to drill into"), 0x00000402u, 1, 0, false, false, nullptr, "design_hole", L("Drill a hole, centerd on a picked face or placed on a plane")},
{"thread", L_CONTEXT("Thread", "Design"), 2, "Shift+T", "key:S+T", L("Pick a cylindrical surface (bore / outer) or a circular edge for a thread"), 0x00000024u, 1, 0, false, false, nullptr, "design_thread", L("Thread a cylindrical surface (inner bore / outer) or a circular edge")},
{"shell", L_CONTEXT("Shell", "Design"), 2, "Shift+K", "key:S+K", L("Shell needs a solid body — add or import one first"), 0x00000082u, 1, 0, false, false, nullptr, "design_shell", L("Hollow the body to a wall thickness, opening a picked face")},
{"cut", L_CONTEXT("Cut", "Design"), 2, "Shift+X", "key:S+X", L("Cut needs a solid body — add or import one first"), 0x000004feu, 1, 0, false, false, nullptr, "design_cut", L("Trim the body with a plane — drag the offset arrow; keep one half or both")},
+1 -1
View File
@@ -4805,7 +4805,7 @@ void DesignPanel::text_dialog_done(bool accepted)
if (have) m_doc.undo(); // a new text leaves, an edited one gets its old outline back
refresh_tree();
sync_sketch_display();
set_status(StatusKind::Info, editing ? _L("Text unchanged") : _L("Text canceled"));
set_status(StatusKind::Info, editing ? _L("Text unchanged") : _L("Text cancelled"));
return;
}
if (!have) return;
+3 -1
View File
@@ -43,6 +43,8 @@
#include <wx/types.h>
namespace fs = boost::filesystem;
namespace Slic3r {
namespace GUI {
@@ -86,7 +88,7 @@ struct Bundle
// cache or its profile JSONs, whichever is usable.
// Returns false if not loaded. Reason for that is logged as boost::log error.
//BBS: set BBL as default
bool load(boost::filesystem::path dir, const std::string &vendor_name, bool is_in_resources, bool is_bbl_bundle = false);
bool load(fs::path dir, const std::string &vendor_name, bool is_in_resources, bool is_bbl_bundle = false);
const std::string& vendor_id() const { return vendor_profile->id; }
};
+1 -3
View File
@@ -25,7 +25,7 @@
#include "slic3r/GUI/Widgets/RadioBox.hpp"
#include <cstdio>
#include <map>
#include <nlohmann/json.hpp>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <cstdlib>
#include "slic3r/GUI/GUI_Utils.hpp"
#include "slic3r/GUI/Widgets/Label.hpp"
@@ -91,8 +91,6 @@
#define SELECT_ALL_OPTION_COLOUR wxColour("#009688")
#define DEFAULT_PROMPT_TEXT_COLOUR wxColour("#ACACAC")
using json = nlohmann::json;
namespace Slic3r {
namespace GUI {
+1 -3
View File
@@ -1,12 +1,10 @@
#include "DevAxis.h"
#include "DevUtil.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include "slic3r/GUI/DeviceCore/DevDefs.h"
using json = nlohmann::json;
namespace Slic3r
{
+2 -1
View File
@@ -2,6 +2,7 @@
#include <memory>
#include <nlohmann/json.hpp>
#include <string>
#include "slic3r/Utils/json_diff.hpp"
namespace Slic3r {
@@ -21,7 +22,7 @@ public:
bool IsArchCoreXY() const;
public:
void ParseAxis(const nlohmann::json &print_json);
void ParseAxis(const json &print_json);
int Ctrl_GoHome();
int Ctrl_Axis(std::string axis, double unit = 1.0f, double input_val = 1.0f, int speed = 3000); // xyz e
+1 -3
View File
@@ -1,13 +1,11 @@
#include "DevAxis.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include <string>
#include <cstdlib>
#include <cstdio>
using json = nlohmann::json;
namespace Slic3r
{
+1 -3
View File
@@ -1,9 +1,7 @@
#include "DevBed.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
using json = nlohmann::json;
namespace Slic3r {
void DevBed::ParseV1_0(const json &print_json, DevBed *system)
+3 -2
View File
@@ -1,5 +1,6 @@
#pragma once
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
namespace Slic3r {
@@ -15,8 +16,8 @@ public:
public:
static void ParseV1_0(const nlohmann::json &print_json, DevBed *system);
static void ParseV2_0(const nlohmann::json &print_json, DevBed *system);
static void ParseV1_0(const json &print_json, DevBed *system);
static void ParseV2_0(const json &print_json, DevBed *system);
private:
+1 -3
View File
@@ -1,6 +1,6 @@
#include <algorithm>
#include <boost/log/trivial.hpp>
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/I18N.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
@@ -22,8 +22,6 @@
#include "DevFilaSystem.h"
#include "DevConfig.h"
using json = nlohmann::json;
namespace Slic3r {
static float string_to_float(const std::string &str_value)
+8 -7
View File
@@ -2,6 +2,7 @@
#include <nlohmann/json.hpp>
#include <optional>
#include <vector>
#include "slic3r/Utils/json_diff.hpp"
#include "DevDefs.h"
@@ -85,11 +86,11 @@ public:
std::vector<FlowRatioCalibResult> GetFlowRatioResult() const {return m_flow_ratio_results; }
protected:
void ExtrusionCalibSetParse(const nlohmann::json &jj);
void ExtrusionCalibSelectParse(const nlohmann::json &jj);
void ExtrusionCalibGetTableParse(const nlohmann::json &jj);
void ExtrusionCalibGetResultParse(const nlohmann::json &jj);
void FlowrateGetResultParse(const nlohmann::json &jj);
void ExtrusionCalibSetParse(const json &jj);
void ExtrusionCalibSelectParse(const json &jj);
void ExtrusionCalibGetTableParse(const json &jj);
void ExtrusionCalibGetResultParse(const json &jj);
void FlowrateGetResultParse(const json &jj);
private:
MachineObject* m_owner{nullptr};
@@ -118,11 +119,11 @@ private:
bool m_calib_finished{false};
public:
static void ParseCalibVersion(const nlohmann::json& j, DevCalib* system);
static void ParseCalibVersion(const json& j, DevCalib* system);
static void ParseSupportNewAutoCalib(int flag, DevCalib* system);
static void ParseV1_0(const nlohmann::json& print_json, DevCalib* system, bool key_field_only);
static void ParseV1_0(const json& print_json, DevCalib* system, bool key_field_only);
};
} // namespace Slic3r
+1 -3
View File
@@ -3,11 +3,9 @@
#include "DevConfig.h"
#include "DevUtil.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
using json = nlohmann::json;
namespace Slic3r {
bool DevChamber::HasChamber() const { return m_owner->GetConfig()->HasChamber(); }
+4 -3
View File
@@ -1,6 +1,7 @@
#pragma once
#include <memory>
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
namespace Slic3r {
@@ -24,10 +25,10 @@ public: // getter
public:
// setter
void ParseChamber(const nlohmann::json &print_json);
void ParseChamber(const json &print_json);
void ParseChamberV1_0(const nlohmann::json& print_json);
void ParseChamberV2_0(const nlohmann::json& print_json);
void ParseChamberV1_0(const json& print_json);
void ParseChamberV2_0(const json& print_json);
// control
int CtrlSetChamberTemp(int temp);
+1 -3
View File
@@ -1,10 +1,8 @@
#include "DevChamber.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include <string>
using json = nlohmann::json;
namespace Slic3r {
int DevChamber::CtrlSetChamberTemp(int temp)
+1
View File
@@ -2,6 +2,7 @@
#include "DevConfig.h"
#include "DevUtil.h"
#include "json_diff.hpp"
using namespace nlohmann;
+5 -5
View File
@@ -1,7 +1,7 @@
#pragma once
#include "libslic3r/CommonDefs.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include <wx/string.h>
#include <limits>
@@ -47,11 +47,11 @@ public:
public:
/*Setters*/
void ParseConfig(const nlohmann::json& print_json);
void ParseConfig(const json& print_json);
void ParseChamberConfig(const nlohmann::json& print_json); // chamber
void ParsePrintOptionsConfig(const nlohmann::json& print_json); // print options
void ParseCalibrationConfig(const nlohmann::json& print_json); //cali
void ParseChamberConfig(const json& print_json); // chamber
void ParsePrintOptionsConfig(const json& print_json); // print options
void ParseCalibrationConfig(const json& print_json); //cali
private:
[[maybe_unused]] MachineObject* m_obj;
+1 -1
View File
@@ -1,6 +1,6 @@
#include "DevConfigUtil.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include <string>
+1
View File
@@ -4,6 +4,7 @@
#include "DevCtrl.h"
// TODO: remove this include
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
using namespace nlohmann;
+3 -3
View File
@@ -1,6 +1,6 @@
#pragma once
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include <string>
#include <ctime>
#include <wx/string.h>
@@ -15,7 +15,7 @@ class DevCtrlInfo
{
public:
DevCtrlInfo() {};
DevCtrlInfo(MachineObject* obj, int sequence_id, const nlohmann::json& req_json, int interval_max = 3, int interval_min = 0);
DevCtrlInfo(MachineObject* obj, int sequence_id, const json& req_json, int interval_max = 3, int interval_min = 0);
public:
bool CheckCanUpdateData(const nlohmann::json& jj);
@@ -32,7 +32,7 @@ private:
time_t m_request_time = 0;
int m_request_seq = 0;
nlohmann::json m_request_json = nlohmann::json();
json m_request_json = json();
// check
int m_request_interval_max = 3;
+1 -1
View File
@@ -3,7 +3,7 @@
#include <optional>
#include "libslic3r/CommonDefs.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include <wx/string.h>
#include "DevDefs.h"
@@ -15,6 +15,7 @@
#include "DevFilaSystem.h" // complete type for GetFilaSystem()->GetTrayIndexMap() in GetBackupAmsSlotInGroup
// TODO: remove this include
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include "slic3r/GUI/I18N.hpp"
@@ -5,7 +5,7 @@
#include <unordered_map>
#include "libslic3r/CommonDefs.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include <vector>
#include <wx/string.h>
+1
View File
@@ -6,6 +6,7 @@
#include <string>
#include <vector>
#include <wx/app.h>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
using namespace nlohmann;
+6 -5
View File
@@ -2,6 +2,7 @@
#include <functional>
#include <cstdint>
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include <map>
#include <vector>
@@ -12,7 +13,7 @@ namespace Slic3r {
class MachineObject;
enum AirDuctType { AIR_FAN_TYPE, AIR_DOOR_TYPE };
typedef std::function<void(const nlohmann::json &)> CommandCallBack;
typedef std::function<void(const json &)> CommandCallBack;
enum AIR_FUN : int {
FAN_HEAT_BREAK_0_IDX = 0,
@@ -122,14 +123,14 @@ public:
AirDuctData GetAirDuctData() { return m_air_duct_data; };
void converse_to_duct(bool is_suppt_part_fun, bool is_suppt_aux_fun, bool is_suppt_cham_fun); // Convert the data to duct type to make the newand old protocols consistent
int command_handle_response(const nlohmann::json &response);
int command_handle_response(const json &response);
int command_control_fan(int fan_type, int val); // Old protocol
int command_control_fan_new(int fan_id, int val); // New protocol
int command_control_air_duct(int mode_id, int submode, const CommandCallBack& cb);
void ParseV1_0(const nlohmann::json &print_json);
void ParseV2_0(const nlohmann::json &print_json);
void ParseV3_0(const nlohmann::json &print_json);
void ParseV1_0(const json &print_json);
void ParseV2_0(const json &print_json);
void ParseV3_0(const json &print_json);
public:
bool GetSupportAirduct() { return is_support_airduct; };
@@ -1,13 +1,11 @@
#include "DevFilaAmsSetting.h"
#include "DevFilaSystem.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include <string>
#include "slic3r/GUI/DeviceCore/DevCtrl.h"
using json = nlohmann::json;
namespace Slic3r {
int DevAmsSystemFirmwareSwitch::CrtlSwitchFirmware(int firmware_idx)
{
@@ -14,6 +14,7 @@
#include "slic3r/GUI/DeviceCore/DevDefs.h"
#include "DevFilaBlackList.h"
#include "json_diff.hpp"
#include "slic3r/Utils/NetworkAgent.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include "DevFilaSystem.h"
+2 -2
View File
@@ -5,7 +5,7 @@
#include <string>
#include <vector>
#include <wx/string.h>
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
namespace Slic3r
{
@@ -67,7 +67,7 @@ public:
static CheckResult check_filaments_in_blacklist(const CheckFilamentInfo& info);
public:
static nlohmann::json filaments_blacklist;
static json filaments_blacklist;
};// class DevFilaBlacklist
}// namespace Slic3r
@@ -18,6 +18,7 @@
#include <set>
#include <utility>
#include "DevFilaSystem.h"
#include "json_diff.hpp"
#include "slic3r/Utils/NetworkAgent.hpp"
#include "DevNozzleSystem.h" // DevNozzle / DevNozzleSystem for GetNozzleFlowStringByAmsId
+3 -3
View File
@@ -1,6 +1,6 @@
#pragma once
#include "libslic3r/CommonDefs.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include "DevDefs.h"
#include "DevFilaAmsSetting.h"
@@ -415,9 +415,9 @@ private:
class DevFilaSystemParser
{
public:
static void ParseV1_0(const nlohmann::json& print_json, MachineObject* obj, DevFilaSystem* system, bool key_field_only);
static void ParseV1_0(const json& print_json, MachineObject* obj, DevFilaSystem* system, bool key_field_only);
static void ParseAgentFilament(const nlohmann::json& data, MachineObject* obj, DevFilaSystem* system);
static void ParseAgentFilament(const json& data, MachineObject* obj, DevFilaSystem* system);
};
struct DevFilamentDryingPreset
@@ -2,6 +2,7 @@
#include <string>
#include "DevFilaSystem.h"
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"// TODO: remove this include
using namespace nlohmann;
+5 -3
View File
@@ -1,9 +1,11 @@
#pragma once
#include "DevFirmware.h"
#include "slic3r/Utils/json_diff.hpp"
#include <nlohmann/json.hpp>
#include <string>
#include <wx/string.h>
#include "slic3r/Utils/json_diff.hpp"
namespace Slic3r {
@@ -49,10 +51,10 @@ public:
bool isCuttingModule() const { return product_name.Contains("Cutting Module"); }
bool isRotary() const { return product_name.Contains("Rotary"); }// Rotary Attachment
bool isExtinguishSystem() const { return product_name.Contains("Extinguishing System"); }// Auto Fire Extinguishing System
bool isWTM() const { return name.find("wtm") != std::string::npos; } // nozzle
bool isWTM() const { return name.find("wtm") != string::npos; } // nozzle
bool isExhaustFan() const { return product_name.Contains("Exhaust Fan"); }
bool isHmshub() const { return product_name.find("Filament Buffer") != std::string::npos; }
bool isFilaTrackSwitch() const { return product_name.find("Filament Track") != std::string::npos; }
bool isHmshub() const { return product_name.find("Filament Buffer") != string::npos; }
bool isFilaTrackSwitch() const { return product_name.find("Filament Track") != string::npos; }
};
+1 -3
View File
@@ -2,12 +2,10 @@
#include "DevHMS.h"
#include <string>
#include <cstdio>
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include <exception>
#include <cassert>
using json = nlohmann::json;
namespace Slic3r
{
+3 -3
View File
@@ -1,6 +1,6 @@
#pragma once
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include <vector>
#include <string>
#include <wx/string.h>
@@ -18,7 +18,7 @@ public:
DevHMS(MachineObject* obj) : m_object(obj) {}
public:
void ParseHMSItems(const nlohmann::json& hms_json);
void ParseHMSItems(const json& hms_json);
const std::vector<DevHMSItem>& GetHMSItems() const { return m_hms_list; };
private:
@@ -69,7 +69,7 @@ public:
bool has_read() const { return m_already_read; };
protected:
friend void DevHMS::ParseHMSItems(const nlohmann::json& hms_json);
friend void DevHMS::ParseHMSItems(const json& hms_json);
bool parse_hms_info(unsigned attr, unsigned code);
private:
@@ -3,6 +3,7 @@
#include "DevLamp.h"
// TODO: remove this include
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
using namespace nlohmann;
+1
View File
@@ -23,6 +23,7 @@
#include "DevUtil.h"
// TODO: remove this include
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include "slic3r/GUI/I18N.hpp"
#include "slic3r/GUI/GUI_App.hpp"
+1
View File
@@ -3,6 +3,7 @@
#include <mutex>
#include "libslic3r/CommonDefs.hpp"
#include "slic3r/Utils/json_diff.hpp"
#include <string>
#include <vector>
#include <wx/object.h>
@@ -6,6 +6,7 @@
#include "DevUtil.h"
#include "DevUtilBackend.h"
#include "json_diff.hpp"
#include "libslic3r/MultiNozzleUtils.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
+1 -1
View File
@@ -1,7 +1,7 @@
#pragma once
#include "libslic3r/CommonDefs.hpp"
#include "libslic3r/MultiNozzleUtils.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include "DevNozzleSystem.h"
#include "DevFirmware.h"
@@ -1,7 +1,7 @@
#include "DevNozzleRack.h"
#include "DevExtruderSystem.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include "slic3r/GUI/MsgDialog.hpp"
#include "slic3r/GUI/I18N.hpp"
@@ -14,8 +14,6 @@
#include "slic3r/GUI/DeviceCore/DevNozzleSystem.h"
using json = nlohmann::json;
namespace Slic3r
{
@@ -4,7 +4,7 @@
#include "DevNozzleSystem.h"
#include "DevUtil.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include "slic3r/GUI/I18N.hpp"
@@ -28,8 +28,6 @@
#include <optional>
#include <cmath>
using json = nlohmann::json;
namespace Slic3r
{
+2 -2
View File
@@ -4,7 +4,7 @@
#include "libslic3r/CommonDefs.hpp"
#include "libslic3r/MultiNozzleUtils.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include "libslic3r/PrintConfig.hpp"
#include <string>
@@ -195,6 +195,6 @@ namespace Slic3r
{
public:
static void ParseV1_0(const nlohmann::json& nozzletype_json, const nlohmann::json& diameter_json, DevNozzleSystem* system, std::optional<int> flag_e3d);
static void ParseV2_0(const nlohmann::json& device_json, DevNozzleSystem* system);
static void ParseV2_0(const json& device_json, DevNozzleSystem* system);
};
};
@@ -8,11 +8,9 @@
#include <ctime>
#include <exception>
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
using json = nlohmann::json;
namespace Slic3r
{
+1 -3
View File
@@ -1,10 +1,8 @@
#include "DevStorage.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include <string>
using json = nlohmann::json;
namespace Slic3r {
DevStorage::SdcardState Slic3r::DevStorage::set_sdcard_state(int state)
+2 -1
View File
@@ -1,6 +1,7 @@
#pragma once
#include <nlohmann/json.hpp>
#include <string>
#include "slic3r/Utils/json_diff.hpp"
namespace Slic3r {
@@ -26,7 +27,7 @@ public:
SdcardState get_sdcard_state() const { return m_sdcard_state; };
SdcardState set_sdcard_state(int state);
static void ParseV1_0(const nlohmann::json &print_json, DevStorage *system);
static void ParseV1_0(const json &print_json, DevStorage *system);
bool is_timelapse_storage_low(const std::string& storage) const;
+1 -3
View File
@@ -1,7 +1,7 @@
#include "DevUpgrade.h"
#include "DevUtil.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include "slic3r/GUI/GUI_App.hpp"
@@ -13,8 +13,6 @@
#include "slic3r/GUI/DeviceCore/DevDefs.h"
#include <wx/string.h>
using json = nlohmann::json;
namespace Slic3r {
int DevUpgrade::GetUpgradeProgressInt() const
+4 -3
View File
@@ -4,6 +4,7 @@
#include <nlohmann/json.hpp>
#include <string>
#include <wx/string.h>
#include "slic3r/Utils/json_diff.hpp"
#include "DevDefs.h"
#include "DevFirmware.h"
@@ -46,8 +47,8 @@ public:
int CtrlUpgradeModule(std::string url, std::string module_type, std::string version);
// parser
void ParseUpgrade_V1_0(const nlohmann::json &print_jj);
void ParseUpgradeDisplayState(const nlohmann::json &upgrade_state_jj);
void ParseUpgrade_V1_0(const json &print_jj);
void ParseUpgradeDisplayState(const json &upgrade_state_jj);
protected:
DevUpgrade(MachineObject *owner) : m_owner(owner) {}
@@ -89,7 +90,7 @@ public:
public:
int CtrlGetVersion(bool with_retry = true);
void ParseGetVersion(const nlohmann::json &print_jj);
void ParseGetVersion(const json &print_jj);
private:
MachineObject *m_owner;
+1 -3
View File
@@ -1,12 +1,10 @@
#include "DevUpgrade.h"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include <string>
#include "slic3r/GUI/DeviceCore/DevFirmware.h"
using json = nlohmann::json;
namespace Slic3r {
int DevUpgrade::CtrlUpgradeConfirm()
+1 -3
View File
@@ -1,5 +1,5 @@
#include "PrinterNetworkTypes.hpp"
#include <nlohmann/json.hpp>
#include "json_diff.hpp"
#include "DeviceManager.hpp"
#include "HMS.hpp"
#include "I18N.hpp"
@@ -105,8 +105,6 @@
#include "libslic3r/PresetBundle.hpp"
#include "slic3r/GUI/Jobs/SendJob.hpp"
using json = nlohmann::json;
class wxWindow;
namespace fs = boost::filesystem;

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