Commit Graph

18008 Commits

Author SHA1 Message Date
SoftFever
77a64c300a Merge branch 'main' into feature/wipetower2_travel_path 2026-08-05 00:11:07 +08:00
SoftFever
0051768206 Smooth out the spiral lift when arc fitting is disabled (#15118)
The linear approximation used a heuristic segment count clamped to 4..16, so the
lift ran as a coarse polygon. Every vertex is a direction change large enough to
hit the firmware's jerk limit, forcing a decelerate/accelerate at each corner —
the lift micro-stutters instead of running at speed. The segment count now comes
from the chord deviation against the slicing resolution, reusing
Geometry::ArcWelder::arc_discretization_steps, which keeps the turn at each
vertex shallow enough for the firmware to carry speed through the whole move.

Points are emitted through GCodeG1Formatter so they carry the same quantization
as the rest of the G-code, and the move comment now trails the feedrate line to
match _travel_to_z and the G2/G3 branch. No change when arc fitting is enabled.
2026-08-05 00:09:46 +08:00
Ian Bassi
1d078e005a Mouse ear Wiki redirect (#15115)
Based in https://github.com/OrcaSlicer/OrcaSlicer/pull/15015 and https://github.com/OrcaSlicer/OrcaSlicer_WIKI/pull/323
2026-08-04 11:37:05 -03:00
Kris Austin
82759d3899 fix: make the error dialog caret point at the character it's blaming (#14886)
* fix: make the error dialog caret point at the character it's blaming

Custom G-code parse errors print the offending line with a '^' under the
character that broke, positioned with spaces so it only lines up in a
fixed-width font. Since v2.3.2 these dialogs rendered entirely in the
proportional UI font, so the caret drifted left of its column and landed
on unrelated text.

Render only the code excerpts (the offending source line and its caret) in
the fixed-width face, leaving the surrounding prose in the UI font, and
reserve the horizontal scrollbar's height so a long line does not clip.
Rename the flag to has_code_excerpts to match what it now means.

Fixes #14869

* refactor(GUI): use <code> instead of <tt> for error excerpts

wxHTML maps <tt>, <code>, <kbd> and <samp> to the same fixed-width
handler, so this renders identically. <code> is the non-deprecated
tag and matches what the original code used.

* fix(GUI): align the error caret with real spaces, not &nbsp;

The caret line was padded with &nbsp; so its spaces would survive inline
HTML. wxHTML measures every glyph by its font extent, so where the fixed
font lacks a U+00A0 glyph the fallback renders it about twice as wide, and
the all-&nbsp; caret line outran the source, drifting the ^ to the right.

Wrap the excerpts in a small <excerpt> tag, registered on the dialog's own
parser, that switches on wxHTML literal-whitespace mode so the caret uses
real spaces that match the source column in any font. It sits inside <code>
for the fixed face; <pre> would do both but forces a blank line above it.

---------

Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
2026-08-04 22:01:45 +08:00
Ian Bassi
59155f26ac Build Arch Fix (#15107)
Arch Fix
2026-08-04 21:56:15 +08:00
SoftFever
8d2196d4a6 Refine wipe tower size estimates, fit checks, and travel-path code
- Account the SEMM flush-matrix volume in the rib tower size estimate,
  reading its gate from the plate config: m_print may not have been
  applied yet on fresh plates or in the CLI. Rectangle output is
  unchanged.
- Drop the brim growth from the printable-area tower check — the mesh
  bottom already includes the brim, and the pre-slice auto-brim
  estimate can overshoot the generated brim by several mm, so prints
  that physically fit hard-errored. Skip the check when no tower will
  be printed.
- Test the rotated tower body polygon in the gap-route early-out; at
  off-axis angles the body rect's bounding box covers most of the brim
  ring, defeating the tightening.
- Regenerate the wipe tower when it is moved or rotated while
  wait_for_temp_on_wipe_tower is active: the temperature-wait park
  bakes a bed-relative side choice into the cached tower gcode, so a
  re-slice after dragging the tower could park off the bed. Adds a
  regression test.
- Clean up: reuse OozePrevention::_get_temp for the deferred preheat,
  park and route against the exact printable-area polygon, fold the
  bed clamp into generate_path_to_wipe_tower, and take ConfigBase in
  the flush estimators so PartPlate passes the plate config directly.
2026-08-04 13:59:59 +08:00
yw4z
40eab797c6 match em_unit value for on_dpi_change for linux (#15043)
* Update GUI_Utils.hpp

* Update GUI_Utils.hpp
2026-08-04 08:45:31 +08:00
Kiss Lorand
ca7fbfb007 Fix missing overhang wall when no partial counterbore bridge is generated (#15100) 2026-08-03 18:02:48 -03:00
Mikhail f. Shiryaev
7b404596e9 Add Skip G-code config block to exclude the config comments from G-code files (#12455)
Add feature to skip CONFIG_BLOCK in G-code files
2026-08-03 15:10:01 -03:00
SoftFever
74c4a7e450 Support printer specific filament profiles in the OrcaFilamentLibrary (#15101)
* Support printer specific filament profiles in the Orca Filament Library
2026-08-03 22:25:50 +08:00
Noisyfox
dbb991bf07 Fix gizmo being closed after releasing mouse outside the gizmo floating window (#15095)
* Fix gizmo being closed after releasing mouse outside the gizmo floating window

The left up event of a drag started on the gizmo floating window (e.g.
selecting text in an input field) and released over the bed was treated
as a click on the plate, which deselected the objects and closed the
active gizmo. Add the ignore_left_up guard to the plate select branch,
matching the deselect branch above.

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix Emboss gizmo being closed after releasing mouse outside its floating window

The Emboss gizmo has its own close-on-click-away handler
(on_mouse_change_selection) that was not protected against left up events
originating from ImGui windows, so the gizmo was still closed when a drag
started on its floating window (e.g. selecting text in the input field)
ended over the 3D scene. Expose the canvas's ignore_left_up state to
gizmos and skip the close check for such releases.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-03 18:34:15 +08:00
SoftFever
4303d723a1 Validate the wipe tower against the printable area
A tower (grown by its brim) hanging past the printable outline now fails
Print::validate like the existing exclusion-area check, instead of slicing
silently in the CLI and only warning post-slice in the GUI.
2026-08-03 15:58:36 +08:00
SoftFever
132086933f Fix wipe tower rotation in the clearance check
The pre-generation square was rotated by degrees through the radians API
around the bed origin, and the post-slice mesh bottom was never rotated;
rotate both around the tower anchor via deg2rad. Exact no-op at angle 0.
2026-08-03 15:58:36 +08:00
SoftFever
4d81f0c181 Clamp gap-entry scrub excursions to the wipe tower margin
The dry drag-out and the flat-ironing spiral could leave the margin band no
tower envelope accounts for (the ironing area is unbounded user input);
truncate them to WIPE_TOWER_MARGIN around the tower outline instead of
skipping the scrub.
2026-08-03 15:23:54 +08:00
SoftFever
1e0fb1a0ae Fix the gap-route early-out to test the tower body, not the brim envelope
An approach starting over the first-layer brim ring skipped routing and
travelled straight across the printed wall; only starts over the tower body
itself may go direct.
2026-08-03 15:22:15 +08:00
SoftFever
72998ddda2 Route wipe tower entries near bed edges and honor the real bed shape
Clamp the router's avoid box against the bed shrunk by the routing
clearance so a tower near a bed edge still gets a routed entry instead of
a straight line across its wall, and test route corners against the real
printable outline instead of its bounding box so circular and custom beds
reject off-bed corners.
2026-08-03 15:20:36 +08:00
SoftFever
4d421918ef Harden wait_for_temp_on_wipe_tower parking and temperature deferral
Share one wait_for_temp_enabled gate between the tower and append_tcr2 so a
SEMM profile carrying the flag keeps its blocking ooze-prevention wait.
Park beside the tower on custom polygonal beds via point-in-polygon, clamp
the near-side park toward the bed edge before crossing to the far side, and
start non-blocking heating at the toolchange when ooze prevention emits
nothing so heat-up overlaps the travel.
2026-08-03 15:18:38 +08:00
SoftFever
0f48ad4157 WIP: add wait_for_temp_on_wipe_tower feature 2026-08-03 14:35:48 +08:00
yw4z
e72a3a65b2 QOL Continue to capture mouse position while dragging ImGui controls and mouse position goes to outside of window (#14999)
* Update GLCanvas3D.cpp

* support navigation cube

* capture events for transform widgets

* camera rotation and pan

* selection frame

* object drag

* fix navigation cube stealing drag events

* fix lag on navigation cuve

* variable layer height

* fix plates toolbar scrollbar

* Update GLCanvas3D.cpp

* Fix issue that mouse button state is wrong in certain macOS mouse events

---------

Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
2026-08-02 18:59:53 +08:00
Misterff1
1b71835337 Fixed some desktop environments showing title bar on splash screen when running on Wayland (#15019)
* Remove titlebar from splash screen on Wayland

* Broadly check for window decorations and added explanatory description

* Fixed hiding title bar on Wayland for all desktop environments

* Update format

---------

Co-authored-by: noisyfox <timemanager.rick@gmail.com>
2026-08-02 18:58:49 +08:00
Dipl.-Ing. Raoul Rubien, BSc
f9fa1c117f Define WXINSPECTOR_DISABLE globally to prevent include-order-dependent class layout (#15063)
fix: define WXINSPECTOR_DISABLE globally to prevent include-order-dependent class layouts
2026-08-02 18:20:35 +08:00
Kiss Lorand
6f3ca7d1b9 Fix preview speeds and time estimates after firmware retract commands (#15066) 2026-08-02 00:01:19 -03:00
maddavo
13ae3a1c90 Add outer-only mouse ears and align ear radius controls (#15015)
Improve mouse ear brim controls
2026-08-02 10:54:16 +08:00
Valerii Bokhan
fb36d5e73b Feature: Smooth Factor for the Hilbert Curve sparse infill (#14969) 2026-08-01 17:58:04 -03:00
SoftFever
9abec76af1 Add per-filament overrides for toolchange retraction 2026-08-01 20:17:50 +08:00
Dipl.-Ing. Raoul Rubien, BSc
95b781745d Fixes 4 Compiler Warnings (#10727)
* fixes: may be used uninitialized [-Wmaybe-uninitialized]

* fixes: arc_len_next may be used uninitialized [-Wmaybe-uninitialized]

* review result: reverts {} initializer with = to keep code style consistent
2026-08-01 18:07:15 +08:00
Kenneth Raplee
80e64f80a6 Fix 32-bit build in LayerResult::make_nop_layer_result (#15036)
LayerResult's second field is typed size_t, so std::numeric_limits::max
should also use size_t and not something related to coordinates for the
layer_id.
2026-08-01 11:49:28 +08:00
yw4z
477208a969 Remove borders and paddings from native controls on Linux (#14873)
* init

* update

* Update SpinInput.cpp

* possible fix for em_unit

* button alignment

* match titlebar height

* revert em_value for macOS and Windows

* Update GUI_Utils.hpp

* Merge branch 'main' into linux-black-borders-2

* Revert "button alignment"

This reverts commit 3fc7461071.

* Revert "match titlebar height"

This reverts commit c4aa1d9f1e.

* revert dpi changes

* match platform tags

* remove radio box borders

* Fix code indent
2026-08-01 11:28:07 +08:00
Rodrigo Faselli
2e08b19d6b Outline MSAA (#14835)
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
2026-07-31 20:51:48 -03:00
SoftFever
603a8f9c8f Fix stringing between the model and the wipe tower
The tower travel took retract()'s default vertical Z hop instead of the
configured one, so the nozzle rose in place over the part and oozed
rather than departing with the travel. Pass the filament's z_hop_types
through, mapping Auto to a spiral lift as append_tcr does.
2026-07-31 18:16:06 +08:00
SoftFever
6a2a57bdf4 Bring the rib wall and skip-points prime tower to all printers (#15035)
* Sync WipeTower from BambuStudio(through ca1881761)

* Fix post-slice self-invalidation on custom multi-extruder printers

* Complete the rib wipe tower port in WipeTower2

The rib tower is now always square (prime_tower_width is ignored, as the
GUI already implies), carries the rib origin offset like the BBL tower so
the rib tips sit inside the configured position, clamps the rib length to
the tower diagonal, and extends the ribs for short towers.

* Use the squared rib tower size in arrange estimates

estimate_wipe_tower_polygon reserved the arrange footprint and clamped the
tower X position with the raw prime_tower_width, under-reserving space
whenever the rib wall squares the tower to a different width.

* Print the WipeTower2 shell with a non-support, non-soluble filament

Like the BBL tower: the layer's sparse infill, wall, and brim go to the
first toolchange to a non-support/non-soluble filament, or are printed
with the incoming filament before any toolchange. The minimal-purge
clamp now also covers toolchanges that get no finish-layer saving.
Output is unchanged when no support/soluble filament is used.

* Port the skip-points gap wall to WipeTower2

prime_tower_skip_points was stubbed for Type2 towers: the wall call
hard-coded skip_points=false, the gap cutter received an empty vector,
and append_tcr2 never routed the entry travel. Now the toolchange entry
positions are precomputed from the finalized plan, the wall is cut open
at each entry, and the entry travel approaches around the tower bounding
box through the opening when it starts outside the tower. The geometry
helpers are re-synced with the BBL versions (add_extra_point guards,
per-point side selection). The cone wall keeps its separate path, where
the option stays inert.

Behavior change: non-BBL towers now honor the (default-on) checkbox with
gap walls and routed entries; with the option off the output is
unchanged, and the BBL tower path is untouched.

* Route the in-place toolchange tower entry through the skip-point gap

On multi-tool printers without ramming the tool changes away from the
tower and the entry travel is the tcr's own positioning move, which went
straight across the printed wall. Append the avoid-perimeter path to the
change-filament gcode instead, so the head approaches around the tower
and enters through the wall opening (append_tcr parity).

* Iron the purge start out through the skip-point gap in WipeTower2

Port the BBL tower's entry line ironing: extrude the first 3 mm of the
purge, retract, drag the nozzle 1.5x back out through the wall gap at
F600, creep back at F240 and unretract, so the toolchange start blob
ends up in the gap instead of on the wall. Fires only when the purge
starts at the left-edge entry heading right (in-place toolchangers);
SEMM ram/cooling wipes start mid-box and the priming line has no wall,
so both keep their previous output.

* Reserve WipeTower2 toolchange depth to match the printed purge

The planner reserved ramming rows gated only on enable_filament_ramming and
sized them with the SEMM 0.25s time step, while toolchange_Unload rams on
(semm && enable_filament_ramming) || filament_multitool_ramming with the
multitool time step. Disabling multitool ramming therefore left ~3 unprinted
rows per toolchange as blank bands in the tower. Without ramming the first
wipe line also needs reserved depth of its own (it no longer rides the last
ramming row), plus the y_step/2 offset the wipe start inherits from the
ramming start position - otherwise the tightened boxes truncate the ordered
purge at the box edge.

* Tile WipeTower2 purge rows contiguously across toolchange blocks

Without ramming, each purge block reserved one wipe pitch more than its
rows occupy (ceil+1 rounding plus the ram-geometry start offset), and the
wipe began a full pitch inside the block, leaving a blank band of exactly
two pitches between adjacent blocks. Plan the block as whole wipe rows,
start the first row so the row lattice continues across the block
boundary, and fill the reserved box instead of stopping at the ordered
volume, mirroring how the BBL WipeTower keeps planned depth identical to
printed rows. Ram-printing toolchanges (SEMM with ramming enabled,
multitool ramming) are unchanged.

* Scrub the WipeTower2 toolchange entry with the BBL flat-ironing spiral

The entry scrub now matches the BBL tower's toolchange_wipe_new sequence:
after the ironing drag the retracted nozzle runs a dry expanding-square
spiral centred on the wall-gap entry point before resuming the purge row.
The spiral runs whenever the gap wall is on (disable per filament via
filament_tower_ironing_area = 0); WipeTower2 no longer reads
prime_tower_flat_ironing.

* Restart the WipeTower2 wipe at the box boundary after multitool ramming

With the gap wall on a multi-tool printer, quantize the ram band up to its
whole reserved rows (as the BBL tower does for the old-tool purge) and start
CP TOOLCHANGE WIPE at the left-edge boundary on a fresh row below it instead
of continuing from wherever the ram serpentine ended. The entry scrub then
runs at the wall gap on ram toolchanges too, and the wipe box is whole rows,
so it is filled completely like the no-ram case. SEMM and skip-points-off
behavior is unchanged.

* Move the WipeTower2 wall gap to the wipe start row for ram toolchanges

* code cleanup

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix typo

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-31 18:08:55 +08:00
SoftFever
c8aacea176 fix typo 2026-07-31 18:07:46 +08:00
Ian Chua
101f43b2d8 fix: resolve plugins that are missing locally (physical file deleted) (#14861)
* fix: resolve plugins that are missing locally (physical file deleted)

* fix: don't treat file not found as an error
2026-07-31 14:15:51 +08:00
Ian Chua
e01ac1f0a6 fix: keep orphaned cloud plugins runnable (#14859)
* fix: keep orphaned cloud plugins runnable

* fix: tests
2026-07-31 14:15:22 +08:00
Ian Chua
603b02f0e7 Merge branch 'main' into fix/ota-profile-race 2026-07-31 14:14:23 +08:00
Nathan Schulte
ddce030322 add space after "Arranging" message (#15017) 2026-07-29 17:37:23 -03:00
Ian Bassi
2d4b431d5f Improve dimmed layers (#15001)
Co-authored-by: yw4z <yw4z@outlook.com>
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
2026-07-29 16:27:15 -03:00
Ian Chua
27c468754c feat(plugin): expose orca.host.app_language() for plugin localization (#14997)
# Description

Python plugins currently have no way to localize their own dialogs to
match the app: the UI language is stored in `OrcaSlicer.conf`, which the
plugin audit hook deny-lists by design (the file sits next to cloud
secrets), and the host API exposes no app info. As a result, localized
plugins have to guess the language from the OS locale, which does not
always match the slicer UI (and the embedded interpreter often gets no
`LANG` at all in GUI sessions).

This PR adds a minimal read-only accessor:

```python
orca.host.app_language()   # -> "en_US", "ru_RU", ...
```

It returns `GUI_App::current_language_code_safe()` — only the language
code string, nothing else from the config, so the audit-hook security
model is untouched.

No breaking changes; one file, +10 lines.

# Screenshots/Recordings/Graphs

(screenshots of the test dialog will be attached below)

## Tests

- Built on macOS (arm64, Ninja) with this change — compiles clean.
- Ran a minimal script-capability plugin calling
`orca.host.app_language()` on a system with Russian UI: the dialog shows
`'ru_RU'`.
- Guard before GUI init follows the same exception pattern as the
neighbouring `plater()`/`preset_bundle()` accessors.
<img width="903" height="826" alt="Снимок экрана 2026-07-28 в 23 10 48"
src="https://github.com/user-attachments/assets/27088265-b55d-4958-8602-7c3ab4993003"
/>
<img width="437" height="276" alt="Снимок экрана 2026-07-28 в 23 10 56"
src="https://github.com/user-attachments/assets/9845b401-dc8e-4353-aa24-5ace678270d6"
/>
2026-07-30 01:19:09 +08:00
SoftFever
3ab9cf53d0 code cleanup 2026-07-30 00:55:09 +08:00
Nathan Schulte
d434e35488 fix STEP progress message percent format (#14994) 2026-07-29 10:48:01 -03:00
yw4z
7bd53b1283 Fix cannot type values to spin control if first digit of desired value is less then min value (#15002) 2026-07-29 10:19:10 -03:00
SoftFever
252df70ec4 Move the WipeTower2 wall gap to the wipe start row for ram toolchanges 2026-07-29 20:58:21 +08:00
Ian Bassi
6489b4cad3 Fix: Only one wall top surfaces (#14929) 2026-07-29 09:23:35 -03:00
SoftFever
086bbf986b Restart the WipeTower2 wipe at the box boundary after multitool ramming
With the gap wall on a multi-tool printer, quantize the ram band up to its
whole reserved rows (as the BBL tower does for the old-tool purge) and start
CP TOOLCHANGE WIPE at the left-edge boundary on a fresh row below it instead
of continuing from wherever the ram serpentine ended. The entry scrub then
runs at the wall gap on ram toolchanges too, and the wipe box is whole rows,
so it is filled completely like the no-ram case. SEMM and skip-points-off
behavior is unchanged.
2026-07-29 19:59:33 +08:00
SoftFever
67e1ce03a6 Scrub the WipeTower2 toolchange entry with the BBL flat-ironing spiral
The entry scrub now matches the BBL tower's toolchange_wipe_new sequence:
after the ironing drag the retracted nozzle runs a dry expanding-square
spiral centred on the wall-gap entry point before resuming the purge row.
The spiral runs whenever the gap wall is on (disable per filament via
filament_tower_ironing_area = 0); WipeTower2 no longer reads
prime_tower_flat_ironing.
2026-07-29 18:48:10 +08:00
SoftFever
36bd453ac8 Tile WipeTower2 purge rows contiguously across toolchange blocks
Without ramming, each purge block reserved one wipe pitch more than its
rows occupy (ceil+1 rounding plus the ram-geometry start offset), and the
wipe began a full pitch inside the block, leaving a blank band of exactly
two pitches between adjacent blocks. Plan the block as whole wipe rows,
start the first row so the row lattice continues across the block
boundary, and fill the reserved box instead of stopping at the ordered
volume, mirroring how the BBL WipeTower keeps planned depth identical to
printed rows. Ram-printing toolchanges (SEMM with ramming enabled,
multitool ramming) are unchanged.
2026-07-29 16:37:06 +08:00
SoftFever
9292db2f9f Reserve WipeTower2 toolchange depth to match the printed purge
The planner reserved ramming rows gated only on enable_filament_ramming and
sized them with the SEMM 0.25s time step, while toolchange_Unload rams on
(semm && enable_filament_ramming) || filament_multitool_ramming with the
multitool time step. Disabling multitool ramming therefore left ~3 unprinted
rows per toolchange as blank bands in the tower. Without ramming the first
wipe line also needs reserved depth of its own (it no longer rides the last
ramming row), plus the y_step/2 offset the wipe start inherits from the
ramming start position - otherwise the tightened boxes truncate the ordered
purge at the box edge.
2026-07-29 13:23:29 +08:00
Kiss Lorand
29d4513694 Fix overlapping brims (#14991) 2026-07-28 17:46:14 -03:00
Ru
0dc14aa876 feat(plugin): expose orca.host.app_language() for plugin localization
Plugins have no way to localize their own dialogs: the UI language lives in
OrcaSlicer.conf, which the plugin audit hook deny-lists because the file sits
next to cloud secrets. Add a read-only host accessor that returns just the
language code (current_language_code_safe), so plugins can match the app
language without touching the config file.
2026-07-28 23:11:05 +03:00
SoftFever
bef47b2c70 Iron the purge start out through the skip-point gap in WipeTower2
Port the BBL tower's entry line ironing: extrude the first 3 mm of the
purge, retract, drag the nozzle 1.5x back out through the wall gap at
F600, creep back at F240 and unretract, so the toolchange start blob
ends up in the gap instead of on the wall. Fires only when the purge
starts at the left-edge entry heading right (in-place toolchangers);
SEMM ram/cooling wipes start mid-box and the priming line has no wall,
so both keep their previous output.
2026-07-28 21:21:50 +08:00