Merge branch 'main' into pr/yw4z/16162

This commit is contained in:
SoftFever
2026-10-07 14:44:59 +08:00
222 changed files with 11463 additions and 6009 deletions
+9 -4
View File
@@ -1,10 +1,15 @@
# clang-tidy configuration, enforced by the clang-tidy CI job on the lines a pull
# 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.
# 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.
# 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'
Checks: '-*,misc-include-cleaner,google-global-names-in-headers'
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@v1
uses: actions/create-github-app-token@v3
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 and remind about the localization glossary
- name: Auto-label localization changes and remind contributors about the glossary
uses: actions/github-script@v9
with:
script: |
@@ -106,37 +106,37 @@ jobs:
const pr = context.payload.pull_request;
// List changed files once (mirrors the `localization/**` paths filter in check_locale.yml)
// 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
});
const touchesLocalization = files.some((file) => file.filename.startsWith('localization/'));
const onlyPoFiles = files.length > 0 && files.every((file) => file.filename.endsWith('.po'));
if (!files.some((file) => file.filename.startsWith('localization/'))) {
core.info('No localization changes detected; skipping Localization label.');
return;
}
// 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;
}
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 (!touchesLocalization) {
core.info('No localization changes detected; skipping glossary reminder.');
// 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.');
return;
}
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
uses: actions/checkout@v7
- name: Setup Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: '3.12'
+6 -4
View File
@@ -4,15 +4,17 @@ OrcaSlicer — open-source C++17 3D slicer. wxWidgets GUI, CMake build system.
## Build Commands
Build the Release configuration unless asked otherwise.
```bash
# macOS
cmake --build build/arm64 --config RelWithDebInfo --target all --
cmake --build build/arm64 --config Release --target all --
# Linux
cmake --build build --config RelWithDebInfo --target all --
cmake --build build --config Release --target all --
# Windows (replace %build_type% with Debug/Release/RelWithDebInfo)
cmake --build . --config %build_type% --target ALL_BUILD -- -m
# Windows
cmake --build . --config Release --target ALL_BUILD -- -m
```
## Testing
+92 -52
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-10-05 10:49-0300\n"
"POT-Creation-Date: 2026-10-06 15:16-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 "to"
msgid "Range"
msgstr ""
msgid "Add height range"
@@ -5064,9 +5064,6 @@ msgstr ""
msgid "layers"
msgstr ""
msgid "Range"
msgstr ""
msgid "Empty string"
msgstr ""
@@ -9464,14 +9461,6 @@ 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 ""
@@ -9483,6 +9472,14 @@ 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 ""
@@ -9645,6 +9642,9 @@ msgstr ""
msgid "Please input layer value (>= 2)."
msgstr ""
msgid "to"
msgstr ""
msgid "Plate name"
msgstr ""
@@ -14779,6 +14779,12 @@ 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 ""
@@ -20421,6 +20427,21 @@ 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 ""
@@ -20506,26 +20527,10 @@ msgstr ""
msgid "Bed hidden"
msgstr ""
msgid "FEATURES"
msgid "Reference planes shown"
msgstr ""
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."
msgid "Reference planes hidden"
msgstr ""
msgid "Add material (extrude / revolve / sweep / loft / thicken / rib)"
@@ -20793,12 +20798,6 @@ 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 ""
@@ -21111,10 +21110,16 @@ 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 "Show the printer bed and its plate grid"
msgid "Create a new sketch"
msgstr ""
msgid "Place on Face (F) — lay the picked face on the bed"
@@ -21147,6 +21152,9 @@ msgstr ""
msgid "Height / Y"
msgstr ""
msgid "Sketch"
msgstr ""
msgid "Distance X"
msgstr ""
@@ -21625,6 +21633,9 @@ msgstr ""
msgid "Value"
msgstr ""
msgid "Pick a tool, or press Menu for the list."
msgstr ""
msgid "Constraints"
msgstr ""
@@ -21654,6 +21665,9 @@ msgstr ""
msgid "Show / hide"
msgstr ""
msgid "Zoom to selection"
msgstr ""
msgid "Check interference — find overlapping bodies"
msgstr ""
@@ -21711,6 +21725,9 @@ 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 ""
@@ -21753,10 +21770,6 @@ 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 ""
@@ -21811,7 +21824,7 @@ msgstr ""
msgid "Text unchanged"
msgstr ""
msgid "Text cancelled"
msgid "Text canceled"
msgstr ""
msgid "Import SVG"
@@ -22431,7 +22444,7 @@ msgstr ""
msgid ""
"Nothing yet — import a STEP or a mesh from the toolbar,\n"
"or click a reference plane and right-click it to start a sketch."
"or press Sketch and click a reference plane to start a sketch."
msgstr ""
msgid "No solid yet — select a sketch and right-click it to Extrude."
@@ -22463,12 +22476,25 @@ msgstr ""
msgid "Finding the feature's faces…"
msgstr ""
msgid "Select a body first — click it in the viewport or the Bodies list"
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"
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 ""
@@ -22488,9 +22514,6 @@ 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 ""
@@ -22839,6 +22862,16 @@ 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 ""
@@ -23055,7 +23088,10 @@ msgctxt "Design"
msgid "Sketch"
msgstr ""
msgid "Click a face or a reference plane, then pick a drawing tool"
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"
msgstr ""
msgctxt "Design"
@@ -23125,9 +23161,6 @@ 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 ""
@@ -23290,6 +23323,13 @@ 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
+92 -52
View File
@@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Orca Slicer\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-10-05 10:49-0300\n"
"POT-Creation-Date: 2026-10-06 15:16-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 "to"
msgid "Range"
msgstr ""
msgid "Add height range"
@@ -5060,9 +5060,6 @@ msgstr ""
msgid "layers"
msgstr ""
msgid "Range"
msgstr ""
msgid "Empty string"
msgstr ""
@@ -9460,14 +9457,6 @@ 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 ""
@@ -9479,6 +9468,14 @@ 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 ""
@@ -9641,6 +9638,9 @@ msgstr ""
msgid "Please input layer value (>= 2)."
msgstr ""
msgid "to"
msgstr ""
msgid "Plate name"
msgstr ""
@@ -14775,6 +14775,12 @@ 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 ""
@@ -20417,6 +20423,21 @@ 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 ""
@@ -20502,26 +20523,10 @@ msgstr ""
msgid "Bed hidden"
msgstr ""
msgid "FEATURES"
msgid "Reference planes shown"
msgstr ""
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."
msgid "Reference planes hidden"
msgstr ""
msgid "Add material (extrude / revolve / sweep / loft / thicken / rib)"
@@ -20789,12 +20794,6 @@ 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 ""
@@ -21107,10 +21106,16 @@ 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 "Show the printer bed and its plate grid"
msgid "Create a new sketch"
msgstr ""
msgid "Place on Face (F) — lay the picked face on the bed"
@@ -21143,6 +21148,9 @@ msgstr ""
msgid "Height / Y"
msgstr ""
msgid "Sketch"
msgstr ""
msgid "Distance X"
msgstr ""
@@ -21621,6 +21629,9 @@ msgstr ""
msgid "Value"
msgstr ""
msgid "Pick a tool, or press Menu for the list."
msgstr ""
msgid "Constraints"
msgstr ""
@@ -21650,6 +21661,9 @@ msgstr ""
msgid "Show / hide"
msgstr ""
msgid "Zoom to selection"
msgstr ""
msgid "Check interference — find overlapping bodies"
msgstr ""
@@ -21707,6 +21721,9 @@ 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 ""
@@ -21749,10 +21766,6 @@ 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 ""
@@ -21807,7 +21820,7 @@ msgstr ""
msgid "Text unchanged"
msgstr ""
msgid "Text cancelled"
msgid "Text canceled"
msgstr ""
msgid "Import SVG"
@@ -22427,7 +22440,7 @@ msgstr ""
msgid ""
"Nothing yet — import a STEP or a mesh from the toolbar,\n"
"or click a reference plane and right-click it to start a sketch."
"or press Sketch and click a reference plane to start a sketch."
msgstr ""
msgid "No solid yet — select a sketch and right-click it to Extrude."
@@ -22459,12 +22472,25 @@ msgstr ""
msgid "Finding the feature's faces…"
msgstr ""
msgid "Select a body first — click it in the viewport or the Bodies list"
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"
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 ""
@@ -22484,9 +22510,6 @@ 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 ""
@@ -22835,6 +22858,16 @@ 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 ""
@@ -23051,7 +23084,10 @@ msgctxt "Design"
msgid "Sketch"
msgstr ""
msgid "Click a face or a reference plane, then pick a drawing tool"
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"
msgstr ""
msgctxt "Design"
@@ -23121,9 +23157,6 @@ 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 ""
@@ -23286,6 +23319,13 @@ 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, centerd on a picked face or placed on a plane"
"hint": "Drill a hole, centered on a picked face or placed on a plane"
},
{
"id": "thread",
+3 -2
View File
@@ -311,11 +311,12 @@ 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 add.")
print(f"\nclang-tidy still fails on {len(failed)} file(s); the findings above are what --fix could not fix.")
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).")
"suggestions locally with scripts/run_clang_tidy.sh --fix (scripts\\run_clang_tidy.ps1 -Fix on Windows). "
"Other findings need a manual fix.")
return 1
print("clang-tidy passed.")
return 0
+5 -7
View File
@@ -23,7 +23,6 @@
#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>
@@ -78,12 +77,10 @@
#include <condition_variable>
#include <mutex>
#include <boost/thread.hpp>
//add json logic
#include "nlohmann/json.hpp"
using namespace nlohmann;
#endif
#include "nlohmann/json.hpp"
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem.hpp>
#include <boost/nowide/args.hpp>
@@ -157,6 +154,7 @@ using namespace nlohmann;
#include <stdio.h>
namespace fs = boost::filesystem;
using json = nlohmann::json;
#ifdef __WXGTK__
#if __has_include(<X11/Xlib.h>)
@@ -3524,7 +3522,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<string>& filament_variants = curr_variant_opt->values;
std::vector<std::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));
@@ -6554,7 +6552,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(), insert_iterator<vector<int>>(result_filaments, result_filaments.begin()));
unprintable_filament_vec[index].end(), std::insert_iterator<std::vector<int>>(result_filaments, result_filaments.begin()));
conflict_filament_vector = result_filaments;
}
}
-2
View File
@@ -15,8 +15,6 @@
#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"
@@ -466,8 +466,6 @@ void SkeletalTrapezoidation::constructFromPolygons(const Polygons& polys)
edge.from->incident_edge = &edge;
}
using NodeSet = SkeletalTrapezoidation::NodeSet;
void SkeletalTrapezoidation::separatePointyQuadEndNodes()
{
NodeSet visited_nodes;
-1
View File
@@ -93,7 +93,6 @@ using namespace libnest2d;
using Item = _Item<ExPolygon>;
using Box = _Box<Point>;
using Circle = _Circle<Point>;
using Segment = _Segment<Point>;
using MultiPolygon = ExPolygons;
// Summon the spatial indexing facilities from boost
-5
View File
@@ -23,11 +23,6 @@ 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
@@ -2851,7 +2851,6 @@ bool is_patch_inside_of_model(const SurfacePatch &patch,
/// <returns>shape point index</returns>
uint32_t get_shape_point_index(const CutAOI &cut, const CutMesh &model);
using PatchNumber = CutMesh::Property_map<FI, size_t>;
/// <summary>
/// Separate triangles singned with number n
/// </summary>
@@ -32,8 +32,6 @@
// #define DEBUG_FUZZY
using namespace Slic3r;
namespace Slic3r::Feature::FuzzySkin {
// Produces a random value between 0 and 1. Thread-safe.
-2
View File
@@ -122,8 +122,6 @@ Polylines get_polylines(const ScalarField& sf, const double tolerance = SCALED_E
namespace Slic3r {
using namespace std;
void FillTpmsFK::_fill_surface_single(const FillParams& params,
unsigned int thickness_layers,
const std::pair<float, Point>& direction,
-1
View File
@@ -25,7 +25,6 @@
#include <boost/property_tree/xml_parser.hpp>
#include <vector>
#include <utility>
namespace pt = boost::property_tree;
#include <boost/filesystem/operations.hpp>
#include <boost/algorithm/string.hpp>
-1
View File
@@ -1135,7 +1135,6 @@ void SeamPlacer::gather_seam_candidates(const PrintObject *po, const SeamPlacerI
void SeamPlacer::calculate_candidates_visibility(const PrintObject *po,
const SeamPlacerImpl::GlobalModelInfo &global_model_info) {
using namespace SeamPlacerImpl;
std::vector<PrintObjectSeamData::LayerSeams> &layers = m_seam_per_object[po].layers;
tbb::parallel_for(tbb::blocked_range<size_t>(0, layers.size()),
-2
View File
@@ -1482,7 +1482,6 @@ static FilamentGroupContext build_filament_group_context(
FilamentMapMode mode,
const std::unordered_map<int, int>& nozzle_status)
{
using namespace MultiNozzleUtils;
using namespace FilamentGroupUtils;
FilamentGroupContext context;
@@ -1691,7 +1690,6 @@ static std::vector<int> apply_master_extruder_preference(const FilamentGroupCont
// multi-nozzle (H2C/A2L) resolves to a nozzle-granular result.
MultiNozzleUtils::LayeredNozzleGroupResult ToolOrdering::get_recommended_filament_maps(const std::vector<std::vector<unsigned int>>& layer_filaments, const Print* print, const FilamentMapMode mode, const std::vector<std::set<int>>& physical_unprintables, const std::vector<std::set<int>>& geometric_unprintables, const std::map<int, std::set<NozzleVolumeType>>& unprintable_volumes, const std::unordered_map<int, int>& nozzle_status)
{
using namespace FilamentGroupUtils;
using namespace MultiNozzleUtils;
if (!print || layer_filaments.empty())
+1
View File
@@ -16,6 +16,7 @@
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,6 +20,7 @@
namespace Slic3r::Geometry {
using VD = VoronoiDiagram;
using PolygonsSegmentIndexConstIt = std::vector<Arachne::PolygonsSegmentIndex>::const_iterator;
using LinesIt = Lines::iterator;
using ColoredLinesIt = ColoredLines::iterator;
+14 -16
View File
@@ -10,8 +10,6 @@
#include "libslic3r/Point.hpp"
#include "libslic3r/libslic3r.h"
using VD = Slic3r::Geometry::VoronoiDiagram;
namespace Slic3r::Geometry {
// Represent trapezoid Voronoi cell around segment.
@@ -19,8 +17,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 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.
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.
SegmentCellRange() = delete;
explicit SegmentCellRange(const PT &source_segment_start_point, const PT &source_segment_end_point)
@@ -34,8 +32,8 @@ template<typename PT> struct SegmentCellRange
template<typename PT> struct PointCellRange
{
const PT source_point; // The source point of this cell.
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.
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.
PointCellRange() = delete;
explicit PointCellRange(const PT &source_point) : source_point(source_point) {}
@@ -46,20 +44,20 @@ template<typename PT> struct PointCellRange
class VoronoiUtils
{
public:
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 Vec2i64 to_point(const VoronoiDiagram::vertex_type &vertex);
static bool is_finite(const VD::vertex_type &vertex);
static bool is_finite(const VoronoiDiagram::vertex_type &vertex);
static VD::vertex_type make_rotated_vertex(VD::vertex_type &vertex, double angle);
static VoronoiDiagram::vertex_type make_rotated_vertex(VoronoiDiagram::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 VD::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end);
get_source_segment(const VoronoiDiagram::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end);
template<typename SegmentIterator>
static typename boost::polygon::enable_if<
@@ -73,7 +71,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 VD::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end);
get_source_point_index(const VoronoiDiagram::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end);
/**
* Discretize a parabola based on (approximate) step size.
@@ -113,7 +111,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 VD::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end);
compute_segment_cell_range(const VoronoiDiagram::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end);
/**
* Compute the range of line segments that surround a cell of the skeletal
@@ -140,19 +138,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 VD::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end);
compute_point_cell_range(const VoronoiDiagram::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 VD::vertex_type &vertex)
template<typename T> static bool is_in_range(const VoronoiDiagram::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 VD::edge_type &edge)
template<typename T> static bool is_in_range(const VoronoiDiagram::edge_type &edge)
{
if (edge.vertex0() == nullptr || edge.vertex1() == nullptr)
return false;
-2
View File
@@ -230,7 +230,6 @@ std::vector<Bridge> get_grouped_bridges(
{
result.reserve(bridge_expansions.size());
uint32_t group_id = 0;
using std::move_iterator;
for (ExPolygon& expolygon : bridge_expolygons)
result.push_back({ std::move(expolygon), group_id ++, bridge_expansions.end() });
}
@@ -432,7 +431,6 @@ Surfaces expand_bridges_detect_orientations(
const float closing_radius
)
{
using namespace Slic3r::Algorithm;
double thickness;
ExPolygons bridge_expolygons = fill_surfaces_extract_expolygons(surfaces, {stBottomBridge}, thickness);
-1
View File
@@ -660,7 +660,6 @@ bool empty(const CGALMesh &mesh)
bool repair(TriangleMesh& mesh, RepairedMeshErrors* repaired_errors, std::string* error)
{
using namespace CGAL;
namespace PMP = CGAL::Polygon_mesh_processing;
if (mesh.empty())
@@ -63,6 +63,7 @@ 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
@@ -263,7 +263,6 @@ size_t get_shapes_count(const NSVGimage &image)
} // namespace Slic3r
namespace {
using namespace Slic3r; // Polygon + Vec2f
Point::coord_type to_coor(float val, double scale) { return static_cast<Point::coord_type>(std::round(val * scale)); }
-1
View File
@@ -2175,7 +2175,6 @@ namespace client
{
macro_processor() : macro_processor::base_type(start)
{
using namespace qi::labels;
qi::alpha_type alpha;
qi::alnum_type alnum;
qi::eps_type eps;
+1
View File
@@ -87,6 +87,7 @@
#include "libslic3r/GCode/Thumbnails.hpp"
namespace fs = boost::filesystem;
using json = nlohmann::json;
using boost::property_tree::ptree;
+4 -1
View File
@@ -80,6 +80,8 @@
#include <vector>
#include <utility>
namespace fs = boost::filesystem;
// Mark string for localization and translate.
#define L(s) Slic3r::I18N::translate(s)
@@ -87,6 +89,8 @@
// 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
@@ -1527,7 +1531,6 @@ bool PresetBundle::apply_vendor_config(
const std::string& preferred_printer_variant,
const std::string& preferred_filament)
{
namespace fs = boost::filesystem;
// Get current configuration from AppConfig
const auto old_vendors = app_config->vendors();
+2 -4
View File
@@ -11,8 +11,6 @@
#include <boost/filesystem/path.hpp>
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
namespace Slic3r {
class BBLProject;
@@ -208,7 +206,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 */
fs::path task_path; /* local path of 3mf or gcode */
boost::filesystem::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 */
@@ -326,7 +324,7 @@ public:
std::string project_url_md5; /* md5 of project url file */
std::string project_name;
std::string project_3mf_file;
fs::path project_path;
boost::filesystem::path project_path;
std::string project_content;
std::string project_country_code;
-2
View File
@@ -404,7 +404,6 @@ std::string debug_out_path(const char *name, ...)
}
namespace logging = boost::log;
namespace src = boost::log::sources;
namespace expr = boost::log::expressions;
namespace keywords = boost::log::keywords;
namespace attrs = boost::log::attributes;
@@ -892,7 +891,6 @@ int copy_file_linux_read_write(int infile, int outfile, uintmax_t file_size)
// and only features supported by Linux 3.10 (on our build server with CentOS 7) are kept, namely sendfile with ranges and statx() are not supported.
bool copy_file_linux(const boost::filesystem::path &from, const boost::filesystem::path &to, boost::system::error_code &ec)
{
using namespace boost::filesystem;
struct fd_wrapper
{
+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(), insert_iterator<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(), std::insert_iterator<std::vector<int>>(result_filaments, result_filaments.begin()));
conflict_filament_vector = result_filaments;
}
}
+1
View File
@@ -69,6 +69,7 @@
#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 "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <nlohmann/json.hpp>
#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<json>> paths);
void Reload(wxString aux_path, std::map<std::string, std::vector<nlohmann::json>> paths);
void update_all_panel();
void update_all_cover();
@@ -18,8 +18,6 @@
class AuxiliaryModelNode;
WX_DEFINE_ARRAY_PTR(AuxiliaryModelNode*, AuxiliaryModelNodePtrArray);
namespace fs = boost::filesystem;
class AuxiliaryModelNode
{
public:
-4
View File
@@ -73,10 +73,6 @@ private:
CancelFn m_cancel_cb;
};
namespace GUI {
using Slic3r::BBLStatusBar;
}
}
#endif // BBLSTATUSBAR_HPP
-4
View File
@@ -80,10 +80,6 @@ private:
CancelFn m_cancel_cb_fina;
};
namespace GUI {
using Slic3r::BBLStatusBarBind;
}
} // namespace Slic3r
#endif // BBLSTATUSBAR_HPP
-4
View File
@@ -97,10 +97,6 @@ private:
CancelFn m_cancel_cb_fina;
};
namespace GUI {
using Slic3r::BBLStatusBarPrint;
}
wxDECLARE_EVENT(EVT_SHOW_ERROR_INFO, wxCommandEvent);
} // namespace Slic3r
-4
View File
@@ -99,10 +99,6 @@ 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,6 +41,7 @@
#define TOPBAR_TITLE_WIDTH 300
using namespace Slic3r;
using namespace Slic3r::GUI;
enum CUSTOM_ID
{
-2
View File
@@ -18,8 +18,6 @@ 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 = *wxGetApp().preset_bundle;
PresetBundle& preset_bundle = *GUI::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() = wxGetApp().preset_bundle->is_bbl_vendor();
m_fff_print->is_BBL_printer() = GUI::wxGetApp().preset_bundle->is_bbl_vendor();
return m_print->validate(warnings, collison_polygons, height_polygons);
}
@@ -22,8 +22,6 @@
#include "CapsuleButton.hpp"
namespace Slic3r::GUI { struct IntEvent; }
using namespace Slic3r;
using namespace Slic3r::GUI;
namespace Slic3r { namespace GUI {
#define ANIMATION_REFRESH_INTERVAL 20
+3 -1
View File
@@ -26,7 +26,7 @@
#include <memory>
#include "slic3r/GUI/BBLStatusBarBind.hpp"
#include "slic3r/GUI/Jobs/BindJob.hpp"
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/DeviceCore/DevDefs.h"
#include "slic3r/GUI/Jobs/Worker.hpp"
#include <utility>
@@ -54,6 +54,8 @@
#include "DeviceCore/DevManager.h"
using json = nlohmann::json;
namespace Slic3r {
namespace GUI {
-2
View File
@@ -45,8 +45,6 @@
#include <gtk/gtk.h>
#endif
using Slic3r::GUI::format_wxstr;
#define BORDER_W 10
// ---------------------------------
+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, centerd 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, centered 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 cancelled"));
set_status(StatusKind::Info, editing ? _L("Text unchanged") : _L("Text canceled"));
return;
}
if (!have) return;
-1
View File
@@ -95,7 +95,6 @@ namespace GUI {
using Config::Snapshot;
using Config::SnapshotDB;
// Configuration data structures extensions needed for the wizard
+1 -3
View File
@@ -43,8 +43,6 @@
#include <wx/types.h>
namespace fs = boost::filesystem;
namespace Slic3r {
namespace GUI {
@@ -88,7 +86,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(fs::path dir, const std::string &vendor_name, bool is_in_resources, bool is_bbl_bundle = false);
bool load(boost::filesystem::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; }
};
+3 -1
View File
@@ -25,7 +25,7 @@
#include "slic3r/GUI/Widgets/RadioBox.hpp"
#include <cstdio>
#include <map>
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
#include <nlohmann/json.hpp>
#include <cstdlib>
#include "slic3r/GUI/GUI_Utils.hpp"
#include "slic3r/GUI/Widgets/Label.hpp"
@@ -91,6 +91,8 @@
#define SELECT_ALL_OPTION_COLOUR wxColour("#009688")
#define DEFAULT_PROMPT_TEXT_COLOUR wxColour("#ACACAC")
using json = nlohmann::json;
namespace Slic3r {
namespace GUI {
+3 -1
View File
@@ -1,10 +1,12 @@
#include "DevAxis.h"
#include "DevUtil.h"
#include "json_diff.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/DeviceManager.hpp"
#include "slic3r/GUI/DeviceCore/DevDefs.h"
using json = nlohmann::json;
namespace Slic3r
{
+1 -2
View File
@@ -2,7 +2,6 @@
#include <memory>
#include <nlohmann/json.hpp>
#include <string>
#include "slic3r/Utils/json_diff.hpp"
namespace Slic3r {
@@ -22,7 +21,7 @@ public:
bool IsArchCoreXY() const;
public:
void ParseAxis(const json &print_json);
void ParseAxis(const nlohmann::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
+3 -1
View File
@@ -1,11 +1,13 @@
#include "DevAxis.h"
#include "json_diff.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/DeviceManager.hpp"
#include <string>
#include <cstdlib>
#include <cstdio>
using json = nlohmann::json;
namespace Slic3r
{
+3 -1
View File
@@ -1,7 +1,9 @@
#include "DevBed.h"
#include "json_diff.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/DeviceManager.hpp"
using json = nlohmann::json;
namespace Slic3r {
void DevBed::ParseV1_0(const json &print_json, DevBed *system)
+2 -3
View File
@@ -1,6 +1,5 @@
#pragma once
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
namespace Slic3r {
@@ -16,8 +15,8 @@ public:
public:
static void ParseV1_0(const json &print_json, DevBed *system);
static void ParseV2_0(const json &print_json, DevBed *system);
static void ParseV1_0(const nlohmann::json &print_json, DevBed *system);
static void ParseV2_0(const nlohmann::json &print_json, DevBed *system);
private:
+3 -1
View File
@@ -1,6 +1,6 @@
#include <algorithm>
#include <boost/log/trivial.hpp>
#include "json_diff.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/I18N.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
@@ -22,6 +22,8 @@
#include "DevFilaSystem.h"
#include "DevConfig.h"
using json = nlohmann::json;
namespace Slic3r {
static float string_to_float(const std::string &str_value)
+7 -8
View File
@@ -2,7 +2,6 @@
#include <nlohmann/json.hpp>
#include <optional>
#include <vector>
#include "slic3r/Utils/json_diff.hpp"
#include "DevDefs.h"
@@ -86,11 +85,11 @@ public:
std::vector<FlowRatioCalibResult> GetFlowRatioResult() const {return m_flow_ratio_results; }
protected:
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);
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);
private:
MachineObject* m_owner{nullptr};
@@ -119,11 +118,11 @@ private:
bool m_calib_finished{false};
public:
static void ParseCalibVersion(const json& j, DevCalib* system);
static void ParseCalibVersion(const nlohmann::json& j, DevCalib* system);
static void ParseSupportNewAutoCalib(int flag, DevCalib* system);
static void ParseV1_0(const json& print_json, DevCalib* system, bool key_field_only);
static void ParseV1_0(const nlohmann::json& print_json, DevCalib* system, bool key_field_only);
};
} // namespace Slic3r
+3 -1
View File
@@ -3,9 +3,11 @@
#include "DevConfig.h"
#include "DevUtil.h"
#include "json_diff.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/DeviceManager.hpp"
using json = nlohmann::json;
namespace Slic3r {
bool DevChamber::HasChamber() const { return m_owner->GetConfig()->HasChamber(); }
+3 -4
View File
@@ -1,7 +1,6 @@
#pragma once
#include <memory>
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
namespace Slic3r {
@@ -25,10 +24,10 @@ public: // getter
public:
// setter
void ParseChamber(const json &print_json);
void ParseChamber(const nlohmann::json &print_json);
void ParseChamberV1_0(const json& print_json);
void ParseChamberV2_0(const json& print_json);
void ParseChamberV1_0(const nlohmann::json& print_json);
void ParseChamberV2_0(const nlohmann::json& print_json);
// control
int CtrlSetChamberTemp(int temp);
+3 -1
View File
@@ -1,8 +1,10 @@
#include "DevChamber.h"
#include "json_diff.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/DeviceManager.hpp"
#include <string>
using json = nlohmann::json;
namespace Slic3r {
int DevChamber::CtrlSetChamberTemp(int temp)
-1
View File
@@ -2,7 +2,6 @@
#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 "slic3r/Utils/json_diff.hpp"
#include <nlohmann/json.hpp>
#include <wx/string.h>
#include <limits>
@@ -47,11 +47,11 @@ public:
public:
/*Setters*/
void ParseConfig(const json& print_json);
void ParseConfig(const nlohmann::json& print_json);
void ParseChamberConfig(const json& print_json); // chamber
void ParsePrintOptionsConfig(const json& print_json); // print options
void ParseCalibrationConfig(const json& print_json); //cali
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
private:
[[maybe_unused]] MachineObject* m_obj;
+1 -1
View File
@@ -1,6 +1,6 @@
#include "DevConfigUtil.h"
#include "json_diff.hpp"
#include <nlohmann/json.hpp>
#include "slic3r/GUI/DeviceManager.hpp"
#include <string>
-1
View File
@@ -4,7 +4,6 @@
#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 "slic3r/Utils/json_diff.hpp"
#include <nlohmann/json.hpp>
#include <string>
#include <ctime>
#include <wx/string.h>
@@ -15,7 +15,7 @@ class DevCtrlInfo
{
public:
DevCtrlInfo() {};
DevCtrlInfo(MachineObject* obj, int sequence_id, const json& req_json, int interval_max = 3, int interval_min = 0);
DevCtrlInfo(MachineObject* obj, int sequence_id, const nlohmann::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;
json m_request_json = json();
nlohmann::json m_request_json = nlohmann::json();
// check
int m_request_interval_max = 3;
@@ -5,8 +5,6 @@
#include <map>
#include <nlohmann/json.hpp>
using namespace nlohmann;
namespace Slic3r
{
+1 -1
View File
@@ -3,7 +3,7 @@
#include <optional>
#include "libslic3r/CommonDefs.hpp"
#include "slic3r/Utils/json_diff.hpp"
#include <nlohmann/json.hpp>
#include <wx/string.h>
#include "DevDefs.h"
@@ -15,7 +15,6 @@
#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 "slic3r/Utils/json_diff.hpp"
#include <nlohmann/json.hpp>
#include <vector>
#include <wx/string.h>
@@ -1,11 +1,8 @@
#include <nlohmann/json.hpp>
#include "DevExtruderSystem.h"
#include "slic3r/GUI/DeviceManager.hpp"
using namespace nlohmann;
namespace Slic3r
{
int DevExtderSystem::CtrlRetrySwitching()
-1
View File
@@ -6,7 +6,6 @@
#include <string>
#include <vector>
#include <wx/app.h>
#include "json_diff.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
using namespace nlohmann;
+5 -6
View File
@@ -2,7 +2,6 @@
#include <functional>
#include <cstdint>
#include <nlohmann/json.hpp>
#include "slic3r/Utils/json_diff.hpp"
#include <map>
#include <vector>
@@ -13,7 +12,7 @@ namespace Slic3r {
class MachineObject;
enum AirDuctType { AIR_FAN_TYPE, AIR_DOOR_TYPE };
typedef std::function<void(const json &)> CommandCallBack;
typedef std::function<void(const nlohmann::json &)> CommandCallBack;
enum AIR_FUN : int {
FAN_HEAT_BREAK_0_IDX = 0,
@@ -123,14 +122,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 json &response);
int command_handle_response(const nlohmann::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 json &print_json);
void ParseV2_0(const json &print_json);
void ParseV3_0(const json &print_json);
void ParseV1_0(const nlohmann::json &print_json);
void ParseV2_0(const nlohmann::json &print_json);
void ParseV3_0(const nlohmann::json &print_json);
public:
bool GetSupportAirduct() { return is_support_airduct; };
@@ -1,11 +1,13 @@
#include "DevFilaAmsSetting.h"
#include "DevFilaSystem.h"
#include "json_diff.hpp"
#include <nlohmann/json.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,7 +14,6 @@
#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 "slic3r/Utils/json_diff.hpp"
#include <nlohmann/json.hpp>
namespace Slic3r
{
@@ -67,7 +67,7 @@ public:
static CheckResult check_filaments_in_blacklist(const CheckFilamentInfo& info);
public:
static json filaments_blacklist;
static nlohmann::json filaments_blacklist;
};// class DevFilaBlacklist
}// namespace Slic3r
@@ -18,7 +18,6 @@
#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 "slic3r/Utils/json_diff.hpp"
#include <nlohmann/json.hpp>
#include "DevDefs.h"
#include "DevFilaAmsSetting.h"
@@ -415,9 +415,9 @@ private:
class DevFilaSystemParser
{
public:
static void ParseV1_0(const json& print_json, MachineObject* obj, DevFilaSystem* system, bool key_field_only);
static void ParseV1_0(const nlohmann::json& print_json, MachineObject* obj, DevFilaSystem* system, bool key_field_only);
static void ParseAgentFilament(const json& data, MachineObject* obj, DevFilaSystem* system);
static void ParseAgentFilament(const nlohmann::json& data, MachineObject* obj, DevFilaSystem* system);
};
struct DevFilamentDryingPreset

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