The device drying options hold several values per filament, as many as
the filament preset gives, and a project stores them as the filaments'
values one after another. The CLI filament merge wrote them like an
option with one value per filament, putting each preset's first value at
the filament's own index, so a project with three filaments whose preset
gives "1", "0" was exported with 1;1;1;0;1;0 where the GUI writes
1;0;1;0;1;0.
The merge now leaves these options out of the per-filament pass and
rebuilds them afterwards from every filament's values in slot order.
Without a fixed number of values per filament one slot cannot be
replaced in place, so the stored values are kept when any slot has no
config to rebuild from.
The Bambu network plug-in's code protector rewrites one page of its own signed __TEXT after loading. The hardened runtime tolerates that until the page is evicted; the next read of it then kills OrcaSlicer with CODESIGNING Invalid Page. Bambu Studio signs with allow-unsigned-executable-memory for this reason; with it added, the same build survives critical memory pressure that killed it in 30 s without.
A project's listed settings are carried onto its base preset by update_non_diff_values_to_base_config, which matched variants by exact name and id. A variant the base gained after the project was saved got the base's value, while the same value in a user preset now falls back to the preset's first variant of that extruder. So an old project opened with its printer preset already modified, and saving it wrote the base's values into the 3MF.
The function now maps variants with map_variant_indices, as update_diff_values_to_child_config does: a base variant the project does not list takes the project's first variant of the same extruder. The variant lists themselves stay the base's, so a fallback never writes one variant's name over another's.
The 02.08.02 series appended queue_plate_id to PrintParams and nothing
after it changed the ABI OrcaSlicer calls, so adding the field brings
the current layout up to 02.08.04. Make 02.08.04 the latest series and
drop 02.08.01 from the whitelist: its PrintParams no longer matches, and
its malformed bind table is refused by dyld on macOS 27, so it cannot
load there. A stored 02.08.01 falls back to the latest series through
the existing unsupported-version path.
The directive sat at global scope in a header that DeviceManager.hpp
includes, so most of the GUI compiled with all of std in the global
namespace. 42 files had come to rely on it, mostly for string, vector
and unordered_map, four of them for the ""sv and ""ms literals.
Those sites are qualified. GCodeViewer.cpp spelled the type as
std::vector<::string>, which only resolved through the directive. The
files that use the ""sv and ""ms literals get a file-scope
"using namespace std::string_view_literals;" or
"using namespace std::chrono_literals;", as other sources already do.
# Description
The default Orca Cloud API URL omits its scheme, so libcurl interprets
it as HTTP and follows the server redirect to HTTPS. Recent libcurl
versions intentionally do not forward the `Authorization` header across
protocol/port-changing redirects, causing Orca Cloud profile sync to
receive HTTP 401 `missing_authorization` responses and eventually log
the user out.
Use the HTTPS API URL directly. Besides restoring sync with current
libcurl versions, this improves security by preventing the bearer access
token from being sent in the initial unencrypted HTTP request.
# Screenshots/Recordings/Graphs
N/A — no UI changes.
## Tests
- `git diff --check`
- Confirmed with current libcurl that the scheme-less URL redirects and
loses the authorization header, while the direct HTTPS URL retains it
A using-directive or using-declaration in the global namespace of a
header reaches every file that includes it, and a using-declaration also
makes the include checker treat that header as the one to include for
the name. google-global-names-in-headers reports both, on changed lines
like the existing check, so headers that still have one are not held to
it until the line is touched.
The check does not see a using inside a namespace.
clang_tidy_diff.py's closing message assumed every finding was a missing
include; it now says other findings need a manual fix.
- ClipperUtils.hpp imported jtMiter, jtRound and jtSquare into the
global namespace for every includer. No code names them there.
- BBLStatusBar.hpp, BBLStatusBarBind.hpp, BBLStatusBarPrint.hpp,
BBLStatusBarSend.hpp and ProgressStatusBar.hpp re-exported their class
into Slic3r::GUI. Nothing refers to the class through that namespace.
- Jobs/SendJob.hpp, Jobs/BindJob.hpp, Jobs/UpgradeNetworkJob.hpp and
AuxiliaryDataViewModel.hpp declared "namespace fs = boost::filesystem;"
at global scope without using it.
Each of these headers put a using or namespace alias at global or
namespace scope, which every includer inherited:
- BBLTopbar.hpp: "using namespace Slic3r::GUI;" at global scope, reached
through MainFrame.hpp. Seven source files used GUI names unqualified
outside the namespace because of it, one of them as "::RadioBox".
- IMSlider.hpp and TickCode.hpp: "using namespace CustomGCode;" inside
Slic3r.
- ProjectTask.hpp, Jobs/PrintJob.hpp and ConfigWizard_private.hpp:
"namespace fs = boost::filesystem;". PresetBundle.cpp and GUI_App.cpp
had no alias of their own.
- VoronoiUtils.hpp: "using VD = Slic3r::Geometry::VoronoiDiagram;" at
global scope.
The headers now spell the names out. Source files that used them get
the qualifier, or a using of their own where there are many uses.
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.
* Stop Leaking json Through Headers and Drop Includes Kept Only for the Name
AppConfig.hpp, DeviceManager.hpp and UserManager.hpp carried a global
"using namespace nlohmann;", json_diff.hpp a global "using json =
nlohmann::json;" and PrinterFileSystem.h a global "using nlohmann::json;".
Every file that included one of them, directly or not, could write a
bare json, and 63 did without declaring it.
The last two also made the include checker treat json_diff.hpp and
PrinterFileSystem.h as the headers that provide json, so they were
included from files that use nothing else from them: 57 of the 59
includers of json_diff.hpp never name json_diff.
The five statements are removed. Headers that use the type now spell
nlohmann::json, source files declare their own "using json =
nlohmann::json;", and the includes that only supplied the name are
dropped or replaced by <nlohmann/json.hpp>.
Eight files reached json_diff.hpp only through an include that is now
gone and with it lost that header's "using namespace std;". The std
names they used unqualified are qualified.
* Declare json in OrcaSlicer.cpp on Every Platform
OrcaSlicer.cpp had its "using namespace nlohmann;" and the json include
inside the Linux-only include block, so on Windows and macOS it took
json from AppConfig.hpp's global directive, which is gone. The include
and a "using json = nlohmann::json;" now sit outside the block.
# Description
Filament changes on the Prusa CORE One MMU3, MK4 MMU3 and CORE One INDX
now use the settings PrusaSlicer 3.0 ships for them. On the MMU3
printers these are Prusa's per-material ramming, load and unload speeds,
cooling moves and stamping. On the INDX they are Prusa's multi-tool
ramming and 10 mm³ minimal purge, plus a filament start G-code that
restores pressure advance after the purge station disables it and then
sends `M573 R`, as PrusaSlicer does.
This supersedes #16008. Thanks to @nuclearmistake for that work, which
identified what these printers need for reliable filament changes. This
PR reaches the same goal with the existing `include` mechanism rather
than new printer-level overrides. The values live in shared templates in
the Prusa bundle (PLA and PETG families with High Flow ramming variants,
and one for the INDX), and the filament presets include them, so each
material keeps its own values as in PrusaSlicer. For the MK4 MMU3, ten
small presets inherit the MK4 filament tunes and include the templates;
they cover the materials PrusaSlicer offers with the MMU3 and replace
the library generics as that printer's defaults. The CORE One MMU3 0.6
nozzle now uses the 0.6 Generic PLA and Prusament rPLA profiles, as in
PrusaSlicer. Unlike #16008, filaments from Orca's shared library keep
Orca's defaults on these printers.
No engine change, and printers without an MMU3 or INDX are unaffected.
MK4 MMU3 users also get the MK4's material tuning, such as temperatures
and cooling, from the new presets.
# Screenshots/Recordings/Graphs
<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->
## Tests
<!--
> Please describe the tests that you have conducted to verify the
changes made in this PR.
-->
<!--
> A guide for users on how to download the artifacts from this PR.
-->
[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
# Description
This PR follows up on #16019 with fixes and workflow improvements to the
Design tab. Sketching now waits for you to pick a plane, the reference
planes stay out of the way until they are needed, and the camera follows
the mouse controls set in Preferences, as suggested by @Felix14-v2 in
https://github.com/OrcaSlicer/OrcaSlicer/pull/16019#issuecomment-5932747510.
It also fixes rendering, camera and Move bugs, which are listed below.
https://github.com/user-attachments/assets/6aac0a03-8405-403a-93b2-1fbf95da9fe7
**Improvements:**
- Pan and orbit follow Preferences > Control while sketching too. A
right-drag no longer ends the polyline chain or drops the point already
placed, and in the Touchpad camera style Alt+move and Shift+move orbit
and pan while a draw tool is selected.
- The XY, XZ and YZ planes are separate labelled squares around the
origin, in their axis colours, with dash-dot axes. They no longer cross
through the bed as one grey smear. Hovering over a plane greys it out,
and selecting one makes it solid.
- The reference planes stay hidden until a sketch needs them. A new
Origin row in the Feature tree keeps them on screen, and Ctrl+Shift+O
toggles it.
- A sketch opens only once its plane is chosen. If a flat face or a
reference plane is already picked, the sketch opens on it at once.
Otherwise the planes appear, and the next plane or face you click opens
the sketch. Esc or Cancel leaves without one.
- The Bed checkbox is now a row under Origin, and its state is
remembered across sessions. Both rows sit above the feature list as
fixed view switches.
- Zoom to selection is available on Feature tree and Bodies rows and in
the right-click menu.
- A Sketch button replaces the FEATURES label, the import icons now have
an arrow, and the document icons are sized consistently.
**Fixes:**
- Feature previews no longer z-fight with the bodies. The Hole preview
now hides the bodies and shows only the result, as Fillet/Chamfer and
Draft already do.
- Body edge lines stay in sync with the bodies after undo, hide and
delete.
- The bed, grid and reference planes stay aligned on every plate, not
only the first.
- The Fit camera button frames the selection and sketches, or everything
on show, instead of always framing the whole bed.
- Grabbing a move arrow no longer makes the body jump on the first drag.
- Move no longer gets stuck after Esc or a click off the gizmo. Esc and
Cancel put the body back, and undo waits until the Move is confirmed or
cancelled.
- The camera stays still when the first body appears.
- The view buttons no longer cover the status line at display scales
above 100%.
- The import buttons no longer stay highlighted after a click.
- The Bodies right-click menu no longer closes at once on Linux.
# Screenshots/Recordings/Graphs
- **Z fighting issue**
Before fix:
https://github.com/user-attachments/assets/0da30897-8d81-494a-a206-9b4dfd8fa9c0
After fix:
https://github.com/user-attachments/assets/04ccad39-dbbc-4bcf-8d5c-3ba4894cb755
- **Sketch plane rendering**
Before:
<img width="374" alt="{CCFCEB16-20FA-4202-A5F8-5F2219E44C0B}"
src="https://github.com/user-attachments/assets/2dfd19b2-9991-45c7-91e3-e139d111229c"
/>
After:
<img width="1706" height="1258" alt="image"
src="https://github.com/user-attachments/assets/3ec89038-4614-4c04-9f20-37bfc50ee5ef"
/>
- **Wrong body frame lines**
Before:
https://github.com/user-attachments/assets/81ccae26-2a9d-4ecb-9928-678dbe9fb94c
After
## Tests
<!--
> Please describe the tests that you have conducted to verify the
changes made in this PR.
-->
<!--
> A guide for users on how to download the artifacts from this PR.
-->
[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
* fix: crash in LAN mode when the printer type is not known yet
InputIpAddressDialog::set_machine_obj() built the help image name from
the printer config with no fallback. If the printer type is empty or
unknown, for example before the first push_all arrives on a flaky LAN
link, the lookup returns "" and create_scaled_bitmap("_en") throws.
The dialog is opened by the "LAN Connection Failed" handlers in
MediaPlayCtrl and MediaFilePanel, where nothing catches the exception,
so the app crashes.
Use input_access_code_x1 when there is no image, and the _cn image for
zh_CN, the same as ConnectPrinterDialog::init_bitmap().
Ported from Bambu Studio 52ca2ec5d1.
* fix: return an empty bitmap for an empty icon name
create_scaled_bitmap() threw when a caller passed an empty name. That
happens when a printer config lookup has no entry, for example in
AMSSetting::update_ams_img() for a printer type with no AMS image.
Log an error and return wxNullBitmap instead.
Ported from Bambu Studio 52ca2ec5d1.
They now sit above the features' framed list as fixed view switches:
a click no longer selects them, they stay put while the features scroll,
their eyes line up with the features' eyes, and their labels dim when
hidden. Ctrl+Shift+O toggles the Origin from the keyboard, as
Ctrl+Shift+B does the Bed. The test script's position for the first
feature row is calculated, not measured, and needs re-measuring on the
test setup.
The bed's show/hide state is now remembered across sessions like the Origin
row's, shown by default. The GUI ladder's ribbon x-coordinates are shifted by
the removed checkbox's derived width and still need re-measuring on the rig.
Sketch on a picked flat face or reference plane opens the sketch on it at once. With nothing
picked it no longer enters sketch mode: the reference planes and axes come up, and the plane or
flat face clicked next opens the sketch and puts them away. Esc or Cancel leaves without one.
A picked plane is used up by the sketch on it and dropped by Esc or a click on nothing, the plane
prompt is no longer replaced by a stale tool hint, and clicking the face a sketch was just
cancelled on picks that face again rather than the whole body.
* perf: write post-processed G-code without a per-line copy
* perf: size the post-process line map from the first pass
* test: line ends of the exported G-code
* test: include the headers the line-ends test and gcode() helper use