Commit Graph
183 Commits
Author SHA1 Message Date
Kris Austin cb770802c4 Fix AltGr typing in settings boxes switching tabs, and add go-to shortcuts for the other tabs (#16918)
Remove the old Ctrl+1 to Ctrl+4 key handler on settings fields. wxWidgets reports AltGr as Ctrl+Alt, so on AZERTY and similar layouts, typing `{`, `~` or `#` in a multi-line settings box switched the main tab. The handler was also outside the shortcut registry and clashed with the Ctrl+1 to Ctrl+4 camera shortcuts.

Add unbound "Go to the ... tab" shortcuts for Home, Design, Multi-device and Calibration, next to the Prepare, Preview, Device and Project ones from #16301.

Fixes #9649

(cherry picked from commit 42608687e5)
2026-11-01 09:53:53 +08:00
TheLegendTubaGuy 89fa736737 Fix center of mass details, belt preview and section view bugs (#16958)
* Fix center of mass details, belt preview and section view bugs

Fixes the center of mass bugs from #16781 (center of mass a-d and
rendering b).

- The details box follows its marker, so zooming toward the cursor
  could slide it under the mouse, where ImGui took the wheel and
  zooming stopped. The wheel now zooms over the box.
- Esc closes the details box. A click on a marker now focuses the 3D
  view first, so Esc reaches it after typing in a sidebar field.
- On belt printers the Preview markers stayed in the raw G-code frame
  while the upright view draws the toolpaths back-transformed. The
  masses now get the toolpaths' transform. It shears, so the second
  moments are kept as a full 3x3 matrix to keep the moments of
  inertia right, and the bounding box rows are left out for a map
  that mixes the axes, where the box of the mapped corners would be
  far too large.
- At the top layer of the slider the solid marker of what is printed
  so far covered the faded finished-print one, which could not be
  clicked. At the top layer only the finished print's markers show,
  drawn solid.
- The section view cuts a marker away when its center is on the cut
  side, as it does the toolpaths' option markers.

* Keep the belt bounding box and store six second moments

- Belt prints keep the bounding box rows in the details. The G-code
  back-transform moves from GCodeViewer into
  BeltTransformPipeline::build_gcode_back_transform(), and on a belt
  print the processor keeps a second box per mass, of each segment's
  ends and bead height mapped by its linear part. ObjectMass::transform()
  moves that box by the translation, instead of dropping the box that
  the shear would blow up.
- A mass stores its second moments as the diagonal and the three cross
  terms instead of a full matrix, which is built only to transform it.

(cherry picked from commit e66569a966)
2026-11-01 09:53:53 +08:00
TheLegendTubaGuy fc409ef862 Apply the print dialog's Box mapping on Qidi printers (#16723)
With printer agents on, the Qidi agent now uses the Box slot picked for each filament in the print dialog. After the upload it writes `SAVE_VARIABLE VARIABLE=value_t<n> VALUE="'slot<m>'"` for each mapped filament, which the firmware's T<n> macros read. Then it starts the print through `/printer/print/start`, because the Max 4, Q2, Q2C and Plus 5 only open prints from the copy that Moonraker's print start makes.

- `MoonrakerPrinterAgent::start_local_print` now ends with a virtual `print_uploaded_file()`. The default still sends `SDCARD_PRINT_FILE`, so other Moonraker agents are unchanged.
- Box units show as "Qidi Box 1", "Qidi Box 2". Agents can set an optional `display_name` on an AMS unit.
- New agent flag `native_device_tab`. Qidi sets it to false, so its native Device and Calibration tabs are hidden and the web page becomes the Device tab.
- The Moonraker agent retries its first connection with the status stream's backoff. A disconnect, a newer connection or closing the app stops the retries.
- The print dialog fetches filament data itself for agents that only send it when asked, so the slot picker shows the Box units without a sidebar sync.
- Agent printers show their address in the print dialog's printer list instead of "(LAN)". Bambu printers keep "(LAN)".
- A single nozzle whose size the printer hasn't reported shows no size instead of "Unknown".

(cherry picked from commit b6ca378b23)
2026-11-01 09:53:53 +08:00
SoftFever 10c38a54e1 Merge branch 'main' into feat/lane-data-filament-id-matching 2026-10-26 17:40:53 +08:00
SoftFever 20388f846d Resolve Moonraker lane filament_id through the shared AMS matcher 2026-10-26 17:30:42 +08:00
Noisyfox 0d7c956558 Merge upstream/main into dev/ams-custom-color-alpha-gradient 2026-10-26 15:18:06 +08:00
SoftFever c1119ee013 Merge branch 'main' into feat/lane-data-filament-id-matching 2026-10-26 14:55:37 +08:00
SoftFeverandSoftFever acb4cce4ae Explain why settings are hidden or disabled (#16657)
* Record option availability reasons per settings tab

* Explain option restrictions in field and label tooltips

* Show option restriction reasons in settings search

* Explain support and raft option restrictions

* Explain print option dependency restrictions

* Explain printer and filament option restrictions

* Declare settings owner lookup in the Tab header

* Reuse repeated option availability reasons

* Fix availability tooltips for synthetic options

* Deduplicate availability reasons in row tooltips

* Keep motion limit availability consistent with disabled controls

* Show availability reasons in object table settings

* Explain filament override retraction dependencies

* Explain disabled preset compatibility conditions

* Stop search and Speed Dial from refusing settings that are visible

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-10-26 13:59:47 +08:00
SoftFever 1d9bd2704d Stop search and Speed Dial from refusing settings that are visible 2026-10-26 13:43:32 +08:00
BroncosisandClaude Sonnet 5 9a49a14674 docs: add a lane_data field reference table
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-25 19:33:07 -07:00
BroncosisandClaude Sonnet 5 39127c5813 docs: describe Moonraker lane_data filament matching in filament_id.md
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-25 18:58:45 -07:00
BroncosisandClaude Sonnet 5 0d1c53d36e Match filament presets by filament_id/setting_id from Moonraker lane_data
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-25 18:58:38 -07:00
Kris Austin 1b8bc0b19d Remove the FreeType dependency (#16852)
FreeType was only bundled for OCCT's font code in TKService. The only Orca code that used that font code was Shape/TextShape.cpp, and nothing calls it. Its one call in ImGuiWrapper.cpp is commented out. The Emboss tool and the Design tab's text use stb_truetype.

Build OCCT with USE_FREETYPE=OFF, and remove the FREETYPE dep, its Flatpak source entry, the freetype.dll copy on Windows, TextShape, and the freetype and fontconfig links in libslic3r. OCCT only links fontconfig when FreeType is on, and libslic3r_gui links fontconfig on its own.
2026-10-25 13:51:34 -05:00
SoftFever 8efa90c763 Merge branch 'main' into dev/option-unavailability-reasons 2026-10-26 02:19:01 +08:00
Damir GaleevandIan Bassi 09761a3136 Fix seam alignment, contour continuity and painted boundaries (#16447)
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
2026-10-24 11:10:48 -03:00
Ian Bassi 7319a2c54c Draw translucent filaments translucent in Preview (#16776) 2026-10-23 17:14:09 -03:00
Noisyfox bfd3002875 Merge upstream/main and retain motion limit availability reasons
Follow the removal of silent_mode by updating only motion limit index zero, preserving disabled tooltips and visible controls.
2026-10-23 22:21:29 +08:00
Ian Chua 557feba649 feat: introduce plugin APIs for mutable presets (#16518)
* feat: introduce plugin APIs for mutable presets

* fix: tests

* fix: tests

* doc: HLSD for preset plugin APIs

* feat: preset APIs

* fix: remove async behavior and clang-tidy

* fix: update demo plugins
2026-10-23 13:54:08 +08:00
Noisyfox 7d0ba0a5aa Merge upstream/main into option-unavailability-reasons
Keep option availability reasons while adopting the ArcFittingMode enum.
2026-10-23 09:43:58 +08:00
Kris Austin 3f8ff53e65 Keep keys away from the 3D view while ImGui has the keyboard (#16673)
The 3D view decided whether to run its shortcuts from ImGui's "wants the
keyboard" flag, which is updated a frame late. The first key typed after
clicking into a field could still reach the canvas.

The canvas now leaves every key to ImGui while an ImGui text field is
active, while a popup (dropdown, menu or modal) is open, or while a
slider or button is held with the mouse. A focused sidebar text field
works the same way. Global shortcuts still run unless they edit text.
Every key still goes to ImGui.

- ImGuiWrapper::claim_key_event() decides on the key-down. The key's
  repeats, char event and release follow that decision, so a key never
  both runs a shortcut and types.
- Esc closes an open dropdown or menu before the gizmo.
- Esc and Tab during a slider drag no longer close the gizmo or switch
  views.
- text_input_active() reads ImGui's text input request, so a slider
  that once had a value typed into it no longer counts as a text field
  when dragged.
- A modifier whose key-up went to a dialog no longer stays stuck. The
  canvas releases held modifiers when it loses the focus, and ImGui
  takes its modifiers from each mouse event.
- The macOS Edit menu's key equivalents follow the same rule.
2026-10-22 10:22:23 -05:00
Noisyfox 8b8f2ca909 Explain disabled preset compatibility conditions 2026-10-22 23:06:26 +08:00
Noisyfox aea6b9c02d Explain filament override retraction dependencies 2026-10-22 23:06:26 +08:00
Noisyfox 3b5fc939fc Show availability reasons in object table settings 2026-10-22 23:06:26 +08:00
Noisyfox e3b9be506f Deduplicate availability reasons in row tooltips 2026-10-22 23:06:26 +08:00
Noisyfox 4eac8f70a0 Explain print option dependency restrictions 2026-10-22 23:01:01 +08:00
Noisyfox 1bf53e3a19 Show option restriction reasons in settings search 2026-10-22 23:01:01 +08:00
Noisyfox ffb1a0b6cc Explain option restrictions in field and label tooltips 2026-10-22 23:01:01 +08:00
Noisyfox 3573195780 Record option availability reasons per settings tab 2026-10-22 23:01:01 +08:00
SoftFever f92f75e0fa Feat: Add multiple and 3D bed exclusion volumes (#13777)
# Description

This PR adds opt-in, height-aware exclusion volumes to OrcaSlicer,
including multi-nozzle handling, object and generated-geometry
validation, final G-code collision checking, and travel rerouting.

It grew from the original object-placement prototype into a
collision-aware slicing pipeline with documented limitations. The
central compatibility decision is that Orca's existing
`bed_exclude_area` keeps its historical meaning, while the new
`bed_exclude_volumes` setting explicitly enables the stronger
collision-aware behavior.

<img width="935" height="707" alt="Travel paths routed around exclusion
volumes"
src="https://github.com/user-attachments/assets/22925e5c-a3b1-4c26-be1a-8a89d9970cb5"
/>

Related issues: #5922, #10579, #10638 and #12774.

## Why this is useful

The existing 2D exclusion area prevents object placement in areas such
as the filament-cutter corner on Bambu printers. It cannot describe low
bed clips, raised tool docks, camera arms, flying-gantry hardware, or
other obstacles that occupy only part of the printer's Z range.

Treating every existing area as a physical motion obstacle would also be
unsafe for compatibility: some printers deliberately move into their
excluded material area. This PR therefore separates the two concepts
rather than changing the meaning of existing profiles.

| Setting | Purpose | Existing motion affected? |
| --- | --- | --- |
| `bed_exclude_area` | Existing bed-fixed material/placement keep-out |
No G-code checking or travel rerouting |
| `bed_exclude_volumes` | Shared 3D collision volumes |
Object/generated-material checks, G-code validation and travel rerouting
|
| `extruder_bed_exclude_volumes` | Per-extruder 3D collision volumes |
Same collision behavior, resolved for the active physical nozzle |

Bed areas and collision volumes are additive. A printer can retain an
existing cutter/material keep-out while adding separate physical
collision volumes. Belt printers retain the existing projection of bed
areas onto the tilted belt surface; collision volumes remain in model
coordinates.

## Configuration and syntax

`bed_exclude_volumes` accepts one or more polygonal prisms:

```text
XxY,XxY,...
```

defines a full-height collision volume.

```text
REGION|REGION|REGION
```

defines multiple independent volumes.

```text
ZMIN..ZMAX;XxY,XxY,...
```

defines a volume active only across that Z range. Either Z bound may be
omitted:

```text
..10;20x20,40x20,40x40,20x40
30..;20x20,40x20,40x40,20x40
```

For example:

```text
20x0,45x0,45x18,20x18|8..22;115x20,145x20,145x48,115x48
```

defines one full-height volume and one volume active from Z=8 mm to Z=22
mm. Z ranges are validated and clamped against the configured printable
height, and decimal parsing is locale-independent.

The CLI exposes the same distinction:

```text
--bed-exclude-area
--bed-exclude-volumes
```

Existing scripts using `--bed-exclude-area` retain the original polygon
format and behavior.

## Backward compatibility and migration

- Existing profiles and projects using only `bed_exclude_area` keep its
material/placement keep-out meaning; they do not implicitly enable
collision-volume checking or travel rerouting.
- Stock printer motion is not checked or rerouted against bed areas.
This is important for machines that deliberately enter an excluded
material area during cutting or loading.
- The new syntax is stored under separate config keys, so an older Orca
build does not try to deserialize a volumetric string as the existing
point-list option.
- In **Printer settings → Basic information → Printable space**,
**Excluded bed area** remains a normal editable field with Orca's
standard reset controls. **Toolhead collision volumes** is a separate
field directly below it. There is no Convert/Copy button and neither
setting clears the other.
- A bed-area polygon can be manually copied into the collision-volume
field to describe a full-height physical obstacle. Pasting volume syntax
into the bed-area field instead prompts for confirmation before adding
it to the appropriate volume definitions. The saved bed area, existing
volumes and selected nozzle mode are preserved; cancelling leaves them
unchanged.
- If a user does not configure the new volume keys, the new G-code
checker, rerouter, support trimming and nozzle-specific brim behavior
remain inactive.

This gives existing profiles a stable compatibility boundary while
allowing users and maintainers to migrate deliberately to full collision
checking over time.

## Multi-nozzle behavior

For multi-nozzle printers, the collision-volume mode selects one of
three behaviours. In individual mode, each extruder's definition is
edited on its own Extruder settings page. These modes apply only to
collision volumes; the excluded bed area stays shared and bed-fixed.

Collision volumes support three modes:

<img width="549" height="441" alt="Exclusion volume behavior selector"
src="https://github.com/user-attachments/assets/6ca8c2e2-d00e-4b32-9b12-bfbff0928966"
/>

### Shared

Every physical nozzle uses the same collision-volume definition.

<img width="2353" height="1633" alt="Shared exclusion volumes"
src="https://github.com/user-attachments/assets/96fe938b-07b4-4cd9-b587-e31f2ebba5f8"
/>

### Toolhead-relative (nozzle offsets)

The shared definition is treated as relative to the toolhead. Orca
derives the other nozzles' collision regions using their configured XY
offset from the reference nozzle. This is useful where the same physical
carriage must avoid an obstacle but its position changes when a
different offset nozzle prints at the same model coordinate.

<img width="1084" height="803" alt="Toolhead-relative exclusion volumes"
src="https://github.com/user-attachments/assets/e0790ee4-68b5-444f-90ac-22a5eba05eec"
/>

### Individual per extruder

Each physical extruder/nozzle has its own independent volume definition.
This supports machines whose valid region differs by tool and cannot be
derived from a simple nozzle offset.

<img width="1123" height="761" alt="Independent exclusion volumes for
three extruders"
src="https://github.com/user-attachments/assets/c6404ceb-9958-4df8-93ed-5ff2ac7dc658"
/>

Object validation resolves logical filament assignments to the physical
nozzle or nozzles that may print the object, including automatic Bambu
mapping. If an object may use several nozzles through painting,
feature-level assignments, modifiers, support or interface material, the
complete object is conservatively checked against every relevant
nozzle's volumes.

## Object validation and 3D preview

Object collision detection uses a cheap XY/Z broad phase followed by an
exact mesh-versus-prism test. The exact test:

- Avoids rejecting an object whose XY shadow overlaps a raised volume
while its real mesh remains clear.
- Detects normal surface crossings.
- Detects a volume completely enclosed inside a solid model.
- Respects object-instance and model-volume transforms.
- Separates the collision decision from optional preview-mesh
generation.

When a collision is found, Orca reports the relevant extruder where
possible and renders the intersecting model surface in red. The bed
preview shows a neutral grey footprint, a thin nozzle-colored ownership
border where appropriate, and a translucent 3D prism when a nearby
object makes the volume relevant. Raised volumes keep their ownership
outline on the bed rather than floating at their starting Z.

<img width="578" height="534" alt="Red model and exclusion-volume
intersection preview"
src="https://github.com/user-attachments/assets/d409f574-1790-48e5-b4a3-703273439954"
/>

Single-nozzle/shared geometry remains visually neutral; nozzle colors
are used when they convey distinct tool ownership.

The default automatic preview limits the translucent 3D geometry to
nearby object height to avoid obscuring the workspace. **View → Show all
collision volumes** displays the complete configured Z ranges, including
on an empty bed. Its default shortcut is **Ctrl+Shift+V**
(**Command+Shift+V** on macOS), and it can be changed in the shortcut
settings. Orca remembers this application-level display preference
independently of printer presets; it does not change collision checks or
slicing.

## Arrange and Fill Bed

Arrange and Fill Bed receive Z-aware, nozzle-aware obstacles, so an
object may occupy a footprint belonging only to another nozzle or pass
below a raised volume when its height permits it.

- Existing objects remain obstacles when Fill Bed creates new copies.
- Convex volume footprints are passed through accurately.
- Orca's current libnest2d path supports convex NFP obstacles only, so
non-convex volumes use a documented conservative bounding box until
convex decomposition is implemented.
- Orca's existing final alignment and normal unplaced-item behavior are
retained.

<img width="1097" height="846" alt="Fill Bed with multiple tools and
exclusion volumes"
src="https://github.com/user-attachments/assets/8c0ee5cf-624b-42a6-b57a-13c73400ac5c"
/>

## Brim and support generation

When collision volumes are enabled, object and support brims are clipped
against the relevant first-layer volume footprints before their final
extrusion paths are generated. Brim ownership is retained so touching
object and support brims cannot be merged and silently reassigned to a
nozzle whose volume they intersect. Established bed-edge and bed-area
brim clipping remains unchanged when collision volumes are not
configured.

<img width="1139" height="770" alt="Object and support brims clipped
around nozzle-specific volumes"
src="https://github.com/user-attachments/assets/2913ff31-53e4-4e43-8b27-1afba7e3bafb"
/>

Normal support and raft polygon categories are trimmed against the
relevant volumes over each support layer's actual vertical slab.
Support-material resolution accounts for explicit support/interface
tools, “current filament” behavior, alternating material layers,
automatic physical-nozzle mapping, support brims, and shared support
geometry.

TreeSupport3D receives active exclusion geometry during branch planning
so its existing avoidance machinery can steer branches around obstacles
rather than merely cutting finished paths.

## Final G-code collision validation

The final emitted G-code is checked as a safety backstop after slicing.
The checker tracks:

- The active physical nozzle and its XY offset.
- Absolute and relative XY/Z motion.
- Travel, extrusion and other parsed motion types.
- Tool selection and physical/nozzle mapping.
- Explicit motion in start, filament-change and tool-change G-code.
- Coordinate resets and common `G28` forms, including bare, spaced,
compact and parameterized axis selections.

Material keep-outs from `bed_exclude_area` are deliberately ignored by
the motion checker. Only explicit collision volumes constrain motion.

If Z is genuinely unknown, the check is conservative across all relevant
heights and the warning identifies that fact and includes the relevant
G-code line. The artificial first segment that the preview draws from
`(0,0)` is not treated as a real machine move.

## Travel rerouting

Generated travel moves are rerouted around active collision volumes when
a valid route exists.

Routing is:

- Aware of the travel's actual Z slab and planned lift/Z-hop.
- Resolved for the active physical nozzle.
- Constrained so any detour vertices added by Orca remain inside the
printable bed.
- Able to accept firmware-established start/end points on or beyond the
nominal bed edge.
- Revalidated before the replacement path is emitted.

The implementation covers ordinary generated travels, the first
generated move after start G-code, and moves following physical or
same-nozzle filament changes. Explicit movement commands in custom
start/tool-change G-code update the tracked position so the next
generated travel begins from the correct point without defeating Orca's
post-toolchange Z restoration.

Obstacle geometry is cached by extruder and active Z-region set, with
bounding-box rejection before expensive polygon work. Clear travels
therefore avoid repeatedly unioning and offsetting the same obstacles.

If no safe route can be found, Orca leaves the original move for the
final checker to report rather than emitting an assumed-safe detour.
Extrusion paths are validated but never rerouted.

<img width="1286" height="706" alt="Travel rerouting from start G-code
across multiple Z-aware volumes"
src="https://github.com/user-attachments/assets/a68cd98f-5576-4f78-af43-697e9f687a9b"
/>

And here is an example of independent nozzle travel rerouting:
<img width="2532" height="876" alt="image"
src="https://github.com/user-attachments/assets/28b0c26e-59d6-42b9-a64f-4c2205c4ea3f"
/>


## Testing and review status

Targeted Catch2 coverage now includes:

- Bed-area/volume parsing, validation, confirmed paste handling,
additive behavior and CLI options.
- Belt-surface projection of bed areas through both static and dynamic
region resolution, including the reported cube positions, with collision
volumes left unprojected.
- Shared, toolhead-relative and individual per-extruder resolution.
- Physical-nozzle and filament mapping.
- Exact object intersection, including fully enclosed prisms and
transformed instances.
- 3MF persistence.
- Arrange behavior for convex and non-convex obstacles.
- Brim bed-boundary and volume clipping regressions.
- Support and interface-material masks across support polygon
categories.
- G-code motion classification, coordinate tracking, homing forms and
tool selection.
- Safe travel rerouting, Z-aware activation, nozzle selection, off-bed
firmware endpoints and failure cases.

The reviewed `929beaee15` revision passed the CI checks, and review
testing confirmed that the unit tests and earlier arrange, tool-change Z
restoration, support, brim and brim-ownership regressions still pass.
Stock-output comparisons covered 12 printers × 3 jobs plus 17 project
files and produced G-code identical to `main` when the new feature was
not configured.

The belt projection correction and its regression coverage are included
in the latest update. Please use the checks below for the current head's
build and test status; earlier successful runs do not substitute for
validation of a new revision.

Review also compared CLI output against `main` across stock printers and
multi-filament projects. The compatibility regressions found during that
review—including stock Bambu cutter motion, preset dirty state,
unintended bed-area brim/support changes, tool-change Z restoration,
stale post-change origins, arrange rejection, router cost, locale
parsing and bed-edge brim clipping—have been addressed.

## Known limitations and follow-up work

The implementation deliberately favors conservative safety. A false
positive or some unused build volume is preferable to emitting a
movement that may collide with the machine. Collision warnings are not
an automatic repair or a guarantee of safe output.

- Skirts and draft shields are not regenerated or detoured around
collision volumes. The final checker can report an intersection, but
producing a valid closed loop around internal obstacles while remaining
inside the bed needs a dedicated solution.
- Extrusion paths are checked but not rerouted.
- Spiral Z-hop's circular XY sweep is generated after the primary travel
route has been planned. That sweep is not currently rerouted; the final
G-code checker can report a collision, but does not repair it.
- Orca cannot infer movement hidden inside an opaque firmware macro. A
deterministic macro endpoint should be exposed with explicit `G90`/`G91`
and `G0`/`G1` motion in Orca's custom G-code so the following travel can
be routed from a known position. Movements inside custom G-code are
checked, but only the generated travel after them is rerouted.
- Negative model parts are not applied to the raw object-intersection
mesh, so geometry removed only by a negative part can produce a
conservative false positive.
- Multi-nozzle object validation applies every relevant nozzle's volume
to the complete object rather than only its visibly painted surface.
- Support shared by several instances uses a conservative union of
relevant plate-space exclusions.
- Support avoidance trims or steers generated geometry but does not
perform structural support re-planning. Support above a raised volume
may resume over a void; native tree-support paths not using
TreeSupport3D are not yet volume-aware.
- Raised-only collision volumes are not yet fully represented in
prime/wipe-tower placement validation; the final G-code checker remains
the safety backstop.
- Existing cross-object support-to-support overlap behavior is outside
this PR.
- “No tool selected” carriage-only exclusions are not represented by
Orca's current backend and remain a possible future extension.

## Origin

This work began with the [Muon3D
M1](https://www.youtube.com/watch?v=jBatFQpTM6g), whose notched glass
bed leaves usable print volume above a low obstruction. Upstreaming the
capability lets other printers describe low clips, raised docks,
toolchanger hardware and per-tool clearance limits without requiring a
permanent fork.

Thank you to everyone who tested the implementation, reviewed the
architecture, identified regressions and helped improve the test
coverage—especially the multi-tool and macOS testers. Further
real-hardware feedback remains welcome, but the current implementation
and compatibility behavior are ready to merge.

Harry Loud  
Muon3D
2026-10-22 22:04:40 +08:00
9b37da699b Sparse infill smoothing: round corners in equal turns, flattened to the resolution (#16694)
Co-authored-by: raistlin7447 <kris.austin@gmail.com>
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
2026-10-21 16:08:29 -03:00
Ian Bassi 01ae2dd49a Port Bambu Studio's gap fill ordering for monotonic surfaces (#16743) 2026-10-21 16:05:44 -03:00
SoftFever 55b8fe296f Merge branch 'main' into perf/slicing-optimizations 2026-10-20 19:37:06 +08:00
Harry Loud 4083b7996c Avoid text-editing chord for collision-volume preview shortcut 2026-10-20 11:17:46 +01:00
HanifKoh 506dd497db Translate H2C Nozzle Rack Filament IDs at the Printer Boundary (#16612)
The Bambu payload rewrite only matched tray_info_idx, filament_id and filamentId. The H2C nozzle rack puts filament ids in cate (the auto nozzle mapping request) and fila_id (the rack status), so the printer got Orca's OF ids for the filaments and its own ids back for the nozzles in the same request, and the device tab could not name a rack nozzle's filament. Add both keys to one shared list used by the rewrite and its pre-check.
2026-10-19 19:42:05 -05:00
Ian BassiandTobias Gloth 69193d5681 Optimize travel: exact/refined path chaining, object tours, and joined infill lines (#16492)
* Shorten the travel between extrusion paths

chain_and_reorder_extrusion_entities() builds the print order of the infill,
ironing and support paths of a region from the nozzle position. It took the
greedy chain, which leaves its longest joins for last; it now shortens it:

- Up to eight paths, chain_segments_exact() finds the shortest chain over
  every order and allowed reversal, by dynamic programming over the subsets
  of paths, with a fixed start and a free end.
- Longer chains are refined by local search: 2-opt, or-opt of up to three
  paths, and moving a run of any length next to the nozzle to the front, each
  tried only toward the 32 end points nearest a link, which come from a
  uniform grid. A move is applied only if it shortens the chain, so the result
  is never longer than the greedy one.
- A nearest-next chain is built too, and refined and used instead when it is
  already shorter than the refined greedy chain, which happens when the greedy
  chain sweeps away from the nozzle and has to come back with a long jump.

The shared greedy chaining also chains two to four segments exactly, which
covers the islands of a layer and the loops of a perimeter collection. Paths
that cannot reverse, such as Grid's, are only reordered, and collections that
keep their order are left alone. The overload without a start point keeps the
greedy chain.

Co-authored-by: Tobias Gloth <tobias.gloth@3dsystems.com>

* Order objects and islands along shorter tours

Objects under print_order Default, and the tour of islands across objects, are
visited in the same order on every layer, so chain_points_with_postprocessing()
orders them as a closed tour. Up to ten points, tsp_exact_cycle() finds the
shortest tour by dynamic programming over subsets, starting at the point
nearest the start point when one is given. Larger sets add or-opt to the
existing 2-opt and crossing removal: runs of up to three points move next to
one of the eight points nearest an end of the run, reversed or not, and
crossing removal runs last so no crossing is left. Snake ordering is
unchanged; Best of strategies gets the shorter Default tour as a candidate.

* Join infill lines into fewer paths

Every separate infill path costs a travel to it, so the fill generators now
leave fewer of them:

- connect_infill() pairs the line ends along each wall in the order that
  joins the most lines: besides shortest arc first, it replays arcs of about
  the same length taken along each contour, forwards and backwards, including
  the last pass that joins neighboring open ends, and keeps the order that
  joins the most. Regular patterns no longer leave loose ends where the
  pairs along a wall fall out of step, and multiline copies print out and back.
- Ends whose anchors would meet are joined along the wall instead, up to two
  anchors and a line width apart.
- An unpaired end anchors toward the nearest open end of another path, where
  the next path usually starts, instead of the side with more free wall. With
  multiline infill, an anchor toward a copy of the same line stops short of
  the copy instead of printing over it.
- Last, sparse infill lines whose ends are at most two line spacings apart are
  joined with a straight piece, shortest first, without closing a loop or
  crossing a line; with anchors off this is the only joining. Copies of
  neighboring multiline groups are joined at the same side, and lines that
  cannot reverse only join end to start.

* Describe the travel optimization design

How the extrusion chains, the object and island tours and the infill line joining shorten the travel, and why each part is built the way it is.

---------

Co-authored-by: Tobias Gloth <tobias.gloth@3dsystems.com>
2026-10-19 15:53:32 -03:00
raistlin7447 17c3bbb7b6 Merge branch 'main' into perf/slicing-optimizations 2026-10-19 11:33:03 -05:00
Ian Bassi 9f6a344162 Make the adaptive infill settings pattern-neutral (#16654) 2026-10-19 12:05:55 -03:00
Rodrigo Faselli c67a46a277 Merge branch 'main' into feat-3D-Exclusion-Volumes 2026-10-19 09:59:50 -03:00
Kris Austin 0f59cd5d05 Let Global shortcuts run while typing, except keys that edit text (#16558)
#16505 skipped every Global shortcut while ImGui had the keyboard, so
Ctrl+S, Ctrl+R and the others did nothing while the cursor was in the
text tool's box. Skip only the chords that edit text, and only while a
text field (a wx text entry, a spin control, a web view, or an active
ImGui InputText) has the focus. Skip every Global shortcut while an
ImGui modal is open on the focused canvas.

KeyChord::edits_text() defines the text-editing chords. The Global page
of the shortcuts dialog no longer says these shortcuts apply while
typing.
2026-10-18 13:32:41 -05:00
Harry Loud 20ef416b37 Preserve belt bed-area projection in resolved exclusion regions 2026-10-17 11:54:14 +01:00
Harry Loud 247e903cbe Merge upstream/main and resolve exclusion volume integration conflicts 2026-10-15 18:05:19 +01:00
Noisyfox 99ca7732c7 Remove filament swatch rendering fallbacks 2026-10-15 23:35:35 +08:00
Noisyfox 206552674b Flatten filament preview bitmaps to opaque RGB for native labels 2026-10-15 23:25:23 +08:00
Harry Loud dc9d499434 Simplify collision volume settings layout 2026-10-15 16:24:52 +01:00
Noisyfox 78de3ad9cd Show gradient alpha checkerboard in AMS circles and cards 2026-10-15 23:09:09 +08:00
Noisyfox 9a866ab916 Render translucent filament preview icons over checkerboard 2026-10-15 23:00:39 +08:00
Noisyfox 4efd8bfde1 Show checkerboard under translucent AMS custom colors 2026-10-15 22:49:22 +08:00
Noisyfox dea5a0dd32 Limit AMS gradient editing to four configurable picker colors 2026-10-15 22:35:02 +08:00
Noisyfox 87bf836699 Add alpha and gradient editing for custom AMS colors 2026-10-15 21:41:11 +08:00
Noisyfoxandyw4z 26f5fd6251 Add a themed WebView color picker with persistent favorites (#16197)
* Define validated color picker selection contract

* Integrate web color picker with gradient and alpha controls

Co-authored-by: yw4z <ywsyildiz@gmail.com>

* Apply shared Orca theme to web color picker

* Host color picker in a validated WebView dialog

* Persist color picker favorites in user preferences

* Integrate localized web color picker with filament actions

* Add color picker browser regressions and verify direct includes

* Fit color picker content in a borderless floating panel

* Anchor color picker panels to their triggering controls

* Use accent foreground for selected color picker switches

* Integrate web color picker into generic color fields

* Use web color picker for AMS custom colors

* Use shared web color picker from Linux sidebar menu

* Use web color picker when adding texture import material

* Preserve alpha in filament color picker actions

* Clean up color picker asset whitespace

* Use application translations for color picker validation

* Preserve existing formatting in color picker integration

* Match SpeedDial rounded window handling on macOS

* Align color picker host behavior with SpeedDial

* Consolidate color picker implementation into its dialog

* Remove native color picker fallback

* Limit color picker interfaces to production consumers

* Use shared WebView translation field name

* Reapply anchored color picker placement after GTK show

* update

* fix increment buttons not working on spin inputs

* Use thumb color from its own channel

* init gradients with shifted color for second color

* fix hsl sliders cannot move freely and lock downs other one

* unify save button and color preview & increase stored color count to 32

* switch to hsl based calculation and fix plot and slider drag events

* update

* add support for multi colored gradients

* Update test_filament_color_picker.cpp

* add filtering color palette and store sidebar and combo state

* open dialog with calculated size

* apply shadow to dialog on windows

* add tooltip for gradient add color button

* Restore draggable fixed-size color picker frame

* Fix color picker sidebar sizing in WebKit

* Fix invisible default filament color button on macOS

* Remove duplicated color defs for color picker

* Remove duplicate HTML color picker frame

* Match color picker tests to current theme roles

* update icons

* use focus color on background of filter box

* align gradient switch with hex input

* fix initial window sizing

* Preserve caller color order when drawing filament icons

---------

Co-authored-by: yw4z <ywsyildiz@gmail.com>
2026-10-15 15:29:49 +08:00