Compare commits

...

555 Commits

Author SHA1 Message Date
Claude 727f1facd0 Expose imported presets in the filament wizard 2026-11-30 21:26:38 +00:00
Claude f9d7f3976e Preserve lazy filament enrollment after Android merge 2026-11-30 21:25:53 +00:00
Claude 2065d46e9e Merge branch 'ux-filament-preset-footer' into HEAD
# Conflicts:
#	web/frontend/src/FilamentPresetBrowser.tsx
2026-11-30 21:25:13 +00:00
Claude 5def368984 Merge branch 'codex/android-server-connection' into HEAD
# Conflicts:
#	android/app/src/main/java/uk/labus/webslicer/MainActivity.kt
#	android/app/src/main/res/values/strings.xml
#	web/backend/orca_web/filament_library.py
#	web/backend/tests/test_filament_product_api.py
#	web/frontend/src/FilamentPresetBrowser.tsx
#	web/frontend/src/FilamentProductLibrary.tsx
#	web/frontend/src/Imports.tsx
#	web/frontend/src/i18n/messages.json
2026-11-30 21:25:13 +00:00
Claude e256b71922 Redesign printer dispatch and automate filament mapping 2026-11-30 21:16:19 +00:00
Claude fa3be04fab Restore workbench navigation and selected print result 2026-11-30 15:23:15 +00:00
Claude 98c41a0543 Remember the Device tab in Project printer 2026-11-30 15:16:28 +00:00
Claude 519f4ae24a Restore the remembered device from printer management shortcuts 2026-11-30 15:13:37 +00:00
Claude 089b35e85f Remember printer device view and camera playback 2026-11-30 15:11:19 +00:00
Claude 3ea5da5b77 Slice with uncommitted project setting fields 2026-11-30 06:06:38 +00:00
Claude ef56275336 Expose Anycubic local storage for print dispatch 2026-11-30 05:58:50 +00:00
Claude b9692e0f28 Restore preview timeline and Android sign-in UX 2026-11-29 21:40:00 +00:00
Claude cb7a043f38 Merge branch 'gui-audit-a-device-heading' into codex/merge-g18-g19
Check CAD offer table / Check CAD offer table (push) Successful in 16s
2026-11-29 19:53:43 +00:00
Claude e089e1c858 Assert assigned filament choices independently of the shared library 2026-11-29 19:53:36 +00:00
Claude bd67f27cbb Prepare Web Slicer 0.3.5-alpha 2026-11-29 19:48:36 +00:00
Claude faf9525d08 Localize printer telemetry units and remove duplicate message 2026-11-29 19:47:52 +00:00
Claude 51580cba0d Merge remote-tracking branch 'origin/main' into gui-audit-a-device-heading 2026-11-29 19:41:07 +00:00
Claude 6c828b8c4e Merge remote-tracking branch 'origin/filament-library-lazy' into codex/merge-g18-g19 2026-11-29 19:39:41 +00:00
Claude 2a15f3d003 Avoid reloading the filament library after its own save 2026-11-29 19:25:21 +00:00
Claude 9fbc75d730 Merge remote-tracking branch 'origin/main' into filament-library-lazy 2026-11-29 19:25:21 +00:00
Claude 40deb7c6b9 Materialise filament presets on first project use 2026-11-29 19:24:18 +00:00
Claude c7e54cdd16 Merge branch 'codex/g18-g19-printer-devices' into codex/merge-g18-g19 2026-11-29 19:19:11 +00:00
Claude 71791b78c6 Verify still camera refresh and stop in Chromium 2026-11-29 12:12:38 +00:00
Claude dc76dab3bc Include OctoPrint in documented snapshot refresh behavior 2026-11-29 12:08:15 +00:00
Claude 70cd8c7517 Document prerequisites for Prusa Connect cloud Device support 2026-11-29 12:04:48 +00:00
Claude 15b7d6a00a Refresh configured OctoPrint still cameras 2026-11-29 12:03:06 +00:00
Claude 4390202507 Refresh PrusaLink still-camera snapshots 2026-11-29 12:02:29 +00:00
Claude 79b7c35c21 Bound still-camera snapshot relay responses 2026-11-29 12:00:30 +00:00
Claude 4c807cea37 Refresh SimplyPrint and Prusa Connect Local still cameras 2026-11-29 11:59:28 +00:00
Claude 9ef67ca356 Refresh Obico camera snapshots while viewing Device 2026-11-29 11:58:51 +00:00
Claude 62383a088f Show same-origin Obico camera snapshots in Device 2026-11-29 11:57:34 +00:00
Claude 48e502be3d Report UltiMaker operator waits and terminal job outcomes 2026-11-29 11:56:26 +00:00
Claude ec513f9952 Require complete Digest pairing for UltiMaker job actions 2026-11-29 11:55:38 +00:00
Claude 6792068523 Control identified UltiMaker print jobs in Device 2026-11-29 11:54:44 +00:00
Claude bab411a2d0 Recognize TCP resets in printer disconnect test 2026-11-29 11:53:14 +00:00
Claude b52f566a7c Delete reviewed writable files through Prusa Connect Local 2026-11-29 11:50:30 +00:00
Claude db11fb252b Show legacy Flashforge print progress 2026-11-29 11:49:19 +00:00
Claude 06b93e79a8 Monitor legacy Flashforge printers through the TCP console 2026-11-29 11:47:27 +00:00
Claude ad9e764ab9 Match OctoPrint counterclockwise webcam rotation 2026-11-29 11:44:43 +00:00
Claude 053393a716 Pause identified Repetier print jobs 2026-11-29 11:44:07 +00:00
Claude 9f22e9cfe2 Application menu: undo and redo as ordinary menu rows
Undo and redo were the only bordered pill buttons in a menu of plain rows.
They are now rows like the other project actions, with their keyboard
shortcut as a muted hint (aria-keyshortcuts for assistive tech) and a
separator below.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-29 11:43:47 +00:00
Claude 725f48bbb6 Resume and stop identified Repetier print jobs 2026-11-29 11:43:15 +00:00
Claude d9bfec20b9 Application menu: grouped project actions, readable jobs, Polish labels
- Project: separators between open/create, earlier work and the current
  project; the save state heads the current-project group instead of sitting
  between 'Open in new tab' and 'Download .3mf'.
- Jobs: the import list has a title; progress shows only while an import
  runs, and a finished import no longer repeats its stale last-stage message.
- Polish for Library, Jobs, Geometry operation history and Saving project.
  E2E helpers match the Polish section names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-29 11:36:23 +00:00
Claude 2f160f57e7 Filament library phase 4: one catalog picker, product wizard, per-printer settings
The add-printer wizard's filament step reused the old checkbox list of every
catalog preset. The readable browser from the filament library (search,
popular-material chips, material/manufacturer filters, filament families)
is now the shared FilamentCatalogPicker, used both there and in the new
inline product wizard; each nozzle variant resolves a chosen family to its
own catalog preset, so no "@printer" variant is picked by hand.

"Add filament" in the library opens that wizard (start from the catalog or
blank, then details) instead of the FilamentPresetBrowser modal, which is
removed. A product's "Settings per printer" lists each printer configuration
via lazy resolution: tuned (edit), printer base (tune: materialise, then edit)
or no base for the material (create from a catalog template). The manual
copy-a-profile form and the unlink button are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbN9UMd79Uym67Lafsw
2026-11-29 11:29:31 +00:00
Claude a853f17926 Project → Plates: keep both origin buttons beside the X/Y fields
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-29 05:43:10 +00:00
Claude a3dac88bc6 Prepare inspector: profile-set actions in one even column
Add filament, Apply profile set and Manage printers now share the panel width
instead of a full-width add button followed by ragged right-aligned buttons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-29 05:39:58 +00:00
Claude 05a0ec5a65 Imports: a stopped import shows its reason and next step
The inline import line showed a failed, interrupted or conflicting import as
only 'name · status · percent', hiding the server's reason. It now shows the
reason with Retry (or Keep as copy for a conflict) and Hide; running imports
keep the progress line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-29 05:33:14 +00:00
Claude a3932789e6 Project → Objects: grouped object actions and card sections
Object actions were one column of ~18 full-width buttons with options mixed
in. They are now grouped by purpose (select, duplicate, merge and split,
printing, units, delete) with a small title per group; split options sit on
their own lines above the split buttons. On the project page each group is a
row of ordinary buttons and every object section (actions, parts and
filaments, model files, clipboard, instances) is a card; the side panel keeps
its column layout with the group titles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-29 05:29:24 +00:00
Claude 337c2104c2 Filament library phase 3: three-step add-printer wizard
Adding a printer is now Printer -> Filaments -> Connection. Model cards only
choose the model; nozzle variants are ticked beside the chosen card, next to
the printer and preset names, instead of checkmarks on every catalog card.

The filament step lists the owner's library (available on the new printer
without copying) and offers catalog filaments as an optional addition,
required only while the library is empty. Without a choice each variant
copies the printer's default filament as its base, so the per-variant
"at least one filament each" gate and PrinterVariantSetup are gone.

E2E specs walk the new flow through shared pickPrinterTemplate/advanceWizard
helpers; the setup-layout spec captures each step in the dark theme.
physical-mesh-import still fails at its ZIP printer chooser, identically
on main's frontend, so it is not addressed here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbN9UMd79Uym67Lafsw
2026-11-29 00:50:53 +00:00
Claude 0578c92f34 Polish UI: one term for plate ('płyta'), matching the OrcaSlicer glossary
The web app's own Polish strings called a plate 'stół' while the upstream
catalog says 'płyta', so both appeared on one screen. Plate strings now use
'płyta' with matching grammar (case, adjective gender); 'stół' stays for the
physical bed (shape, texture, grid, levelling). Plate labels use the
parametrised 'Stół {0}' key instead of 'Stół ' + number, which the native
catalog resolved to the bed. Plate origin buttons drop the English 'origin'.
E2E selectors follow the new wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-29 00:39:36 +00:00
Claude 7766782872 Filament library phase 2: lazy creation and deletion cascade
Adding a product or a printer creates no presets. Deleting a product now
retires its tuned presets on every printer it reached, in the same
transaction, through the same path as deleting a single preset (soft
deletion keeps immutable revisions for projects; printer defaults move to a
remaining preset). It is refused while a preset is a printer profile's only
filament preset, since that preset is the lazy base there. Deleting a
printer drops its presets' product links and opt-out rows.

The default re-pointing shared by delete_preset and the cascade is extracted
into repoint_default and runs once per profile, so a product with two
tunings on one profile does not race its own uncommitted printer write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbN9UMd79Uym67Lafsw
2026-11-29 00:21:59 +00:00
Claude 0b9aced879 Project → Overview: readable project information, Polish for the project section
- Project information: fields in rows (model name | author, description,
  license | copyright | source), information and attachments stacked at full
  width, extra metadata as a key/value table without empty entries. The 3MF
  'Origin' field is labelled Model source: it is where the model came from,
  and its old translation named the bed origin.
- Polish catalog entries for the project section (overview, export,
  publishing, details, object panel labels) replacing English text and
  half-translations such as 'Project informacje' or 'Obiekt table'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-29 00:10:28 +00:00
Claude 600d7ad612 Project → Projects: no stray line, duplicate heading or dead tabs
- style.css's old sidebar border no longer draws a line beside the list.
- The list heading repeats the page title and the active tab, so it is kept
  for assistive tech only.
- An empty list explains what to do; without a project the section bar shows
  only Projects instead of three disabled tabs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-29 00:06:31 +00:00
Claude 6364b8e382 Project → Plates: align buttons with the fields beside them
Rows that mix labelled fields and buttons align to the bottom, so a button
lines up with the input rather than centring on label plus input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-29 00:05:23 +00:00
Claude 1711389cff Project → Overview: show the printer once and frame every section alike
- The summary no longer repeats printer and preset; the Project printer
  section below shows them once, as the controls that change them, in two
  columns instead of full-width selects.
- Collapsible sections (plates, export, publishing, details) are one
  full-width card each with the title inside; nested cards drop their own
  frame, Export models drops its duplicate heading, side-by-side detail cards
  share the row height.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-29 00:04:30 +00:00
Claude 8860ed9523 Project → Plates: grouped cards instead of a stack of full-width bars
The plate tools are styled for the narrow side panel (stacked full-width
buttons, single-column fields). On the full-width Project → Plates page they
now read as grouped cards: plate picker, an action toolbar, a two-column plate
settings form with Save/Cancel side by side, and equal-width cards for origin,
filament order, plate name and transfer. Scoped to the project page, so the
side panel keeps its layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-28 23:58:55 +00:00
Claude e6ee465c41 Filament library phase 1: ownership-based availability and lazy per-printer presets
A product is now available on every printer whose owner owns or manages its
library; filament_product_printers becomes an opt-out list (enabled=0 only).
The gate lives in one SQL predicate used by every reader (visible_product,
product printer_ids, preset_available, selection/verification, imports,
slot assignments). Server administration is deliberately not a library role
for this check, so an admin's printer does not receive every inventory.

Untuned (printer profile, product) pairs resolve lazily to the profile's own
same-material base composed with the product identity; materialise() creates
and links the preset on first tuning (new /lazy-resolve and /tuning routes).
Every filament preset keeps a product: unlink is refused and migration
relinks orphans to their origin product.

Isolation tests cover owners, managers, library transfer, admin printers,
forged cross-owner links and single-user mode. Old tests asserting opt-in
semantics are rewritten; three order-dependent sync tests no longer pick the
first row of a UUID-ordered list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbN9UMd79Uym67Lafsw
2026-11-28 23:50:05 +00:00
Claude 2d9905ea0e Printers: reach the device page from the printer list in one click
- A connected printer's card gets a Device shortcut (labelled with the
  printer name for assistive tech), so the device page no longer needs
  select-card-then-scroll-to-details.
- The Device button in the printer details is an ordinary button instead of
  a full-width bar.
- Without a project, the Project printer page offers Go to printers instead
  of a dead end, and its message is translated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-28 23:41:53 +00:00
Claude 937614d392 Device page: Polish translations for the device panels
Adds Polish catalog entries for the device sub-panels' headings, actions,
hints and status messages, replacing English text and native-pattern
fallbacks such as 'Początek camera'. The home-axes button uses its own
'Home {axes}' key because the upstream 'Home' entry means the start page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-28 23:39:06 +00:00
Claude 970cb98bc7 Device page: one card shell for every device section
The eleven device sections each repeated the same card declarations and a
mobile padding override. Declare the shell once; section rules keep only
their own content layout. PA result cards wrap like the control cards so a
lone last card fills its row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-28 23:34:49 +00:00
Claude 54c58247a1 Device page: no lone cards next to empty space
- Device control cards use a wrapping flex row: a card left alone in its row
  takes the full width and cards in one row share its height.
- Status/camera (and, in the overview, the left column vs device controls)
  stretch to a common height; stretched cards keep content packed at the top.
- Feeder slots lay out in 4, 2 or 1 equal columns by card width (container
  query), and modules with up to four slots fill a single row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-28 23:31:03 +00:00
Claude b1b9380b66 Device page: stop the back button and section actions crowding headings
- Section headings (h2/h3 + action group) shared by every device sub-panel:
  the title takes the free space and the actions wrap as one group, right-
  aligned in wide cards and under the title in narrow ones (container query).
  Headings use the theme text colour instead of style.css's fixed h2 colour.
- 'Back to printers' was a loose sibling placed flush against the printer
  name; PrinterDevices now renders it (onBack) inside its own grid gap.
- The fixed printer heading sets its own padding/border so style.css's global
  header rule no longer indents it below 1200px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbQ4LM69GUfjC2kUn5y
2026-11-28 23:22:13 +00:00
Claude ca699c5137 Select configured OctoPrint cameras in Device 2026-11-28 22:49:44 +00:00
Claude 5fb182d916 Open exact stored file paths from printer job history 2026-11-28 22:48:27 +00:00
Claude 40ef729302 Show the recorded duration in OctoPrint history 2026-11-28 22:47:26 +00:00
Claude 37a7caa3e9 Show active SimplyPrint job layer and time remaining 2026-11-28 22:46:22 +00:00
Claude f33868f415 Cancel eligible SimplyPrint jobs in Device 2026-11-28 22:45:22 +00:00
Claude 3e3c222148 Pause and resume SimplyPrint jobs in Device 2026-11-28 22:44:12 +00:00
Claude 5cbcb74559 Show estimated time before starting stored Duet prints 2026-11-28 22:42:55 +00:00
Claude b9fd3c81c6 Validate Duet print-start acknowledgements 2026-11-28 22:42:07 +00:00
Claude 1e0ba34506 Start reviewed stored G-code on Duet printers 2026-11-28 22:40:33 +00:00
Claude cc198184d7 Document Prusa Connect Local setup and token scopes 2026-11-28 22:39:11 +00:00
Claude 7ea37bba17 Allow Prusa Connect Local to start after a previous print stops 2026-11-28 22:38:36 +00:00
Claude f574343a31 Relay Prusa Connect Local cameras in Device 2026-11-28 22:37:12 +00:00
Claude ddb7612e92 Start reviewed USB files through Prusa Connect Local 2026-11-28 22:35:28 +00:00
Claude 55bb1a3ec6 Browse Prusa Connect Local printer files and thumbnails 2026-11-28 22:34:07 +00:00
Claude 75ef0abea9 Show completed Prusa Connect Local jobs in Device 2026-11-28 22:31:10 +00:00
Claude 5598375bed Show firmware reported by Prusa Connect Local 2026-11-28 22:29:45 +00:00
Claude 429fd9b134 Control active prints through Prusa Connect Local 2026-11-28 22:28:02 +00:00
Claude ae547dbd7a Start uploaded prints through Prusa Connect Local 2026-11-28 22:26:59 +00:00
Claude 952b815148 Upload G-code to Prusa Connect Local server storage 2026-11-28 22:25:34 +00:00
Claude 1de201d5ef Monitor printers through Prusa Connect Local 2026-11-28 22:23:34 +00:00
Claude 47a9d3c170 Document deployment of Prusa Connect cloud sign-in 2026-11-28 22:20:27 +00:00
Claude 19611b7c74 Explain OctoPrint job command targeting in Device 2026-11-28 22:19:35 +00:00
Claude 1b05049550 Preview OctoPrint stored-file thumbnails in Device 2026-11-28 22:16:43 +00:00
Claude 16c0fd4fa9 Review and start identifiable OctoPrint SD card files 2026-11-28 22:13:51 +00:00
Claude 8ffb0b8d55 Show OctoPrint analysis time on stored-file print review 2026-11-28 22:12:36 +00:00
Claude 519c423ae8 Start reviewed OctoPrint local files directly from Device 2026-11-28 22:11:45 +00:00
Claude 1a58ccaebc Tidy the filament preset browser footer into one aligned action bar
The selection block laid the chosen name above a full-width variant dropdown
while the action buttons sat centred to its right, so the wide select and the
buttons read as mismatched controls dropped next to each other rather than a
deliberate row.

Lay the footer out as a single action bar: the chosen name with a compact
vendor/material line, the variant selector inline at its natural width, and the
buttons grouped at the end on a shared baseline. A short hint fills the left
when nothing is selected. On narrow screens the selection, its select and the
buttons each go full width and stack. Variant options now show only the part
that distinguishes them ("@System"), not the whole name the title already
carries.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-28 21:32:56 +00:00
Claude b7969d2829 Drop retired config keys when loading user presets instead of failing the catalogue
A user preset carrying a key the config def has since retired (e.g. silent_mode,
which PrintConfigDef::handle_legacy lists in its ignore set) made the worker's
load_users throw "Invalid preset setting: <key>". Because GET /api/v1/profiles
loads every user preset in one worker call, a single stale preset returned 422
for the whole catalogue, breaking the profile list and the filament picker.

load_users now runs each stored key through PrintConfigDef::handle_legacy before
validating it, exactly as the 3MF reader does: retired keys are dropped and
renamed keys migrated, so one legacy key no longer fails the catalogue. A key
that is still valid globally but belongs to another scope keeps throwing, so
genuine mis-scoped writes are still caught.

test_profiles_legacy_keys injects silent_mode and an unknown key into stored
user presets and asserts /profiles returns 200 with the preset still listed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-28 21:21:51 +00:00
Claude f0e78ae4a2 Show stored PrusaLink print metadata before starting 2026-11-28 17:18:02 +00:00
Claude 52fec6d7aa Start reviewed PrusaLink v1 files directly from Device 2026-11-28 17:15:56 +00:00
Claude 6a1916eb9b Home PrusaLink axes from Device when the printer is idle 2026-11-28 17:13:10 +00:00
Claude 593a767aa5 Merge remote-tracking branch 'origin/main' into codex/g18-g19-printer-devices 2026-11-28 17:10:48 +00:00
Claude 5355ec7eb4 Pass Prusa and SimplyPrint OAuth settings through Compose 2026-11-28 17:10:32 +00:00
Claude a3d5eddb05 Exercise PrusaLink Device controls through Digest and the command journal 2026-11-28 17:09:38 +00:00
Claude bec7d2a436 Adjust Python PrusaLink print speed and flow from Device 2026-11-28 17:08:31 +00:00
Claude 0b1a15207a Set heater targets on Python PrusaLink hosts 2026-11-28 17:06:39 +00:00
Claude e40b2835c9 Select among connected PrusaLink cameras in Device 2026-11-28 17:04:37 +00:00
Claude c79f7a45bc Show PrusaLink fan speed and filament change timing 2026-11-28 17:02:44 +00:00
Claude 8eea8a2b4b Validate complete SimplyPrint printer selection pages 2026-11-28 17:01:10 +00:00
Claude 83be263660 Report the temperature actually applied by SimplyPrint 2026-11-28 16:59:53 +00:00
Claude ecdb04e477 Expose SimplyPrint chamber temperature and scoped control 2026-11-28 16:58:19 +00:00
Claude e71c37e194 Open SimplyPrint account authorization from connection settings 2026-11-28 16:56:50 +00:00
Claude 89b6556e1a Control SimplyPrint heaters with a scoped account grant 2026-11-28 16:55:37 +00:00
Claude 9b5af05956 Page through SimplyPrint job history in Device 2026-11-28 16:53:11 +00:00
Claude e131a96fad Select among configured Repetier cameras in Device 2026-11-28 16:51:34 +00:00
Claude 3156364fbf Address each Repetier nozzle with its own heater limit 2026-11-28 16:50:18 +00:00
Claude ecdafe0c54 Set bounded Repetier heater targets from Device 2026-11-28 16:49:19 +00:00
Claude b63795ae9c Open Duet history files using their native volume and path 2026-11-28 16:47:09 +00:00
Claude eff9954a2b Use the native Duet Software Framework object model 2026-11-28 16:45:16 +00:00
Claude b3aeca388c G4: filament->extruder grouping panel for multi-extruder printers
Desktop assigns each filament to an extruder through FilamentMapDialog
(auto-by-flush / auto-by-colour / manual). The slicing engine and the
headless worker already carry the whole mechanism: filament_map_mode is a
scalar enum and filament_map is a per-filament vector, both written during
slicing and settable through the generic PATCH /settings path (the 0.3.4
merge brought the surrounding multi-nozzle plumbing - nozzle inventory,
volume type, extruder variants, per-nozzle flushing). Only the web UI to
drive the grouping was missing.

Add a FilamentGrouping panel in the filament settings scope, shown only when
the printer has more than one extruder. It offers the three grouping modes
and, in manual mode, a per-filament extruder picker with colour swatches. It
writes filament_map_mode as a setting and filament_map as indexed elements in
one PATCH, reusing the existing serialized edit queue (revision guarding,
409 handling, draft tracking) via a new applyFilamentGrouping action.

No backend change: the data path already exists. test_filament_grouping_api
locks that contract (default auto mode, manual scalar + indexed writes,
single-slot moves, stale-revision 409, single-extruder shape) so the
frontend-only feature cannot regress server-side.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-28 13:35:33 +00:00
Claude 34abc82e8f Preview stored Duet G-code thumbnails in Device 2026-11-28 12:21:24 +00:00
Claude 4dde3772d8 Control the active Duet nozzle temperature 2026-11-28 12:19:32 +00:00
Claude 76b32f3499 Control bounded Duet bed and chamber temperatures 2026-11-28 12:18:21 +00:00
Claude 78ea1dafa4 Read modern Duet bed and chamber heater mappings 2026-11-28 12:16:13 +00:00
Claude 3045177729 Show the last Duet job in Device history 2026-11-28 12:15:08 +00:00
Claude 402daee475 Export Prusa MCP tool schemas from connection diagnostics 2026-11-28 12:13:23 +00:00
Claude 333c74f6c2 Verify Device capability gating for OctoPrint heater controls 2026-11-28 12:12:28 +00:00
Claude 82d4d9d444 Read the authenticated Prusa MCP tool catalogue 2026-11-28 12:11:29 +00:00
Claude 19a39e0de4 Renew Prusa MCP sessions without replaying refresh tokens 2026-11-28 12:09:54 +00:00
Claude 913f3bab44 Expose Prusa Connect account sign-in in printer settings 2026-11-28 12:08:25 +00:00
Claude d416334258 Add browser-bound Prusa MCP OAuth backend 2026-11-28 12:06:38 +00:00
Claude 5f1b3b1e44 Set bounded OctoPrint heater targets from Device 2026-11-28 12:03:00 +00:00
Claude 4bcc22c782 Edit OctoPrint heater limits in connection settings 2026-11-28 11:59:46 +00:00
Claude e04a46b35f Store configured heater limits per OctoPrint connection 2026-11-28 11:58:55 +00:00
Claude db175f28dd Document OctoPrint heater telemetry limits 2026-11-28 11:57:58 +00:00
Claude ad7c25e465 Preview legacy PrusaLink files in Device 2026-11-28 11:57:11 +00:00
Claude 7cbcadc94d Preview stored PrusaLink files in Device 2026-11-28 11:55:19 +00:00
Claude 7da1d45b1e Allow explicitly configured camera origins for Repetier 2026-11-28 11:53:00 +00:00
Claude 7c6274c8b0 Browse stored G-code on stock Creality LAN printers 2026-11-28 11:52:04 +00:00
Claude ab24d0cc46 Browse local files on OctoPrint-compatible ElegooLink hosts 2026-11-28 11:50:26 +00:00
Claude e4b6b4bf26 Preview stored Flashforge files in Device 2026-11-28 11:49:29 +00:00
Claude 063f561a4b Browse recent Flashforge HTTP files in Device 2026-11-28 11:47:52 +00:00
Claude 4021330350 Use the configured OctoPrint snapshot camera as a fallback 2026-11-28 11:46:03 +00:00
Claude 7e6ac09481 Show printer firmware identity through MKS and ESP3D 2026-11-28 11:45:10 +00:00
Claude 0925b81bc1 Show history and host version for OctoPrint-compatible ElegooLink 2026-11-28 11:44:07 +00:00
Claude 10d53371db Show Repetier Server software version in Device 2026-11-28 02:11:00 +00:00
Claude 355cdccc3b Fix Repetier camera proxy authentication and failed history labels 2026-11-28 02:10:15 +00:00
Claude 590a5fad45 Relay same-host Repetier printer webcams in Device 2026-11-28 02:09:41 +00:00
Claude 45c622a96c Show Repetier reported print progress and remaining estimate 2026-11-28 02:08:53 +00:00
Claude 1998cffa95 Show Repetier bed and chamber temperature channels 2026-11-28 02:08:17 +00:00
Claude 35aeefc5cd Show reported Creality LAN print time and speed 2026-11-28 02:07:19 +00:00
Claude 12827df9c7 Verify PrusaLink resume and stop through the Device API 2026-11-28 02:06:42 +00:00
Claude 670474dd91 Show firmware version for stock Creality LAN printers 2026-11-28 02:06:01 +00:00
Claude 7c5b776f1a Relay stock Creality HTTP cameras without upload credentials 2026-11-28 02:05:11 +00:00
Claude d89a3740d7 Read stock Creality LAN print history in Device 2026-11-28 02:04:26 +00:00
Claude 063c64ac21 Monitor stock Creality LAN printers through native status frames 2026-11-28 02:02:54 +00:00
Claude ebdb0d679d Show Repetier active filenames and flow ratio in Device 2026-11-28 02:00:53 +00:00
Claude 0ba3662b53 Show 3DPrinterOS reported temperature channels in Device 2026-11-28 02:00:09 +00:00
Claude e5d3ae22a7 Cancel a reviewed 3DPrinterOS cloud job from Device 2026-11-28 01:59:10 +00:00
Claude 07b27f6696 Show 3DPrinterOS print results in Device history 2026-11-28 01:57:51 +00:00
Claude 64489ac814 Monitor selected 3DPrinterOS organization printers 2026-11-28 01:56:53 +00:00
Claude f959c091e5 Show PrusaLink speed flow and head position in Device 2026-11-28 01:55:03 +00:00
Claude 7d14a04449 Show OctoPrint and AstroBox host versions in Device 2026-11-28 01:54:01 +00:00
Claude 63bb8d2301 Show installed Flashforge firmware for HTTP connections 2026-11-28 01:53:15 +00:00
Claude 1f13933e7d Show authorized SimplyPrint print history in Device 2026-11-28 01:52:30 +00:00
Claude bc1a71b126 Show SimplyPrint notification camera snapshots in Device 2026-11-28 01:50:56 +00:00
Claude 64c5abf365 Bind Prusa Connect upload credentials to the configured endpoint 2026-11-28 01:50:02 +00:00
Claude 5d0a3f388a Clarify Prusa Connect cloud printer setup 2026-11-28 01:48:45 +00:00
Claude 5b657cffa1 Verify UltiMaker camera relay and credential boundaries 2026-11-28 01:46:31 +00:00
Claude ade9d83eee Relay the local UltiMaker camera feed in Device 2026-11-28 01:46:01 +00:00
Claude 5bb979e0e5 Show local UltiMaker print history in Device 2026-11-28 01:45:18 +00:00
Claude 21e7781299 Show installed UltiMaker firmware in Device 2026-11-28 01:44:15 +00:00
Claude cf598b71a3 Report SimplyPrint printer firmware and agent versions 2026-11-28 01:43:15 +00:00
Claude 0f12bbcc9c Show active SimplyPrint job progress in Device 2026-11-28 01:42:12 +00:00
Claude a55545e0a4 Show AstroBox last print outcomes in Device history 2026-11-28 01:41:29 +00:00
Claude 89fa84c6a8 Show PrusaLink camera snapshots and Repetier print history 2026-11-28 01:40:27 +00:00
Claude 5ebddcdd11 Monitor selected SimplyPrint organization printers 2026-11-28 01:36:52 +00:00
Claude 0e31e126c1 G9 phase 2 backend: apply flow-ratio and max-volumetric-speed to a filament preset
Extend the calibration-apply pattern to the two manual filament tunings. A shared
apply_filament_calibration helper writes a result into the owned filament preset
through the strict settings-edit path (prepared_edit + profile_extract +
save_preset), scope-gated to filament. Pressure advance now goes through it too.

New endpoints:
- POST .../calibrations/flow-ratio {revision, flow_ratio}  -> filament_flow_ratio (0 < r <= 2)
- POST .../calibrations/max-volumetric-speed {revision, max_volumetric_speed} -> filament_max_volumetric_speed (0 < v <= 200)

Access control runs the per-key lock check for each setting. test_machines_api
covers both (written value, revision bump, out-of-range 422, wrong scope 422);
34 access-control tests still pass. Frontend apply controls for flow/max-vol and
the hardware round trip are the remaining increments.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-28 00:45:38 +00:00
Claude 8968d2712b G9 phase 1 UI: apply a PA-history k-value to a filament preset
Add an Apply-K action to the Bambu PA-history panel. After reading the printer's
stored results it loads the owning machine's filament presets (the physical
printer id is the machine id), and for each result lets the user pick a filament
preset and POST the measured k to
/machines/{id}/profiles/{pid}/presets/{preset}/calibrations/pressure-advance,
enabling pressure advance on that preset. The target list is refreshed after a
write so a second apply uses the new revision.

Completes G9 phase 1 end to end. tsc passes and the DeviceSession SSR render is
unchanged; the click→POST interaction has no automated test here (no jsdom
component harness) and the round trip is not hardware-verified (hardware-unverified
HV3).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-28 00:42:44 +00:00
Claude 06f771e507 G9 phase 1: apply a measured pressure-advance k-value to a filament preset
The calibration print generators and the PA-history reader already exist; the
missing half of G9 is writing a result back into the profile. Add
POST /machines/{id}/profiles/{pid}/presets/{preset_id}/calibrations/pressure-advance
taking {revision, k_value}: it sets pressure_advance to the measured k across the
filament's tool entries and enables pressure advance, through the same strict
owned-preset settings-edit path as a manual edit (prepared_edit + profile_extract
+ library.save_preset). Scope-gated to filament presets and bounded to the
native k-value range (0..10).

Access control treats the route like a filament settings edit: it requires
save_presets + edit_filament and runs the per-key lock check for
pressure_advance/enable_pressure_advance. Tested in test_machines_api
(applied value, enable flag, stale-revision 409, out-of-range 422, wrong-scope
422); 34 access-control tests still pass.

The device UI action that calls this from the PA-history view is the next
increment; the Bambu round trip is not hardware-verified.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-28 00:37:43 +00:00
Claude d7a6efa88a G23: start a stored file from the classic Bambu SD card over FTPS
Complete G23 for X1/P1/A1 by adding print-from-SD on top of the FTPS file
browser. Classic machines cannot read a single archive member like the native
TLS6000 protocol, so BambuFtpFiles.archive_metadata pulls the whole .3mf (bounded
by the download cap) and parses only Metadata/slice_info.config locally with the
shared archive_plates parser. The reviewed start reuses the proven
stored_start_payload command form: the SD path is addressed as
file:///sdcard/<path> with md5=from_sd_card, so no new MQTT shape is invented.

bambu_file_print.start now picks the native adapter for P2S/N7 and the FTPS
adapter otherwise, resolving the stored-file identity over the same transport it
reviewed. BambuFileSelection/Preparation accept the 'sdcard' root, and host_spec
advertises supports_file_print + start_file_print for the classic FTPS family.

Updates the documented matrix (X1C gains file_print / start_file_print), its
frontend fixture, the storage-family test, and adds archive_metadata coverage to
test_bambu_ftp_files. The end-to-end review→start is not hardware-verified and has
no combined FTPS+MQTT loopback peer yet (tracked in hardware-unverified.md HV2);
73 file-print/storage tests still pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-28 00:23:21 +00:00
Claude 271c8c1044 Track optional SimplyPrint printer read permission 2026-11-27 21:13:50 +00:00
Claude 6129d3bed1 Show SD print progress for MKS and ESP3D 2026-11-27 21:12:13 +00:00
Claude 2e4cc2817e Support legacy Duet status and firmware endpoints 2026-11-27 21:11:21 +00:00
Claude ba1fdfc72e Show Duet firmware and slicer-reported print telemetry 2026-11-27 21:10:29 +00:00
Claude 54d00aa0b8 Decode Repetier queue states and expose live telemetry 2026-11-27 21:09:20 +00:00
Claude 60ca264f11 Show installed PrusaLink and printer firmware versions 2026-11-27 21:08:35 +00:00
Claude 0aebd2b0e8 Show OctoPrint last print outcomes in Device history 2026-11-27 21:07:24 +00:00
Claude d5ede7c7f6 Extend Device support across G18 and G19 transports 2026-11-27 21:00:02 +00:00
Claude 6cf2429d5c G23: browse the classic Bambu SD card over FTPS (X1/P1/A1)
Bambu LAN had two storage worlds: the TLS6000 "native fun" protocol browsed and
printed from P2S/N7 (bambu_storage_files), while classic X1/P1/A1 machines — which
already expose recordings over implicit FTPS — had no file browser at all. Their
SD card is reachable over the same implicit FTPS channel used for sliced-file
upload (bambu_ftp) and recordings (bambu_recordings), via directory listing and
retrieval rather than STOR.

Add bambu_ftp_files.BambuFtpFiles, a printer_file_transport adapter for those
models: bounded MLSD listing with an NLST+SIZE fallback, token-verified bounded
download, read-only (no delete), scoped to the classic-FTPS model family shared
with recordings. printer_file_transport routes bambu_lan to the native adapter
for P2S/N7 and to the FTPS adapter otherwise, and host_spec advertises
supports_file_browser for both. file_print / start_file_print stay native-only
for now (the classic print-from-SD MQTT path is a separate change).

Updates the documented capability matrix (X1C gains file_browser), its frontend
fixture, and the storage-family test. New test_bambu_ftp_files drives the real
loopback implicit-FTPS peer. Not yet hardware-verified (no classic Bambu to test).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-27 20:43:45 +00:00
Claude 9f0521437d Integrate OctoPrint and PrusaLink with Device status 2026-11-27 20:43:08 +00:00
Claude 733616d4b3 Fix android build-deps.sh so the arm64 dependency prefix builds from scratch
The committed script could not produce a working deps/build-android prefix:

- It built dep_Blosc/dep_OpenEXR/dep_OpenVDB, but OpenVDB is SLA-hollowing only,
  gated behind SLIC3R_OPENVDB (OFF); with SLIC3R_CAD=OFF the superbuild emits no
  such targets, so ninja failed with "unknown target 'dep_Blosc'".
- It listed a non-existent "FREETYPE" target. The main project resolves FreeType
  with find_package(Freetype REQUIRED) and there is no arm64 system freetype, so
  cross-build FreeType into the prefix (static, optional deps off) from the
  prefetched source, mirroring build-native.sh's download.
- OpenSSL's Perl Configure reads ANDROID_NDK_ROOT (not ANDROID_NDK_HOME); export
  it and pass it through the step env, and cap OpenSSL-dependent deps with
  OMP_NUM_THREADS so OpenSSL honors the six-job budget.

dep_python3 is intentionally not built: build-headless.sh links a prebuilt
python.org Android CPython (ORCA_HEADLESS_PYTHON_ROOT), not the superbuild python.

With these fixes the full arm64 deps prefix, orca-headless, payload and both the
standard and Bambu-cloud APKs build end to end.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-27 20:01:07 +00:00
Claude bd5c905bb0 Release 0.3.4-alpha: bump version for the upstream OrcaSlicer sync
Check CAD offer table / Check CAD offer table (push) Successful in 12s
Second upstream sync (340 commits since the 0.3.3 merge base): new feature work
(filament slots independent of toolhead count, MCP Agent Activity pane), printer
profiles (Prusa MK4S MMU3, Anycubic Kobra 3 Max V2, Flashforge Creator 5, Elegoo
Centauri Carbon 2) and many fixes. versionCode 5->6, versionName 0.3.3->0.3.4-alpha.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-27 14:31:33 +00:00
Claude 74c7dea7ed Fix enable_arc_fitting enum port + ironing inheritance source after upstream merge
Validation of the upstream merge surfaced pre-existing fork bugs where
enable_arc_fitting (a coEnum<ArcFittingMode> in PrintConfig) was still treated
as a bool by the headless config-manipulation port and its tests:

- PrintConfigManipulation.cpp disabled it with ConfigOptionBool(false), replacing
  the enum option with a bool one. A later config comparison then threw
  "ConfigOptionEnum<T>: Comparing incompatible types" (422 on PATCH /settings),
  and the native FFF-rules test crashed (opt_bool on an enum). Set the enum value
  (ArcFittingMode::Disabled), matching the GUI ConfigManipulation.cpp.
- test_config.cpp and test_native_api.py used the old bool contract for
  enable_arc_fitting; update them to the enum ('enabled'/'disabled').

Also classify the four filament_ironing_* keys as process (not printer) overrides
in the settings-state inheritance builder: they are filament-extruder override
keys, but their editable source is the process ironing_* setting.

Resolve two merge-seam brace drops in test_arrange.cpp and test_obj.cpp where the
fork's appended TEST_CASE lost its closing brace to the conflict boundary.

Native libslic3r_tests 1610/1615 pass (5 skipped); backend test_native_api 26/26.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-27 14:31:10 +00:00
Claude 73fd903c41 Merge remote-tracking branch 'upstream/main' into upstream-sync-2
# Conflicts:
#	.github/workflows/build_all.yml
#	.gitignore
#	CONTRIBUTING.md
#	README.md
#	src/slic3r/GUI/Jobs/ArrangeJob.cpp
#	src/slic3r/plugin/PluginAuditManager.cpp
#	src/slic3r/plugin/PluginAuditManager.hpp
#	src/slic3r/plugin/PluginFsUtils.cpp
#	src/slic3r/plugin/PluginFsUtils.hpp
#	src/slic3r/plugin/PythonPluginBridge.cpp
#	src/slic3r/plugin/host/PluginHostModel.cpp
#	src/slic3r/plugin/host/PluginHostPresets.cpp
#	src/slic3r/plugin/pluginTypes/printerAgent/PrinterAgentPluginCapability.cpp
#	src/slic3r/plugin/pluginTypes/slicingPipeline/SlicingPipelinePluginCapability.cpp
#	tests/CMakeLists.txt
#	tests/libslic3r/test_arrange.cpp
#	tests/libslic3r/test_obj.cpp
2026-11-27 12:44:28 +00:00
Ian Chua bd9f5261ab feat: allow filament slots independent of toolhead count (#17847)
* feat: make filament slots independent from extruders

* test: fix filament slot fixtures

* fix: warn when filament slots exceed tool count

* test: fix filament slot warning fixture

* fix: update preset sweep for independent filament slots

* fix: Warn about filament slots that may address the wrong tool

* fix: align MCP filament slot operations with the sidebar

* test: fix filament slot schema and preset sweep

* fix: limit object filament settings by slot count
2026-11-27 19:38:12 +08:00
HanifKoh a0663e6eb5 Hold the GIL in the Python Tests That Segfault on Main (#17941)
#17871 made the slic3rutils tests start the production PythonInterpreter, which releases the GIL once Python is up, and gave the existing Python tests ensure_python_initialized() and py::gil_scoped_acquire. Four tests that #17819 added touch Python without the GIL and segfault on every platform. Give them the same two lines; the MCP tests hold the GIL only around the import, since python_api_reference() takes it itself.
2026-11-27 17:12:17 +08:00
Bartłomiej Kałuża 7cdc829ab3 Fix the Elegoo Centauri Carbon 2 plate type: enable plate selection, default to Textured PEI (side A) (#17916)
The CC2 profile hid the plate selector and fell back to Smooth High Temp Plate, which the printer doesn't have, so bed temperatures came from hot_plate_temp. Enable plate selection on the 0.4 nozzle profile (the 0.2, 0.6 and 0.8 inherit it) and default to Textured PEI Plate, side A of the stock plate. Users with a saved plate keep it until they switch.

Elegoo bundle version 02.04.00.14 -> 02.04.00.15.
2026-11-26 21:15:58 -06:00
HanifKoh 7fbacdfe7a Stop Reading an Uninitialised Position When Routing Back to the Type 1 Wipe Tower (#17930)
After a filament change on a Type 1 wipe tower with "Skip points" on, the travel back to the tower started from `gcode_last_pos`, which was never initialised. An axis the change G-code doesn't move kept whatever was on the stack, so the route could cut across the tower or go the long way round, and the same slice could give different G-code between runs.

That axis now starts at the head's last tracked position from before the change G-code. This changes slices on the Bambu Lab A2L, H2C, P2S and X2D and the Qidi Q2 and Q2C, and adds a regression test to `test_wipe_tower.cpp`.
2026-11-26 21:13:56 -06:00
Kris Austin fe6c70d736 Keep every object when the CLI moves a project's plates to a new bed (#17897)
When the CLI slices a project for a printer with a different bed, it
matches each object to a plate by position and then moves each plate's
objects onto the new plate grid. The plates got the new bed's shape
before that matching, while they were still laid out on the old grid.

On a 256 mm project's grid, a 340 mm plate 1 overlaps plate 2 by
32.8 mm. An object near plate 2's left edge joined plate 1, moved with
it into the gap between plates, and was left out of the slice with
exit code 0. On a smaller bed, an object near a plate's right edge
matched no plate and was left out the same way.

Match objects on the bed the project was saved with, then apply the
new bed's shape and match them again on the new grid.

Fixes #17741
2026-11-26 21:02:46 -06:00
Kris Austin f829169077 Let slic3rutils tests pass when they all run in one process (#17871) 2026-11-26 21:01:05 -06:00
Eric Lin 2b15a60dce fix(gui): Plate Settings follows the plate picked in the 3D view (#17838)
Picking a plate in the 3D view selected its row in the object list without running part_selection_changed(), so Plate Settings kept showing the previous plate. on_plate_selected() now runs it under m_prevent_list_events, and skips it when select_items() already set the flag, since select_items() refreshes after it returns.
2026-11-26 20:57:47 -06:00
Claude 48446d151d Docker web image: retry electron-packager under the 64-pid builder
Packaging the Bambu-login desktop helper briefly forks several processes; while
sibling build stages run in parallel this exceeds the builder's 64-pid limit and
aborts (it succeeds in an unconstrained container). Split the linux and win32
packaging into separate layers and retry each so it completes once the parallel
stages free up pids.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-26 23:06:20 +00:00
Claude ad24fe6f06 Docker app image: build dep_EXPAT (main project needs EXPAT >= 2.10)
The upstream merge raised the EXPAT requirement to 2.10.0, but the Debian base
ships 2.5.0 and the deps build never built dep_EXPAT, so the orca-headless
configure failed with 'Could NOT find EXPAT: unsuitable version 2.5.0'. Build
dep_EXPAT into the prefix before the native configure.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-26 22:35:43 +00:00
Claude b54844ed3c Docker app image: cap dep_python3 and orca-headless parallelism too
The builder's 64-pid cgroup (baseline ~22 from buildkit) overflows under six
parallel compiles: dep_python3's OpenSSL build hit 'vfork: Resource temporarily
unavailable'. Build dep_python3 and the orca-headless worker at
CMAKE_BUILD_PARALLEL_LEVEL/--parallel 3, matching OCCT/OpenCV; the host guard's
256 tasks still lets those run at BUILD_JOBS elsewhere.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-26 21:45:23 +00:00
Claude 125ee6a275 Docker app image: cap OCCT/OpenCV parallelism to fit the 64-pid builder
OCCT builds with precompiled headers on Linux; six parallel .gch compiles
exhausted the builder's process budget (/bin/sh: Cannot fork) where the host
guard (256 tasks) copes. Build dep_OCCT and dep_OpenCV at CMAKE_BUILD_PARALLEL_LEVEL=3
(dep_JPEG already at 2); the lighter deps and the PCH-free orca-headless build
keep BUILD_JOBS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-26 21:27:14 +00:00
Claude de9bf38b71 Docker app image: build dep_JPEG at low parallelism before OpenCV
libjpeg-turbo links its many bundled tools simultaneously; that burst of
vfork'd linkers exceeded the builder's 64-pid limit (the host guard allows 256),
failing dep_OpenCV with 'collect2: fatal error: vfork: Resource temporarily
unavailable'. Build the JPEG dependency first at CMAKE_BUILD_PARALLEL_LEVEL=2,
then OpenCV proper at full parallelism.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-26 21:22:12 +00:00
Claude d030ead647 Docker app image: stop building dep_OpenVDB (SLIC3R_OPENVDB defaults OFF)
The deps configure only creates dep_OpenVDB when SLIC3R_OPENVDB is ON, but the
headless worker builds with it OFF (SLA hollowing disabled), matching the
validated host build. Building the target unconditionally failed the app image
with 'ninja: error: unknown target dep_OpenVDB'. Blosc/OpenEXR are pulled only
by OpenVDB, so they drop out too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-26 21:06:05 +00:00
Claude 9e6243bbbe Merge codex/android-server-connection into main; bump to 0.3.3-alpha
Brings the optional Web Slicer server mode for Android, mobile slicing and
preview improvements, Android/server filament reconciliation, Android backend
lifecycle, Bambu print routing through the saved connection, and the menu /
preferences / help-center UI reorg on top of the upstream sync and the UX
feedback work already in main. Bumps the release to 0.3.3-alpha (Android
versionCode 5) so the combined tree ships as one new version.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-26 17:18:47 +00:00
Claude ec200ceabf Merge codex/ux-feedback into main
UX feedback improvements (web frontend): desktop Bambu sign-in flow,
filament and Bambu workflows, external model import, machine library,
theme selector, imports and i18n (228 new messages); 0.3.1 release prep
kept marked alpha. Merges cleanly over the upstream sync; validated with
tsc (clean), vite web bundle, and the i18n and setting-layout tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-26 17:12:10 +00:00
erentar 5c30e3ee97 fix #17904: hide long gpg signature text from git_commit_hash.h (#17905)
GitCommitHash.cmake: obtain hash via git rev-parse instead of git log for git_commit_hash.h (OrcaSlicer#17904)

when git config log.showSignature=true, the default format for git log
contains the gpg signature. this breaks the git_commit_hash.h file
generated by GitCommitHash.cmake.

fix: obtain hash via rev-parse instead which does not have formatting and
intended for picking out paramteters such as this case.
2026-11-26 10:51:58 -06:00
Kris Austin d528c0ea9a Retry the macOS admission check after a truncated API response (#17859)
json.load in Api.get raises http.client.IncompleteRead when GitHub drops
a response partway. That is an http.client.HTTPException, which wait()
did not catch, so one dropped response failed the "Wait for a macOS
runner" job and skipped the macOS unit tests. wait() now catches
HTTPException and counts it as a failed read like the other API errors,
then polls again. URLError comes out of the tuple because OSError
already covers it.
2026-11-26 10:49:29 -06:00
Claude 61e3b9c5eb Merge upstream: keep fork regression tests in-place with their helpers
The earlier split moved our added TEST_CASEs into *_webslicer.cpp files, but
several of them use helpers defined locally in the upstream test file (squares,
quiet_params, bed in test_arrange; FFFOptionState, PrintConfigManipulationCallbacks
in test_config), so the split files did not compile. Append our helpers and
cases back into test_3mf/test_arrange/test_config.cpp instead; keep the two
genuinely self-contained files (test_cut, test_triangle_mesh_deal) as *_webslicer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbKxbSeHpxVhmWEwU8U2vE
2026-11-26 16:06:48 +00:00
SoftFever d42123d2f1 Fix hang when MCP clicks an open printer selector (#17913)
# Description

When an MCP client clicked the printer selector on the Device or
Calibration tab while its printer list was already open, OrcaSlicer
froze at full CPU on macOS and Linux and had to be force-quit. A
person's mouse can't trigger it, because the open list takes the click
and closes before the selector sees it, but an MCP click goes straight
to the selector. That click now closes the list, as a person's click
does, and Orca's popups no longer hang on macOS and Linux when they are
asked to open while already open. The hung call's reply was misleading
as well: it said the call had not run and was safe to retry, although
its click had run. A call that has already acted now says it may have
done some or all of what was asked, and to check with `app_state` before
calling it again.

**Included:**
- **GUI:** the Device and Calibration printer selectors close their open
list on a click; `PopupWindow` ignores a second open on macOS and Linux.
- **MCP:** "not run, safe to retry" is reported only while no step of
the call has run.
- **Tests:** an automation test for the MCP reply and a slic3rutils test
for the popup.
- **Docs:** the MCP server design doc and the orca-wxwidgets skill's
popup pages.

A person's clicks behave as before on every platform, and Windows popup
behaviour is unchanged.

# Screenshots/Recordings/Graphs

<!--
> UI changes need before and after screenshots, on each platform you
tested.
> See what each kind of PR needs:
https://github.com/OrcaSlicer/OrcaSlicer/blob/main/CONTRIBUTING.md#what-each-kind-of-pr-needs
> For other changes, please attach images that can help explain them.
-->

## Tests

- Reproduced the hang on macOS over MCP with two `widget_click
{target:{class:"SideToolsPanel"}}` calls on the Device tab. With the
fix, repeated clicks open and close the list, each reply comes back in
under 100 ms, and the app stays idle and answers `app_state` afterwards.
- New tests: "a call says it was not run only until a step of it has
run" (automation) and "a popup never links its event handlers to
themselves and a second click on its control closes it" (slic3rutils).
With the popup guard disabled, the popup test fails and still runs to
the end instead of hanging.
- On this branch, macOS arm64 Release: the build passes, the automation
suite passes (186 test cases) and the slic3rutils `[Mcp]` tests pass
(508 test cases).
- Windows and Linux were not built or run; their code paths were checked
against wxWidgets' source.

<!--
> 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)
2026-11-26 20:51:59 +08:00
SoftFever 04603d6ccd Official OrcaSlicer MCP support (#17819)
* Give the MCP server its own AI features group in Preferences

The group shows whether agents can connect and at which address, and copies a
ready-made setup for Claude Code, Codex, opencode, DeepSeek Harness or other
apps. A second OrcaSlicer window on the same configuration folder says another
window is serving agents and takes the server over when that window closes.

* Let users choose HTTP or stdio when adding OrcaSlicer to an agent

* Refuse Design tab reads while a rebuild owns the document

* Let MCP clients drive every gizmo

Also fixes a crash when a script answers the primitive size dialog, the Simplify ratio box being
ignored, a Measure crash after a reload, and Mesh Boolean showing a bare "tool" label.

* Let MCP clients do the OrcaSlicer tasks the agent benchmark found missing

* Point agents at the MCP harness instead of an in-repo skill

* Add explain_settings so agents can look up what settings do

It returns each setting's full tooltip, its page and group, and its wiki link, maps every setting
by page and group, and finds settings by the words of their help text. get_settings no longer
includes tooltips in its metadata.

* set window size to 1920x1200 for MCP scripts

* Add a Run Script dialog for running MCP scripts in the app

* update git ignore

* Add app recording and screenshots for MCP agents and the Help menu

Agents can record OrcaSlicer to video, captioned with the current tool call, and encode it to MP4.
People get Take Screenshot and Start/Stop Recording in the Speed Dial and the Help menu, with a
dialog for the recording and encoding settings.

* Stop the app flickering while a recording runs on Windows

* Make recording overlays opt-in, with pointer and caption switches in Start Recording

* Let agents ask for an MP4 when starting a recording

* Show a REC pill in the tab bar while a recording runs

* Make the MCP tools easier for agents to use

get_settings now gives each setting's description and settings page and finds settings by what
they do, replacing explain_settings. set_view orbits the camera by degrees, the same on every
install, and a painting stroke that would miss the object is refused with the pixel to start it
at instead of turning the camera. Tools accept the argument names and forms agents commonly use,
save_project refuses a .gcode.3mf path, and select range-checks part and instance indices.

* Keep the Run Script dialog in front after its file picker closes on macOS

* Add a script editor with suggestions and saving to the Run Script dialog

* Show the recording and screenshot icons in the Speed Dial at full size

* Keep the Run Script dialog in sight while a script runs on macOS

* Let MCP agents read and drive web dialogs and plugin pages

Agents can also answer a native message box that is already open (Windows and Linux), and URLs in
replies hide credential values.

* Fix MCP canvas captures failing right after a tab switch on Wayland

* Add missing includes in the MCP sources and the recording dialog

* Make the MCP harness and its test scripts executable

* Stop the MCP stdio bridge leaving a quit OrcaSlicer as a zombie process

* Report frames that failed to encode in stop_recording's result

* Tell MCP agents when a call fails because the display is off

* Name the open dialog when a script step times out waiting for its job

* Make canvas screenshots taken right after a layer or view type change show the change

* Add Python scripts and plugin tools to the MCP server

The MCP tools are listed in core, API and UI lanes. With Python scripts turned on in Preferences, agents
and people can run Python against the open app; plugins holding the tools permission can call the tools,
and plugins can offer operations of their own to agents. Calls can pin object and volume ids so a stale
index is refused, and run_script takes a script as JSON text as well as an object.

* Run Python scripts like python file.py, with the whole plugin API

* Document the whole orca Python API and search every catalog from api_describe

* Tell agents which scope a setting belongs to when they name the wrong one or none

* Ask for approval only on MCP calls that delete without undo, and mark the tools that reach outside the app

* Let agents select hidden filaments and printers by name

* Show agents the selection, the Python setting and the Design tab in get_state

* Tell agents what list_objects ids are for and how paged replies continue

* Make the MCP tool descriptions shorter and consistent, with the UI locators described once

* Explain in the MCP design doc why tools have no output schema

* Let the MCP harness call api_call, whose argument is named tool

* Read a modal dialog's controls and values into its MCP message

* Let install_local_plugin take a plugin file's path

* Report why a local plugin install failed

* Show Speed Dial plugin refreshes and installs in an open Plugins dialog

* Show a reloaded local plugin's new version in the Plugins dialog

* Give python_api's static methods their own documentation

* Give register_operation a signature Python can declare

* Correct the MCP web fixture's comments on its thread command

* Start OrcaSlicer from the stdio bridge only when a tool is called

* Show dialogs in Wayland recordings and stop blank Wayland window captures

* Show popups, context menus and tooltips in Wayland recordings and screenshots

* Show popups in Windows and macOS recordings and screenshots

* Keep MCP canvas clicks working when OrcaSlicer is in the background

* Show context menus, dialogs and web views in macOS screenshots and recordings

Recording frames are also spaced as documented when capture is slow, and a drop-down that has left the screen is no longer drawn into macOS frames.

* Fix Windows popup capture and MCP stalls in native menus and dialogs

* Move the MCP server only when its port is edited in Preferences

* Vendor Ace 1.45.2 for the script editors

* Split Run Script into Action Replay and a docked Python Run Script panel

* Add an MCP tool that lists open windows with refs for screenshots and input

* Give MCP tools plain names and call recorded tool lists replays

* Keep the call_cad_tool registration with the Design tab's MCP code

* Move the Design tab's MCP code next to the MCP server

* Reach the Design tab only through the MCP server

* Give every CAD tool a one-line summary and details

* Add list_cad_tools and describe_cad_tool and call CAD tools by tool and args

* Attach orca_mcp.py to a running app and call CAD tools from Python

* Give the CAD read and sketch tools runnable examples

* Give the CAD solid, dress-up and datum tools runnable examples

* Give every CAD tool runnable examples

* Bound the MCP journal by the size of its calls' arguments

* Run the CAD sketch checks against the app's MCP server

* Remove the Design tab's Docker test setup and check its offer table in CI

* Correct CAD docs and comments that disagree with the code

* Pin the journal's byte accounting and the CAD table's id notes in tests

* Find a portable OrcaSlicer through a symlinked binary in orca_mcp.py

* Correct when the Design tab is created and why sketch_set_value exists

* Describe orca_mcp.py's macOS datadir lookup as the stdio bridge's

* Keep the MCP journal's trim linear and its lock short

* End the journal entry of a job that never runs

* Clarify the CAD tool descriptions and examples

* Tidy orca_mcp.py's CAD helper and its tests

* Describe CAD checks and sketch code as they are, not as they were

* Finish describing the CAD sources and checks as they are

* Describe thicken_surface's capped and simple paths as they are

* Say which sheets thicken_surface refuses

* Report sketch loop areas as positive whichever way the loop runs

* Report degrees of freedom instead of -1 for sketches with no constraints

* Keep constraints among entities a sketch transform moves together

* Build revolve's default rectangle beside the axis instead of across it

* Report every bad example reference and describe the sketch code as it is

* Move the Design-tab GUI checks into the MCP tests

* Fix four Design-tab sketch bugs the GUI tests found

A sketch with thousands of constraints no longer freezes the app, the first value field after launch
takes typed digits, an array's spacing and copy count can both be typed, and cancelling a new Text
removes it.

* Let auto-answer rules answer file and folder pickers with a path

* Run the Design-tab GUI tests through MCP on every platform

* Refuse MCP clicks on main menu items the app would show greyed

* Report the selected sketch constraint over MCP and test badge selection in the Design GUI tests

* Add set_window and set_view camera target and zoom over MCP

* Mention set_window in the MCP server instructions and keep them under 4096 characters

* Load the flow ratio calibration models without the 3MF import dialog

* Make set_window work on Wayland and on an X server without a window manager

Also keeps a polygon drawn near an axis regular in the Design tab, and lets the Design GUI tests run on Linux.

* Launch MCP harness instances on a private headless desktop on Linux, falling back to Xvfb

* Point MCP name misses at the right catalog and give each argument one name

A tool, Speed Dial action or CAD tool called through the wrong tool is told
where it runs, search_actions ranks a query's words as search_tools does, and
every list replies with items.

Renamed arguments: set_view's target and view are look_at and canvas,
list_widgets' root is target, mouse_gesture's path is waypoints, the presets'
changes is preset_changes, set_height_ranges' layer_config_ranges is ranges,
and the main window is "main" for screenshot and start_recording.

The harness's launch takes --python-scripts to allow Python scripts in the
instance it starts.

* List objects by plate over MCP and call a part "part" in every tool

list_objects replies as the Objects panel is laid out: each plate with the
objects on it, then the objects on no plate. list_plates gives how many
objects a plate has, and every tool refuses a plate the project lacks in the
same words.

* Drop the old MCP names the server still read and the text that still used them

set_view's view, the print scope and window for the main window are refused
like any unknown name.

* Reduce script permissions to a single "run unrestricted" switch

Python scripts always run and follow the plugin permission checks; the switch in Preferences lets
them bypass the checks. Plugins call the tools and offer operations without a separate permission.

* Fix macOS issues found driving the app over MCP

set_window brings a window minimized while zoomed back to normal, and its documentation covers
raising windows and native dialogs. A right-click in the Design tab picks what it points at on
Retina displays, where the Design tab GUI tests now run too, and the Text dialog opens in a plain
font. The app no longer hangs when dialogs open and close with the display asleep, and no longer
crashes when a new project or a delete removes an object that has parts.

* Run commands, tools and the plugin API through one operations layer

A Speed Dial command, the MCP tool that does the same thing and the plugin
API's preset calls now run one shared operation, so every route accepts and
refuses the same states, with one wording and a code for each refusal. An
import by a command or a tool is one undo step, and import_file adds geometry
only.

The cases where two routes behaved differently now behave the same: a project
is not saved under a .gcode.3mf name, an empty project exports as .3mf but not
as STL, arrange runs from any view and with a gizmo open, a mixed-colour
filament slot is refused as one, a hidden preset is shown before it is
selected, and a layer is refused while the Preview has none.

* Hold Speed Dial commands, MCP tools and Design tools in one command catalog

Every command takes JSON arguments and has one function for a person and for
automation: with no arguments it does what a person's pick does, and with
arguments it runs silently. The Design tab's CAD tools are commands that
call_tool runs, and they show as Speed Dial tiles on the Design tab.

* Correct what command descriptions and the skill reference tell agents

A Design tile's command says it follows its right-click menu row and may
decline, export_config says how its rows are named, and the generated skill
reference says which commands are the person's own and how the Design tab is
turned on.

* Fix the sketching test's undo check and a missing include found on Linux

* Open the Speed Dial with Space right after a tab switch, without a KWin title bar on Wayland

* Fix MCP menu paths, CAD-off replies, test-instance sign-in, Preview focus and clang-tidy on macOS

* Make the MCP harness and page tests pass reliably on a loaded machine and on macOS

* Make the automation runtime its own subsystem, with MCP as one front end

Everything that drives OrcaSlicer by command (the dispatch of the command
catalog, jobs, the journal, replays, Python scripts, recordings) lived
inside the MCP server's service class. So Action Replay, the Run Script
panel, a plugin's tool call, a person's recording and a run from the
command line each had to start "the MCP service", with all of its GUI
hooks, although none of them needs a server or an agent.

The automation runtime is now a subsystem of its own. It starts the first
time a front end asks for it and knows none of them. The MCP endpoint
(HTTP, the protocol, the token, the discovery file, the takeover of a port
another window holds) is one front end beside the others, opened and
closed without stopping what the others run. The widget inspector, menu
capture and ImGui item recording are turned on only by a front end that
drives the GUI, so a person's recording or long command does not carry
them.

The part of the runtime that needs no GUI is the library
libslic3r_automation, built without wxWidgets and tested by its own suite,
automation_tests. A wx dependency in it fails to build, and its tests no
longer link the GUI library or the embedded Python.

The command line has one option set for this: --run FILE runs a replay or
a Python script once the GUI is ready, with --outputdir for its files, and
--unrestricted-scripts and --cad turn their settings on for one run
without saving them. --mcp-run, --mcp-run-out and --mcp-token are gone;
the scripts setting is python_scripts_unrestricted and a session's output
folder is <datadir>/automation/out. get_app_state reports ready and
version at the top level, and its mcp block describes the endpoint only.

No change to slicing output.

* Keep only the MP4 of an encoded recording unless asked to keep the raw video file

* Expect keep_raw_video_file among the start_recording command's arguments

* revert localization/i18n/OrcaSlicer.pot

* Let a plugin file be named script.py or mcp.py

* Leave a Speed Dial command's unexpected exception to the app's handler

* Keep the Speed Dial's Undo and Redo to where the Edit menu allows them

* Keep menu update handlers away from a freed context menu's items

* Turn the automation's GUI instruments off when nothing drives the GUI

* Cut the MCP test sweep's run time without losing coverage

* Keep the Design toolbar at its own height when the Design tab first opens

* Open every MCP test instance at 1600x900 in the top left of the screen

* Rename the completion and result enums clear of Xlib's macros

* Run the MCP sweep on the desktop, and answer the certificate prompt

* Click a partly shown list row, and let a refusal keep its result.json

* Make the MCP test sweep pass on Windows

Windows now keeps one window per data folder, as macOS and Linux do.

* Name the Design tab's commands in the search_tools description

* Keep layer G-code when New Project's prompt is cancelled or saves the project

* Report a project save that wrote nothing as not saved

* Make the MCP tool descriptions say what the tools do, and rename four misleading names

* Rename and regroup the Design tab's MCP commands, and add the missing ones

The Design commands follow Fusion 360's names and grouping: one command per
job, with a `type` argument for its variants, so 133 commands become 88. An
old name or argument is refused. What the tab could do and no command
reached now has one: re-opening a committed sketch, selecting geometry,
confirming or cancelling an open tool, placing a body, sketch patterns and
dimensions, and text, SVG art and projected edges from arguments.

Ten defects in the Design tab's cards and sketch tools found on the way are
fixed. For a person: the Mirror tool binds a mirrored line or arc to its
source, Commit to Plate and Export STEP stop when the open card's Confirm
fails, and the Speed Dial keeps a query typed before its list arrives.

* Give replay files a semver format version

* Document the Design tab's command set

* Regroup the slicer's MCP commands and let each run from its arguments

Outside the Design tab an agent had 175 commands, 50 of them in the tool
list. There are now 118, named by what they act on (`object_`, `plate_`,
`preset_`, `filament_`, `plugin_` and so on), and 115 are listed. Each takes
its target and values in the call, acts on the selection when it names no
target and says what it acted on; an old name is refused. Printers and
system filaments install and uninstall, preferences read and write, plugins
enable, reload, uninstall and refresh, and objects reorder, with no dialog
to drive.

The Speed Dial keeps its 129 tiles under the same ids. Eight defects in the
rows these commands share with the menus are fixed. For a person: an object
row that cannot run says why instead of "Select an object first.", rows
that failed no longer claim success, Duplicate Plate can be undone, and
Refresh Plugins picked while a refresh runs now runs after it instead of
beside it.

* Document every MCP command in one reference, the Design tab's in a section of its own

The commands outside the Design tab now have a reference like the Design tab's: what each does and
takes, which menu rows call it, which calls ask in a dialog and the call that does not. Both live in
docs/HLSD/mcp-tools.md, OrcaSlicer's commands first and the Design tab's at the end.

* Say menu item, not menu row, in the MCP commands and docs

The MCP command descriptions, docs and code called an entry of the app's
menus a "row", the word they also use for the rows of the object list and
the app's other lists. They now say "menu item", so a row is only ever a row
of a list or table. Command names, arguments and Speed Dial tile ids are
unchanged.

* Say action and Speed Dial, not tile and palette, in the MCP commands and docs

The MCP commands, their catalog and the docs called a command's Speed Dial entry a "tile" and the Speed
Dial itself "the palette", words the app already uses for an entry's icon and for sets of colours. They now
say "action" and "Speed Dial", as action_search and action_run do, and the catalog's tiles, tile_group and
in_palette fields are now actions, action_group and has_own_action. Speed Dial ids, and the pins people
stored under them, are unchanged.

* Catalog the MCP sweep tests and design their Python replacements

Every sweep test now has an entry, by area under tools/mcp/test-entries/, saying what it checks, how it decides pass
or fail and what it leaves unchecked, and TESTS.md holds the rules a new test is designed by before it is written.
The entries also design the Python tests that take the place of the replays, which leave the sweep as those land;
the fifteen operation replays that could not fail are removed now.

* Check the plates in the MCP sweep with a Python test that reads every step back

test_plates.py takes the place of the plate replays: after each add, duplicate, rename, lock, select or delete it
reads the plate list back and compares it with the state its entry writes out, and it checks what a lock keeps
Arrange and Auto-Orient from doing, a plate's own settings, the filament slots and the plate icons. Arranging a
locked plate is refused with advice that names plate_lock with the plate, instead of a needless plate_select.

* Check every area of the MCP sweep with Python tests that read each step back

The sweep's objects, presets, filaments, settings, project files, slicing, gizmos and GUI tools are tested by Python
tests that compare the app's state after every step with the values their entries write out, in place of the
replays, and the existing tests' checks that could not fail now can. The calls these tests found wrong now behave
as described: moving one instance no longer sinks the others, a toolpath export writes the layers shown, an
auto-answered dialog no longer reports its call blocked, and a web dialog that has just opened takes requests.

* Design the sweep tests for the gizmo and printing commands

The sweep's entries now describe the tests for the commands that open a gizmo or a print dialog on a target and,
where they can, do its job from arguments: what each step must leave behind and how every refusal is told apart.
They also take every sweep call that would open a Bambu printer's Print or storage dialog off the scratch datadir,
so no test run messages a real printer.

* Check that a refused gizmo opening leaves the selection as it was

The gizmo commands' test design now also checks a refused opening made while another gizmo is open, and says which
refusals put back the selection the call had changed and which come before it changes anything.

* Let MCP clients open the painting, Measure, Simplify and Mesh Boolean gizmos on a named object

object_paint, object_measure, object_simplify and part_boolean open their gizmo on the object, instance or part a
client names, where before a client had to know the gizmo existed and click its icon after selecting. A refused
opening says why in the gizmo's own terms, such as Mesh Boolean needing two parts, and leaves the selection and the
undo history as they were.

* Let MCP clients cut an object along a plane with object_cut

object_cut cuts an object at a height or along any plane, keeping either piece or both, laid where the Cut gizmo would
lay them or kept as two parts of one object, in one undo step, as the gizmo's Perform cut does. Named with only its
object it opens the Cut gizmo on it, for connectors, the dovetail and cuts along a contour. A plane that misses the
object, or an object with connectors, is refused with the model left as it was.

* Let MCP clients lay an object on a face, set its brim ears, and add text or an SVG to a named object

object_lay_on_face turns an instance so that the face a direction names lies on the bed, as a click in the Lay on Face
gizmo does, and object_set_brim_ears places brim ears at bed positions, or clears them, as the Brim Ears gizmo stores
them; called with only their object, both open their gizmo. object_add_text and object_add_svg can name the object the
part joins and make it a negative part or a modifier. The Brim Ears gizmo shows ears set this way when it next opens,
rather than writing back the ones it held.

* Let MCP clients start a print, send to a Bambu printer, and test the print host

print_start opens the dialog the Print button opens for the selected printer, for one plate or all of them, and is
refused where the button would be disabled, such as for a plate not sliced. printer_send, and the Send G-code Speed
Dial action with it, open the dialog that sends to a Bambu printer's storage where they used to refuse such a printer,
and take the plate to send. printer_test_host checks that the printer's print host answers, as the Test button of its
connection dialog does.

* Let MCP clients read the connected printer's status and pause, resume or stop its print

printer_status reads what the Device tab shows of the printer it is connected to: its state, progress, layer, the
file printing and the temperatures, with no serial number and nothing sent to the printer. print_pause, print_resume
and print_stop do what the tab's buttons do, and are refused, saying why, where the printer's state does not allow
them or a job can be resumed only at the printer.

* Let MCP clients see and close the Action Replay window

The Action Replay window was hidden from every GUI tool, so an agent or a test that opened it could not close it,
and it stayed on screen for the rest of the run. It is now listed with a ref, its page can be read, and Escape sent
to it closes it. Its file pickers and confirmation prompts stay the person's alone.

* Document the gizmo and printing commands for MCP clients and developers

The command reference now describes the 13 gizmo and printing commands: which gizmo or dialog each opens, the
arguments that do the job without it, the Print button's routes for each kind of printer, and what is left to the
dialog. The server design says how the commands reach the gizmos, the print dialogs and the printer, and the test
notes name what no test reaches: the Bambu print dialogs and a physical printer.

* Fix object_cut on planes just off straight down, and text added with several objects selected

An object_cut plane tilted less than a degree from straight down was cut level, and object_add_text or
object_add_svg given only a part type, with several objects selected, made a new ordinary object. The cut now keeps
the plane's tilt, the add is refused one_object_only, and the sweep also checks lay on face's refusals, clearing
brim ears with the gizmo open, and print calls that name a plate.

* Add a typed text or SVG to an object when only its negative part or modifier is selected

object_add_text or object_add_svg given only a part type, with nothing but a negative part or modifier of an object
selected, made a new ordinary object. It now selects that object whole and adds the part to it, as a right click on
the object's row does before its Add Part, Add Negative Part and Add Modifier menus.

* Keep the flush multiplier when viewing a G-code file

Viewing a G-code file set the project's flush multiplier to 1 whatever the file was sliced with, and
the 1 stayed through a new project, a preset switch and a restart, so every later multi-colour slice
purged several times as much. The project now keeps the file's own multiplier, and the preview still
shows the purge volumes the file was sliced with.

* Delete mixed filament slots and export sliced files of unsliced plates over MCP

An agent could not remove a mixed filament slot, so a project that had one never got back to a single slot, and
deleting a physical slot a mix used left the mix broken. filament_delete now removes a mixed slot as the sidebar's
list does and refuses to delete a slot a mix needs. Exporting a sliced file to a given path no longer fails on the
file name template when the plate is not sliced, as it did on the Generic Klipper Printer.

* Keep MCP calls reliable on a busy machine

When the computer was busy, agents saw calls fail that work on a quiet one. A right click's context menu could open
on screen instead of reaching the call, a click could find a button still disabled, a call could report it was
blocked by a dialog an auto-answer rule had already answered, the first call through the stdio bridge could be
refused while the app it started was still loading, and a replay could fail waiting on a step that had finished.
Each of these now waits for the app to catch up instead.

* Run the MCP sweep on shared data folders with the Generic Klipper Printer

The sweep made a fresh data folder for every test, copying all of Bambu Lab's profiles each time, left tens of
gigabytes of run folders behind, and failed outright on a test that only failed while other tests loaded the
machine. Each job now keeps one data folder for all its tests, seeded with the Generic Klipper Printer as a person's
folder carries over from day to day; a test that fails beside others runs again alone and is remembered as one to run
alone; and a passing test's folder is deleted as soon as it passes.

* Thread bores reliably wherever the part sits on the bed

In the Design tab, threading a bore could fail with "thread removed no material" depending only on
where the part sat: an M5 standoff at the centre of a 250 x 250 mm bed could not be tapped, while the
same part a few millimetres away could, and some blind holes could not be tapped anywhere. Threads now
cut into through and blind holes alike, at any position.

* Fix the MCP sweep's files and preferences tests failing on the DRC depth

Both tests still set the DRC depth to 0, a value the Preferences dialog does not take, so they failed. The files test
now checks that the depth is the app's lossless default and fails by name on a data folder set to a lossy one, and the
preferences test no longer checks a value outside the dialog's range.

* Say what the slice preview test leaves now that viewing G-code keeps the flush multiplier

The test's entry still said a viewed G-code file leaves the flush multiplier at 1. It now says the test leaves the 0.3
its start sets, and why that start still sets it: the filaments test leaves the same printer at 1.4.

* Say which slot colours and flush multiplier the filaments test leaves

A developer reading the filaments test's entry could not tell that it leaves white and black slots and a flush
multiplier of 1.4 on the shared data folder, which the next test meets and a two-colour slice purges more for.

* Edit mixed filaments and their gradients over MCP as the sidebar does

Agents can now read the whole filament list with filament_list, change a mixed filament with filament_edit_mixed,
and set a gradient by driving the Add or Edit Mixed Filament dialog. The slot colours and the flushing settings move
from the project tools to filament_set_colour and filament_set_flushing, beside the rest of the filament list.
Deleting or merging a filament that a mix uses now behaves as it does in the sidebar, and the settings tools no
longer edit a physical filament's preset through a mixed slot.

* Keep sf-plan design and planning files out of the repository

* Make the full MCP sweep finish in about 11 minutes

A full sweep on six jobs took 17 to 19 minutes, too long to run often. Its 66 tests are
now 40 that cover the same areas with each scenario run once, and the sweep finishes in
about 11 minutes. The Speed Dial test checks a handful of commands no other test reaches,
and the sweep runs only test_*.py files; smoke_test.json and the Design replays are
played by the tests that use them.

* Let agents answer the mixed-filament merge warning on macOS

Merging a filament into a mixed filament that uses it asks for confirmation first. On
macOS that question was a native alert, which held the app so an agent driving it over
MCP could neither see nor answer it. It now opens in Orca's own dialog, as the app's
other warnings do, with the same text and buttons.

* Fix crash when a web window is closed as soon as it opens

On macOS, opening the Action Replay window and closing it straight away with Escape
crashed OrcaSlicer a moment later. Web windows can now be closed the moment they open.

* Make the MCP sweep's tests pass on macOS

Several sweep tests failed on every macOS run while passing on Windows: the Run Script
panel and plugin command checks, the auto-orient placement check, and the Design tab's
edge re-pick checks. They now pass on both.

* Fix renaming in the Design tab ending as soon as it starts on Linux

* Make test_cad_commands pass when another app takes the focus on Linux

* Stop testing that the early MCP command-line options are refused

The command-line test checked that four MCP options from before their rename are refused. They never shipped in a release, so the check guarded nothing a user could rely on, and on Windows it printed the app's full usage text into the sweep's console four times.

* Make MCP sweep tests pass in any order, one app per job

A test's verdict depended on which test had run before it on the shared data folder, and fixed pauses failed tests
on a busy machine. Each job now runs its tests in one app, every test starts from the same baseline whatever ran
before, and tests wait for the state they expect rather than for a set time; --shuffle runs the sweep in a random
order to show any test that still leans on another. The command-line test is gone, as it checked options outside
the MCP server.

* Clear every sweep test's serial mark at once with --forget all

* Let MCP path rules answer folder pickers on Linux

A dialog_auto_answer rule with a path cancelled every folder picker on Linux, such as the Preferences
download folder's Browse and the recording dialog's Change..., so a script couldn't pick a folder there and
the sweep's Preferences and Speed Dial tests failed. Folder pickers now take the path as on Windows and
macOS; file pickers still cancel on Linux.

* Let MCP path rules answer file pickers on Linux

A dialog_auto_answer rule with a path still cancelled every open and save file picker on Linux, so a script
couldn't save or open a project through the File menu or insert an SVG in the Design tab there, and the sweep
skipped those steps. File pickers now take the path as on Windows and macOS. This needs the updated
wxWidgets, so rebuild the deps.

* Bring the checked-in command reference up to date with the Linux picker rules

The reference still said a path rule cancels a file picker on Linux and that a save picker needs a new
file, so the reference test failed.

* Let MCP calibration tests print with any physical filament

calibration_generate_test always printed with filament slot 1, so an agent could not calibrate another filament of
the project or, on a multi-extruder printer, the nozzle that prints it. It now takes filament_slot, as the
Calibration dialogs' filament list offers, prints on the extruder the filament map gives that filament, and says in
its reply which extruder that is.

* Start Action Replay with a replay that slices the Orca Cube on a new plate

The Action Replay window now opens with a replay that adds a plate, puts the Orca Cube on it, slices that
plate and saves a screenshot of the preview. It checks that the new plate really sliced, so it fails
instead of passing on an empty plate.

* Write replay results to the temp folder unless an output folder is given

Replays that name no output folder, whether run from Action Replay, by an agent or with --run, left a
<name>.out folder beside the replay file or filled the data folder. They now write to a new
orca_action_replay/replay-<time> folder in the temp folder, or inside --outputdir when a --run launch names one.

* Fix --run crashing at exit when a dialog is still open

A --run launch that ended with a dialog open, such as the prompt to restore an unsaved project left by an
earlier session, crashed while closing and returned a crash code instead of the replay's result. It now
closes the dialog first and exits with the replay's code, and it no longer asks about or discards a
person's unsaved project, which their next normal launch still offers to restore.

* Refuse misspelt Design arguments and tell agents how to fix refused calls

A misspelt argument to most Design commands was ignored, so the command ran with
its default, such as a helix built with the default pitch. Every Design command now
refuses it and names the arguments it takes. Refusals of a missing object or part,
an unknown setting key, an invalid setting value or a preset that is not installed
now say the valid range, the similar keys, what the setting takes or the command
to use, and plate_add and object_add_handy_model say what they added.

* Say in a word why an MCP call was refused, and how to get past it

Design commands were refused with numbers such as -32002 or with no code at all; they now say design_busy,
precondition, invalid_argument, rebuild_failed and the like, so an agent can tell a wrong argument from a design
that is not ready, on every route that takes arguments. Refusals worded for a person, such as an open gizmo or a
selected object, carry a hint naming the call that gets past them, and an index too large for the app or written
as 2.0 is no longer misread as another object, plate or instance.

* Show what each command does when tool_search lists a group

Agents listing the Design tab's commands, or any other group, got bare names and had to look each one up to
choose. tool_search {group} now gives each command's first sentence and, in Design, its heading, in the order
the description's index uses. action_search names the Speed Dial's sections section rather than group, so they
are no longer mistaken for tool_search's groups, and a wrong section is refused with the sections there are
instead of returning nothing.

* Give agents a manual for any MCP command with tool_describe

An agent could read a command's arguments only as raw JSON Schema, with its conditional rules left to decode and
no word on where an object index or a face id comes from. tool_describe now gives any command's manual, listed or
not: every parameter at every depth with its allowed values, ranges and defaults, the schema's rules as sentences,
the Speed Dial items that run it with their arguments, its examples, and which tool lists a value the schema can't.

* List the commands tools/list leaves out with tool_list, in place of tool_search

tool_search matched words, so an agent that asked for a goal such as "add a brim" or "round the edges"
got unrelated commands. Agents now read tool_list, which lists the Design tab's commands, the menu items
that take no arguments and the plugins' operations with what each does, and a call refused for its
arguments names the tool_describe call that gives that command's parameters.

* Document how agents find and read commands with tool_list and tool_describe

* List the Speed Dial's actions with action_list, in place of action_search

action_search ranked actions by matching an agent's words, so an action named differently from the request
was missed. action_list lists them by section and title for the agent to choose from, as tool_list does
for commands.

* Browse the Python API a module at a time with script_list_api and script_describe_api

script_search_api ranked the API by an agent's words, so a goal phrased in other words found the wrong entries.
Agents now list what a module or class holds with script_list_api and read one entry's whole documentation
with script_describe_api.

* Browse settings by page with settings_list_pages, and read them by key

settings_get and preferences_get matched an agent's words, so a goal such as "add a brim" found the wrong
settings. Agents now list a settings tab's pages and groups with settings_list_pages, read a page's settings
and what each does with settings_list, and read named settings with settings_get and preferences by tab
with preferences_get.

* Pass clang-tidy on the MCP list tools and drop the docs' last search wording

* Point tool_describe's manuals to more values' sources, and keep plugin rules

An agent reading a manual now learns where a filament's purge mode, a calibration's shaper type, a
hole's point, printer_install's models and dialog_answer's dialog come from, and sees that a plugin
operation can reach outside the app. What a plugin's schema says that the manual can't show, such as a
required argument with no property, now comes with the raw schema, and a schema that takes any argument
says so instead of looking like one that takes none.

* Say in tool_describe's manuals which objects take keys they don't list

Every object in a manual now says whether it takes keys besides its properties, at any depth, as the top
level already did. A plugin schema whose properties can't be read now comes with the raw schema instead of
looking like one that takes no arguments.

* Keep tool_describe from calling an object open when a plugin schema may close it

A plugin schema can close an object through a keyword the manual keeps raw, such as allOf. The manual
then no longer says the object, or the call, takes other keys, and leaves the attached schema to say
what it accepts.

* Say in the MCP design doc exactly what a manual leaves out for a raw schema

* Say where tool_describe keeps a schema part it cannot show

* Tell agents in the server instructions how to find what to call

An agent connecting to the MCP server now reads, right after the workflow, how each catalog is found
by listing: commands place by place and the rest through tool_list, a command's manual before calling
it through tool_call, settings by page, Speed Dial actions by section and the Python API by module.

* Tell agents which catalog filters are optional and that values_from may name several tools

* Say in the server instructions that values_from belongs to a parameter

* Keep MCP replies short and free of float noise

Agents now read an object's position as 60.001 rather than 60.001007080078125, and a Design
command's zero as 0 rather than 4.4e-16, without the wrapper and ok flag that said nothing; a
client that computes with the numbers can still ask for them whole. object_list gives a short row
per object unless asked for detail, so a plate of a hundred objects fits a client's reply limit,
and app_log returns 50 lines by default.

* Shrink the MCP tool list

Agents load less text before their first call: the object and part id guards are explained once
in the server instructions instead of in every schema that takes one, and each tool's title is
sent once.

* Mark names as code in the MCP tool descriptions

Agents can tell an argument or a reply field from an English word in every tool description. The
server instructions say what the Speed Dial is, a call held by a dialog says how to run it without
asking next time, and object_add_text and object_add_svg say what they reply.

* Shorten the longest MCP tool descriptions

The ten largest definitions in the tool list repeated much of what their parameters already say. They now
say it once, taking about 4.9 KB off the tool list an agent reads at the start of every session, with
nothing they described left out.

* Let MCP commands name objects, parts and instances by id

An agent that read an object's id in object_list could only pass it as a guard beside the index, and the index moves
whenever objects are deleted, split or reordered; an id passed as an index was refused without saying what it was.
Every command that names an object, a part or an instance now takes its index or its id, both together still a
guard, and object_list gives each instance's id too. An id given as an index is refused with what that id names, and
recorded replays keep naming targets by index, so they still run in a new session.

* Fix the CI failures from the first build and test run of the MCP branch

The Flatpak build failed to compile the MCP bridge, clang-tidy flagged four missing
includes, and several new tests failed only on CI: plugin and script tests on Windows
runners with a non-UTF-8 code page, and two tests that raced on slower machines.

* Give a polygon drawn on the axes the same constraints on every platform

A square drawn on the axes through sketch_draw was locked level on x64 but could be
left free to rotate on arm64, so its constraints and degrees of freedom depended on
the CPU, and the test of them failed on macOS arm64 and Windows arm64. A polygon's
side that lies on an axis is now pinned Horizontal or Vertical on every platform, as
the Polygon tool pins it, so such a square has all four sides pinned.

* Fix two unit tests that failed at random on CI

The plugin-unload test of the automation suite and the in-flight tool call
test of the Python script runner each failed now and then on a busy runner,
macOS arm64 and Linux aarch64 in the last run, with nothing wrong in the app.
Both pass however the runner schedules their threads.

* Fix the Flatpak unit-test jobs failing on the page agent test

Both Flatpak unit-test jobs failed one test, which reads the MCP server's
page agent script, because the script was missing from the test bundle those
jobs run from. The bundle carries it, so the jobs run that test as the other
platforms' jobs do.

* Warn in Action Replay when a step can run a program

A replay someone sends you can hold a Python script or set a post-processing
script, and either runs a program on your computer when the replay plays. The
window listed those steps with no warning. They carry a "Can run a program"
tag, as a step that writes a file or sends to a printer carries its own, and a
step that makes its call through tool_call shows the tags of that call.

* Stop a calibration when its save prompt is cancelled

Choosing Cancel when a calibration asked to save the open project still
created the calibration on top of that project, so the project's pauses and
color changes ended up in the calibration's G-code. Only the flow rate tests
stopped. Cancel leaves the project as it was for every calibration.

* Warn in Action Replay when a step replaces a post-processing script

A replay could swap one of your post-processing scripts for its own by
setting a single entry of the list, and the step showed no warning. It now
carries the "Can run a program" tag, as setting the whole list does.

* Add the Agent Activity pane

A new pane, opened from View > Agent Activity or the Speed Dial, lists live what an AI agent and other
automation (Action Replay, Run Script, the command line, plugins) do in OrcaSlicer while it is open: each
call with its source, what it changed, failures with their reason, the steps of a run and the dialogs a
rule answered. Opening a call shows its request and response with passwords, keys and typed text masked,
so a person can watch and check what an agent is doing to their project.

* Fix the clang-tidy check failing on the Agent Activity test

* Fix sweep tests failing with a current_path error in a shared app

When the test that launched a job's app passed, the sweep deleted that test's folder while the app was still
running in it. Later tests in that app then failed on the first preset reload with "boost::filesystem::current_path:
No such file or directory", as test_printers, test_settings and test_speed_dial_open did. The job's app now runs in
a folder of the job's own.

The settings reads now place a printer's extruder settings on its Extruder page on every printer. After a printer
with several extruders, they could put a setting on a page such as "Extruder 3" that the selected printer does not
have, and leave it out of the page it is on, which made test_presets fail when it ran after test_printers.

The sweep can also run every app on a private Xvfb display with --xvfb, for a machine without a desktop, and with
--headless or --xvfb the tests that start their own apps stay off the desktop too. Where Openbox is installed, Xvfb
runs it as the window manager, so drop-down lists and popups stay open as on a desktop and the whole sweep passes
there. Apps launched side by side each get a display of their own, and test_slice_preview no longer fails where the
3D view draws slowly, as on Xvfb.

A test that fails beside the others and then passes alone no longer runs alone in every later sweep: each sweep
runs it among the others again, so a failure that returns is seen, and --forget, which undid that, is gone. Only
the tests sweep.json marks exclusive run alone from the start.

* Stop the Speed Dial offering settings of extruders the printer lacks

After a printer with several extruders, selecting one with fewer left the extra extruders' settings in the Speed
Dial and the settings search, such as Retraction Length under Extruder 3 on a single-extruder printer. They now
list only the extruders the selected printer has.

* Report a dialog closed when an answer ends it on a busy machine

On a busy machine, dialog_answer could reply without closed: true for a dialog its answer ended, such as a web
dialog cancelled while its page was still busy, although the dialog closed a moment later. An agent was then told
the dialog was still open. The reply now says closed for every dialog an answer ends, message boxes included,
however busy the app is.

* Organize the MCP tool code by place and the Design commands by heading

Each place an agent finds commands under (Objects, Plates, View and windows and so on) now has one source file
under Mcp/Tools/, and the Design tab's commands have one file per Design heading, so a developer finds a command
where tool_list lists it and adds a new one beside its neighbours. A unit test fails when a command is added in
another place's file. No change to what agents or people see: the command catalog is byte-identical.

* Run the MCP sweep in CI on the Linux AppImage

Every Build all run now drives the x86_64 Linux AppImage it built through
all the MCP sweep tests on Xvfb with Openbox. When a test fails, its logs are
uploaded with the run.

* Fix the MCP sweep tests that fail on a CI runner

test_run_sweep failed on a machine with no X display, and test_gizmos failed
where the desktop's UI font is as wide as Ubuntu's default, DejaVu Sans. The CI
job summary also lists every failed run of a test, its run alone included.

* Name the Design commands by their place, like the other MCP tools

Thirty-four Design commands were bare verbs (extrude, fillet, measure), so an
agent could not tell from a name where a command acts or find a place's
commands together. Every Design command now starts with its place: design_,
sketch_, solid_, surface_, construct_, body_ or feature_. Replacing objects when
committing a design to the plate deletes them as Prepare's Delete does, and the
guide to making a feature reachable covers Design commands.

* Fix the Speed Dial and other web pages sometimes freezing on Windows

Opening the Speed Dial occasionally left it, the Home page and every other
web page in OrcaSlicer unresponsive, with one CPU core kept busy, until the
app was restarted. The Flushing volumes dialog and the printer camera view
no longer risk the same freeze. The Speed Dial's search field still takes
the keyboard focus on every open, and the Flushing volumes dialog still
falls back to English text when a translation cannot be shown.

* Show the app's message when a Speed Dial pick in the MCP sweep gets no answer

A sweep test whose Speed Dial pick got no answer from the dial's page failed with only
"last seen None". It now fails with the app's own message, such as "The page did not
answer within 30 s".

* List long widget labels whole and keep each MCP fact in one place

widget_list cut a widget's label at 120 bytes, so a long path or tooltip came back truncated, and a test that
read it back failed on a machine with a longer folder; labels now come back whole. Adding or renaming a command
or a sweep test no longer means updating hand-kept lists, copied test helpers or the same text in several docs,
and the runner's own test now fails when a sweep test has no entry in the index.

* Make the MCP server doc an architecture overview

The server doc walked through every command, repeating what the tool reference and each command's own description already say. It now covers the components, how they fit together and the design rules every command follows, and points to the tool reference for what each command does. Caller-facing facts that only the server doc held are now in the tool reference.

* Make calls say whether they ask, and show Prepare after an agent's new project

Calls into the plater, object list and tabs now say in words whether they ask a
person or run without prompts, instead of passing bare true/false flags. An
agent's project_new now does what New Project does: it shows the Prepare tab and
tells plugins about the new project.

* Ask before a plugin calls OrcaSlicer's tools

Any plugin could call OrcaSlicer's tools through orca.host.tools without a permission, so it could change your project, run post-processing scripts and answer permission prompts. It now needs the OrcaSlicer tools permission or full access, which it can declare as it loads or is asked for the first time it calls, like its other permissions. The Plugins dialog's Permissions tab has a switch for it, and turning it off ends what the plugin's calls left in force.

* fix test_cad_commands

* Fix the camera view teardown test crashing

The Web media controller teardown test crashed because running a page script read the app's
settings before checking for a page. Running a script on a web view with no page now does
nothing on every platform.
2026-11-26 11:31:45 +08:00
TheLegendTubaGuy 055edc0982 Update Qidi Q2, Q2c, and Max 4 profiles to almost match QidiStudio (#17663)
QIDI Q2 firmware 01.01.02 and later no longer runs PRINT_END on its
own, so the exhaust fan and Polar Cooler stay on and the X/Y motors
stay powered after a print. Sync the Q2 and Q2C end G-code with
QIDIStudio, which now calls SET_PRINT_MAIN_STATUS and PRINT_END and
caps the final Z lift at the printable height. Firmware 1.1.1 and older
still run PRINT_END themselves and error when the G-code calls it, so
the end G-code starts with a note telling those users to remove it.

Also cap the X-Max 4's final Z lift the same way, drop M141 S0 from the
Q2C end G-code, and turn off chamber temperature control on the Q2C,
which has no chamber heater.

Fixes #17649
2026-11-25 19:33:26 -06:00
TheLegendTubaGuy 755459931e Number IDEX/IQEX tools from 1 like the sidebar (#16959) 2026-11-25 19:28:37 -06:00
TheLegendTubaGuy c0dac580a1 Add Prusa MK4S MMU3 profiles (#17426)
Add the Prusa MK4S MMU3 (0.4, 0.6) and MK4S MMU3 HF (0.4) printers, ported from PrusaSlicer. They use the MK4S filament presets, which now include the Nextruder tip-forming templates, and default to the MK4 MMU3 processes.

Also fix two existing printers. CORE One L homes with a full G28 instead of G28 Q, and the standard MK4 MMU3 nozzle presets no longer report a high-flow nozzle. Prusa bundle version 02.04.00.21.
2026-11-25 19:18:44 -06:00
TheLegendTubaGuy bb22a2416f Time Bambu Lab Arcs as Smooth Moves (#17591)
Since arcs are split into chords for the time estimate, a G2/G3 on a
Bambu Lab printer is timed as many short moves meeting at jerk limited
corners. Bambu Lab firmware runs the arc as one smooth move, so gyroid
infill, which arc fitting turns into many small arcs, was estimated
hours too long: a 15% gyroid cube on an X1C read 8h41m against about
6h21m measured.

On Bambu Lab printers, process_G2_G3() now describes the arc it is
splitting to process_G1(). Its chords don't meet at jerk limited
corners, the arc meets the moves around it along its tangents rather
than its end chords, and every chord is capped by sqrt(acceleration *
arc radius) instead of by the turn into its first chord. The same cube
now reads 6h30m. Other firmware, which splits arcs into segments it
plans like any other moves, and Klipper are unchanged.
2026-11-25 19:14:39 -06:00
RrrrobertB1992 bf9bc48e53 Snapmaker U1: sync every color of a multi-color spool (#16822)
The U1 reports every color of a multi-color spool in `print_task_config.filament_color_multi`. The filament sync now reads it, so a slot with two or more colors shows all of them instead of only the first. Mode 0 is shown as segments and any other mode as a gradient, which is how Snapmaker's own slicer reads it. The color list is capped at `nums`, and a malformed record leaves the slot with its single color. Single-color spools and profile matching are unchanged.
2026-11-25 18:35:25 -06:00
Kris Austin 221269a146 Accept 18-character serial numbers in the manual LAN setup dialog (#17902)
The Bambu Lab A2L has an 18-character serial number. The manual setup
page of the IP and access code dialog only enabled Connect for exactly
15 characters, so an A2L could not be added. Accept 15 or 18, the same
check Bambu Studio uses.

Fixes #17899
2026-11-25 18:14:41 -06:00
Claude 48f5d1edcb Show Android build and catalogue imported Bambu filaments 2026-11-25 20:20:56 +00:00
SoftFever 7ae3d228b3 Fix the camera view teardown test crashing
The Web media controller teardown test crashed because running a page script read the app's
settings before checking for a page. Running a script on a web view with no page now does
nothing on every platform.
2026-11-26 03:46:50 +08:00
SoftFever 4723f694ca Merge branch 'main' into feature/mcp 2026-11-26 03:39:47 +08:00
Claude d93901f2ab Serve test builds as Android APK downloads 2026-11-25 19:38:58 +00:00
SoftFever b92cc124c8 fix test_cad_commands 2026-11-26 03:13:08 +08:00
Claude fb8c93a90b Surface imported filament presets and model import failures 2026-11-25 19:09:27 +00:00
SoftFever b3dcf0ac7d Ask before a plugin calls OrcaSlicer's tools
Any plugin could call OrcaSlicer's tools through orca.host.tools without a permission, so it could change your project, run post-processing scripts and answer permission prompts. It now needs the OrcaSlicer tools permission or full access, which it can declare as it loads or is asked for the first time it calls, like its other permissions. The Plugins dialog's Permissions tab has a switch for it, and turning it off ends what the plugin's calls left in force.
2026-11-26 02:56:29 +08:00
Claude be0188dfad Select sliced 3MF and route Print through the saved Bambu connection 2026-11-25 17:05:23 +00:00
SoftFever 6609ca0503 Make calls say whether they ask, and show Prepare after an agent's new project
Calls into the plater, object list and tabs now say in words whether they ask a
person or run without prompts, instead of passing bare true/false flags. An
agent's project_new now does what New Project does: it shows the Prepare tab and
tells plugins about the new project.
2026-11-26 01:04:13 +08:00
Martin Stachon 808dd7dff8 Fix OBJ import on macOS 13.3 to 14.0 when the UI language uses a decimal comma (#17851)
On macOS 13.3 to 14.0, Apple's `strtod` reads the process locale and ignores the thread locale that `CNumericLocalesSetter` sets. With a UI language that uses a decimal comma, every OBJ vertex with a decimal point was rejected and the import failed. `objparser.cpp` now reads numbers with the new `strtod_decimal_point()` in `LocalesUtils`, which parses with fast_float and doesn't depend on the locale.
2026-11-25 10:14:39 -06:00
Ian Chua 188d11c5e9 fix: bind printer agent printers using the entered address (#17857)
- Moonraker's `bind_detect` now builds the device ID from the entered address instead of the connected printer's cached identity, so binding a second printer by IP no longer reselects and reconnects the first one.
- The C11 model fallback for a device bound without a model now applies only to Bambu printers.
2026-11-25 10:06:48 -06:00
Ian Chua 8a339fc100 fix: bind printer agent printers using the entered address (#17857)
- Moonraker's `bind_detect` now builds the device ID from the entered address instead of the connected printer's cached identity, so binding a second printer by IP no longer reselects and reconnects the first one.
- The C11 model fallback for a device bound without a model now applies only to Bambu printers.
2026-11-25 10:05:37 -06:00
Ian Chua 188782518d fix: bind printer agent printers using the entered address (#17857)
- Moonraker's `bind_detect` now builds the device ID from the entered address instead of the connected printer's cached identity, so binding a second printer by IP no longer reselects and reconnects the first one.
- The C11 model fallback for a device bound without a model now applies only to Bambu printers.
2026-11-25 10:03:22 -06:00
Kris Austin 01adacf334 Post 14-day notices on long-inactive PRs (#17886)
stale.yml now starts with a step that posts a notice on PRs that have
been inactive for a long time and adds the labels the stale step needs
to close them 14 days later. It covers PRs waiting on their author for
90 days, PRs with conflicts for 90 days, PRs nobody on the team has
answered for 180 days, and drafts with no activity for 180 days.

The day counts and the nightly notice limit are set once in the job's
environment and used by both steps. A manual run can preview, post or
skip the notices. The notice step logs the REST and GraphQL rate limits
when it finishes.

Drafts are no longer exempt in stale.yml, because the notice step
removes "wait for response" from drafts that have no open notice. The
stale PR messages and CONTRIBUTING describe the new rules.
2026-11-25 09:10:02 -06:00
SoftFever 529752ad0c Make the MCP server doc an architecture overview
The server doc walked through every command, repeating what the tool reference and each command's own description already say. It now covers the components, how they fit together and the design rules every command follows, and points to the tool reference for what each command does. Caller-facing facts that only the server doc held are now in the tool reference.
2026-11-25 22:23:41 +08:00
Claude 3fd9c26805 Pin the validated native build base for 0.3.2-alpha 2026-11-25 11:22:56 +00:00
Claude d74b2e4f10 Prepare Web Slicer 0.3.2-alpha 2026-11-25 11:21:33 +00:00
Claude b2ffb7f10e Use a spoke reel icon for filaments 2026-11-25 11:16:01 +00:00
SoftFever f047c606d9 List long widget labels whole and keep each MCP fact in one place
widget_list cut a widget's label at 120 bytes, so a long path or tooltip came back truncated, and a test that
read it back failed on a machine with a longer folder; labels now come back whole. Adding or renaming a command
or a sweep test no longer means updating hand-kept lists, copied test helpers or the same text in several docs,
and the runner's own test now fails when a sweep test has no entry in the index.
2026-11-25 19:10:57 +08:00
Claude c82388cec4 Make support content readable within Preferences 2026-11-25 11:06:09 +00:00
Claude f9896430c3 Restore a compact application menu hierarchy 2026-11-25 11:00:31 +00:00
Claude e552ff65b1 Organize printer libraries and application preferences 2026-11-25 10:53:17 +00:00
Claude bcda8ef4fa Shut down the Android backend when its task is removed 2026-11-25 10:23:50 +00:00
SoftFever 193b80a613 Show the app's message when a Speed Dial pick in the MCP sweep gets no answer
A sweep test whose Speed Dial pick got no answer from the dial's page failed with only
"last seen None". It now fails with the app's own message, such as "The page did not
answer within 30 s".
2026-11-25 18:22:02 +08:00
Claude 9d585c6c2d Improve mobile slicing controls and preview responsiveness 2026-11-25 10:19:20 +00:00
SoftFever 9b57301b9e Fix the Speed Dial and other web pages sometimes freezing on Windows
Opening the Speed Dial occasionally left it, the Home page and every other
web page in OrcaSlicer unresponsive, with one CPU core kept busy, until the
app was restarted. The Flushing volumes dialog and the printer camera view
no longer risk the same freeze. The Speed Dial's search field still takes
the keyboard focus on every open, and the Flushing volumes dialog still
falls back to English text when a translation cannot be shown.
2026-11-25 17:12:13 +08:00
Ian Chua 5c559bf378 fix: set port to empty if none entered (#17876) 2026-11-25 14:51:10 +08:00
Kris Austin 71a1f4f6f2 Load startup plugins after the presets are loaded (#17873)
* Load startup plugins after the presets are loaded

The startup plugin loads ran on the load thread while the main thread
was still starting the network and had not loaded the presets yet. A
plugin that reads the presets while it registers, such as through
full_config_value(), reached PresetBundle::full_fff_config() while
filament_presets was still empty and crashed reading filament_presets[0].
A plugin that got there a little later read the presets while
load_presets() was rebuilding them.

Start the startup loads after load_current_presets(). A printer agent
that a plugin registers after that point is already installed by the
late registration path.

Fixes #17792

* Build the full config of a bundle whose presets are not loaded yet

A new PresetBundle has no filament_presets until load_presets() runs,
and full_fff_config() read filament_presets[0] anyway, which crashed any
caller that asked for the full config before the presets loaded. Treat
such a bundle as having one filament, the edited filament preset.
2026-11-25 14:18:45 +08:00
SoftFever e4538b5262 Name the Design commands by their place, like the other MCP tools
Thirty-four Design commands were bare verbs (extrude, fillet, measure), so an
agent could not tell from a name where a command acts or find a place's
commands together. Every Design command now starts with its place: design_,
sketch_, solid_, surface_, construct_, body_ or feature_. Replacing objects when
committing a design to the plate deletes them as Prepare's Delete does, and the
guide to making a feature reachable covers Design commands.
2026-11-25 13:38:40 +08:00
yw4z ce7f703e68 Add Center button to move gizmo and fix centering of parts in skewed objects / instances (#17550)
* init

* Update tooltip

* update speed dial command condition

* Update Selection.cpp

* fix instance part cannot not centered

* fix centering of skewed objects
2026-11-25 08:04:30 +03:00
Kris Austin 4e020aaf23 Fetch the Flatpak wxWidgets source shallowly again (#17748)
#17743 pinned the source by commit alone, which was the right fix, and added
disable-shallow-clone with it. That flag is what now makes the fetch expensive.

flatpak-builder passes the commit as the ref when no branch or tag is set (get_branch in
builder-source-git.c), then lookup_full_ref in builder-git.c looks that ref up, matching
either a ref name or a ref whose tip is that commit. The commit we pin is now tagged in
the fork, so b44c39c1 is the tip of refs/tags/orca-3.3.2-1 and the lookup resolves it:

    $ git ls-remote https://github.com/OrcaSlicer/Orca-deps-wxWidgets
    b44c39c100975a0ac0e46f937aa3f3eae5e18631  refs/tags/orca-3.3.2-1

With the lookup resolving, flatpak-builder fetches that ref at depth 1. Setting
disable-shallow-clone skips the lookup entirely and falls through to the full
"fetch origin *:*" instead. It also reaches the submodules, which git_mirror_submodules
fetches with the same flags, so wxWidgets' twelve submodules are fetched in full rather
than at depth 1.

Dropping it costs no safety. The lookup falls back to the full fetch on its own if the
pinned commit is ever not a ref tip, which is the case the flag was added for.

The comment claimed the full clone was needed to check out a commit that is not a branch
tip. GitHub serves a depth-1 fetch of an arbitrary commit, so that was not the reason
either. It now just says why the pin names no branch.

The CMake deps recipe is untouched.
2026-11-24 21:23:33 -06:00
yw4z 966f5613a3 Build OpenCV with only its baseline CPU code (#17578)
Build OpenCV with an empty CPU_DISPATCH, so it compiles only its baseline CPU code and skips the extra per-CPU copies (SSE4.1 to AVX-512 on x64, NEON DOTPROD on ARM64) that it chooses between at runtime. The baseline is unchanged, so there is no new CPU requirement. This cuts OpenCV's build time and makes the app about 4 to 5 MB smaller.
2026-11-24 20:51:38 -06:00
Gazi Faysal Jubayer 7c5db9e7c1 Allow spiral vase on a model painted all over with one filament (#17073)
Painting a whole model with a filament other than its own (T3 on a Snapmaker U1, for example) and turning on spiral vase failed validation with "Spiral (vase) mode does not work when an object contains more than one material", although only the painted filament prints.

When every facet of every model part is painted, the check now uses the painted filaments instead of the object's own. It still refuses when mmu_segmented_region_max_width or mmu_segmented_region_interlocking_depth is above 0, because the paint then covers only a band near the walls and the rest prints with the object's filament. Segmentation ignores both settings when beam interlocking is on, so that case is allowed.

Fixes #17072
Co-authored-by: raistlin7447 <kris.austin@gmail.com>
2026-11-24 19:33:45 -06:00
Kris Austin d43eb75ba8 Start the AppImage when no English locale is installed (#17816)
The AppImage's AppRun exports LC_ALL=C, so wxWidgets detects en_US as the
system language and the best-translation match is dropped. When neither
en_US nor en_GB is installed, load_language() runs out of candidates and
closes the app with "Switching Orca Slicer to language en_US failed".

On non-Apple Unix systems, the environment's locale is now the last step
of the fallback chain, since wxLocale::IsAvailable() can't report it. When
nothing else is installed and the environment's locale can be created,
wxLocale is initialized with wxLANGUAGE_DEFAULT and the selected
dictionary is kept. If the environment's locale is missing too, the app
shows the same error as before.

wxWidgets' own catalog is now loaded after the dictionary language is set
on every path, so its dialogs follow the UI language when the locale falls
back to a different one. When the locale matches the language, nothing
changes. The locale switch logs name the locale that was actually set.

Fixes #17809
2026-11-24 19:21:56 -06:00
Ilia Kuzmin 58fc8a7c1f Fix AMS sync for Happy Hare printers with an unpopulated lane_data skeleton (#14798)
Happy Hare can write a lane_data entry for every gate with only the lane number set. Orca took that as the answer and showed every slot empty without asking Happy Hare's mmu object. When every lane is empty, sync now tries Happy Hare and then Creality CFS, and keeps the empty lane layout if neither reports filament. Lane data with filament in it keeps its priority.
2026-11-24 16:01:28 -06:00
Hanan V e56fd1ed44 Fix a crash deleting or merging a multi-part object on macOS (#17825)
The object list deletes an object's ModelObject before its row, and removes the
row's part rows one by one. On macOS each removal makes the outline reload the
object row at once, and GetChildren's import order read the freed ModelObject.
Deleting a multi-part object, or merging its parts with Mesh boolean, crashed
when that memory had been reused.

GetChildren now reads the row's object only while the model still holds it
(ObjectDataViewModel::live_model_object, a pointer comparison). The import order
read came in with #17050, so no release carries the crash.
2026-11-24 15:48:45 -06:00
TheLegendTubaGuy 3f90d6ccf6 Fix printer list hidden by its scrollbar in Export Preset Bundle (#17830)
The Export Preset Bundle list is sized to exactly fit its checkboxes,
capped at 1200 px wide. When long preset names or high display scaling
push the content past that cap, a horizontal scrollbar appears inside
the list and takes its height from the one-row client area, so the
checkboxes are hidden and nothing can be selected. Reserve the
scrollbar's height when the width is capped.

Fixes #17824
2026-11-24 13:56:43 -06:00
SoftFever 9c18af5435 Fix the MCP sweep tests that fail on a CI runner
test_run_sweep failed on a machine with no X display, and test_gizmos failed
where the desktop's UI font is as wide as Ubuntu's default, DejaVu Sans. The CI
job summary also lists every failed run of a test, its run alone included.
2026-11-25 02:48:31 +08:00
yw4z cd9218c1d6 QOL: Allow toggling visibility of text emboss gizmo (#17678)
- Pressing T or clicking the Text toolbar button while the Text tool is open now closes it, like the other gizmos. It closes the same way as the Done button, so empty text is still removed.
- With several instances of a text object selected, T and the toolbar button now edit the existing text instead of adding a new text part to the object.
2026-11-24 12:29:28 -06:00
Kris Austin 38f12b1357 Keep a filament's compatible printers when a project loads its edits (#17770)
A project doesn't save a filament's compatible_printers or compatible_prints. When a project with an edited filament preset was opened again, both lists came in empty and the preset's compatible printers reset to All.

load_external_preset now leaves the two keys alone when it applies a project filament over an existing preset. When a later filament slot becomes a new "Name(file.3mf)" preset, that preset copies the lists from the preset the project names.

The test covers the first slot over the named preset and over the inherited parent, and a later slot over an embedded preset and as a new copy.
2026-11-24 12:27:08 -06:00
Kris Austin 79d5833e28 Count the feature filaments a part sets as filaments the plate uses (#17778)
A part, a modifier or a layer range can set its own outer wall, inner
wall, sparse infill, internal solid infill, top surface or bottom
surface filament. The slicer prints with them, but
PartPlate::get_extruders() and get_extruders_under_cli() read these
settings only from the print and object configs. A filament that only a
part's feature used was missing from the plate's filament list, so on a
dual-nozzle printer the custom grouping dialog left it out and Prepare
hid the prime tower.

Both walks now share a helper that also reads the feature filaments of
each part, modifier and layer range. A mixed filament still expands to
its components as it does for object settings.

A printer switch or a filament delete can leave filament ids past the
last slot. The plate now resolves them as the slicer does. An object's,
part's or layer range's id counts as filament 1, including a part's own
filament. A print-wide id follows PresetBundle::full_config() in the
GUI, which resets a feature or brim id to the default and caps a
support id at the last slot. From the CLI it follows the slicer, which
prints a feature or support id with filament 1.

Fixes #17728
2026-11-24 12:25:53 -06:00
Noisyfox 39baf6d917 Finish touchpad camera panning when Shift is released (#17846)
In Touchpad camera mode, releasing Shift after a pan or Alt after an orbit left the camera move active. The next right-click then skipped the menu and, since #17432, the object selection.

Finish the pan on Shift release and the orbit on Alt release. This replaces the Windows-only Alt release handling from #8249, which stopped the orbit but still left the next right-click ignored.

Fixes #17844
2026-11-24 12:02:41 -06:00
SoftFever 538e67b033 Run the MCP sweep in CI on the Linux AppImage
Every Build all run now drives the x86_64 Linux AppImage it built through
all the MCP sweep tests on Xvfb with Openbox. When a test fails, its logs are
uploaded with the run.
2026-11-25 01:19:23 +08:00
SoftFever 18eb4f8459 Organize the MCP tool code by place and the Design commands by heading
Each place an agent finds commands under (Objects, Plates, View and windows and so on) now has one source file
under Mcp/Tools/, and the Design tab's commands have one file per Design heading, so a developer finds a command
where tool_list lists it and adds a new one beside its neighbours. A unit test fails when a command is added in
another place's file. No change to what agents or people see: the command catalog is byte-identical.
2026-11-24 23:50:10 +08:00
SoftFever 6a601166e4 Report a dialog closed when an answer ends it on a busy machine
On a busy machine, dialog_answer could reply without closed: true for a dialog its answer ended, such as a web
dialog cancelled while its page was still busy, although the dialog closed a moment later. An agent was then told
the dialog was still open. The reply now says closed for every dialog an answer ends, message boxes included,
however busy the app is.
2026-11-24 23:27:16 +08:00
SoftFever 7cfbda4c62 Stop the Speed Dial offering settings of extruders the printer lacks
After a printer with several extruders, selecting one with fewer left the extra extruders' settings in the Speed
Dial and the settings search, such as Retraction Length under Extruder 3 on a single-extruder printer. They now
list only the extruders the selected printer has.
2026-11-24 23:27:16 +08:00
SoftFever b4408536f1 Fix sweep tests failing with a current_path error in a shared app
When the test that launched a job's app passed, the sweep deleted that test's folder while the app was still
running in it. Later tests in that app then failed on the first preset reload with "boost::filesystem::current_path:
No such file or directory", as test_printers, test_settings and test_speed_dial_open did. The job's app now runs in
a folder of the job's own.

The settings reads now place a printer's extruder settings on its Extruder page on every printer. After a printer
with several extruders, they could put a setting on a page such as "Extruder 3" that the selected printer does not
have, and leave it out of the page it is on, which made test_presets fail when it ran after test_printers.

The sweep can also run every app on a private Xvfb display with --xvfb, for a machine without a desktop, and with
--headless or --xvfb the tests that start their own apps stay off the desktop too. Where Openbox is installed, Xvfb
runs it as the window manager, so drop-down lists and popups stay open as on a desktop and the whole sweep passes
there. Apps launched side by side each get a display of their own, and test_slice_preview no longer fails where the
3D view draws slowly, as on Xvfb.

A test that fails beside the others and then passes alone no longer runs alone in every later sweep: each sweep
runs it among the others again, so a failure that returns is seen, and --forget, which undid that, is gone. Only
the tests sweep.json marks exclusive run alone from the start.
2026-11-24 23:27:15 +08:00
SoftFever 3d4782e7d6 Fix the clang-tidy check failing on the Agent Activity test 2026-11-24 16:42:59 +08:00
SoftFever 5eefef82fc Add the Agent Activity pane
A new pane, opened from View > Agent Activity or the Speed Dial, lists live what an AI agent and other
automation (Action Replay, Run Script, the command line, plugins) do in OrcaSlicer while it is open: each
call with its source, what it changed, failures with their reason, the steps of a run and the dialogs a
rule answered. Opening a call shows its request and response with passwords, keys and typed text masked,
so a person can watch and check what an agent is doing to their project.
2026-11-24 16:38:50 +08:00
yw4z 755af907c6 Prevent object selection on mouse up events from pan / rotate (#17432)
init

Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
2026-11-24 14:37:55 +08:00
SoftFever eae8929b41 Warn in Action Replay when a step replaces a post-processing script
A replay could swap one of your post-processing scripts for its own by
setting a single entry of the list, and the step showed no warning. It now
carries the "Can run a program" tag, as setting the whole list does.
2026-11-24 14:24:47 +08:00
ArtytheSecond2nd 6b79a61ff3 Fix grammar in README license section for OrcaSlicer (#17175)
Fix formatting in README for OrcaSlicer

Change one instance of "the OrcaSlicer" to just "OrcaSlicer"
2026-11-24 03:30:09 +03:00
Noisyfox 7694a2e1f0 Disable rectangle selection in Measure and Assemble gizmos (#17533)
Disable rectangle selection in measure and assembly gizmos
2026-11-24 02:32:08 +03:00
Sergei 5c671c7995 Flashforge: add Flow Calibration option for Creator 5 / 5 Pro (#17237)
Signed-off-by: Sergei Rozhkov <zmod@zAdd a "Flow calibration" checkbox to the Flashforge send dialog, shown only for the Creator 5 and Creator 5 Pro. It sets the flowCalibration upload header, which was hardcoded to false. Other printers still send false.mod.link>
2026-11-23 16:41:01 -06:00
yw4z bfca086490 Fix Thai font registering in the wxWidgets UI on Linux and in the Text Emboss tool on Windows (#17818)
- Register the bundled Sarabun fonts with wxWidgets in `Label::initSysFont()`, so a Thai UI on Linux falls back to Sarabun instead of showing boxes when the system has no Thai font. The Linux check that skips registration when fontconfig already has the bundled fonts now includes Sarabun.
- Add "Sarabun Medium" to the Text tool's bundled font fallback. Windows lists Sarabun under that name, so "Sarabun" never matched and a Thai UI got the English default text.
2026-11-23 16:28:12 -06:00
Kris Austin 0c2f19d4e1 Leave mixed filaments out of the Slice all grouping dialog (#17767)
Slice all listed every filament slot in the custom nozzle grouping
dialog, so a mixed filament showed up as its own spool. Slice plate
already lists only physical filaments, because get_extruders() expands
a mixed slot into its components. Skip the mixed slots for Slice all
too. The mixed slot keeps its entry in the saved filament maps, but the
dialog no longer sets it, the same as Slice plate.

Fixes #17712
2026-11-23 16:00:32 -06:00
Kris Austin bf86aeae79 Write each plate's own filaments into a sliced 3MF (#17815)
Exporting all sliced plates put every plate's filament ids and colors into the selected plate's Metadata/plate_N.json, and left the other plates' lists empty. export_3mf now indexes the bounding-box data by each plate's own index.

That data stays on the plate between exports, and the writer adds a plate_N.json for every plate that has it. So the export clears every plate's filament lists first, then fills in the plates it exports. Plates left out of an export get empty lists, and repeat exports don't duplicate entries.
2026-11-23 15:59:10 -06:00
Noisyfox 821b602c4d Keep height ranges and per-feature filament assignments on their mixed slots (#17729)
Adding a physical filament inserts it ahead of the mixed filaments. Height ranges and the per-feature filament settings (outer and inner walls, sparse and internal solid infill, top and bottom surfaces) kept their old slot numbers, so an assignment to a mix printed with the new physical filament instead.

Shift those assignments with the mixes when a filament is added, and move them with the deleted or merged slot when a filament is removed. This covers the process preset, objects, parts, modifiers and height ranges. Inherited (Default) assignments are unchanged.

When a published 3MF import moves mixed filaments, imported parts and published process settings follow the author's slot moves, and process settings kept from the receiver follow the receiver's own mixes. A receiver mix that moved no longer redirects the author's references to the physical filament in that slot.

Fixes #17727
2026-11-23 15:56:49 -06:00
TheLegendTubaGuy d0c70bef7b Add Anycubic Kobra 3 Max V2 profiles (#17661)
Port the Kobra 3 Max V2 printer, process and filament profiles from Anycubic Slicer Next (profile bundle 1.3.2609.02) for the 0.25, 0.4, 0.6 and 0.8 mm nozzles. All four nozzles are hardened steel, and the 0.25 nozzle is V2 only.

Anycubic's zig-zag sparse infill becomes rectilinear, the same conversion Orca applies to legacy configs.

Move the logo in the shared Kobra 3 Max bed texture to Anycubic's revised position, which Anycubic Slicer Next uses for both the original Kobra 3 Max and the V2.
2026-11-23 15:11:45 -06:00
Sergei 30d283fe75 Flashforge: allow non-ASCII filenames in local API upload (#17254)
The Flashforge filename sanitizer replaced every non-ASCII byte with `_`, so a file named `Тест.gcode` reached the printer as `________.gcode`. For uploads through the local HTTP API, only the characters FlashPrint rejects (`< > [ ] : / \ | ? * "`) and control characters are now replaced. Non-ASCII text, spaces and parentheses are kept. The legacy TCP upload still uses the strict ASCII sanitizer.
2026-11-23 14:53:55 -06:00
yw4z 074be951e5 Fix: Instances move when a part is added, and assembly view poses break for copies and part changes (#17617)
* init

* fix assembly

* fix text instances and storing rotated items on assembly

* unposed source as new object

* simplify comments

* update text object

* fix object looses positioning after deleting volumes

* fix scale properties not used for instances on assembly view

* fix undo history for scale not reflected to assembly view

* apply exact scaling to assembly view for fixing skewed scalings

* fix cant create proper instances from skewed objects

* Preserve assembly poses when splitting an object into parts

---------

Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
2026-11-23 23:03:36 +03:00
SoftFever bff0641b28 Stop a calibration when its save prompt is cancelled
Choosing Cancel when a calibration asked to save the open project still
created the calibration on top of that project, so the project's pauses and
color changes ended up in the calibration's G-code. Only the flow rate tests
stopped. Cancel leaves the project as it was for every calibration.
2026-11-24 02:34:07 +08:00
SoftFever 2b52191901 Warn in Action Replay when a step can run a program
A replay someone sends you can hold a Python script or set a post-processing
script, and either runs a program on your computer when the replay plays. The
window listed those steps with no warning. They carry a "Can run a program"
tag, as a step that writes a file or sends to a printer carries its own, and a
step that makes its call through tool_call shows the tags of that call.
2026-11-24 02:34:07 +08:00
Kris Austin 91d9cf01d0 Fix crash slicing after a printer switch leaves fewer filaments (#17774)
With remember_printer_config on, switching printers rebuilds the filament list from the new printer's saved selection but only refreshed the sidebar. The plates kept their filament maps sized for the old filament count, and Print::apply took them over the resized project maps, so the flush reorder read past the end of the filament list. Resize the plates' filament maps and print sequences on the switch, and cut filament maps longer than the filament count in Print::apply.

Fixes #17562
2026-11-23 08:40:57 -06:00
Kris Austin a816435087 Fix a calibration page crash when a Snapmaker U1 is connected (#17817)
Keep only the first 2 extruder types in the calibration preset page

A Snapmaker U1 matches a preset with 4 extruder types, and the page wrote
all of them into a list sized for 2. Linux builds aborted on the vector
assertion; other builds wrote past the end.
2026-11-23 08:40:08 -06:00
Kris Austin 8474bc9e2d Keep the IP and access code dialog inside the display work area (#17763)
InputIpAddressDialog centers itself on the main frame and then moves up by
50 DIP, with nothing clamping the result to the display. wxWidgets pulls a
centered window back onto the display, but for a window taller than the work
area its last step is to bring the bottom edge into view, which leaves the top
off screen. The 50 DIP shift then adds to that. At 350% display scaling it is
175 physical pixels, so the title bar, the first line and step 1 all end up
above the top edge, as reported in #17749. The dialog has no resize border and
the title bar is the part that goes off screen, so it cannot be dragged back
into view either.

Clamp the final position to the work area of the display the dialog was
centered on. The clamp moves the dialog only when it would fall outside the
work area, so one that already fits keeps its exact position and size. Every
later Layout() and Fit() in this dialog preserves its top left corner, so
clamping once after it is positioned is enough to keep the title bar reachable.
2026-11-23 08:39:31 -06:00
SoftFever 888ee0dff3 Fix the Flatpak unit-test jobs failing on the page agent test
Both Flatpak unit-test jobs failed one test, which reads the MCP server's
page agent script, because the script was missing from the test bundle those
jobs run from. The bundle carries it, so the jobs run that test as the other
platforms' jobs do.
2026-11-23 21:40:24 +08:00
SoftFever a0db07311b Fix two unit tests that failed at random on CI
The plugin-unload test of the automation suite and the in-flight tool call
test of the Python script runner each failed now and then on a busy runner,
macOS arm64 and Linux aarch64 in the last run, with nothing wrong in the app.
Both pass however the runner schedules their threads.
2026-11-23 21:38:37 +08:00
codex f66ed2d6e4 Keep the Android theme consistent across offline and server modes 2026-11-23 12:46:03 +00:00
codex 0518ffeb09 Move Android connection settings into the application menu 2026-11-23 12:34:10 +00:00
codex 6d7d598a9d Reconcile Android and server filament libraries safely 2026-11-23 12:11:50 +00:00
SoftFever efc29fdb80 Give a polygon drawn on the axes the same constraints on every platform
A square drawn on the axes through sketch_draw was locked level on x64 but could be
left free to rotate on arm64, so its constraints and degrees of freedom depended on
the CPU, and the test of them failed on macOS arm64 and Windows arm64. A polygon's
side that lies on an axis is now pinned Horizontal or Vertical on every platform, as
the Polygon tool pins it, so such a square has all four sides pinned.
2026-11-23 20:02:09 +08:00
codex e33657fa45 Add optional Web Slicer server mode to Android 2026-11-23 11:53:29 +00:00
SoftFever 82d1f6adfa Fix the CI failures from the first build and test run of the MCP branch
The Flatpak build failed to compile the MCP bridge, clang-tidy flagged four missing
includes, and several new tests failed only on CI: plugin and script tests on Windows
runners with a non-UTF-8 code page, and two tests that raced on slower machines.
2026-11-23 19:10:16 +08:00
Damir Galeev aefb6b3d66 Precise Seam: intersect modifiers with the model surface, not the perimeter centerline (#17557)
* Precise Seam: intersect modifiers with the model surface, not the perimeter centerline

A modifier acted where it crossed the centerline of the printed perimeter, which
lies about half a line width inside the model surface and deeper at corners. It
now acts where it crosses the model surface.

- The surface is reconstructed from the centerline by a shift of half the
  external perimeter width less the XY compensation and a 5 um margin, clipped
  against the modifier and carried back onto the centerline.
- On elephant foot layers and with Arachne the shift is measured against the
  layer's islands.
- With fuzzy skin the perimeter generator keeps the centerline before texturing
  (ExtrusionLoop::untextured); modifiers are evaluated on it and the points are
  carried onto the noisy loop.
- Open extrusions are left out of Precise Seam.
- The "had no effect" warning no longer names the centerline.

See docs/HLSD/precise-seam.md.

* Precise Seam: fuzzy skin window per loop kind; no negative search reach

The transfer window of a fuzzy skin loop counted every region with fuzzy
skin on the layer, including those that do not texture its kind (a Hole
region for contours, an External one for holes). FuzzySkin.cpp skips such
regions, so mixed settings widened the transfer search and the weak zone
order check. The window is now computed for contours and holes separately
from the regions should_fuzzify() selects, as a function in
PreciseSeamInternal.hpp with a unit test.

The modifier prefilter of the measured shift no longer takes a negative
reach: a compensation beyond the whole wall depth leaves no shift.

* Precise Seam: shift narrow classic loops by their own line; keep the warning translations

Without thin wall detection the classic generator prints an island too narrow for
two lines with a thinner line and insets the loop by half of that width, while the
surface shift used the region's external perimeter width. The reconstructed
surface lay 0.055 x spacing - 5 um outside the model, more than the margin, so a
modifier flush against the face acted on such loops. The shift of a classic loop
now comes from the width of its own external perimeter path; Arachne loops are
measured as before.

The two "had no effect on the seam" messages lost their bracketed part, and the
catalogs dropped the old entries without getting the new ones. The entries are
back under the new msgids with the existing translations, trimmed of the
bracketed part.

* Precise Seam: keep the aligned seam inside an Enforced modifier zone

A loop with an Enforced zone in effect now has exact ends: alignment no longer
moves the seam up to 0.2 mm past a zone boundary, and Random does not sample
the edge leaving the zone.

* Precise Seam: test both ends of an Enforced zone in alignment

The regression test for the aligned seam leaving an Enforced modifier zone
ran on the right face only, where the stepping end of the zone is the last
candidate of the Enforced run. It now also runs on the left face, where the
same end is the first candidate, so both directions of the allowed arc are
checked.

The HLSD notes that a zone reduced to a single candidate holds the aligned
seam on it, so alignment cannot smooth its shift between layers.
2026-11-23 18:32:08 +08:00
HanifKoh 10f9054f06 Stop Staggered Inner Seams Hanging G-code Export at a Hairpin Corner (#17731) 2026-11-23 14:39:54 +08:00
yw4z 08bd6b56f1 Fix color picker dialog being clipped on Linux with text scaling (#17781)
init
2026-11-23 14:29:44 +08:00
Ian Chua fcbfbaaf91 fix: add missing fedora perl dependencies (#17796) 2026-11-23 13:40:48 +08:00
SoftFever df459143cc Merge branch 'main' into feature/mcp 2026-11-23 13:29:29 +08:00
codex fc9fcdd0d4 Keep the 0.3.1 web and Android release marked alpha 2026-11-23 01:41:16 +00:00
yw4z a31c95e273 Fix: custom G-codes and wipe tower for plate not moved after using move plate to front and undo (#17569)
Custom G-codes and wipe tower positions are stored by plate index, and reordering plates left them at the old index.

- Moving a plate reorders `wipe_tower_x` and `wipe_tower_y` with it.
- `PartPlateList::remap_custom_gcodes()` re-keys `plates_custom_gcodes` by plate ID after a plate move, a plate deletion and an undo/redo jump. Entries of a plate that an undo removes are kept and restored when the plate comes back.
- Undo/redo restores every changed wipe tower position instead of only the first.
2026-11-22 19:35:38 -06:00
Kris Austin 1281de4cdc Comment and wait for the author when a PR gets the see guide label (#17814) 2026-11-22 19:08:17 -06:00
Kris Austin 5c561b17df Add contributor rules for untested PRs, rewrites and ports (#17813)
* Add contributor rules for untested PRs, rewrites and ports

* List missing explanations and mixed changes as reasons we don't review a PR
2026-11-22 19:00:18 -06:00
codex a63458c94e Prepare Web Slicer 0.3.1 with desktop Bambu sign-in 2026-11-23 00:18:03 +00:00
Lam Wei Lun ec6e124658 Fix main window opening fullscreen instead of maximized on X11 (#17585)
Restore a maximized main window without resizing it on X11

Mutter/Muffin turn a client resize of an undecorated window to exactly the
monitor rect into a fullscreen window, so the main frame came up fullscreen
instead of maximized when the panel reserved no strut (#17191). On X11, skip
SetSize when the saved state is maximized and skip window_pos_sanitize for
maximized or fullscreen windows. Windows and macOS keep the resize, which
sets the normal size Restore Down returns to.

persist_window_geometry also ignored the window name and stored the non-modal
settings dialog under window_mainframe. Use the window's own name.
2026-11-22 18:14:35 -06:00
Arthur Porto 6d563f72c2 Keep arranged objects clear of a compacted prime tower (#17304)
With "No sparse layers" on, Arrange and Fill bed keep objects as far from the compacted prime tower as the slicer's clearance check needs. Objects stay the toolhead radius away, or 4 mm when none of the objects being placed is taller than nozzle_height. Objects taller than the rod clearance are also kept out of the tower's Y span, and the final alignment of the pile is skipped in that case. Placing a newly added object keeps the full toolhead radius.

With the option off, arranging is unchanged.

Fixes #17566
2026-11-22 16:43:49 -06:00
TheLegendTubaGuy f611c3b488 Fix "Line width too small" when the layer height equals the nozzle diameter (#17643)
Skin and skeleton line widths are only validated for Locked Zag regions, the only pattern that prints them. A bridge as wide as the layer is tall is accepted without thick bridges.

Flow::with_cross_section() gave a line shrunk into a round strand a quarter of the cross-section it asked for, using the radius as its diameter. This changes G-code for bridges, overhang walls and support bottom interfaces without thick bridges whenever the bridge flow ratio is low enough to shrink the line to the layer height.
2026-11-22 16:37:27 -06:00
codex 27cbe5a04b Improve filament and Bambu workflows and add external model import 2026-11-22 21:03:09 +00:00
SoftFever e6250eca57 Let MCP commands name objects, parts and instances by id
An agent that read an object's id in object_list could only pass it as a guard beside the index, and the index moves
whenever objects are deleted, split or reordered; an id passed as an index was refused without saying what it was.
Every command that names an object, a part or an instance now takes its index or its id, both together still a
guard, and object_list gives each instance's id too. An id given as an index is refused with what that id names, and
recorded replays keep naming targets by index, so they still run in a new session.
2026-11-23 00:06:23 +08:00
SoftFever 6122352058 Shorten the longest MCP tool descriptions
The ten largest definitions in the tool list repeated much of what their parameters already say. They now
say it once, taking about 4.9 KB off the tool list an agent reads at the start of every session, with
nothing they described left out.
2026-11-22 22:36:37 +08:00
SoftFever 3283fa0016 Mark names as code in the MCP tool descriptions
Agents can tell an argument or a reply field from an English word in every tool description. The
server instructions say what the Speed Dial is, a call held by a dialog says how to run it without
asking next time, and object_add_text and object_add_svg say what they reply.
2026-11-22 22:01:16 +08:00
SoftFever d3f57df99f Shrink the MCP tool list
Agents load less text before their first call: the object and part id guards are explained once
in the server instructions instead of in every schema that takes one, and each tool's title is
sent once.
2026-11-22 21:59:35 +08:00
SoftFever f9c0411c0c Keep MCP replies short and free of float noise
Agents now read an object's position as 60.001 rather than 60.001007080078125, and a Design
command's zero as 0 rather than 4.4e-16, without the wrapper and ok flag that said nothing; a
client that computes with the numbers can still ask for them whole. object_list gives a short row
per object unless asked for detail, so a plate of a hundred objects fits a client's reply limit,
and app_log returns 50 lines by default.
2026-11-22 21:57:47 +08:00
SoftFever bca0a9857f Say in the server instructions that values_from belongs to a parameter 2026-11-22 20:01:01 +08:00
SoftFever 8bb0196353 Tell agents which catalog filters are optional and that values_from may name several tools 2026-11-22 19:57:16 +08:00
SoftFever 122f106aee Tell agents in the server instructions how to find what to call
An agent connecting to the MCP server now reads, right after the workflow, how each catalog is found
by listing: commands place by place and the rest through tool_list, a command's manual before calling
it through tool_call, settings by page, Speed Dial actions by section and the Python API by module.
2026-11-22 19:52:06 +08:00
SoftFever a629d3590f Say where tool_describe keeps a schema part it cannot show 2026-11-22 19:48:47 +08:00
SoftFever f399cdd79f Say in the MCP design doc exactly what a manual leaves out for a raw schema 2026-11-22 19:47:14 +08:00
SoftFever 37e136acac Keep tool_describe from calling an object open when a plugin schema may close it
A plugin schema can close an object through a keyword the manual keeps raw, such as allOf. The manual
then no longer says the object, or the call, takes other keys, and leaves the attached schema to say
what it accepts.
2026-11-22 19:33:47 +08:00
SoftFever b1500e4aae Say in tool_describe's manuals which objects take keys they don't list
Every object in a manual now says whether it takes keys besides its properties, at any depth, as the top
level already did. A plugin schema whose properties can't be read now comes with the raw schema instead of
looking like one that takes no arguments.
2026-11-22 19:25:15 +08:00
SoftFever 5026ada896 Point tool_describe's manuals to more values' sources, and keep plugin rules
An agent reading a manual now learns where a filament's purge mode, a calibration's shaper type, a
hole's point, printer_install's models and dialog_answer's dialog come from, and sees that a plugin
operation can reach outside the app. What a plugin's schema says that the manual can't show, such as a
required argument with no property, now comes with the raw schema, and a schema that takes any argument
says so instead of looking like one that takes none.
2026-11-22 19:14:39 +08:00
SoftFever 918fc04533 Pass clang-tidy on the MCP list tools and drop the docs' last search wording 2026-11-22 18:38:33 +08:00
SoftFever 7f8af3beeb Browse settings by page with settings_list_pages, and read them by key
settings_get and preferences_get matched an agent's words, so a goal such as "add a brim" found the wrong
settings. Agents now list a settings tab's pages and groups with settings_list_pages, read a page's settings
and what each does with settings_list, and read named settings with settings_get and preferences by tab
with preferences_get.
2026-11-22 18:19:51 +08:00
SoftFever 3c6752abf9 Browse the Python API a module at a time with script_list_api and script_describe_api
script_search_api ranked the API by an agent's words, so a goal phrased in other words found the wrong entries.
Agents now list what a module or class holds with script_list_api and read one entry's whole documentation
with script_describe_api.
2026-11-22 18:08:23 +08:00
SoftFever ee42f3922c List the Speed Dial's actions with action_list, in place of action_search
action_search ranked actions by matching an agent's words, so an action named differently from the request
was missed. action_list lists them by section and title for the agent to choose from, as tool_list does
for commands.
2026-11-22 18:03:47 +08:00
SoftFever 2e46806600 Document how agents find and read commands with tool_list and tool_describe 2026-11-22 17:57:19 +08:00
SoftFever b85dbded55 List the commands tools/list leaves out with tool_list, in place of tool_search
tool_search matched words, so an agent that asked for a goal such as "add a brim" or "round the edges"
got unrelated commands. Agents now read tool_list, which lists the Design tab's commands, the menu items
that take no arguments and the plugins' operations with what each does, and a call refused for its
arguments names the tool_describe call that gives that command's parameters.
2026-11-22 17:56:09 +08:00
SoftFever 56d7f9e815 Give agents a manual for any MCP command with tool_describe
An agent could read a command's arguments only as raw JSON Schema, with its conditional rules left to decode and
no word on where an object index or a face id comes from. tool_describe now gives any command's manual, listed or
not: every parameter at every depth with its allowed values, ranges and defaults, the schema's rules as sentences,
the Speed Dial items that run it with their arguments, its examples, and which tool lists a value the schema can't.
2026-11-22 17:35:15 +08:00
SoftFever d51fb9f4ed Show what each command does when tool_search lists a group
Agents listing the Design tab's commands, or any other group, got bare names and had to look each one up to
choose. tool_search {group} now gives each command's first sentence and, in Design, its heading, in the order
the description's index uses. action_search names the Speed Dial's sections section rather than group, so they
are no longer mistaken for tool_search's groups, and a wrong section is refused with the sections there are
instead of returning nothing.
2026-11-22 14:50:46 +08:00
SoftFever 7db95f5c1e Say in a word why an MCP call was refused, and how to get past it
Design commands were refused with numbers such as -32002 or with no code at all; they now say design_busy,
precondition, invalid_argument, rebuild_failed and the like, so an agent can tell a wrong argument from a design
that is not ready, on every route that takes arguments. Refusals worded for a person, such as an open gizmo or a
selected object, carry a hint naming the call that gets past them, and an index too large for the app or written
as 2.0 is no longer misread as another object, plate or instance.
2026-11-22 13:36:38 +08:00
SoftFever 15bb082ce2 Refuse misspelt Design arguments and tell agents how to fix refused calls
A misspelt argument to most Design commands was ignored, so the command ran with
its default, such as a helix built with the default pitch. Every Design command now
refuses it and names the arguments it takes. Refusals of a missing object or part,
an unknown setting key, an invalid setting value or a preset that is not installed
now say the valid range, the similar keys, what the setting takes or the command
to use, and plate_add and object_add_handy_model say what they added.
2026-11-22 01:28:26 +08:00
SoftFever fdf335472c Fix --run crashing at exit when a dialog is still open
A --run launch that ended with a dialog open, such as the prompt to restore an unsaved project left by an
earlier session, crashed while closing and returned a crash code instead of the replay's result. It now
closes the dialog first and exits with the replay's code, and it no longer asks about or discards a
person's unsaved project, which their next normal launch still offers to restore.
2026-11-21 23:41:23 +08:00
SoftFever 3ba8743720 Write replay results to the temp folder unless an output folder is given
Replays that name no output folder, whether run from Action Replay, by an agent or with --run, left a
<name>.out folder beside the replay file or filled the data folder. They now write to a new
orca_action_replay/replay-<time> folder in the temp folder, or inside --outputdir when a --run launch names one.
2026-11-21 23:41:14 +08:00
SoftFever b92d6b51ae Start Action Replay with a replay that slices the Orca Cube on a new plate
The Action Replay window now opens with a replay that adds a plate, puts the Orca Cube on it, slices that
plate and saves a screenshot of the preview. It checks that the new plate really sliced, so it fails
instead of passing on an empty plate.
2026-11-21 23:40:56 +08:00
SoftFever 7e4b791589 Let MCP calibration tests print with any physical filament
calibration_generate_test always printed with filament slot 1, so an agent could not calibrate another filament of
the project or, on a multi-extruder printer, the nozzle that prints it. It now takes filament_slot, as the
Calibration dialogs' filament list offers, prints on the extruder the filament map gives that filament, and says in
its reply which extruder that is.
2026-11-21 20:45:39 +08:00
SoftFever e7bcdbe01e Bring the checked-in command reference up to date with the Linux picker rules
The reference still said a path rule cancels a file picker on Linux and that a save picker needs a new
file, so the reference test failed.
2026-11-21 19:17:25 +08:00
SoftFever 867ba9b005 Merge branch 'main' into feature/mcp 2026-11-21 18:57:39 +08:00
SoftFever b30dfcd51b Let MCP path rules answer file pickers on Linux
A dialog_auto_answer rule with a path still cancelled every open and save file picker on Linux, so a script
couldn't save or open a project through the File menu or insert an SVG in the Design tab there, and the sweep
skipped those steps. File pickers now take the path as on Windows and macOS. This needs the updated
wxWidgets, so rebuild the deps.
2026-11-21 17:24:41 +08:00
SoftFever 97809fe274 Let MCP path rules answer folder pickers on Linux
A dialog_auto_answer rule with a path cancelled every folder picker on Linux, such as the Preferences
download folder's Browse and the recording dialog's Change..., so a script couldn't pick a folder there and
the sweep's Preferences and Speed Dial tests failed. Folder pickers now take the path as on Windows and
macOS; file pickers still cancel on Linux.
2026-11-21 17:24:34 +08:00
SoftFever b4ffa1ecfd Clear every sweep test's serial mark at once with --forget all 2026-11-21 02:36:58 +08:00
SoftFever af80804f24 Make MCP sweep tests pass in any order, one app per job
A test's verdict depended on which test had run before it on the shared data folder, and fixed pauses failed tests
on a busy machine. Each job now runs its tests in one app, every test starts from the same baseline whatever ran
before, and tests wait for the state they expect rather than for a set time; --shuffle runs the sweep in a random
order to show any test that still leans on another. The command-line test is gone, as it checked options outside
the MCP server.
2026-11-21 02:24:06 +08:00
SoftFever 3f314bad3f Stop testing that the early MCP command-line options are refused
The command-line test checked that four MCP options from before their rename are refused. They never shipped in a release, so the check guarded nothing a user could rely on, and on Windows it printed the app's full usage text into the sweep's console four times.
2026-11-21 02:23:39 +08:00
SoftFever b595b8b02f Make test_cad_commands pass when another app takes the focus on Linux 2026-11-20 23:58:51 +08:00
SoftFever 070f377eb2 Fix renaming in the Design tab ending as soon as it starts on Linux 2026-11-20 23:58:51 +08:00
SoftFever fa029465a3 Make the MCP sweep's tests pass on macOS
Several sweep tests failed on every macOS run while passing on Windows: the Run Script
panel and plugin command checks, the auto-orient placement check, and the Design tab's
edge re-pick checks. They now pass on both.
2026-11-20 21:42:51 +08:00
SoftFever 26ad77def2 Fix crash when a web window is closed as soon as it opens
On macOS, opening the Action Replay window and closing it straight away with Escape
crashed OrcaSlicer a moment later. Web windows can now be closed the moment they open.
2026-11-20 21:41:59 +08:00
SoftFever 0b9c6b5d09 Let agents answer the mixed-filament merge warning on macOS
Merging a filament into a mixed filament that uses it asks for confirmation first. On
macOS that question was a native alert, which held the app so an agent driving it over
MCP could neither see nor answer it. It now opens in Orca's own dialog, as the app's
other warnings do, with the same text and buttons.
2026-11-20 21:41:59 +08:00
SoftFever 9d7778ec86 Make the full MCP sweep finish in about 11 minutes
A full sweep on six jobs took 17 to 19 minutes, too long to run often. Its 66 tests are
now 40 that cover the same areas with each scenario run once, and the sweep finishes in
about 11 minutes. The Speed Dial test checks a handful of commands no other test reaches,
and the sweep runs only test_*.py files; smoke_test.json and the Design replays are
played by the tests that use them.
2026-11-20 21:38:12 +08:00
SoftFever 8c1ada5aab Keep sf-plan design and planning files out of the repository 2026-11-20 17:16:52 +08:00
SoftFever 190d6848b0 Edit mixed filaments and their gradients over MCP as the sidebar does
Agents can now read the whole filament list with filament_list, change a mixed filament with filament_edit_mixed,
and set a gradient by driving the Add or Edit Mixed Filament dialog. The slot colours and the flushing settings move
from the project tools to filament_set_colour and filament_set_flushing, beside the rest of the filament list.
Deleting or merging a filament that a mix uses now behaves as it does in the sidebar, and the settings tools no
longer edit a physical filament's preset through a mixed slot.
2026-11-20 17:15:05 +08:00
SoftFever 6afa573668 Say which slot colours and flush multiplier the filaments test leaves
A developer reading the filaments test's entry could not tell that it leaves white and black slots and a flush
multiplier of 1.4 on the shared data folder, which the next test meets and a two-colour slice purges more for.
2026-11-20 16:01:44 +08:00
SoftFever ddfce90df4 Say what the slice preview test leaves now that viewing G-code keeps the flush multiplier
The test's entry still said a viewed G-code file leaves the flush multiplier at 1. It now says the test leaves the 0.3
its start sets, and why that start still sets it: the filaments test leaves the same printer at 1.4.
2026-11-20 15:55:23 +08:00
SoftFever f6b6b5793d Merge branch 'refs/heads/feature/hopeful-lalande-0a52eb' into feature/mcp 2026-11-20 15:47:11 +08:00
SoftFever f779174c7b Fix the MCP sweep's files and preferences tests failing on the DRC depth
Both tests still set the DRC depth to 0, a value the Preferences dialog does not take, so they failed. The files test
now checks that the depth is the app's lossless default and fails by name on a data folder set to a lossy one, and the
preferences test no longer checks a value outside the dialog's range.
2026-11-20 15:35:25 +08:00
SoftFever f12b73014f Thread bores reliably wherever the part sits on the bed
In the Design tab, threading a bore could fail with "thread removed no material" depending only on
where the part sat: an M5 standoff at the centre of a 250 x 250 mm bed could not be tapped, while the
same part a few millimetres away could, and some blind holes could not be tapped anywhere. Threads now
cut into through and blind holes alike, at any position.
2026-11-20 15:14:11 +08:00
SoftFever 58b1236f60 Run the MCP sweep on shared data folders with the Generic Klipper Printer
The sweep made a fresh data folder for every test, copying all of Bambu Lab's profiles each time, left tens of
gigabytes of run folders behind, and failed outright on a test that only failed while other tests loaded the
machine. Each job now keeps one data folder for all its tests, seeded with the Generic Klipper Printer as a person's
folder carries over from day to day; a test that fails beside others runs again alone and is remembered as one to run
alone; and a passing test's folder is deleted as soon as it passes.
2026-11-20 15:04:22 +08:00
SoftFever 28203ae06d Keep MCP calls reliable on a busy machine
When the computer was busy, agents saw calls fail that work on a quiet one. A right click's context menu could open
on screen instead of reaching the call, a click could find a button still disabled, a call could report it was
blocked by a dialog an auto-answer rule had already answered, the first call through the stdio bridge could be
refused while the app it started was still loading, and a replay could fail waiting on a step that had finished.
Each of these now waits for the app to catch up instead.
2026-11-20 15:04:12 +08:00
SoftFever f81887ca13 Delete mixed filament slots and export sliced files of unsliced plates over MCP
An agent could not remove a mixed filament slot, so a project that had one never got back to a single slot, and
deleting a physical slot a mix used left the mix broken. filament_delete now removes a mixed slot as the sidebar's
list does and refuses to delete a slot a mix needs. Exporting a sliced file to a given path no longer fails on the
file name template when the plate is not sliced, as it did on the Generic Klipper Printer.
2026-11-20 15:04:05 +08:00
SoftFever d57a06f3f4 Keep the flush multiplier when viewing a G-code file
Viewing a G-code file set the project's flush multiplier to 1 whatever the file was sliced with, and
the 1 stayed through a new project, a preset switch and a restart, so every later multi-colour slice
purged several times as much. The project now keeps the file's own multiplier, and the preview still
shows the purge volumes the file was sliced with.
2026-11-20 14:28:28 +08:00
SoftFever e0f528a431 Add a typed text or SVG to an object when only its negative part or modifier is selected
object_add_text or object_add_svg given only a part type, with nothing but a negative part or modifier of an object
selected, made a new ordinary object. It now selects that object whole and adds the part to it, as a right click on
the object's row does before its Add Part, Add Negative Part and Add Modifier menus.
2026-11-20 02:18:46 +08:00
SoftFever cff75e0ac3 Fix object_cut on planes just off straight down, and text added with several objects selected
An object_cut plane tilted less than a degree from straight down was cut level, and object_add_text or
object_add_svg given only a part type, with several objects selected, made a new ordinary object. The cut now keeps
the plane's tilt, the add is refused one_object_only, and the sweep also checks lay on face's refusals, clearing
brim ears with the gizmo open, and print calls that name a plate.
2026-11-20 01:16:16 +08:00
SoftFever fd6f2934eb Document the gizmo and printing commands for MCP clients and developers
The command reference now describes the 13 gizmo and printing commands: which gizmo or dialog each opens, the
arguments that do the job without it, the Print button's routes for each kind of printer, and what is left to the
dialog. The server design says how the commands reach the gizmos, the print dialogs and the printer, and the test
notes name what no test reaches: the Bambu print dialogs and a physical printer.
2026-11-19 23:54:56 +08:00
SoftFever 04b533f493 Let MCP clients see and close the Action Replay window
The Action Replay window was hidden from every GUI tool, so an agent or a test that opened it could not close it,
and it stayed on screen for the rest of the run. It is now listed with a ref, its page can be read, and Escape sent
to it closes it. Its file pickers and confirmation prompts stay the person's alone.
2026-11-19 23:29:31 +08:00
SoftFever cbf5226d13 Let MCP clients read the connected printer's status and pause, resume or stop its print
printer_status reads what the Device tab shows of the printer it is connected to: its state, progress, layer, the
file printing and the temperatures, with no serial number and nothing sent to the printer. print_pause, print_resume
and print_stop do what the tab's buttons do, and are refused, saying why, where the printer's state does not allow
them or a job can be resumed only at the printer.
2026-11-19 22:58:34 +08:00
SoftFever 0584100037 Let MCP clients start a print, send to a Bambu printer, and test the print host
print_start opens the dialog the Print button opens for the selected printer, for one plate or all of them, and is
refused where the button would be disabled, such as for a plate not sliced. printer_send, and the Send G-code Speed
Dial action with it, open the dialog that sends to a Bambu printer's storage where they used to refuse such a printer,
and take the plate to send. printer_test_host checks that the printer's print host answers, as the Test button of its
connection dialog does.
2026-11-19 22:40:22 +08:00
SoftFever 23a104bc85 Let MCP clients lay an object on a face, set its brim ears, and add text or an SVG to a named object
object_lay_on_face turns an instance so that the face a direction names lies on the bed, as a click in the Lay on Face
gizmo does, and object_set_brim_ears places brim ears at bed positions, or clears them, as the Brim Ears gizmo stores
them; called with only their object, both open their gizmo. object_add_text and object_add_svg can name the object the
part joins and make it a negative part or a modifier. The Brim Ears gizmo shows ears set this way when it next opens,
rather than writing back the ones it held.
2026-11-19 22:11:04 +08:00
SoftFever 4f6821f059 Let MCP clients cut an object along a plane with object_cut
object_cut cuts an object at a height or along any plane, keeping either piece or both, laid where the Cut gizmo would
lay them or kept as two parts of one object, in one undo step, as the gizmo's Perform cut does. Named with only its
object it opens the Cut gizmo on it, for connectors, the dovetail and cuts along a contour. A plane that misses the
object, or an object with connectors, is refused with the model left as it was.
2026-11-19 20:49:40 +08:00
SoftFever d25593e29b Let MCP clients open the painting, Measure, Simplify and Mesh Boolean gizmos on a named object
object_paint, object_measure, object_simplify and part_boolean open their gizmo on the object, instance or part a
client names, where before a client had to know the gizmo existed and click its icon after selecting. A refused
opening says why in the gizmo's own terms, such as Mesh Boolean needing two parts, and leaves the selection and the
undo history as they were.
2026-11-19 20:21:41 +08:00
SoftFever 5fa42c1294 Check that a refused gizmo opening leaves the selection as it was
The gizmo commands' test design now also checks a refused opening made while another gizmo is open, and says which
refusals put back the selection the call had changed and which come before it changes anything.
2026-11-19 19:01:22 +08:00
SoftFever e3f3f019a2 Design the sweep tests for the gizmo and printing commands
The sweep's entries now describe the tests for the commands that open a gizmo or a print dialog on a target and,
where they can, do its job from arguments: what each step must leave behind and how every refusal is told apart.
They also take every sweep call that would open a Bambu printer's Print or storage dialog off the scratch datadir,
so no test run messages a real printer.
2026-11-19 18:55:20 +08:00
SoftFever 6cd2ce1a2e Check every area of the MCP sweep with Python tests that read each step back
The sweep's objects, presets, filaments, settings, project files, slicing, gizmos and GUI tools are tested by Python
tests that compare the app's state after every step with the values their entries write out, in place of the
replays, and the existing tests' checks that could not fail now can. The calls these tests found wrong now behave
as described: moving one instance no longer sinks the others, a toolpath export writes the layers shown, an
auto-answered dialog no longer reports its call blocked, and a web dialog that has just opened takes requests.
2026-11-19 13:49:20 +08:00
SoftFever f80433cff0 Check the plates in the MCP sweep with a Python test that reads every step back
test_plates.py takes the place of the plate replays: after each add, duplicate, rename, lock, select or delete it
reads the plate list back and compares it with the state its entry writes out, and it checks what a lock keeps
Arrange and Auto-Orient from doing, a plate's own settings, the filament slots and the plate icons. Arranging a
locked plate is refused with advice that names plate_lock with the plate, instead of a needless plate_select.
2026-11-19 06:15:39 +08:00
SoftFever 5a351f9cb1 Catalog the MCP sweep tests and design their Python replacements
Every sweep test now has an entry, by area under tools/mcp/test-entries/, saying what it checks, how it decides pass
or fail and what it leaves unchecked, and TESTS.md holds the rules a new test is designed by before it is written.
The entries also design the Python tests that take the place of the replays, which leave the sweep as those land;
the fifteen operation replays that could not fail are removed now.
2026-11-19 05:40:47 +08:00
SoftFever 1d63e52dec Say action and Speed Dial, not tile and palette, in the MCP commands and docs
The MCP commands, their catalog and the docs called a command's Speed Dial entry a "tile" and the Speed
Dial itself "the palette", words the app already uses for an entry's icon and for sets of colours. They now
say "action" and "Speed Dial", as action_search and action_run do, and the catalog's tiles, tile_group and
in_palette fields are now actions, action_group and has_own_action. Speed Dial ids, and the pins people
stored under them, are unchanged.
2026-11-19 01:39:50 +08:00
SoftFever bbda030f4d Say menu item, not menu row, in the MCP commands and docs
The MCP command descriptions, docs and code called an entry of the app's
menus a "row", the word they also use for the rows of the object list and
the app's other lists. They now say "menu item", so a row is only ever a row
of a list or table. Command names, arguments and Speed Dial tile ids are
unchanged.
2026-11-19 00:35:28 +08:00
SoftFever ba02e96c27 Document every MCP command in one reference, the Design tab's in a section of its own
The commands outside the Design tab now have a reference like the Design tab's: what each does and
takes, which menu rows call it, which calls ask in a dialog and the call that does not. Both live in
docs/HLSD/mcp-tools.md, OrcaSlicer's commands first and the Design tab's at the end.
2026-11-18 19:17:04 +08:00
SoftFever d64e10f4dd Regroup the slicer's MCP commands and let each run from its arguments
Outside the Design tab an agent had 175 commands, 50 of them in the tool
list. There are now 118, named by what they act on (`object_`, `plate_`,
`preset_`, `filament_`, `plugin_` and so on), and 115 are listed. Each takes
its target and values in the call, acts on the selection when it names no
target and says what it acted on; an old name is refused. Printers and
system filaments install and uninstall, preferences read and write, plugins
enable, reload, uninstall and refresh, and objects reorder, with no dialog
to drive.

The Speed Dial keeps its 129 tiles under the same ids. Eight defects in the
rows these commands share with the menus are fixed. For a person: an object
row that cannot run says why instead of "Select an object first.", rows
that failed no longer claim success, Duplicate Plate can be undone, and
Refresh Plugins picked while a refresh runs now runs after it instead of
beside it.
2026-11-18 16:50:32 +08:00
SoftFever 74c98e197c Document the Design tab's command set 2026-11-16 21:40:27 +08:00
SoftFever 152168ee8a Give replay files a semver format version 2026-11-16 21:13:10 +08:00
SoftFever 81b93dd687 Rename and regroup the Design tab's MCP commands, and add the missing ones
The Design commands follow Fusion 360's names and grouping: one command per
job, with a `type` argument for its variants, so 133 commands become 88. An
old name or argument is refused. What the tab could do and no command
reached now has one: re-opening a committed sketch, selecting geometry,
confirming or cancelling an open tool, placing a body, sketch patterns and
dimensions, and text, SVG art and projected edges from arguments.

Ten defects in the Design tab's cards and sketch tools found on the way are
fixed. For a person: the Mirror tool binds a mirrored line or arc to its
source, Commit to Plate and Export STEP stop when the open card's Confirm
fails, and the Speed Dial keeps a query typed before its list arrives.
2026-11-16 19:50:08 +08:00
SoftFever 0604f25fd9 Make the MCP tool descriptions say what the tools do, and rename four misleading names 2026-11-16 05:14:35 +08:00
SoftFever ef23583a9a Report a project save that wrote nothing as not saved 2026-11-16 05:14:26 +08:00
SoftFever 03bda45dcf Keep layer G-code when New Project's prompt is cancelled or saves the project 2026-11-16 05:14:16 +08:00
SoftFever 053d409abb Name the Design tab's commands in the search_tools description 2026-11-16 05:14:16 +08:00
SoftFever 8cccdf82d0 Make the MCP test sweep pass on Windows
Windows now keeps one window per data folder, as macOS and Linux do.
2026-11-16 04:00:22 +08:00
SoftFever 38eadbe007 Click a partly shown list row, and let a refusal keep its result.json 2026-11-16 03:08:45 +08:00
SoftFever d2ab05eebf Run the MCP sweep on the desktop, and answer the certificate prompt 2026-11-16 02:02:48 +08:00
SoftFever ae6aba41f3 Rename the completion and result enums clear of Xlib's macros 2026-11-16 02:02:46 +08:00
SoftFever 5698fe1f7e Open every MCP test instance at 1600x900 in the top left of the screen 2026-11-15 15:51:58 +08:00
SoftFever 241240f844 Keep the Design toolbar at its own height when the Design tab first opens 2026-11-15 15:51:58 +08:00
SoftFever bf85189501 Cut the MCP test sweep's run time without losing coverage 2026-11-15 14:33:01 +08:00
SoftFever 72f9c4b28c Turn the automation's GUI instruments off when nothing drives the GUI 2026-11-15 03:26:55 +08:00
SoftFever dc96ff4ee5 Keep menu update handlers away from a freed context menu's items 2026-11-15 03:26:54 +08:00
SoftFever ab5f665e0a Keep the Speed Dial's Undo and Redo to where the Edit menu allows them 2026-11-15 03:26:46 +08:00
SoftFever ccfd16c51e Leave a Speed Dial command's unexpected exception to the app's handler 2026-11-15 03:26:46 +08:00
SoftFever 4eb5952232 Let a plugin file be named script.py or mcp.py 2026-11-15 03:26:38 +08:00
SoftFever 54c5c8d2a7 revert localization/i18n/OrcaSlicer.pot 2026-11-15 01:18:04 +08:00
SoftFever 3a1be8ff96 Expect keep_raw_video_file among the start_recording command's arguments 2026-11-15 01:03:43 +08:00
SoftFever e40a8a7ed5 Merge branch 'main' into feature/mcp 2026-11-15 01:01:57 +08:00
SoftFever 528d1d78f8 Keep only the MP4 of an encoded recording unless asked to keep the raw video file 2026-11-15 00:22:11 +08:00
SoftFever fece418ae0 Make the automation runtime its own subsystem, with MCP as one front end
Everything that drives OrcaSlicer by command (the dispatch of the command
catalog, jobs, the journal, replays, Python scripts, recordings) lived
inside the MCP server's service class. So Action Replay, the Run Script
panel, a plugin's tool call, a person's recording and a run from the
command line each had to start "the MCP service", with all of its GUI
hooks, although none of them needs a server or an agent.

The automation runtime is now a subsystem of its own. It starts the first
time a front end asks for it and knows none of them. The MCP endpoint
(HTTP, the protocol, the token, the discovery file, the takeover of a port
another window holds) is one front end beside the others, opened and
closed without stopping what the others run. The widget inspector, menu
capture and ImGui item recording are turned on only by a front end that
drives the GUI, so a person's recording or long command does not carry
them.

The part of the runtime that needs no GUI is the library
libslic3r_automation, built without wxWidgets and tested by its own suite,
automation_tests. A wx dependency in it fails to build, and its tests no
longer link the GUI library or the embedded Python.

The command line has one option set for this: --run FILE runs a replay or
a Python script once the GUI is ready, with --outputdir for its files, and
--unrestricted-scripts and --cad turn their settings on for one run
without saving them. --mcp-run, --mcp-run-out and --mcp-token are gone;
the scripts setting is python_scripts_unrestricted and a session's output
folder is <datadir>/automation/out. get_app_state reports ready and
version at the top level, and its mcp block describes the endpoint only.

No change to slicing output.
2026-11-14 23:41:01 +08:00
SoftFever b4be9d8374 Make the MCP harness and page tests pass reliably on a loaded machine and on macOS 2026-11-14 18:06:17 +08:00
SoftFever 72dc14c9d6 Fix MCP menu paths, CAD-off replies, test-instance sign-in, Preview focus and clang-tidy on macOS 2026-11-14 17:04:40 +08:00
SoftFever 69cd4ff3cd Open the Speed Dial with Space right after a tab switch, without a KWin title bar on Wayland 2026-11-14 16:02:39 +08:00
SoftFever c143a06dcf Fix the sketching test's undo check and a missing include found on Linux 2026-11-14 13:42:08 +08:00
SoftFever 822775179b Merge branch 'main' into feature/mcp 2026-11-14 01:05:25 +08:00
SoftFever 924a9dad9c Correct what command descriptions and the skill reference tell agents
A Design tile's command says it follows its right-click menu row and may
decline, export_config says how its rows are named, and the generated skill
reference says which commands are the person's own and how the Design tab is
turned on.
2026-11-14 00:21:37 +08:00
SoftFever 1ef24b7d34 Hold Speed Dial commands, MCP tools and Design tools in one command catalog
Every command takes JSON arguments and has one function for a person and for
automation: with no arguments it does what a person's pick does, and with
arguments it runs silently. The Design tab's CAD tools are commands that
call_tool runs, and they show as Speed Dial tiles on the Design tab.
2026-11-13 20:59:31 +08:00
SoftFever 0616068e26 Run commands, tools and the plugin API through one operations layer
A Speed Dial command, the MCP tool that does the same thing and the plugin
API's preset calls now run one shared operation, so every route accepts and
refuses the same states, with one wording and a code for each refusal. An
import by a command or a tool is one undo step, and import_file adds geometry
only.

The cases where two routes behaved differently now behave the same: a project
is not saved under a .gcode.3mf name, an empty project exports as .3mf but not
as STL, arrange runs from any view and with a gizmo open, a mixed-colour
filament slot is refused as one, a hidden preset is shown before it is
selected, and a layer is refused while the Preview has none.
2026-11-12 22:06:10 +08:00
SoftFever a9c73c76b2 Fix macOS issues found driving the app over MCP
set_window brings a window minimized while zoomed back to normal, and its documentation covers
raising windows and native dialogs. A right-click in the Design tab picks what it points at on
Retina displays, where the Design tab GUI tests now run too, and the Text dialog opens in a plain
font. The app no longer hangs when dialogs open and close with the display asleep, and no longer
crashes when a new project or a delete removes an object that has parts.
2026-11-12 01:39:39 +08:00
SoftFever 636367d143 Reduce script permissions to a single "run unrestricted" switch
Python scripts always run and follow the plugin permission checks; the switch in Preferences lets
them bypass the checks. Plugins call the tools and offer operations without a separate permission.
2026-11-11 22:23:28 +08:00
SoftFever 869d8a9b96 Merge branch 'main' into feature/mcp 2026-11-11 20:34:10 +08:00
SoftFever f5368b0483 Merge remote-tracking branch 'origin/main' into feature/mcp 2026-11-11 19:46:07 +08:00
SoftFever e7f7c4d1e9 Drop the old MCP names the server still read and the text that still used them
set_view's view, the print scope and window for the main window are refused
like any unknown name.
2026-11-11 19:25:09 +08:00
SoftFever 8bb18e84bf List objects by plate over MCP and call a part "part" in every tool
list_objects replies as the Objects panel is laid out: each plate with the
objects on it, then the objects on no plate. list_plates gives how many
objects a plate has, and every tool refuses a plate the project lacks in the
same words.
2026-11-11 18:31:00 +08:00
SoftFever 5e426b2cb7 Point MCP name misses at the right catalog and give each argument one name
A tool, Speed Dial action or CAD tool called through the wrong tool is told
where it runs, search_actions ranks a query's words as search_tools does, and
every list replies with items.

Renamed arguments: set_view's target and view are look_at and canvas,
list_widgets' root is target, mouse_gesture's path is waypoints, the presets'
changes is preset_changes, set_height_ranges' layer_config_ranges is ranges,
and the main window is "main" for screenshot and start_recording.

The harness's launch takes --python-scripts to allow Python scripts in the
instance it starts.
2026-11-11 18:31:00 +08:00
SoftFever ef301e132d Launch MCP harness instances on a private headless desktop on Linux, falling back to Xvfb 2026-11-11 17:32:05 +08:00
SoftFever 693b018dd3 Make set_window work on Wayland and on an X server without a window manager
Also keeps a polygon drawn near an axis regular in the Design tab, and lets the Design GUI tests run on Linux.
2026-11-11 16:13:40 +08:00
SoftFever a24bac6737 Load the flow ratio calibration models without the 3MF import dialog 2026-11-11 13:10:32 +08:00
SoftFever 69349c3f55 Mention set_window in the MCP server instructions and keep them under 4096 characters 2026-11-11 13:10:32 +08:00
SoftFever 042d6bc455 Add set_window and set_view camera target and zoom over MCP 2026-11-11 12:02:03 +08:00
SoftFever eb3ab975cf Report the selected sketch constraint over MCP and test badge selection in the Design GUI tests 2026-11-11 04:29:23 +08:00
SoftFever 58ff1f5244 Merge remote-tracking branch 'origin/main' into feature/mcp 2026-11-11 03:35:56 +08:00
SoftFever 6e9bdca2da Refuse MCP clicks on main menu items the app would show greyed 2026-11-11 01:04:51 +08:00
SoftFever 0935d49c83 Run the Design-tab GUI tests through MCP on every platform 2026-11-11 00:27:51 +08:00
SoftFever 5d17d49ab7 Let auto-answer rules answer file and folder pickers with a path 2026-11-11 00:27:43 +08:00
SoftFever d8d436a589 Fix four Design-tab sketch bugs the GUI tests found
A sketch with thousands of constraints no longer freezes the app, the first value field after launch
takes typed digits, an array's spacing and copy count can both be typed, and cancelling a new Text
removes it.
2026-11-11 00:27:39 +08:00
SoftFever 3f73a72998 Move the Design-tab GUI checks into the MCP tests 2026-11-11 00:27:33 +08:00
SoftFever af5ced0496 Report every bad example reference and describe the sketch code as it is 2026-11-10 06:01:32 +08:00
SoftFever 0aaf097a0c Build revolve's default rectangle beside the axis instead of across it 2026-11-10 05:48:31 +08:00
SoftFever 70b11c5174 Keep constraints among entities a sketch transform moves together 2026-11-10 05:48:30 +08:00
SoftFever c15fc319d4 Report degrees of freedom instead of -1 for sketches with no constraints 2026-11-10 05:48:29 +08:00
SoftFever 88a366dfb2 Report sketch loop areas as positive whichever way the loop runs 2026-11-10 05:48:09 +08:00
SoftFever 4dd989a9e3 Merge remote-tracking branch 'origin/main' into feature/mcp 2026-11-10 03:03:41 +08:00
SoftFever 3460d52058 Say which sheets thicken_surface refuses 2026-11-10 02:34:26 +08:00
SoftFever c2169c81d6 Describe thicken_surface's capped and simple paths as they are 2026-11-10 02:29:17 +08:00
SoftFever 699f518227 Finish describing the CAD sources and checks as they are 2026-11-10 02:13:49 +08:00
SoftFever fe98638cff Describe CAD checks and sketch code as they are, not as they were 2026-11-10 01:57:37 +08:00
SoftFever a3239db64f Tidy orca_mcp.py's CAD helper and its tests 2026-11-10 01:47:58 +08:00
SoftFever d5f6f33957 Clarify the CAD tool descriptions and examples 2026-11-10 01:45:39 +08:00
SoftFever 5a5e7b50b5 End the journal entry of a job that never runs 2026-11-10 01:30:45 +08:00
SoftFever 9bda81acf4 Keep the MCP journal's trim linear and its lock short 2026-11-10 01:30:45 +08:00
SoftFever 90bb0e6192 Describe orca_mcp.py's macOS datadir lookup as the stdio bridge's 2026-11-10 01:08:26 +08:00
SoftFever 5bfebec540 Correct when the Design tab is created and why sketch_set_value exists 2026-11-10 01:07:31 +08:00
SoftFever 97999d5123 Find a portable OrcaSlicer through a symlinked binary in orca_mcp.py 2026-11-10 00:57:47 +08:00
SoftFever e96da420c2 Pin the journal's byte accounting and the CAD table's id notes in tests 2026-11-10 00:54:31 +08:00
SoftFever 017963d5a5 Correct CAD docs and comments that disagree with the code 2026-11-10 00:54:31 +08:00
SoftFever 3b245fbc7b Remove the Design tab's Docker test setup and check its offer table in CI 2026-11-10 00:04:05 +08:00
SoftFever cbb2c7ad40 Run the CAD sketch checks against the app's MCP server 2026-11-09 23:51:41 +08:00
SoftFever 45188c9956 Bound the MCP journal by the size of its calls' arguments 2026-11-09 23:42:21 +08:00
SoftFever 7a5f2a3cab Give every CAD tool runnable examples 2026-11-09 23:27:32 +08:00
SoftFever 7a01a8bfea Give the CAD solid, dress-up and datum tools runnable examples 2026-11-09 23:08:24 +08:00
SoftFever 0ed0aa7e35 Give the CAD read and sketch tools runnable examples 2026-11-09 22:41:20 +08:00
SoftFever 1236c0793a Attach orca_mcp.py to a running app and call CAD tools from Python 2026-11-09 22:20:48 +08:00
SoftFever f2eddb7b48 Add list_cad_tools and describe_cad_tool and call CAD tools by tool and args 2026-11-09 22:06:41 +08:00
SoftFever 5b2fee9b10 Give every CAD tool a one-line summary and details 2026-11-09 21:35:05 +08:00
SoftFever 9c1d0e20ec Reach the Design tab only through the MCP server 2026-11-09 21:02:25 +08:00
SoftFever 0b9c47be29 Move the Design tab's MCP code next to the MCP server 2026-11-09 20:42:30 +08:00
SoftFever 348c801203 Keep the call_cad_tool registration with the Design tab's MCP code 2026-11-09 20:40:36 +08:00
SoftFever 70ca70ceb3 Give MCP tools plain names and call recorded tool lists replays 2026-11-09 20:21:02 +08:00
SoftFever 70842d3165 Add an MCP tool that lists open windows with refs for screenshots and input 2026-11-09 04:23:07 +08:00
SoftFever 643319c40b Split Run Script into Action Replay and a docked Python Run Script panel 2026-11-09 03:25:25 +08:00
SoftFever 025a17a875 Vendor Ace 1.45.2 for the script editors 2026-11-09 03:25:19 +08:00
SoftFever d56a80515f Move the MCP server only when its port is edited in Preferences 2026-11-08 16:04:04 +08:00
SoftFever fe12c41057 Fix Windows popup capture and MCP stalls in native menus and dialogs 2026-11-08 15:39:07 +08:00
SoftFever cd76a0ffdd Show context menus, dialogs and web views in macOS screenshots and recordings
Recording frames are also spaced as documented when capture is slow, and a drop-down that has left the screen is no longer drawn into macOS frames.
2026-11-08 01:38:33 +08:00
SoftFever ae5ccfbaa0 Keep MCP canvas clicks working when OrcaSlicer is in the background 2026-11-07 23:36:21 +08:00
SoftFever 4e11be7f3f Show popups in Windows and macOS recordings and screenshots 2026-11-07 22:24:11 +08:00
SoftFever 65d5867d61 Show popups, context menus and tooltips in Wayland recordings and screenshots 2026-11-07 22:15:34 +08:00
SoftFever 3a0dc1785d Show dialogs in Wayland recordings and stop blank Wayland window captures 2026-11-07 20:02:27 +08:00
SoftFever 15ee17cf92 Start OrcaSlicer from the stdio bridge only when a tool is called 2026-11-07 16:51:11 +08:00
SoftFever e5dcdd1247 Correct the MCP web fixture's comments on its thread command 2026-11-07 12:42:15 +08:00
SoftFever dc7f494d2b Give register_operation a signature Python can declare 2026-11-07 12:42:12 +08:00
SoftFever 7fef3a331d Give python_api's static methods their own documentation 2026-11-07 12:42:10 +08:00
SoftFever 6663dcbfb3 Show a reloaded local plugin's new version in the Plugins dialog 2026-11-07 12:42:07 +08:00
SoftFever 0548b7ea5e Show Speed Dial plugin refreshes and installs in an open Plugins dialog 2026-11-07 12:42:04 +08:00
SoftFever be94a6a0da Report why a local plugin install failed 2026-11-07 12:42:01 +08:00
SoftFever 09aa257c76 Let install_local_plugin take a plugin file's path 2026-11-07 12:41:59 +08:00
SoftFever a52e232385 Merge branch 'main' into feature/mcp 2026-11-07 03:12:51 +08:00
SoftFever eedd56991c Merge branch 'main' into feature/mcp 2026-11-07 02:51:37 +08:00
SoftFever 8b5bbcb7e8 Read a modal dialog's controls and values into its MCP message 2026-11-07 02:31:07 +08:00
SoftFever 56b03d7bdf Merge branch 'main' into feature/mcp 2026-11-05 18:07:30 +08:00
SoftFever 17a745e30c Merge branch 'main' into feature/mcp 2026-11-04 13:42:41 +08:00
SoftFever af8feda3b9 Let the MCP harness call api_call, whose argument is named tool 2026-11-04 13:20:13 +08:00
SoftFever 75d117f669 Explain in the MCP design doc why tools have no output schema 2026-11-04 12:28:00 +08:00
SoftFever 5e5571a99f Make the MCP tool descriptions shorter and consistent, with the UI locators described once 2026-11-04 04:03:04 +08:00
SoftFever 3050fbc6a6 Tell agents what list_objects ids are for and how paged replies continue 2026-11-04 03:22:00 +08:00
SoftFever 11ec4d8970 Show agents the selection, the Python setting and the Design tab in get_state 2026-11-04 02:06:30 +08:00
SoftFever 8f61a3a34e Let agents select hidden filaments and printers by name 2026-11-04 01:43:48 +08:00
SoftFever e4ee75e749 Ask for approval only on MCP calls that delete without undo, and mark the tools that reach outside the app 2026-11-04 01:06:55 +08:00
SoftFever ec0f3d864f Tell agents which scope a setting belongs to when they name the wrong one or none 2026-11-03 23:56:08 +08:00
SoftFever f776208c94 Document the whole orca Python API and search every catalog from api_describe 2026-11-03 23:10:10 +08:00
SoftFever ee0314dee2 Merge branch 'main' into feature/mcp 2026-11-03 16:28:57 +08:00
SoftFever cc05d87607 Run Python scripts like python file.py, with the whole plugin API 2026-11-03 16:12:04 +08:00
SoftFever 99018203de Add Python scripts and plugin tools to the MCP server
The MCP tools are listed in core, API and UI lanes. With Python scripts turned on in Preferences, agents
and people can run Python against the open app; plugins holding the tools permission can call the tools,
and plugins can offer operations of their own to agents. Calls can pin object and volume ids so a stale
index is refused, and run_script takes a script as JSON text as well as an object.
2026-11-02 16:05:13 +08:00
SoftFever f31843dcd1 Merge branch 'main' into feature/mcp 2026-11-01 17:40:28 +08:00
SoftFever 39705d7bb9 Make canvas screenshots taken right after a layer or view type change show the change 2026-11-01 17:39:07 +08:00
SoftFever 55bc33dad3 Merge branch 'main' into feature/mcp 2026-11-01 03:28:08 +08:00
SoftFever d6447efdb4 Merge branch 'main' into feature/mcp 2026-11-01 01:27:31 +08:00
SoftFever 7136e78c5b Name the open dialog when a script step times out waiting for its job 2026-10-31 23:45:23 +08:00
SoftFever b9127cb454 Tell MCP agents when a call fails because the display is off 2026-10-31 23:16:07 +08:00
SoftFever b90392d393 Report frames that failed to encode in stop_recording's result 2026-10-31 23:02:16 +08:00
SoftFever a07f29cf4f Stop the MCP stdio bridge leaving a quit OrcaSlicer as a zombie process 2026-10-31 23:02:16 +08:00
SoftFever 9f164e2a7b Make the MCP harness and its test scripts executable 2026-10-31 22:58:42 +08:00
SoftFever e4889b6acb Add missing includes in the MCP sources and the recording dialog 2026-10-31 22:51:21 +08:00
SoftFever b3d3374f8b Fix MCP canvas captures failing right after a tab switch on Wayland 2026-10-31 22:47:31 +08:00
SoftFever d6e2cd0a46 Merge branch 'main' into feature/mcp 2026-10-31 18:23:32 +08:00
SoftFever 457ed1aacb Let MCP agents read and drive web dialogs and plugin pages
Agents can also answer a native message box that is already open (Windows and Linux), and URLs in
replies hide credential values.
2026-10-31 17:56:38 +08:00
SoftFever fb07e32a9f Keep the Run Script dialog in sight while a script runs on macOS 2026-10-31 02:55:33 +08:00
SoftFever 16df8452f6 Show the recording and screenshot icons in the Speed Dial at full size 2026-10-31 02:23:57 +08:00
SoftFever 7bafc3928c Add a script editor with suggestions and saving to the Run Script dialog 2026-10-31 02:13:22 +08:00
SoftFever 58fee96e30 Keep the Run Script dialog in front after its file picker closes on macOS 2026-10-31 00:15:14 +08:00
SoftFever a4dffc92de Merge branch 'main' into feature/mcp 2026-10-30 23:53:28 +08:00
SoftFever 385471a32f Make the MCP tools easier for agents to use
get_settings now gives each setting's description and settings page and finds settings by what
they do, replacing explain_settings. set_view orbits the camera by degrees, the same on every
install, and a painting stroke that would miss the object is refused with the pixel to start it
at instead of turning the camera. Tools accept the argument names and forms agents commonly use,
save_project refuses a .gcode.3mf path, and select range-checks part and instance indices.
2026-10-30 23:43:23 +08:00
SoftFever 4439b743a8 Show a REC pill in the tab bar while a recording runs 2026-10-30 23:30:32 +08:00
SoftFever 48deb31a50 Let agents ask for an MP4 when starting a recording 2026-10-30 20:47:56 +08:00
SoftFever 15277639a0 Make recording overlays opt-in, with pointer and caption switches in Start Recording 2026-10-30 20:19:36 +08:00
SoftFever 6c1518aa61 Stop the app flickering while a recording runs on Windows 2026-10-30 19:23:12 +08:00
SoftFever c56d9968a1 Add app recording and screenshots for MCP agents and the Help menu
Agents can record OrcaSlicer to video, captioned with the current tool call, and encode it to MP4.
People get Take Screenshot and Start/Stop Recording in the Speed Dial and the Help menu, with a
dialog for the recording and encoding settings.
2026-10-30 18:41:40 +08:00
SoftFever 1761c4b0e6 update git ignore 2026-10-30 07:48:43 +08:00
SoftFever c9db694c32 Add a Run Script dialog for running MCP scripts in the app 2026-10-30 07:46:10 +08:00
SoftFever 2496ee0908 set window size to 1920x1200 for MCP scripts 2026-10-30 07:46:10 +08:00
SoftFever bd26585ec1 Add explain_settings so agents can look up what settings do
It returns each setting's full tooltip, its page and group, and its wiki link, maps every setting
by page and group, and finds settings by the words of their help text. get_settings no longer
includes tooltips in its metadata.
2026-10-30 04:33:07 +08:00
SoftFever 80e2128c1b Merge branch 'main' into feature/mcp 2026-10-29 22:22:51 +08:00
SoftFever 86a88267a8 Merge branch 'main' into feature/mcp 2026-10-29 20:22:16 +08:00
SoftFever a63410029a Point agents at the MCP harness instead of an in-repo skill 2026-10-29 20:08:06 +08:00
SoftFever db75a6dc37 Let MCP clients do the OrcaSlicer tasks the agent benchmark found missing 2026-10-29 20:02:27 +08:00
SoftFever 0fc5b70cf4 Let MCP clients drive every gizmo
Also fixes a crash when a script answers the primitive size dialog, the Simplify ratio box being
ignored, a Measure crash after a reload, and Mesh Boolean showing a bare "tool" label.
2026-10-29 04:14:43 +08:00
SoftFever fe6259ca08 Refuse Design tab reads while a rebuild owns the document 2026-10-29 02:18:14 +08:00
SoftFever 5c05a8e662 Merge branch 'main' into feature/mcp 2026-10-28 23:32:22 +08:00
SoftFever 8cf1075d89 Let users choose HTTP or stdio when adding OrcaSlicer to an agent 2026-10-28 22:32:19 +08:00
SoftFever f5254f90aa Give the MCP server its own AI features group in Preferences
The group shows whether agents can connect and at which address, and copies a
ready-made setup for Claude Code, Codex, opencode, DeepSeek Harness or other
apps. A second OrcaSlicer window on the same configuration folder says another
window is serving agents and takes the server over when that window closes.
2026-10-28 21:58:47 +08:00
SoftFever 7791044458 Make MCP mouse modifiers mean the same keys as ui_key 2026-10-28 20:56:04 +08:00
SoftFever 854430d747 Report native dialogs that hold the MCP UI thread on macOS 2026-10-28 20:40:54 +08:00
SoftFever f4f997b8e0 Let a cancel stop an MCP slice that is still waiting to start 2026-10-28 19:43:10 +08:00
SoftFever 809cbc9801 Run the MCP harness on Windows 2026-10-28 19:43:10 +08:00
SoftFever b1af9a68eb Fix MCP server build on Windows 2026-10-28 19:43:10 +08:00
SoftFever 964fa5e741 Say which queued automatic reslice a cancel drops 2026-10-28 19:43:10 +08:00
SoftFever c7b9cd6741 Drop the automatic-reslice due-time check that wx timers make unnecessary 2026-10-28 19:43:10 +08:00
SoftFever d8e41ea138 Count only runs a slice request started as the MCP slice's own, and ignore stale auto-reslice timer events 2026-10-28 19:43:09 +08:00
SoftFever fb918fa900 Keep a queued automatic reslice from overtaking a later delayed one 2026-10-28 19:43:09 +08:00
SoftFever 603d38b9c9 Report a refused MCP slice request as an error, and keep cancelled automatic reslices from running 2026-10-28 19:43:09 +08:00
SoftFever 1f06eda308 Report each plate from the MCP slice's own run, and drop a queued automatic reslice on cancel 2026-10-28 19:43:09 +08:00
SoftFever 23f04a5bc4 Keep MCP slice results standing and free the service only once idle
A slice requested after an MCP slice finished no longer marks it superseded, a slice already
running when MCP asks counts as its own, and Slice All reports an invalid plate's validation
message. The Preview tab shows after an MCP slice, as after the Slice button. Point settings
accept [x, y] pairs, a ui_mouse move drags while a button is held, a tab can be captured, and
dialog rules a client sets after the server is turned off are refused.
2026-10-28 19:43:09 +08:00
SoftFever 71e4d23e88 Note the CA bundle a headless MCP script run needs on Linux 2026-10-28 19:43:09 +08:00
SoftFever c8c37986ac Keep MCP calls safe across shutdown and UI rebuilds, and attribute slices to their own runs
Also handles non-ASCII paths on Windows, lets file pickers only be auto-cancelled, ends a client's auto-answers when the server is turned off, gives the stdio bridge deadlines, and adds notebook tabs, ImGui checkboxes and index-aware locators to GUI automation.
2026-10-28 19:43:09 +08:00
SoftFever 91f4bd2bcc Include the headers the MCP code uses directly 2026-10-28 19:43:09 +08:00
SoftFever 6ffe80a6a8 Describe how screenshots handle Wayland decorations and undrawn 3D views 2026-10-28 19:43:09 +08:00
SoftFever e74be335ba Retake a screenshot whose 3D view has not drawn yet 2026-10-28 19:43:09 +08:00
SoftFever 1b13b1aaf3 Scroll a widget into view before taking its screenshot 2026-10-28 19:43:09 +08:00
SoftFever 84b1a28446 Align Wayland window screenshots with the window as it shows 2026-10-28 19:43:09 +08:00
SoftFever 367030a20e Capture a single widget or window by ref, cancel a given job, and count a pending auto-reslice as slicing 2026-10-28 19:43:09 +08:00
SoftFever 47747478d5 Keep plate selection from superseding an MCP Slice All 2026-10-28 19:43:09 +08:00
SoftFever 39d921d921 Check that a dialog can be answered while stalled MCP clients hold every connection 2026-10-28 19:43:09 +08:00
SoftFever 0fed1f6077 Document the MCP server and add an agent skill for driving OrcaSlicer 2026-10-28 19:43:09 +08:00
SoftFever c47e1843d9 Turn the MCP server on and off, change its port and renew its token from Preferences 2026-10-28 19:43:09 +08:00
SoftFever 30e4af9e68 Scroll GUI targets into view and prefer the field a label names 2026-10-28 19:43:09 +08:00
SoftFever f30a969b60 Show OrcaSlicer's own popups in X11 window screenshots 2026-10-28 19:43:09 +08:00
SoftFever 22e5d79410 Run and export MCP scripts, and reach the Design tab through the MCP server 2026-10-28 19:43:09 +08:00
SoftFever 47a90ff25e Let MCP clients inspect and drive the GUI, answer dialogs and run web view scripts 2026-10-28 19:43:09 +08:00
SoftFever dc522e59e4 Start an opt-in MCP server with slicer, preset, action and screenshot tools 2026-10-28 19:43:09 +08:00
SoftFever 16c4ef8675 Add the MCP protocol, loopback transport and job core 2026-10-28 19:43:08 +08:00
1087 changed files with 218576 additions and 17789 deletions
+8 -2
View File
@@ -18,7 +18,8 @@ CheckOptions:
# Headers that declare a symbol but are not the one to include: per-platform
# implementations of wxWidgets and Boost.Thread (a Linux run would suggest the
# GTK or pthread one), library internals and forward declarations (MSVC's STL
# __msvc_* and the Windows UCRT's corecrt_* included), CPython's headers behind
# __msvc_*, the Windows UCRT's corecrt_*, libc++'s __*/ directories and the
# macOS SDK's _*.h behind its C headers included), CPython's headers behind
# Python.h (python3.x/ on Linux and macOS, libpython/include/ on Windows),
# curl's behind curl.h, oneTBB's behind tbb/, and
# admesh's stl.h, which the include path also exposes without its directory.
@@ -31,7 +32,8 @@ CheckOptions:
# The boost/process headers are only included through Utils/BoostProcessCompat.hpp.
# FFmpeg's C headers are left alone because they are only included inside
# extern "C", which an inserted include would miss. OS-specific headers (GLib,
# GTK, D-Bus, POSIX, the Windows SDK) are only used inside platform #if blocks,
# GTK, D-Bus, POSIX, the Windows SDK, the macOS SDK's frameworks and MacTypes.h)
# are only used inside platform #if blocks,
# and an include added at the top of the file would break the other platforms'
# builds. A symbol these provide is not reported missing.
# Write every / as [/\\] so the patterns also match Windows paths.
@@ -46,6 +48,8 @@ CheckOptions:
bits[/\\].*;
corecrt_.*\.h;
__msvc_.*\.hpp;
__[a-z0-9_]+[/\\].*;
[/\\]_[A-Za-z0-9_]+\.h;
boost[/\\]multiprecision[/\\]fwd\.hpp;
imconfig\.h;
expat_external\.h;
@@ -68,6 +72,8 @@ CheckOptions:
termios\.h;
[/\\](um|shared)[/\\].*;
sal\.h;
\.framework[/\\].*;
MacTypes\.h;
tchar\.h;
clipper[/\\]clipper\.hpp;
png(lib)?conf\.h;
@@ -1,86 +0,0 @@
# DELEGATION SPECIFICATION: HARNESS-DRIVEN VALIDATION LOOP
slug: sketch-focus-arbiter · repo: /home/tommaso/projects/apps/orca_cad · branch: cad-mainline
## 1. TARGET GOAL
**Functional Objective.** Keyboard input in the Design tab is routed by WHAT THE KEY IS, not by
which widget the window manager decided to focus. Adopted from FreeCAD's
`DrawSketchKeyboardManager::detectKeyboardEventHandlingMode`
(src/Mod/Sketcher/Gui/DrawSketchKeyboardManager.cpp), which never queries focus at all:
- digit, `-`, `.`, `,` -> the open value field
- Backspace / Delete -> the open value field (when one is open)
- Enter / Return / Tab -> commit the field, control returns to the view
- a letter -> the sketch-tool shortcut map, as today
- Esc -> the existing CadLevel LIFO (DesignInteraction.hpp), unchanged
- anything else -> sticky: whoever had it keeps it
Observable postcondition: for EVERY sketch tool that opens a value field, a value typed
immediately after the field appears — with NO click into the field — is the value committed.
Today the prefill is committed instead whenever the WM withholds focus.
**Target Files / Scope (writable).**
src/slic3r/GUI/CAD/DesignPanel.cpp (the arbiter lives in the existing wxEVT_CHAR_HOOK)
src/slic3r/GUI/CAD/DesignCanvas.cpp/.hpp (forwarding entry points only)
src/slic3r/GUI/CAD/SketchInlineEditor.cpp/.hpp (accept a programmatically delivered character)
scripts/CAD/check-gui-click-edit.py (F2P oracle — authoring exception, see §4)
Everything else read-only. No dependency additions, no reformatting.
**Open Bindings.**
- The in-canvas ImGui field on wip/in-canvas-value-field is NOT in scope. Default: the arbiter
is implemented against the CURRENT wxFrame field on cad-mainline, because content-based
routing makes the window's focus irrelevant either way. If it later moves in-canvas the
arbiter is unchanged.
- Tools whose field is opened by a toolbar button rather than a gesture (Constrain path) are
covered by the same arbiter but are not in the F2P tool list. Default: assert them in P2P only.
## 2. HARNESS ENVIRONMENT & GROUND TRUTH
The rig container `orcacad-gui` on nativedev IS the harness. Xvfb `:11` + openbox, the app under
test, `xdotool` for synthetic input, and an MCP socket at `/tmp/mcp.sock` that reports sketch
state as JSON. It is a closed loop: drive input, read geometry back, assert. No window manager
politics, no human.
Harness interface (ordered; each slot one invocation, one exit code):
S1 sync docker cp <file> orcacad-gui:/OrcaSlicer/<path>
S2 build docker exec orcacad-gui ninja -C /OrcaSlicer/build orca-slicer
S3 restart docker exec orcacad-gui /OrcaSlicer/scripts/CAD/start-headless-gui.sh
S4 F2P docker exec -e DISPLAY=:11 orcacad-gui python3 /tmp/check-gui-click-edit.py --attach
S5 P2P docker exec -e DISPLAY=:11 orcacad-gui python3 /tmp/check-gui-sketching.py
**F2P.** `scripts/CAD/check-gui-click-edit.py`. For each of Line, Rectangle, Circle, Slot,
Polygon, Ellipse and Rounded rectangle: arm the tool, draw it, and type a value that differs
from the prefill WITHOUT clicking the field. Assert the committed value equals the typed value.
The ladder must FAIL against unmodified cad-mainline — that is what proves it asserts something.
**P2P.** `scripts/CAD/check-gui-sketching.py`, the existing gesture ladder, minus anything red at
baseline. NOTE: it calls `focus_field()` — one click into the field before typing — which is the
workaround this whole task removes. It stays green as a regression guard; it is NOT evidence.
**Test Integrity Constraint.** `focus_field()` in check-gui-sketching.py must NOT be deleted to
make things pass, and check-gui-click-edit.py must NOT be weakened. Either invalidates the run.
## 3. VERIFICATION COMMANDS
1. Static: `docker exec orcacad-gui ninja -C /OrcaSlicer/build orca-slicer` (warnings delta only;
this repo configures no linter — the compiler is the static gate. Absolute-zero is NOT the gate.)
2. Harness: `docker exec -e DISPLAY=:11 orcacad-gui python3 /tmp/check-gui-click-edit.py --attach`
3. Regression: `docker exec -e DISPLAY=:11 orcacad-gui python3 /tmp/check-gui-sketching.py`
## 4. CONVERGENCE LOOP — ceiling 8 iterations
EDIT (scoped) -> EXECUTE S1..S5 -> PARSE the ladder's per-tool assertions and the [UX]/[KEYTRACE]
lines -> PATCH from the parsed cause. On ceiling without convergence: stop, report the last diff
and the unresolved failure set. Do not report success.
F2P authoring exception: check-gui-click-edit.py is writable, and must be shown RED against
unmodified source before any source edit counts.
## 5. TERMINATION CRITERIA
- [ ] S2 exits 0, and introduces no compiler warning absent from the baseline.
- [ ] S4 ALL_PASSED — every tool commits the typed value, no click into the field.
- [ ] S5 shows zero regressions against its recorded baseline pass count.
- [ ] F2P proven red without the fix (source stashed, ladder re-run, must FAIL).
## 6. GUARDRAILS
Zero-assumption: no completion claim without captured stdout and exit codes. Oracle supremacy:
the ladder's verdict overrides my judgement. Blast radius: §1 files only. Baseline obligation:
run §3 once before the first edit and record it.
@@ -796,7 +796,12 @@ append_shortcut_item(export_menu, Shortcut::ExportSlicedFile, true, _L("Export p
NULL" (`:3438-3445`). `wxEVT_CHILD_FOCUS` derives from `wxCommandEvent` and propagates, and its
window is the *direct* child (`:3453-3491`).
- `wxPanel::SetFocus` focuses the first child if "the control has at least one child";
`SetFocusIgnoringChildren()` focuses the panel itself (`interface/wx/panel.h:125-142`).
`SetFocusIgnoringChildren()` focuses the panel itself (`interface/wx/panel.h:125-142`). **[source]**
Not while the focus is on the panel or inside it: `wxControlContainerBase::DoSetFocus()` returns at
once when `FindFocus()` or one of its parents below the top-level window is the panel, so a panel that
holds the focus itself keeps it (`src/common/containr.cpp:110-149`). Otherwise it focuses the child
that had the focus last, if it is still shown, else the first child that `CanAcceptFocusFromKeyboard()`
(`:605-700`).
- `wxGetActiveWindow()` "always returns NULL in the other ports", i.e. on everything but MSW and GTK
(`interface/wx/window.h:4545-4551`).
@@ -811,6 +816,10 @@ append_shortcut_item(export_menu, Shortcut::ExportSlicedFile, true, _L("Export p
`MSWEnableHWND`). Any `WM_SETFOCUS`, `WM_KILLFOCUS` or button-down in a window outside
`wxCurrentPopupWindow` dismisses a transient popup that lacks `wxPU_CONTAINS_CONTROLS`
(`src/msw/window.cpp:3018-3033` → `MSWDismissUnfocusedPopup`, `src/msw/popupwin.cpp:218-229`).
- **macOS:** hiding a window that holds the focus moves it to the next view AppKit can focus, which can
be a `wxPanel` just shown beside it rather than that panel's control; a `SetFocus()` on that panel then
leaves the focus on the panel (see Contract). Seen in `Plater::priv::set_current_panel` on a switch from
Prepare to Preview.
- **Modeless windows:** focus requested right after `Show()` can be dropped while activation is still
in flight (Orca comment in `SpeedDialWebDialog`'s ctor). Set it from `CallAfter` or on
`wxEVT_ACTIVATE` (`SpeedDialWebDialog`'s activate handler, see `references/popups-menus.md`); the
@@ -846,6 +855,14 @@ append_shortcut_item(export_menu, Shortcut::ExportSlicedFile, true, _L("Export p
e.Skip(); });
```
Cite: `GLCanvas3D::on_mouse`.
- **Rule:** To give a view the keyboard, focus its control, not the panel that holds it.
**Why:** a panel that holds the focus itself keeps it, and on macOS that is where hiding a focused
sibling leaves it, so the view's keys wait until the pointer enters it.
```cpp
// Wrong: current_panel->SetFocusFromKbd();
// Right: get_current_canvas3D()->force_set_focus(); // the shown view's canvas
```
Cite: `Plater::priv::set_current_panel`.
- **Rule:** Defer focus changes out of `wxEVT_KILL_FOCUS`, and always `Skip()` focus events.
```cpp
// Wrong: ctrl->Bind(wxEVT_KILL_FOCUS, [=](wxFocusEvent&) { other->SetFocus(); });
@@ -58,7 +58,8 @@ Contents: [Rules](#rules) · [Why the library exists](#why-the-library-exists)
18. `ProgressBar` colours are painted unmapped and its colour-setter names are swapped; use `SetHeight` for thin bars.
→ §ProgressBar
19. Transient popups derive from `PopupWindow`; on MSW call `BindUnfocusEvent()` when the popup must close with the
frame. → §PopupWindow
frame. An opener that toggles the popup starts its click handler with `if (popup.CloseOnToggle()) return;`.
→ §PopupWindow
20. Children of a `LabeledStaticBox` are created with the box as parent; its label is fixed at `Create()`.
→ §StaticBox, LabeledStaticBox, StaticLine
21. Links are `HyperLink`, or a `Label` given `LB_HYPERLINK` through `SetWindowStyleFlag` (the constructor ignores it).
@@ -929,7 +930,10 @@ Command events from controls inside the popup stop at the popup on MSW and macOS
`wxWS_EX_BLOCK_EVENTS` (`src/gtk/popupwin.cpp`; `references/events.md §5`); bind them on the popup or its children,
as `ComboBox` binds `drop`'s `wxEVT_COMBOBOX`, and don't let an ancestor's unfiltered handler also act on them. When a click on the opener both
dismisses and reopens the popup, gate the reopen on `DropDown::HasDismissLongTime()` or an equivalent timestamp.
Dismissal contracts, per-port mechanics and parenting rules: `references/popups-menus.md`.
On macOS and GTK, `Popup()` does nothing while the popup is shown, and first removes the handlers a `Hide()`
left; on MSW it is wx's `Popup()`. An opener whose next click closes the popup starts its click handler with
`if (popup.CloseOnToggle()) return;`. Dismissal contracts, per-port mechanics, parenting rules and these two
members: `references/popups-menus.md` §2, §5, §6.
## ProgressDialog, WebView and device-page composites
@@ -771,6 +771,14 @@ required by other styles (#23575)" (`docs/changes.txt:581`). Commit eefdabcd98 a
gtk_window_begin_move_drag(GTK_WINDOW(m_frame->m_widget), 1, p.x, p.y, gtk_get_current_event_time());
```
Cite: `BBLTopbar::OnMouseLeftDown`; `ResizeEdgePanel::OnLeftDown` (`MainFrame.cpp`).
- **Rule:** On X11, never move or resize a borderless frame that is maximized or fullscreen:
`window_pos_restore` skips `SetSize` for a maximized save, and `window_pos_sanitize` returns early.
**Why:** a client-side resize that lands on exactly the monitor rect counts as a legacy fullscreen
request to Mutter/Muffin (`force_fullscreen` defaults on) for an undecorated window without
`_GTK_FRAME_EXTENTS`, so the frame came up `_NET_WM_STATE_FULLSCREEN` and an auto-hide panel became
unreachable (#17191). It needs a work area equal to the monitor to reproduce, i.e. a panel that
reserves no strut. Windows and macOS keep that `SetSize`: it is what gives Restore Down a saved
normal size.
### macOS: a native titled window
@@ -30,7 +30,9 @@ Contents: [Rules](#rules) · [1. Choosing the window kind](#1-choosing-the-windo
2. Size the popup (`SetSizerAndFit`/`SetSize`) **before** `Position()`, and pass the *anchor's* height as the
second argument: `Position(anchor->ClientToScreen({0,0}), {0, anchor->GetSize().y})`. (§3)
3. On macOS, anchor a hover-driven transient popup flush against its opener, with no pixel gap. (§3)
4. Never call `Popup()` on a popup that is already shown: guard with `if (!popup->IsShown())`. (§2)
4. Never call `Popup()` on a popup that is already shown: guard with `if (!popup->IsShown())`. On macOS and GTK
a repeat hangs a raw `wxPopupTransientWindow`; `PopupWindow::Popup()` ignores it there. On MSW a repeat moves
the focus into the popup again, the one case to call it on purpose (`DropDown::mouseReleased`). (§2, §6)
5. Destroy a popup with one `Destroy()`, typically from `wxEVT_SHOW` when it hides. Never `delete` it or
call `Destroy()` twice. (§2)
6. Command events from controls inside a popup stop at the popup (`wxWS_EX_BLOCK_EVENTS`) on MSW and macOS,
@@ -41,7 +43,9 @@ Contents: [Rules](#rules) · [1. Choosing the window kind](#1-choosing-the-windo
`OnDismiss()`. (§2)
9. `ProcessLeftDown` is never called on MSW. Keep-open logic needs a per-platform path. (§2, §5)
10. A control that opens a popup on click must debounce reopening right after a dismissal
(`DropDown::HasDismissLongTime`), because the dismissing click reaches the opener on MSW and macOS. (§5)
(`DropDown::HasDismissLongTime`), because the dismissing click reaches the opener on MSW and macOS. An
opener whose next click closes its `PopupWindow` starts its handler with `if (popup.CloseOnToggle()) return;`,
so a click that reaches it while the popup is shown closes the popup instead of reopening it. (§5, §6)
11. On MSW, a popup that must close when the frame deactivates or minimizes calls `BindUnfocusEvent()`. On
macOS, nothing dismisses a popup on app deactivation. (§5, §6)
12. On macOS, re-verify the cursor with `GetClientRect().Contains(ScreenToClient(wxGetMousePosition()))`
@@ -128,11 +132,16 @@ Contents: [Rules](#rules) · [1. Choosing the window kind](#1-choosing-the-windo
(`src/common/popupcmn.cpp:536-543`, inside `#ifndef __WXMSW__`). `src/msw/popupwin.cpp` has no click
handler. An override that returns true does not keep the popup open on Windows (§5).
- **`Popup()` must not run on a shown popup (non-MSW).** `Popup()` pushes `m_handlerPopup` onto `m_child` and
`m_handlerFocus` onto the focus window every time (`popupcmn.cpp:308-332`). The "still in use" asserts are
compiled out in Orca. A second push links the handler chain into a cycle, and the next event that no handler
`m_handlerFocus` onto the focus window every time (`popupcmn.cpp:308-332`). The "still in use" asserts there
and `PushEventHandler`'s "shouldn't be part of a wxEvtHandler chain" assert (`src/common/wincmn.cpp:1414-1416`)
are compiled out in Orca. A second push links the handler chain into a cycle, and the next event that no handler
in the cycle consumes loops forever in `wxEvtHandler::DoTryChain` (`src/common/event.cpp:1591-1640`), so the
app hangs. On MSW, `Popup()` is just `Show()` plus an optional `SetFocus` (`src/msw/popupwin.cpp:184-193`), so
a repeat is harmless there.
- **Only `Dismiss()` removes the handlers.** `PopHandlers()` removes them and clears `m_child` and `m_focus`; wx
calls it from `Dismiss()` and from the destructor (`popupcmn.cpp:246-284`, 432-436). `Hide()` (`Show(false)`,
335-430) leaves them pushed, so a `Hide()` followed by `Popup()` builds the same cycle as a repeated `Popup()`.
`PopupWindow::Popup` guards both cases (§6).
- **`Destroy()` is deferred.** The popup goes into `wxPendingDelete`, and a second `Destroy()` fails a silent
`wxCHECK` "Shouldn't destroy the popup twice." (`popupcmn.cpp:209-221`). The comment explains why: "The popup
window can be deleted at any moment, even while some events are still being processed for it".
@@ -170,7 +179,9 @@ A popup created per open is a child of its parent until it is destroyed. Destroy
**Pitfalls.**
- **Rule:** Guard every `Popup()` call with `IsShown()`.
**Why:** On non-MSW ports the second push creates a cycle in the handler chain and the app hangs on the next
unconsumed event. MSW is unaffected, which hides the bug from Windows testing.
unconsumed event. MSW is unaffected, which hides the bug from Windows testing. `PopupWindow::Popup()` ignores a
repeat on macOS and GTK, so a missing guard on a `PopupWindow` no longer hangs, but a raw
`wxPopupTransientWindow` (or a `wxTipWindow`) still does, and on MSW the repeat still moves the focus.
```cpp
// Wrong: re-pops on every motion or click
void on_motion(wxMouseEvent&) { m_popup->Popup(); }
@@ -178,8 +189,8 @@ A popup created per open is a child of its parent until it is destroyed. Destroy
void on_motion(wxMouseEvent&) { if (!m_popup->IsShown()) m_popup->Popup(); }
```
Cite: `DropDown::mouseMove` (`if (!drop.IsShown()) drop.Popup(&drop)`), `SearchObjectDialog::Popup`
(`if (m_is_dismissing || this->IsShown()) return;`). `Button::OnParentMotion` may re-pop its `wxTipWindow` on
every move only because `Button::EnableTooltipEvenDisabled` is MSW-only.
(`if (m_is_dismissing || this->IsShown()) return;`), `PopupWindow::Popup`. `Button::OnParentMotion` may re-pop
its `wxTipWindow` on every move only because `Button::EnableTooltipEvenDisabled` is MSW-only.
- **Rule:** Veto in `Dismiss()`. In `OnDismiss()`, act only if the popup really closed.
**Why:** `DismissAndNotify` calls `OnDismiss` unconditionally after `Dismiss`.
```cpp
@@ -434,6 +445,21 @@ geometry-based dismissal checks must use focus instead (§8).
```
Cite: `DropDown::HasDismissLongTime` (≥20 ms after `OnDismiss`, used by `ComboBox::mouseDown`),
`StatusPanel::on_switch_speed` (`speed_dismiss_time`, 200 ms).
- **Rule:** An opener whose next click closes its popup closes a shown popup with `CloseOnToggle()` before it
does anything else.
**Why:** A click can reach the opener while the popup is still shown. A person's click never does on macOS or
GTK, where the popup's capture or grab takes the click and closes the popup first. A mouse event sent straight
to the opener does, such as the MCP server's `widget_click`, and calling `Popup()` from it would re-pop the
shown popup. On MSW a person's click does too, before the deferred deactivation closes a
`wxPU_CONTAINS_CONTROLS` popup. wx's own combo control toggles the same way: `wxComboCtrlBase::OnButtonClick`
hides a shown popup and opens a hidden one (`src/common/combocmn.cpp:2060-2079`).
```cpp
// Wrong: a click that arrives while the popup is shown re-pops it
void on_opener_click(wxMouseEvent&) { if (!in_debounce()) m_popup.Popup(); }
// Right
void on_opener_click(wxMouseEvent&) { if (m_popup.CloseOnToggle()) return; if (!in_debounce()) m_popup.Popup(); }
```
Cite: `MonitorPanel::on_printer_clicked`, `CalibrationPanel::on_printer_clicked`.
- **Rule:** Don't rely on `ProcessLeftDown` to keep a popup open on Windows.
**Why:** MSW never calls it.
```cpp
@@ -456,6 +482,8 @@ class PopupWindow : public wxPopupTransientWindow {
public:
PopupWindow(wxWindow* parent, int style = wxBORDER_NONE);
bool Create(wxWindow* parent, int flags = wxBORDER_NONE);
void Popup(wxWindow* focus = nullptr) override; // macOS/GTK: no-op while shown (§2)
bool CloseOnToggle(); // for an opener that toggles it (§5)
#ifdef __WXGTK__
bool Show(bool show = true) override; // hides GTK tooltips first on Wayland (§9)
#endif
@@ -476,6 +504,20 @@ What it adds per platform:
| macOS | Only with `wxPU_CONTAINS_CONTROLS`: `OnMouseEvent2`, bound on the popup for `LEFT_DOWN/UP/DCLICK`, `MOTION` and `MOUSEWHEEL`, hit-tests the children (static `HitTest`) and re-dispatches the event to the deepest child under the cursor with `ProcessEventLocally`. On `MOTION` it synthesizes `ENTER`/`LEAVE` for the hovered target. This compensates for the capture rerouting in §5. |
Details [source] (`Widgets/PopupWindow.cpp`).
- `Popup()`: on macOS and GTK it returns at once while `IsShown()`, and when `m_child` or `m_focus` is still set
(a `Hide()` without `Dismiss()` left the handlers pushed) it calls `PopHandlers()` before wx's `Popup()` (§2).
`m_child`, `m_focus` and `PopHandlers()` are protected members of wx's non-MSW `wxPopupTransientWindow`
(`include/wx/popupwin.h:178-193`). The test wx's destructor uses, `m_handlerPopup->GetNextHandler()`, does not
compile outside wx: `wxPopupWindowHandler` is only forward-declared there (`include/wx/popupwin.h:154`). On MSW
it is wx's `Popup()`, unchanged: a repeat there moves the focus into the popup, which `DropDown::mouseReleased`
relies on to focus a sub-list that hovering already showed. An override of `Popup()` keeps the guard only if it
ends in `PopupWindow::Popup(focus)`, as `DropDown::Popup` and `SearchDialog::Popup` do.
- `CloseOnToggle()` returns false while the popup is hidden. While it is shown it returns true, and on macOS and
GTK it first closes the popup with `DismissAndNotify()`, so `OnDismiss()` runs as for a click outside. On MSW it
only returns true. A person's click that reached the opener also deactivated a `wxPU_CONTAINS_CONTROLS` popup,
and wx's deferred `DismissOnDeactivate` calls `DismissAndNotify()` without checking `IsShown()`
(`src/msw/popupwin.cpp:200-216`), so closing it here would run `OnDismiss()` twice. A click sent straight to the
opener deactivates nothing, so on MSW it leaves the popup open.
- `GetTopParent(w)` returns the first *strict* ancestor of `w` that is a `wxNonOwnedWindow`, or the root if there
is none. `Create` starts from `parent`, while `BindUnfocusEvent` and the destructor start from the popup. When
`parent` is itself a top-level window with a parent (a dialog), `Create` therefore binds the dialog's parent
@@ -1242,6 +1284,10 @@ macOS. On MSW it breaks `wxTopLevelWindowMSW::OnActivate`'s focus restore in the
- `append_shortcut_item` records the item in `m_shortcut_menu_items`, and `update_shortcut_labels()` rewrites the
labels with `SetItemLabel` after the user rebinds a key. Menu text for a registry shortcut always goes through
these helpers, never through a hard-coded `"\tCtrl+X"`.
- `GetItemLabelText()` drops a key after `"\t"` but keeps one after `" - "`, so on macOS it returns the label with
the key text. `MainFrame::menu_item_label()` gives a menu bar item's label without it, from the label the item was
made with: the MCP server names menu items by it, so a menu path is the same on every platform. A menu bar item
that writes a fixed key after `sep` itself, outside these helpers, records its plain label in `m_key_text_items`.
**`Plater::PopupMenu(menu, pos)`** (`Plater.cpp`).
- It calls `wxGetApp().mainframe->PopupMenu(menu, pos)`. The invoking window is MainFrame, so **`pos` is in
@@ -1296,7 +1342,9 @@ wxMenuItem* append_menu_check_item(wxMenu*, int id, const wxString&, const wxStr
pass `nullptr`.
- A non-null `parent` binds a `wxEVT_UPDATE_UI` handler for that id on `parent` that is never unbound. It calls
`enable_menu_item` (`evt.Enable(cb_condition())`), which on macOS also re-applies the icon, grayscale when
disabled, on every validation (§14). `append_menu_check_item` binds `Enable` + `Check` the same way.
disabled, on every validation (§14). It finds the item by the event's id in the menu that sent the event and
keeps no pointer to it: the handler outlives a menu that is destroyed and an item that is removed.
`append_menu_check_item` binds `Enable` + `Check` the same way.
`append_menu_radio_item` takes no conditions.
- Without `parent`, `cb_condition` is ignored: no enable callback is wired.
@@ -33,7 +33,7 @@ Contents: [Rules](#rules) · [1 Creating and parenting](#1-creating-and-parentin
8. A `wxEVT_DESTROY` handler on a parent fires for every descendant: compare `GetEventObject()` and `Skip()`. For a top-level window it runs after the derived destructor — do derived cleanup in the destructor. §3
9. Accessors reachable from teardown-time events return `nullptr` instead of dereferencing a pimpl or child; the real fix is still to stop the events first. §3
10. Bring a top-level window forward with `if (!w->IsShown()) w->Show(); w->Raise();` — `Raise()` never shows, and a redundant `Show()` is not inert on GTK3. §4
11. On macOS, after a native modal (file/dir dialog, native message box) or a generic progress dialog opened from a secondary top-level window, re-raise that window with a deferred, liveness-guarded `Raise()`. §4
11. On macOS, after a native modal (file/dir dialog, native message box) or a generic progress dialog opened from a secondary top-level window, re-raise that window with a deferred, liveness-guarded `Raise()`. A dialog that raises the main window itself and must stay in sight meanwhile is a Cocoa child window of it for that span (`keep_window_above`). §4
12. Remove style bits with `& ~flag`, never `!flag`. §5
13. Always pass the style to a `DPIDialog`: the `DPIAware` default is `wxDEFAULT_FRAME_STYLE` (resizable, min/max boxes). §5, §7
14. A `wxFRAME_FLOAT_ON_PARENT` frame takes a non-null top-level parent (parent to `mainframe`, not to a panel). §5
@@ -463,12 +463,14 @@ ignored (observed; recorded in `GUI_App::window_pos_restore`, not documented by
**OrcaSlicer geometry persistence.** Orca uses `AppConfig`, not `wxPersistentTLW`:
`GUI_App::window_pos_save` / `window_pos_restore` / `window_pos_sanitize` / `window_pos_center` (key
`window_<name>`, a `WindowMetrics` = screen rect + maximized; restore skips `SetPosition` on Wayland), and
`on_window_geometry(tlw, callback)` (`GUI_Utils.cpp`) to run the callback when geometry is real — MSW
immediately (no `wxEVT_SHOW` for windows created maximized), Linux on `wxEVT_SHOW` + `CallAfter`, macOS on
`wxEVT_SHOW`. `GUI_App::persist_window_geometry(window, default_maximized)` saves on
`wxEVT_CLOSE_WINDOW` (then `Skip()`) but always uses the key `window_mainframe`, whatever the window's
name — for any other window call `window_pos_save/restore` with its own name.
`window_<name>`, a `WindowMetrics` = screen rect + maximized; restore skips `SetPosition` on Wayland and,
on X11, skips `SetSize` when the saved state is maximized; `window_pos_sanitize` returns early for a
maximized or fullscreen window on X11), and `on_window_geometry(tlw, callback)` (`GUI_Utils.cpp`) to run
the callback when geometry is real — MSW immediately (no `wxEVT_SHOW` for windows created maximized),
Linux on `wxEVT_SHOW` + `CallAfter`, macOS on `wxEVT_SHOW`.
`GUI_App::persist_window_geometry(window, default_maximized)` saves on
`wxEVT_CLOSE_WINDOW` (then `Skip()`) and restores under the window's own name, so the main frame
(`"mainframe"`) and the non-modal settings dialog (`"settings_dialog"`) keep separate entries.
**Pitfalls.**
- **Rule:** When restoring a top-level window (the main frame after hiding a popup or overlay frame, or a
@@ -496,16 +498,30 @@ name — for any other window call `window_pos_save/restore` with its own name.
through `EndModal`. The `Raise()` is deferred to run after the modal has fully torn down, and guarded
because the dialog may be destroyed while queued.
```cpp
void PluginsDialog::restore_z_order()
void WebViewHostDialog::restore_z_order()
{
wxGetApp().CallAfter([this, alive = m_alive]() {
if (alive->load(std::memory_order_acquire) && IsShown())
wxGetApp().CallAfter([this, alive = m_host_alive] {
if (alive->load() && IsShown())
Raise();
});
}
```
Cite: 0a0d59b76b (`PluginsDialog::restore_z_order`; also passed as the `restore` callback of
`detail::run_off_thread_with_progress`).
A `WebViewHostDialog` subclass calls the inherited `restore_z_order()` after each such modal, on every
outcome including Cancel.
Cite: 0a0d59b76b (`PluginsDialog`: also passed as the `restore` callback of
`detail::run_off_thread_with_progress`); `ActionReplayDialog::open_file`.
- **Rule:** On macOS, when a secondary dialog raises the main window on purpose (to give it the keyboard
focus for work that acts on it) and must stay in sight meanwhile, attach it as a Cocoa child window of the
main window for that span — `keep_window_above(GetHandle(), mainframe->GetHandle(), true)`
(`slic3r/Utils/MacDarkMode.hpp`) — and detach it with `false` when the work ends.
**Why:** the raised main window becomes key and front and buries the dialog, which wx never attaches to
its parent on macOS (§5), while an MSW owner or a GTK `transient_for` parent keeps it above by itself. A
child window stays directly above its parent without becoming key, so the main window keeps the focus;
it also moves with its parent, so attach it only for the span. wx detaches it on `Hide()` and in the
window's destructor (`src/osx/cocoa/nonownedwnd.mm:767-768, 990-991`), so closing the dialog midway
needs no extra step.
Cite: `ActionReplayDialog::run` (a run's progress and Stop button; the dialog takes the focus back with
`restore_z_order()` when the run finishes).
- **Rule:** Never position windows by absolute coordinates on Wayland, and never expect `SetIcon` to show on
macOS or Wayland.
+5
View File
@@ -70,3 +70,8 @@ web/frontend/dist-demo
# Persistent application data beside compose.yaml.
/data/
# Package the desktop helper from committed sources in the web image.
desktop/bambu-login/node_modules
desktop/bambu-login/dist
web/frontend/public/bambu-login/*.zip
+13 -1
View File
@@ -1,7 +1,7 @@
# Copy to .env. Runtime state belongs in ./data beside compose.yaml, not Git.
# The maintainer publishes app + web with the same immutable version tag.
ORCA_IMAGE_PREFIX=gitea.labus.uk/karol/web-slicer
ORCA_IMAGE_TAG=0.2.2-alpha
ORCA_IMAGE_TAG=0.3.1-alpha
WEB_PORT=8080
LAN_BIND=0.0.0.0
@@ -26,3 +26,15 @@ ORCA_NATIVE_CONCURRENCY=1
ORCA_PLUGIN_SESSION_LIMIT=1
ORCA_BACKUP_INTERVAL=21600
ORCA_BACKUP_KEEP=7
# Optional Prusa Connect account login through Prusa MCP.
# Set both values for a registered public OAuth client.
ORCA_PRUSACONNECT_OAUTH_CLIENT_ID=
# Example: https://slicer.example.com/api/v1/oauth/prusaconnect/callback
ORCA_PRUSACONNECT_OAUTH_REDIRECT_URI=
# Optional SimplyPrint Device scopes when an OAuth application is registered.
# Print history and printer actions also require printer reads.
ORCA_SIMPLYPRINT_OAUTH_PRINTERS_READ=0
ORCA_SIMPLYPRINT_OAUTH_PRINT_HISTORY_READ=0
ORCA_SIMPLYPRINT_OAUTH_PRINTER_ACTIONS=0
+346
View File
@@ -0,0 +1,346 @@
"""Posts a notice on inactive PRs and adds the labels stale.yml needs to close them.
stale.yml sets the limits and day counts in its environment. It needs the workflow's token, because the
stale bot counts a comment from a person as activity.
"""
import datetime
import json
import os
import re
import subprocess
import sys
import time
import urllib.parse
REPO = os.environ["GITHUB_REPOSITORY"]
LIMIT = max(0, int(os.environ["NOTICE_LIMIT"]))
RENOTICE_DAYS = int(os.environ["RENOTICE_DAYS"])
CLOSE_DAYS = int(os.environ["PR_CLOSE_DAYS"])
DRY_RUN = os.environ.get("DRY_RUN", "false") == "true"
# Dry runs post nothing, so they have no deadline
DEADLINE = None if DRY_RUN else time.monotonic() + 60 * int(os.environ["NOTICE_MINUTES"])
WAIT_LABEL = "wait for response"
STALE_LABEL = "stale"
TEAM = ("MEMBER", "OWNER", "COLLABORATOR")
MARKER = "<!-- inactive-pr-notice -->"
GH_TRIES = 3
GH_TIMEOUT = 120
# gh errors worth another try; others, such as a 404, fail at once
TRANSIENT = re.compile(r"HTTP (5\d\d|429)|rate limit|timed? ?out|connection|EOF|Something went wrong", re.IGNORECASE)
# Days without activity before each notice, and its text
NOTICES = {
"waiting": (int(os.environ["PR_STALE_DAYS"]), """We asked for changes or more information on this PR, and nothing has happened on it for at least {days} days. It will be closed in {close} days.
To keep it open, leave a comment. If you push new commits, please also leave a comment so we know it's ready for review again. If you no longer have time for it, that's fine. You can close it yourself."""),
"conflicts": (int(os.environ["CONFLICT_DAYS"]), """This PR has conflicts with the main branch, and nothing has happened on it for at least {days} days. It will be closed in {close} days.
If you still want to work on it, please fix the conflicts and leave a comment. If you no longer have time for it, that's fine. You can close it yourself."""),
"unreviewed-conflicts": (int(os.environ["CONFLICT_DAYS"]), """We're sorry that nobody on the team has reviewed this PR yet. It has conflicts with the main branch, and nothing has happened on it for at least {days} days. It will be closed in {close} days.
If you still want a review, please fix the conflicts and leave a comment. If you no longer have time for it, that's fine. You can close it yourself."""),
"unreviewed": (int(os.environ["UNREVIEWED_DAYS"]), """We're sorry that nobody on the team has reviewed this PR yet. Nothing has happened on it for at least {days} days. It will be closed in {close} days.
If you still want a review, leave a comment. If you no longer have time for it, that's fine. You can close it yourself."""),
"draft": (int(os.environ["DRAFT_DAYS"]), """Nothing has happened on this draft PR for at least {days} days. It will be closed in {close} days.
If you're still working on it, leave a comment to keep it open. If it is closed, you can open a new PR later and link this one."""),
}
QUERY = """query($owner: String!, $name: String!, $cursor: String) {
repository(owner: $owner, name: $name) {
pullRequests(states: OPEN, first: 40, after: $cursor) {
pageInfo { hasNextPage endCursor }
nodes {
number isDraft mergeable baseRefName authorAssociation
author { __typename login }
labels(first: 100) { nodes { name } }
assignees { totalCount }
milestone { title }
commits(last: 1) { nodes { commit { committedDate } } }
comments(last: 30) { totalCount nodes { author { __typename login } authorAssociation createdAt body } }
reviews(last: 20) { totalCount nodes { author { __typename login } authorAssociation submittedAt } }
labelEvents: timelineItems(last: 100, itemTypes: [LABELED_EVENT]) {
nodes { ... on LabeledEvent { createdAt label { name } actor { login } } }
}
}
}
}
}"""
# One page of a PR's comments or reviews
HISTORY = """query($owner: String!, $name: String!, $number: Int!, $cursor: String) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
%s(first: 100, after: $cursor) { pageInfo { hasNextPage endCursor } nodes { author { __typename login } authorAssociation createdAt body } }
}
}
}"""
def gh(*args, tries=GH_TRIES, missing_ok=False):
target = next((a for a in args if a.startswith("repos/") or a == "graphql"), args[0])
for attempt in range(1, tries + 1):
try:
result = subprocess.run(["gh", *args], capture_output=True, encoding="utf-8", timeout=GH_TIMEOUT)
except subprocess.TimeoutExpired:
result = subprocess.CompletedProcess(args, 1, "", f"timed out after {GH_TIMEOUT} s")
if result.returncode == 0 or (missing_ok and "HTTP 404" in result.stderr):
return result.stdout
print(f"gh api {target} failed (try {attempt} of {tries}): {result.stderr.strip()}", file=sys.stderr)
if attempt == tries or not TRANSIENT.search(result.stderr):
break
time.sleep(10 * attempt)
raise RuntimeError(f"gh api {target} failed")
def paged(query, path, *variables):
"""All nodes of the connection at path, where path starts below the query's data."""
owner, name = REPO.split("/")
cursor, nodes = None, []
while True:
args = ["api", "graphql", "-f", "query=" + query, "-f", "owner=" + owner, "-f", "name=" + name, *variables]
if cursor:
args += ["-f", "cursor=" + cursor]
page = json.loads(gh(*args))["data"]
for key in path:
page = page[key]
nodes += page["nodes"]
if not page["pageInfo"]["hasNextPage"]:
return nodes
cursor = page["pageInfo"]["endCursor"]
def days_since(stamp, now):
return (now - parse_time(stamp)).days
def is_person(actor):
return bool(actor) and actor["__typename"] == "User"
def parse_time(stamp):
return datetime.datetime.fromisoformat(stamp.replace("Z", "+00:00"))
def full_comments(pr):
"""The PR's comments, reading the whole history when the fetched window doesn't hold them all."""
nodes = pr["comments"]["nodes"]
if pr["comments"]["totalCount"] <= len(nodes):
return nodes
return paged(HISTORY % "comments", ("repository", "pullRequest", "comments"), "-F", f"number={pr['number']}")
def answered_notice(pr):
"""Whether a person replied to this PR's notice while the wait label that the notice added is still on it."""
labels = {label["name"] for label in pr["labels"]["nodes"]}
added = [e for e in pr["labelEvents"]["nodes"] if e and e["label"]["name"] == WAIT_LABEL]
if WAIT_LABEL not in labels or STALE_LABEL in labels or not added or not added[-1]["actor"]:
return False
def notices(nodes):
return [c for c in nodes if c["author"] and not is_person(c["author"]) and c["body"].startswith(MARKER)]
comments = pr["comments"]["nodes"]
# A notice can be older than the fetched window
if not notices(comments):
comments = full_comments(pr)
if not notices(comments):
return False
notice, added = notices(comments)[-1], added[-1]
# The notice adds the label seconds before it posts, so a later add came from someone else
gap = (parse_time(notice["createdAt"]) - parse_time(added["createdAt"])).total_seconds()
if added["actor"]["login"] != notice["author"]["login"] or not 0 <= gap <= 300:
return False
replies = [c["createdAt"] for c in comments if is_person(c["author"])]
replies += [r["submittedAt"] for r in pr["reviews"]["nodes"] if is_person(r["author"]) and r["submittedAt"]]
replies += [c["commit"]["committedDate"] for c in pr["commits"]["nodes"]]
return max(replies) > notice["createdAt"]
def team_replied(pr):
author = pr["author"]["login"]
def replied(nodes):
return any(is_person(x["author"]) and x["author"]["login"] != author and x["authorAssociation"] in TEAM
for x in nodes)
for key in ("comments", "reviews"):
fetched = pr[key]
nodes = fetched["nodes"]
# An older reply can be outside the fetched window
if not replied(nodes) and fetched["totalCount"] > len(nodes):
nodes = paged(HISTORY % key, ("repository", "pullRequest", key), "-F", f"number={pr['number']}")
if replied(nodes):
return True
return False
def pick_notice(pr, now):
"""The case and idle days of the notice this PR should get now, or None."""
labels = {label["name"] for label in pr["labels"]["nodes"]}
if (STALE_LABEL in labels or not is_person(pr["author"]) or pr["baseRefName"] != "main"
or pr["assignees"]["totalCount"] or pr["milestone"]):
return None
comments, reviews = pr["comments"]["nodes"], pr["reviews"]["nodes"]
def noticed(nodes):
return any(c["body"].startswith(MARKER) and days_since(c["createdAt"], now) < RENOTICE_DAYS for c in nodes)
if noticed(comments):
return None
activity = [c["createdAt"] for c in comments if is_person(c["author"])]
activity += [r["submittedAt"] for r in reviews if is_person(r["author"]) and r["submittedAt"]]
# A rebase or amend sets a new commit date
activity += [c["commit"]["committedDate"] for c in pr["commits"]["nodes"]]
idle = days_since(max(activity), now)
if WAIT_LABEL in labels:
case = "waiting" if not pr["isDraft"] else None
elif pr["authorAssociation"] in TEAM:
case = None
elif pr["isDraft"]:
case = "draft"
# GitHub computes this on request, so the next run sees the real value
elif pr["mergeable"] == "UNKNOWN":
case = None
elif pr["mergeable"] == "CONFLICTING":
case = "conflicts"
else:
case = "unreviewed"
if not case or idle < NOTICES[case][0]:
return None
# Checked last because they can read a PR's whole history
if noticed(full_comments(pr)):
return None
if case in ("conflicts", "unreviewed"):
replied = team_replied(pr)
if case == "unreviewed" and replied:
return None
if case == "conflicts" and not replied:
case = "unreviewed-conflicts"
return case, idle
def find_notices(number, since):
"""The ids of the notices posted on this PR since the given time."""
return gh("api", f"repos/{REPO}/issues/{number}/comments?since={since}", "--jq",
f'.[] | select(.user.type == "Bot" and (.body | startswith("{MARKER}"))) | .id').split()
def post_comment(number, body, since):
"""The id of the new comment, posted once even when GitHub fails after creating it."""
for attempt in range(1, GH_TRIES + 1):
try:
return gh("api", f"repos/{REPO}/issues/{number}/comments", "-f", f"body={body}", "--jq", ".id", tries=1).strip()
except RuntimeError:
# Posting again is only safe once GitHub confirms the last try created nothing
if posted := find_notices(number, since):
return posted[0]
if attempt < GH_TRIES:
time.sleep(10 * attempt)
raise RuntimeError(f"posting the notice on #{number} failed")
def post_notice(number, case, labels):
# The stale bot counts any change after the stale label as activity, so the stale label goes on last
added_wait = WAIT_LABEL not in labels
# A minute early, so a GitHub clock behind the runner's still finds a notice this call posted
since = (datetime.datetime.now(datetime.timezone.utc) - datetime.timedelta(minutes=1)).strftime("%Y-%m-%dT%H:%M:%SZ")
# Adding a label the PR already has changes nothing, and the fetched labels can be minutes old
gh("api", f"repos/{REPO}/issues/{number}/labels", "-f", f"labels[]={WAIT_LABEL}", "--silent")
comment = None
try:
days, text = NOTICES[case]
comment = post_comment(number, MARKER + "\n" + text.format(days=days, close=CLOSE_DAYS), since)
gh("api", f"repos/{REPO}/issues/{number}/labels", "-f", f"labels[]={STALE_LABEL}", "--silent")
except RuntimeError:
# Without the stale label nothing closes the PR, so the notice is undone and the next run tries again
try:
comments = set(find_notices(number, since))
except RuntimeError:
comments = set()
comments |= {comment} if comment else set()
undo = [f"repos/{REPO}/issues/comments/{c}" for c in comments]
if added_wait:
undo.append(wait_label_path(number))
# Each step is tried even when one before it fails; gh logs the failure
for path in undo:
try:
gh("api", "-X", "DELETE", path, "--silent", missing_ok=True)
except RuntimeError:
pass
raise
def wait_label_path(number):
return f"repos/{REPO}/issues/{number}/labels/{urllib.parse.quote(WAIT_LABEL)}"
def main():
now = datetime.datetime.now(datetime.timezone.utc)
prs = paged(QUERY, ("repository", "pullRequests"))
failed = []
for pr in prs:
labels = {label["name"] for label in pr["labels"]["nodes"]}
# A draft is only on the stale track while a notice is open, so the stale step never starts its own clock on one
draft = pr["isDraft"] and WAIT_LABEL in labels and STALE_LABEL not in labels
try:
if not (draft or answered_notice(pr)):
continue
print(f"#{pr['number']} {'draft' if draft else 'answered'}: removing {WAIT_LABEL}")
if not DRY_RUN:
# Another bot can remove the label between the fetch and this call
gh("api", "-X", "DELETE", wait_label_path(pr["number"]), "--silent", missing_ok=True)
except RuntimeError:
failed.append(pr["number"])
todo = []
for pr in prs:
try:
if notice := pick_notice(pr, now):
todo.append((notice, pr))
except RuntimeError:
failed.append(pr["number"])
# Longest idle first
todo.sort(key=lambda item: item[0][1], reverse=True)
posted = 0
for position, ((case, idle), pr) in enumerate(todo):
if position == LIMIT:
if not DRY_RUN:
break
print(f"-- over the limit of {LIMIT}, not posted tonight --")
# A notice cut off by the step timeout would stay up with nothing to close the PR
if DEADLINE and time.monotonic() > DEADLINE:
print(f"Out of time after {posted} notices; the rest wait for the next run")
break
print(f"#{pr['number']} {case}: idle {idle} days")
if DRY_RUN:
if position < LIMIT:
posted += 1
continue
try:
post_notice(pr["number"], case, {label["name"] for label in pr["labels"]["nodes"]})
posted += 1
except RuntimeError:
failed.append(pr["number"])
# Stays under GitHub's limit on comments per minute
time.sleep(2)
failed = sorted(set(failed))
print(f"{'would-post' if DRY_RUN else 'posted'}={posted} eligible={len(todo)} limit={LIMIT} failed={len(failed)} dry-run={str(DRY_RUN).lower()}")
# Doesn't count against the limits it reports
try:
print(gh("api", "rate_limit", "--jq",
r'.resources | "rate-limit rest-used=\(.core.used) rest-remaining=\(.core.remaining) '
r'graphql-used=\(.graphql.used) graphql-remaining=\(.graphql.remaining)"').strip())
except RuntimeError:
pass
if failed:
sys.exit("Failed on " + " ".join(f"#{n}" for n in failed))
if __name__ == "__main__":
main()
+5 -3
View File
@@ -224,11 +224,13 @@ jobs:
# the bounds checks are compiled in, so a stripped exe still catches them.
find "$d/build_flatpak/tests" -type f -perm -u+x -exec strip --strip-unneeded {} + 2>/dev/null || true
# At runtime the tests read tests/ (TEST_DATA_DIR), scripts/, and under
# resources/ the shipped profiles (PROFILES_DIR), the printers/ maps, and
# the icon SVGs (NativeCommands icon names are checked against them).
# resources/ the shipped profiles (PROFILES_DIR), the printers/ maps,
# the icon SVGs (NativeCommands icon names are checked against them), and
# the MCP server's page agent (web/mcp).
find "$d" -mindepth 1 -maxdepth 1 -type d \
! -name tests ! -name build_flatpak ! -name scripts ! -name resources -exec rm -rf {} +
find "$d/resources" -mindepth 1 -maxdepth 1 ! -name profiles ! -name printers ! -name images -exec rm -rf {} +
find "$d/resources" -mindepth 1 -maxdepth 1 ! -name profiles ! -name printers ! -name images ! -name web -exec rm -rf {} +
find "$d/resources/web" -mindepth 1 -maxdepth 1 ! -name mcp -exec rm -rf {} +
# Only the SVGs are read; the png/ico/icns/gif assets are ~35MB of dead weight.
find "$d/resources/images" -mindepth 1 -maxdepth 1 ! -name '*.svg' -exec rm -rf {} + 2>/dev/null || true
tar -cf flatpak-test-asset.tar flatpak_app "$d"
+1
View File
@@ -44,6 +44,7 @@ on:
- 'version.inc'
- ".github/workflows/build_*.yml"
- ".github/workflows/unit_tests*.yml"
- ".github/workflows/mcp_sweep.yml"
- 'build_linux.sh'
- 'build_win.bat'
- 'scripts/test_build_win.ps1'
@@ -0,0 +1,37 @@
name: Check CAD offer table
# src/slic3r/GUI/CAD/DesignOffer.hpp is generated from scripts/CAD/tool_atlas.json and must never be
# edited by hand. This fails when the checked-in header is not what the generator makes of the atlas, and
# when the generator's checks of an atlas (scripts/CAD/test_gen_offer_table.py) miss a fault.
on:
push:
paths:
- 'scripts/CAD/tool_atlas.json'
- 'scripts/CAD/gen_offer_table.py'
- 'scripts/CAD/test_gen_offer_table.py'
- 'src/slic3r/GUI/CAD/DesignOffer.hpp'
- '.github/workflows/check_cad_offer_table.yml'
pull_request:
paths:
- 'scripts/CAD/tool_atlas.json'
- 'scripts/CAD/gen_offer_table.py'
- 'scripts/CAD/test_gen_offer_table.py'
- 'src/slic3r/GUI/CAD/DesignOffer.hpp'
- '.github/workflows/check_cad_offer_table.yml'
permissions: {}
jobs:
check_cad_offer_table:
name: Check CAD offer table
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Check the offer table against the atlas
run: python3 scripts/CAD/gen_offer_table.py --check
- name: Test the generator's checks of the atlas
run: python3 scripts/CAD/test_gen_offer_table.py
+107
View File
@@ -0,0 +1,107 @@
name: MCP Sweep
# Run the MCP sweep (tools/mcp/run_sweep.py) against the x86_64 Linux AppImage
# the calling build_all.yml run built, each job's app on a private Xvfb display
# with Openbox as its window manager. Called once from build_all.yml.
on:
workflow_call:
permissions:
contents: read
jobs:
mcp_sweep:
# Static "MCP Sweep"; the caller's job name adds the arch, as for the unit tests.
name: MCP Sweep
runs-on: ubuntu-24.04
timeout-minutes: 150
steps:
- name: Checkout
uses: actions/checkout@v7
with:
# The app comes from the AppImage. The tests read tools/mcp, the test
# data in tests/, the handy models and profiles in resources/, and
# scripts/CAD.
sparse-checkout: |
tools
tests
resources
scripts
- name: Download the AppImage
uses: actions/download-artifact@v8
with:
# <ver> is V<version> or PR-<number>, so this leaves out the aarch64
# build's OrcaSlicer_Linux_ubuntu_2404_aarch64_<ver>.
pattern: OrcaSlicer_Linux_ubuntu_2404_{V,PR-}*
path: ${{ runner.temp }}/appimage
- name: Extract the AppImage
working-directory: ${{ runner.temp }}
run: |
set -euo pipefail
mapfile -t found < <(find appimage -name '*.AppImage')
[ ${#found[@]} -eq 1 ] || { echo "expected one x86_64 AppImage, found: ${found[*]:-none}" >&2; exit 1; }
chmod +x "${found[0]}"
"${found[0]}" --appimage-extract > /dev/null
# The bare binary cannot find the AppImage's bundled libraries; AppRun
# sets them up and execs it, so the pid, exit codes and signals the
# sweep reads are the app's own.
[ -x squashfs-root/AppRun ] || { echo "no AppRun in the AppImage" >&2; exit 1; }
echo "ORCA_BIN=$PWD/squashfs-root/AppRun" >> "$GITHUB_ENV"
# Openbox keeps popup lists open under Xvfb, which test_gui_tools.py and
# test_filaments.py need; ffmpeg lets test_recording.py encode. The rest
# are the host libraries the AppImage leaves out (scripts/appimage_lib_policy.sh),
# with Mesa's software OpenGL for Xvfb.
- name: Install Xvfb, Openbox and the AppImage's host runtime
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
xvfb openbox ffmpeg dbus \
libopengl0 libgl1 libegl1 libgl1-mesa-dri libwebkit2gtk-4.1-0
# WebKitGTK runs its web processes in a bubblewrap sandbox, which needs
# unprivileged user namespaces, and Ubuntu 24.04's AppArmor denies them.
# The runner is discarded after the job.
- name: Allow unprivileged user namespaces
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Run the sweep
id: sweep
# Short of the job's limit, so the steps after it still run.
timeout-minutes: 120
run: |
set -o pipefail
# One session bus for the run's apps, as a desktop session gives them.
# -j defaults to half the cores: 2 on this 4-vCPU runner, which also
# draws every app's OpenGL in software.
dbus-run-session -- python3 tools/mcp/run_sweep.py --xvfb --bin "$ORCA_BIN" \
--out "$RUNNER_TEMP/mcp-sweep" \
2>&1 | tee "$RUNNER_TEMP/mcp-sweep.log"
- name: Publish job summary
if: ${{ !cancelled() && steps.sweep.outcome != 'skipped' }}
run: |
{
echo "## MCP sweep"
echo '```'
# Each failed run, beside the others and then alone, the failures'
# logs, any crash report, and the closing count
grep -E "^[^ ]+ +(FAIL \(|passed alone)|^FAIL |^crash report: | passed \(.* alone\)" \
"$RUNNER_TEMP/mcp-sweep.log" || echo "no result lines, see the log"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
# A failed run keeps each failed test's folder (test.log and a copy of the
# app's log), the data folders of the jobs it failed on, and results.jsonl.
- name: Upload the failed runs
if: ${{ failure() }}
uses: actions/upload-artifact@v7
with:
name: mcp-sweep-linux-x86_64
path: |
${{ runner.temp }}/mcp-sweep
${{ runner.temp }}/mcp-sweep.log
retention-days: 7
if-no-files-found: ignore
+57
View File
@@ -0,0 +1,57 @@
name: See guide label
# Adds "wait for response" so stale.yml closes the PR if nothing changes.
on:
pull_request_target:
types: [labeled]
permissions:
pull-requests: write
concurrency:
group: see-guide-label-${{ github.event.pull_request.number }}
jobs:
comment:
if: >-
github.repository == 'OrcaSlicer/OrcaSlicer' &&
github.event.pull_request.state == 'open' &&
github.event.label.name == 'see guide'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Add the wait for response label and comment
env:
GH_TOKEN: ${{ github.token }}
NUMBER: ${{ github.event.pull_request.number }}
AUTHOR: ${{ github.event.pull_request.user.login }}
LABEL: ${{ github.event.label.name }}
run: |
gh api "repos/$GITHUB_REPOSITORY/issues/$NUMBER/labels" -f "labels[]=wait for response" --silent
# Posts once per PR, so removing and adding the label again doesn't repeat the comment.
marker='<!-- see-guide-label -->'
if [ -n "$(gh api --paginate "repos/$GITHUB_REPOSITORY/issues/$NUMBER/comments" \
--jq ".[] | select(.user.login == \"github-actions[bot]\" and (.body | startswith(\"$marker\"))) | .id")" ]; then
exit 0
fi
cat > body.md <<'EOF'
<!-- see-guide-label -->
Hi @AUTHOR, thanks for the PR. A reviewer added the `LABEL` label. It means this PR doesn't follow the [contributing guide](https://github.com/OrcaSlicer/OrcaSlicer/blob/main/CONTRIBUTING.md#prs-we-dont-review) yet. A reviewer can look at it again after it is fixed.
If a reviewer left a comment on this PR, that comment says what to change. If there is no comment, check this list:
- The PR doesn't say how you tested it. For changes you can see in the app, add screenshots.
- The description doesn't say what the change does or why it is needed.
- The PR has unrelated changes, or it reformats existing code.
- It replaces working code instead of changing only what needs to change.
- It ports code that another project has not merged, or it doesn't link and credit the source.
- Another PR already makes the same change. Say how yours is different, or test the other PR instead.
To fix it, push new commits to this PR or edit the description. Please don't open a new PR. Then write a comment that says what you changed. If you think the label is a mistake, reply and say why.
The `wait for response` label means we are waiting for you. If nothing happens on this PR, it may be closed.
EOF
sed -i "s/@AUTHOR/@$AUTHOR/; s/\`LABEL\`/\`$LABEL\`/" body.md
gh api "repos/$GITHUB_REPOSITORY/issues/$NUMBER/comments" -F body=@body.md --silent
+52 -13
View File
@@ -4,9 +4,16 @@ on:
schedule:
- cron: "30 1 * * *"
workflow_dispatch:
inputs:
notices:
description: What the notice step does on this run
type: choice
options: [dry-run, post, skip]
default: dry-run
permissions:
actions: write # save the run state in the actions cache
contents: read # check out the notice script
issues: write
pull-requests: write
@@ -17,11 +24,42 @@ concurrency:
jobs:
stale:
runs-on: ubuntu-latest
env:
ISSUE_STALE_DAYS: 90
ISSUE_CLOSE_DAYS: 14
# CONTRIBUTING's "If your PR is closed" section repeats these day counts, so update it too
PR_STALE_DAYS: 90
PR_CLOSE_DAYS: 14
CONFLICT_DAYS: 90
UNREVIEWED_DAYS: 180
DRAFT_DAYS: 180
# A PR that answered a notice gets no new one for this long
RENOTICE_DAYS: 90
# Each notice posts one comment, which counts toward the stale step's hourly limit
NOTICE_LIMIT: 40
steps:
- uses: actions/checkout@v7
if: github.repository == 'OrcaSlicer/OrcaSlicer' && inputs.notices != 'skip'
with:
sparse-checkout: .github/scripts
persist-credentials: false
# Posts the notice on long-inactive PRs, which the stale step closes if nothing changes
- name: Post notices on inactive PRs
if: github.repository == 'OrcaSlicer/OrcaSlicer' && inputs.notices != 'skip'
timeout-minutes: 30
env:
GH_TOKEN: ${{ github.token }}
DRY_RUN: ${{ inputs.notices == 'dry-run' }}
# Stops starting notices with time to finish the last one before the timeout
NOTICE_MINUTES: 20
run: python3 .github/scripts/inactive_pr_notices.py
- uses: actions/stale@v11
# A failed notice step doesn't stop the stale run
if: ${{ !cancelled() }}
with:
# Each stale label or close costs about 2 operations and posts one
# comment, so 800 stays under GitHub's limit of 500 comments an hour.
# comment, so 800 stays under GitHub's limit of 500 comments an hour
# together with the notice step's NOTICE_LIMIT comments.
# Runs that stop early continue from the same place the next day.
operations-per-run: 800
ascending: true
@@ -33,13 +71,13 @@ jobs:
# Update its filters when they change.
# Issues
days-before-issue-stale: 90
days-before-issue-close: 14
days-before-issue-stale: ${{ env.ISSUE_STALE_DAYS }}
days-before-issue-close: ${{ env.ISSUE_CLOSE_DAYS }}
close-issue-reason: not_planned
exempt-all-issue-assignees: true
exempt-all-issue-milestones: true
stale-issue-message: |
This issue has had no activity for 90 days, so it will be closed in 14 days.
This issue has had no activity for ${{ env.ISSUE_STALE_DAYS }} days, so it will be closed in ${{ env.ISSUE_CLOSE_DAYS }} days.
If it's a bug that still happens on the latest OrcaSlicer release, please leave a comment with the version you tested. If it's a feature request you still want, please leave a comment saying so. Either one keeps it open.
close-issue-message: |
@@ -49,20 +87,21 @@ jobs:
# PRs: only PRs where we asked the author for something
only-pr-labels: "wait for response"
days-before-pr-stale: 90
days-before-pr-close: 14
exempt-draft-pr: true
days-before-pr-stale: ${{ env.PR_STALE_DAYS }}
days-before-pr-close: ${{ env.PR_CLOSE_DAYS }}
# Drafts aren't exempt because the notice step removes the label from drafts without a notice
exempt-draft-pr: false
exempt-all-pr-assignees: true
exempt-all-pr-milestones: true
delete-branch: false
stale-pr-message: |
We asked for changes or more information on this PR, and there has been no activity for 90 days. It will be closed in 14 days.
We asked for changes or more information on this PR, and nothing has happened on it for at least ${{ env.PR_STALE_DAYS }} days. It will be closed in ${{ env.PR_CLOSE_DAYS }} days.
To keep it open, leave a comment. If you push new commits, please also leave a short comment so we know it's ready for another look. If you no longer have time for it, that is fine, just let us know.
To keep it open, leave a comment. If you push new commits, please also leave a comment so we know it's ready for review again. If you no longer have time for it, that's fine. You can close it yourself.
close-pr-message: |
This PR was closed because we did not hear back after the reminder. Thank you for the work you put into it.
This PR was closed because we did not get a reply after the reminder. Thank you for the work you put into it.
If you want to continue, push your changes and reopen it, or open a new PR.
If you want to continue, open a new PR and link this one. You can also leave a comment here, and a team member can reopen it.
# The stale bot checks exemptions before activity, so it never comes back
# to a stale item that became exempt. Remove the label from those here.
@@ -77,8 +116,8 @@ jobs:
--json number,assignees,milestone \
--jq '.[] | select((.assignees | length > 0) or .milestone != null) | .number'
gh pr list -R "$GITHUB_REPOSITORY" --label stale --state open --limit 1000 \
--json number,isDraft,assignees,milestone,labels \
--jq '.[] | select(.isDraft or (.assignees | length > 0) or .milestone != null
--json number,assignees,milestone,labels \
--jq '.[] | select((.assignees | length > 0) or .milestone != null
or ([.labels[].name] | index("wait for response") | not)) | .number'
} | while read -r n; do
gh api -X DELETE "repos/$GITHUB_REPOSITORY/issues/$n/labels/stale" --silent < /dev/null ||
+4
View File
@@ -73,3 +73,7 @@ web/frontend/dist-demo/
# Persistent application data beside compose.yaml.
/data/
# Upstream scratch/planning dirs.
.superpowers/
docs/sf-plan/
+4
View File
@@ -42,6 +42,10 @@ ctest --test-dir ./tests/libslic3r -C Release # individual suite
ctest --test-dir ./tests/fff_print -C Release
```
To run the app and see or drive it (reproduce an issue, capture before/after screenshots, script GUI steps), use its MCP server: [tools/mcp/README.md](tools/mcp/README.md) launches it and drives it from a shell, Python or a replayable script, and the design is in [docs/HLSD/mcp-server.md](docs/HLSD/mcp-server.md).
The MCP sweep's tests (`tools/mcp/run_sweep.py`) are designed top down: [tools/mcp/TESTS.md](tools/mcp/TESTS.md) holds the rules and the index, and each area's entries are in `tools/mcp/test-entries/`. Before writing or changing a test, add or update its entry (what it tests, the checks that decide it, what it leaves out) and have the entry reviewed. Keep the entry in step with the test.
## Documentation
- Docs live in `docs/`; the high-level design of a subsystem goes in `docs/HLSD/<subsystem>.md`.
+6 -8
View File
@@ -149,7 +149,7 @@ models can exceed these defaults. Build requirements are separate; see
## Getting started
The current image version is `0.2.2-alpha`, an alpha for evaluation. Images
The current image version is `0.3.5-alpha`. Images
are public and can be pulled without registry authentication.
Install Docker Engine and Compose v2. Put [compose.yaml](compose.yaml) and
@@ -211,14 +211,12 @@ save G-code with no server, account or network. It can also drive printers on
your LAN — Bambu Lab in Developer Mode, Anycubic Kobra, Moonraker and the other
hosts the web client supports.
The current app version is `0.3.0-alpha`, an alpha for evaluation. Install it by
side-loading the APK from the [latest release](https://gitea.labus.uk/karol/web-slicer/releases)
(enable "install unknown apps" for your browser or file manager); it is not on
any app store. Two builds are published:
The current Android version is `0.3.5-alpha`. Enable "install unknown apps"
for your browser or file manager to sideload one of the two APKs:
- `web-slicer-<version>-arm64.apk` — the standard app (offline slicing and LAN
- [Standard APK](https://gitea.labus.uk/api/packages/karol/generic/web-slicer-android/0.3.5-alpha/web-slicer-0.3.5-alpha-arm64.apk) — the standard app (offline slicing and LAN
printing). Most users want this one.
- `web-slicer-<version>-cloud-arm64.apk` — additionally bundles the third-party
- [Bambu Cloud APK](https://gitea.labus.uk/api/packages/karol/generic/web-slicer-android/0.3.5-alpha/web-slicer-0.3.5-alpha-cloud-arm64.apk) — additionally bundles the third-party
[open-bamboo-networking](https://gitea.labus.uk/karol/open-bamboo-networking)
plugin (AGPL-3.0) for Bambu Lab account sign-in, cloud printer status and
control, and cloud printing. It ships no Bambu keys: printers with command
@@ -236,7 +234,7 @@ Copy [.env.example](.env.example) to `.env`. Do not commit the edited file.
| Variable | Default | Purpose |
| --- | --- | --- |
| `ORCA_IMAGE_PREFIX` | `gitea.labus.uk/karol/web-slicer` | Shared image prefix; services append `-app`, `-web` and optional `-demo`. |
| `ORCA_IMAGE_TAG` | `0.2.2-alpha` | Matching release version for all images; alpha prerelease. |
| `ORCA_IMAGE_TAG` | `0.3.5-alpha` | Matching release version for all images. |
| `WEB_PORT` | `8080` | Published HTTP port. |
| `LAN_BIND` | `0.0.0.0` | Host bind address; use `127.0.0.1` for a proxy on the same host. |
| `DEMO_PORT` / `DEMO_BIND` | `8082` / `127.0.0.1` | Separate static demo, enabled with the `demo` Compose profile. |
+29 -1
View File
@@ -13,10 +13,38 @@ the same pieces as the server deployment:
- the web client in a WebView, served by the same local origin
(`python/android_main.py`), with the slicer resources and profiles.
One local user, no accounts. Everything the backend reads is packed into
The offline workspace has one local user. Everything the embedded backend reads is packed into
`assets/payload.zip` and unpacked into the app's private storage once per
payload version.
## Connecting to a server
Open **Preferences and help → Connection settings** in the application menu.
**Offline on this device** is the default. To use a server, enter its HTTPS origin, such as
`https://slicer.example.com`, and sign in with your Web Slicer account. The app
remembers the selected mode and server. If the server is unavailable, you can
retry or return to the offline workspace. The theme selected in the app applies
to both workspaces. The system theme is the default.
Each mode has its own projects, presets and account session. In server mode the
web client uses the selected server for slicing and storage. Server attachments
are saved to Android Downloads. The native Bambu sign-in and native blob
download bridge run in the offline WebView.
## Syncing filament libraries
After signing in to the server in the app, choose **Sync filament library** in
**Preferences and help → Connection settings**. Select a library on each side
and compare them before confirming. You can sync libraries you manage. The server needs an authenticated
Web Slicer installation with library sync support.
The preview lists the number of products that will be created or updated in
each workspace. Sync carries a product's name, material, colour and other
metadata. A shared product can follow edits made on one side since the last
match. Products edited on both sides stay as they are, with their names shown
for review. Deletions, machine availability, slicing profiles and AMS slot
assignments stay with their own workspace.
## Building
Tools live outside the repository in `~/android`: JDK 21, the Android SDK with
+2 -2
View File
@@ -14,8 +14,8 @@ android {
applicationId = "uk.labus.webslicer"
minSdk = 29
targetSdk = 35
versionCode = 2
versionName = "0.3.0-alpha"
versionCode = 7
versionName = "0.3.5-alpha"
ndk { abiFilters += "arm64-v8a" }
}
sourceSets["main"].assets.srcDir(stage.resolve("assets"))
+3 -3
View File
@@ -17,17 +17,17 @@
android:networkSecurityConfig="@xml/network_security_config"
android:allowBackup="false"
android:theme="@android:style/Theme.DeviceDefault.NoActionBar">
<activity android:name=".MainActivity" android:exported="true"
<activity android:name=".MainActivity" android:exported="true" android:enableOnBackInvokedCallback="true"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden|uiMode">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".BambuLoginActivity" android:exported="false"
<activity android:name=".BambuLoginActivity" android:exported="false" android:process=":bambu_login"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden|uiMode" />
<service android:name=".ServerService" android:process=":server"
android:exported="false" android:foregroundServiceType="specialUse">
android:exported="false" android:stopWithTask="true" android:foregroundServiceType="specialUse">
<property android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
android:value="Local slicing server for the app's own user interface" />
</service>
@@ -2,6 +2,7 @@ package uk.labus.webslicer
import android.annotation.SuppressLint
import android.app.Activity
import android.app.AlertDialog
import android.os.Bundle
import android.webkit.CookieManager
import android.webkit.JavascriptInterface
@@ -13,6 +14,7 @@ import org.json.JSONObject
import java.net.HttpURLConnection
import java.net.URL
import java.util.Locale
import java.util.concurrent.atomic.AtomicBoolean
import kotlin.concurrent.thread
/**
@@ -28,14 +30,18 @@ import kotlin.concurrent.thread
class BambuLoginActivity : Activity() {
private lateinit var web: WebView
@Volatile private var pageHost: String? = null
@Volatile private var delivered = false
private val delivering = AtomicBoolean()
@SuppressLint("SetJavaScriptEnabled", "AddJavascriptInterface")
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val version = intent.getStringExtra(EXTRA_VERSION)?.takeIf { VERSION.matches(it) } ?: DEFAULT_VERSION
// A fresh sign-in: cookies of an earlier account must not carry over.
CookieManager.getInstance().removeAllCookies(null)
// This activity runs in its own process and cookie store. Signing in to
// Bambu must not clear the user's Web Slicer server session.
if (!webDataInitialized) {
WebView.setDataDirectorySuffix("bambu-login")
webDataInitialized = true
}
web = WebView(this)
web.settings.javaScriptEnabled = true
web.settings.domStorageEnabled = true
@@ -52,7 +58,17 @@ class BambuLoginActivity : Activity() {
}
web.addJavascriptInterface(Bridge(), "wx")
setContentView(web)
web.loadUrl(SIGN_IN)
loadSignIn()
}
private fun loadSignIn() {
pageHost = null
CookieManager.getInstance().removeAllCookies {
if (!isFinishing && !isDestroyed) {
delivering.set(false)
web.loadUrl(SIGN_IN)
}
}
}
/** Receives `window.wx.postMessage(json)` from the page; runs on a WebView thread. */
@@ -70,45 +86,56 @@ class BambuLoginActivity : Activity() {
"user_login" -> JSONObject().put("session", data)
else -> null
} ?: return
if (delivered) return
delivered = true
if (!delivering.compareAndSet(false, true)) return
thread { finishWith(deliver(body)) }
}
}
private fun deliver(body: JSONObject): String? = try {
val connection = URL("$BACKEND/api/v1/bambu-cloud/login").openConnection() as HttpURLConnection
connection.requestMethod = "POST"
connection.connectTimeout = 5000
connection.readTimeout = 60000
connection.doOutput = true
connection.setRequestProperty("Content-Type", "application/json")
connection.outputStream.use { it.write(body.toString().toByteArray()) }
val code = connection.responseCode
val reply = (if (code < 400) connection.inputStream else connection.errorStream)
?.bufferedReader()?.use { it.readText() } ?: ""
connection.disconnect()
if (code == 200) null else runCatching { JSONObject(reply).optString("detail") }.getOrNull()
?.takeIf { it.isNotEmpty() } ?: "HTTP $code"
try {
connection.requestMethod = "POST"
connection.connectTimeout = 5000
connection.readTimeout = 60000
connection.doOutput = true
connection.setRequestProperty("Content-Type", "application/json")
connection.outputStream.use { it.write(body.toString().toByteArray()) }
val code = connection.responseCode
val reply = (if (code < 400) connection.inputStream else connection.errorStream)
?.bufferedReader()?.use { it.readText() } ?: ""
if (code == 200) null else runCatching { JSONObject(reply).optString("detail") }.getOrNull()
?.takeIf { it.isNotEmpty() } ?: "HTTP $code"
} finally {
connection.disconnect()
}
} catch (error: Exception) {
error.message ?: "Sign-in failed"
}
private fun finishWith(error: String?) = runOnUiThread {
// The page keeps its own Bambu session; ours now lives in the plugin.
CookieManager.getInstance().removeAllCookies(null)
Toast.makeText(this, error?.let { getString(R.string.bambu_login_failed, it) }
?: getString(R.string.bambu_login_done), Toast.LENGTH_LONG).show()
setResult(if (error == null) RESULT_OK else RESULT_CANCELED)
if (isFinishing || isDestroyed) return@runOnUiThread
if (error != null) {
AlertDialog.Builder(this)
.setMessage(getString(R.string.bambu_login_failed, error))
.setPositiveButton(R.string.bambu_login_retry) { _, _ -> loadSignIn() }
.setNegativeButton(android.R.string.cancel) { _, _ -> finish() }
.setOnCancelListener { finish() }
.show()
return@runOnUiThread
}
Toast.makeText(this, R.string.bambu_login_done, Toast.LENGTH_LONG).show()
setResult(RESULT_OK)
finish()
}
override fun onDestroy() {
CookieManager.getInstance().removeAllCookies(null)
web.destroy()
super.onDestroy()
}
companion object {
private var webDataInitialized = false
const val EXTRA_VERSION = "plugin_version"
private const val DEFAULT_VERSION = "02.09.01.99"
private const val SIGN_IN = "https://bambulab.com/sign-in"
@@ -18,27 +18,31 @@ import kotlin.concurrent.thread
/**
* Saves files the web client downloads into the shared Downloads collection.
* Server artifacts (G-code, archives) arrive as links to the local backend;
* Server artifacts (G-code, archives) arrive as links to the active backend;
* files the client builds itself arrive as blob: links, which only the page
* can read, so a small page script hands their bytes over [BRIDGE].
*/
class Downloads(private val context: Context) {
private val main = Handler(Looper.getMainLooper())
/** A link to the local backend, from the WebView's download listener. */
fun fromUrl(url: String, contentDisposition: String?, mimeType: String?) {
if (!url.startsWith(ORIGIN + "/")) { notify(context.getString(R.string.download_failed)); return }
/** An attachment from the active origin, already checked by the caller. */
fun fromUrl(url: String, contentDisposition: String?, mimeType: String?, origin: String, cookie: String?) {
thread(name = "download") {
try {
val connection = URL(url).openConnection() as HttpURLConnection
connection.connectTimeout = 5000
if (connection.responseCode != 200) throw IllegalStateException("HTTP ${connection.responseCode}")
val disposition = connection.getHeaderField("Content-Disposition") ?: contentDisposition
val type = connection.contentType ?: mimeType
val name = fileName(url, disposition, type)
connection.inputStream.use { save(name, type, it) }
try {
connection.connectTimeout = 5000
connection.readTimeout = 30000
connection.instanceFollowRedirects = false
if (cookie != null) connection.setRequestProperty("Cookie", cookie)
if (connection.responseCode != 200) throw IllegalStateException("HTTP ${connection.responseCode}")
val disposition = connection.getHeaderField("Content-Disposition") ?: contentDisposition
val type = connection.contentType ?: mimeType
val name = fileName(url, disposition, type)
connection.inputStream.use { save(name, type, it) }
} finally { connection.disconnect() }
} catch (error: Exception) {
Log.w(TAG, "download failed: $url", error)
Log.w(TAG, "download failed for $origin", error)
notify(context.getString(R.string.download_failed))
}
}
@@ -0,0 +1,185 @@
package uk.labus.webslicer
import android.content.SharedPreferences
import org.json.JSONArray
import org.json.JSONObject
import java.io.ByteArrayOutputStream
import java.io.IOException
import java.net.HttpURLConnection
import java.net.URL
/** Reconciles portable product data. Printer assignments and tuning stay with their workspace. */
internal class LibrarySync(
private val server: String,
private val cookie: String?,
private val history: SharedPreferences
) {
class RequestFailed(val status: Int) : IOException("HTTP $status")
data class Product(val id: String, val revision: Int, val data: JSONObject?, val fingerprint: String?)
data class Library(val origin: String, val id: String, val name: String, val csrf: String,
val products: Map<String, Product> = emptyMap())
data class Plan(
val local: Library, val remote: Library, val key: String,
val toLocal: JSONArray, val toRemote: JSONArray, val conflicts: List<String>
)
fun choices(): Pair<List<Library>, List<Library>> {
val remote = libraries(server)
awaitLocalBackend()
return libraries(Downloads.ORIGIN) to remote
}
fun prepare(localChoice: Library, remoteChoice: Library): Plan {
val remote = snapshot(remoteChoice)
val local = snapshot(localChoice)
val key = "$server/${remote.id}/${local.id}"
val base = JSONObject(history.getString(key, "{}") ?: "{}")
val toLocal = JSONArray()
val toRemote = JSONArray()
val conflicts = mutableListOf<String>()
for (id in local.products.keys + remote.products.keys) {
val left = local.products[id]
val right = remote.products[id]
if (left?.fingerprint == right?.fingerprint) continue
val known = base.optString(id)
when {
left != null && left.data == null || right != null && right.data == null ->
conflicts.add(label(left, right))
left == null -> toLocal.put(change(checkNotNull(right), 0))
right == null -> toRemote.put(change(left, 0))
known == left.fingerprint -> toLocal.put(change(right, left.revision))
known == right.fingerprint -> toRemote.put(change(left, right.revision))
else -> conflicts.add(label(left, right))
}
}
remember(key, local, remote)
return Plan(local, remote, key, toLocal, toRemote, conflicts)
}
fun apply(plan: Plan): Pair<Int, Int> {
val currentLocal = snapshot(plan.local)
val currentRemote = snapshot(plan.remote)
if (!unchangedSources(plan.toRemote, plan.local, currentLocal) ||
!unchangedSources(plan.toLocal, plan.remote, currentRemote)) {
throw IOException("Source library changed after preview")
}
var updated = 0
var conflicts = plan.conflicts.size
// A successful first write remains valid if the second connection drops.
// The next preview calculates a fresh plan from both current snapshots.
for ((target, changes) in listOf(plan.remote to plan.toRemote, plan.local to plan.toLocal)) {
if (changes.length() == 0) continue
val result = request(target.origin, path(target.id), JSONObject().put("products", changes), target.csrf)
updated += result.getJSONArray("updated").length()
conflicts += result.getJSONArray("conflicts").length()
}
val remote = snapshot(plan.remote)
val local = snapshot(plan.local)
remember(plan.key, local, remote)
return updated to conflicts
}
private fun unchangedSources(changes: JSONArray, before: Library, after: Library): Boolean =
(0 until changes.length()).all { index ->
val id = changes.getJSONObject(index).getString("id")
before.products[id]?.fingerprint == after.products[id]?.fingerprint
}
private fun remember(key: String, local: Library, remote: Library) {
val previous = JSONObject(history.getString(key, "{}") ?: "{}")
val base = JSONObject()
for ((id, product) in local.products) {
val fingerprint = product.fingerprint ?: continue
val other = remote.products[id]?.fingerprint ?: continue
if (fingerprint == other) base.put(id, fingerprint)
else if (previous.has(id)) base.put(id, previous.getString(id))
}
history.edit().putString(key, base.toString()).apply()
}
private fun awaitLocalBackend() {
val deadline = android.os.SystemClock.elapsedRealtime() + 120000
do {
try {
request(Downloads.ORIGIN, "/auth/me")
return
} catch (_: java.net.ConnectException) {
Thread.sleep(500)
}
} while (android.os.SystemClock.elapsedRealtime() < deadline)
throw IOException("Local slicer did not start")
}
private fun libraries(origin: String): List<Library> {
val session = request(origin, "/auth/me")
if (origin == server && (session.optJSONObject("user") == null || !session.optBoolean("required"))) {
throw RequestFailed(401)
}
val csrf = session.optString("csrf_token").takeUnless { it.isBlank() || it == "null" } ?: "login"
val default = request(origin, "/filament-libraries/default", JSONObject(), csrf)
fun option(row: JSONObject) = Library(origin, row.getString("id"), row.getString("name"), csrf)
val primary = option(default)
val available = exchange(origin, "/filament-libraries") { JSONArray(it) }
val others = (0 until available.length()).map { available.getJSONObject(it) }
.filter { it.optBoolean("can_manage") && it.getString("id") != primary.id }.map(::option)
return listOf(primary) + others
}
private fun snapshot(library: Library): Library {
val rows = request(library.origin, path(library.id)).getJSONArray("products")
val products = (0 until rows.length()).associate { index ->
val row = rows.getJSONObject(index)
val id = row.getString("id")
id to Product(id, row.getInt("revision"), row.optJSONObject("data"),
if (row.isNull("fingerprint")) null else row.getString("fingerprint"))
}
return library.copy(products = products)
}
private fun request(origin: String, path: String, body: JSONObject? = null, csrf: String? = null) =
exchange(origin, path, body, csrf) { JSONObject(it) }
private fun <T> exchange(origin: String, path: String, body: JSONObject? = null,
csrf: String? = null, decode: (String) -> T): T {
val connection = URL("$origin/api/v1$path").openConnection() as HttpURLConnection
try {
connection.connectTimeout = 5000
connection.readTimeout = 15000
connection.instanceFollowRedirects = false
connection.setRequestProperty("Accept", "application/json")
if (origin == server && cookie != null) connection.setRequestProperty("Cookie", cookie)
if (body != null) {
val bytes = body.toString().toByteArray(Charsets.UTF_8)
connection.requestMethod = "POST"
connection.doOutput = true
connection.setFixedLengthStreamingMode(bytes.size)
connection.setRequestProperty("Content-Type", "application/json")
connection.setRequestProperty("X-Orca-CSRF", csrf)
connection.outputStream.use { it.write(bytes) }
}
val status = connection.responseCode
if (status !in 200..299) throw RequestFailed(status)
val data = ByteArrayOutputStream()
connection.inputStream.use { input ->
val buffer = ByteArray(8192)
while (true) {
val length = input.read(buffer)
if (length < 0) break
if (data.size() + length > 8 * 1024 * 1024) throw IOException("Response too large")
data.write(buffer, 0, length)
}
}
return decode(data.toString("UTF-8"))
} finally {
connection.disconnect()
}
}
private fun path(id: String) = "/filament-libraries/${java.util.UUID.fromString(id)}/sync"
private fun change(source: Product, revision: Int) = JSONObject()
.put("id", source.id).put("revision", revision).put("data", source.data)
private fun label(left: Product?, right: Product?) =
(left?.data ?: right?.data)?.optString("name").orEmpty()
}
@@ -2,24 +2,47 @@ package uk.labus.webslicer
import android.annotation.SuppressLint
import android.app.Activity
import android.app.AlertDialog
import android.content.Intent
import android.content.pm.ApplicationInfo
import android.content.res.Configuration
import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.view.WindowInsets
import android.view.WindowInsetsController
import android.widget.ArrayAdapter
import android.widget.EditText
import android.widget.FrameLayout
import android.widget.LinearLayout
import android.widget.Spinner
import android.widget.TextView
import android.window.OnBackInvokedDispatcher
import android.webkit.ValueCallback
import android.webkit.WebChromeClient
import android.webkit.WebView
import android.webkit.WebViewClient
import android.webkit.WebResourceResponse
import java.net.HttpURLConnection
import java.net.URI
import java.net.URL
import org.json.JSONObject
import kotlin.concurrent.thread
/** Shows the web client served by the local backend in a WebView. */
/** Hosts either the embedded slicer or the selected Web Slicer server. */
class MainActivity : Activity() {
private lateinit var web: WebView
private lateinit var content: FrameLayout
private var server: String? = null
private var localStarted = false
private var backendWait: Thread? = null
private val preferences by lazy { getSharedPreferences("connection", MODE_PRIVATE) }
private val downloads by lazy { Downloads(this) }
private val theme by lazy {
WebTheme(preferences, {
resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES
}, ::updateAppearance)
}
private var chooser: ValueCallback<Array<Uri>>? = null
@SuppressLint("SetJavaScriptEnabled")
@@ -27,69 +50,8 @@ class MainActivity : Activity() {
super.onCreate(savedInstanceState)
// Debug builds expose the page to DevTools for on-device browser tests.
if (applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE != 0) WebView.setWebContentsDebuggingEnabled(true)
web = WebView(this)
web.settings.javaScriptEnabled = true
web.settings.domStorageEnabled = true
val downloads = Downloads(this)
web.webViewClient = object : WebViewClient() {
// Keep the app on its own origin; anything else opens outside.
override fun shouldOverrideUrlLoading(view: WebView, request: android.webkit.WebResourceRequest): Boolean {
if (request.url.host == "127.0.0.1") {
// The backend serves files as attachment links. Some WebView builds navigate
// to them instead of firing setDownloadListener, so route the known download
// endpoints to the handler here; the handler reads the server's filename.
val path = request.url.path ?: ""
// The web client asks for the native Bambu sign-in (cloud build only).
if (path == "/native/bambu-cloud-login") {
@Suppress("DEPRECATION")
startActivityForResult(Intent(this@MainActivity, BambuLoginActivity::class.java)
.putExtra(BambuLoginActivity.EXTRA_VERSION, request.url.getQueryParameter("plugin_version")),
BAMBU_LOGIN)
return true
}
if (path.contains("/artifacts/") || path.endsWith("/download")) {
downloads.fromUrl(request.url.toString(), null, null)
return true
}
return false
}
startActivity(Intent(Intent.ACTION_VIEW, request.url))
return true
}
override fun onPageStarted(view: WebView, url: String, favicon: android.graphics.Bitmap?) {
if (url.startsWith(Downloads.ORIGIN)) view.evaluateJavascript(Downloads.BLOB_HOOK, null)
}
override fun onPageFinished(view: WebView, url: String) {
if (url.startsWith(Downloads.ORIGIN)) view.evaluateJavascript(Downloads.BLOB_HOOK, null)
}
}
web.addJavascriptInterface(downloads, Downloads.BRIDGE)
// Kept as a fallback for WebView builds that do route attachment links here.
web.setDownloadListener { url, _, disposition, mimeType, _ -> downloads.fromUrl(url, disposition, mimeType) }
web.webChromeClient = object : WebChromeClient() {
override fun onShowFileChooser(view: WebView, callback: ValueCallback<Array<Uri>>,
params: FileChooserParams): Boolean {
chooser?.onReceiveValue(null)
chooser = callback
startActivityForResult(params.createIntent(), CHOOSE_FILE)
return true
}
}
web.loadDataWithBaseURL(null, STARTING_HTML, "text/html", "UTF-8", null)
// Android 15 (targetSdk 35) draws the app edge to edge, so the WebView would
// sit under the status and navigation bars and the system clock would overlap
// the header's menu button. Pad the content by the system bars (and any
// display cutout); the padded strip shows the WebView's dark background so it
// reads as one surface with the header and footer bars.
// Android 15 (targetSdk 35) draws the app edge to edge, so content would sit
// under the status and navigation bars and the system clock would overlap the
// header's menu button. A WebView swallows window insets for its own use, so
// pad a parent container instead and consume the insets there; the padded
// strips show the container's dark background, matching the header and footer.
val root = FrameLayout(this)
root.setBackgroundColor(APP_BACKGROUND)
root.addView(web, FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT))
content = root
root.setOnApplyWindowInsetsListener { view, insets ->
if (Build.VERSION.SDK_INT >= 30) {
val bars = insets.getInsets(WindowInsets.Type.systemBars() or WindowInsets.Type.displayCutout())
@@ -104,25 +66,365 @@ class MainActivity : Activity() {
}
setContentView(root)
root.requestApplyInsets()
startForegroundService(Intent(this, ServerService::class.java))
waitForBackend()
val saved = preferences.getString("server", null)?.let(::serverOrigin)
open(if (preferences.getBoolean("online", false)) saved else null)
if (Build.VERSION.SDK_INT >= 33) {
onBackInvokedDispatcher.registerOnBackInvokedCallback(
OnBackInvokedDispatcher.PRIORITY_DEFAULT, ::handleBack
)
}
}
private fun waitForBackend() = thread(name = "backend-wait") {
val origin = "http://127.0.0.1:${ServerService.PORT}"
private fun chooseMode() {
val savedServer = preferences.getString("server", null)?.let(::serverOrigin)
val options = mutableListOf(getString(R.string.connection_offline), getString(R.string.connection_server))
if (savedServer != null) options.add(getString(R.string.library_sync))
val current = server
val title = if (current == null) getString(R.string.connection_settings)
else getString(R.string.connection_status, Uri.parse(current).authority)
AlertDialog.Builder(this).setTitle(title)
.setItems(options.toTypedArray()) { _, item ->
when (item) {
0 -> select(null)
1 -> editServer()
2 -> if (savedServer != null) previewLibrarySync(savedServer)
}
}.show()
}
private fun previewLibrarySync(origin: String) {
startLocalBackend()
val cookie = android.webkit.CookieManager.getInstance().getCookie(origin)
val sync = LibrarySync(origin, cookie, getSharedPreferences("library-sync", MODE_PRIVATE))
runSyncTask({ sync.choices() }) { (local, remote) ->
val choices = LinearLayout(this).apply {
orientation = LinearLayout.VERTICAL
val padding = (24 * resources.displayMetrics.density).toInt()
setPadding(padding, padding / 2, padding, 0)
}
fun spinner(label: Int, libraries: List<LibrarySync.Library>): Spinner {
val title = TextView(this).apply { setText(label) }
val spinner = Spinner(this).apply {
id = android.view.View.generateViewId()
adapter = ArrayAdapter(this@MainActivity, android.R.layout.simple_spinner_item, libraries.map { it.name })
.apply { setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item) }
}
title.labelFor = spinner.id
choices.addView(title)
choices.addView(spinner)
return spinner
}
val localChoice = spinner(R.string.library_sync_local, local)
val remoteChoice = spinner(R.string.library_sync_remote, remote)
AlertDialog.Builder(this).setTitle(R.string.library_sync).setView(choices)
.setNegativeButton(android.R.string.cancel, null)
.setPositiveButton(R.string.library_sync_compare) { _, _ ->
compareLibraries(sync, local[localChoice.selectedItemPosition], remote[remoteChoice.selectedItemPosition])
}.show()
}
}
private fun compareLibraries(sync: LibrarySync, local: LibrarySync.Library, remote: LibrarySync.Library) {
runSyncTask({ sync.prepare(local, remote) }) { plan ->
val count = plan.toLocal.length() + plan.toRemote.length()
val builder = AlertDialog.Builder(this).setTitle(R.string.library_sync)
.setMessage(buildString {
append(getString(R.string.library_sync_preview, plan.toLocal.length(), plan.toRemote.length()))
if (plan.conflicts.isNotEmpty()) {
append("\n\n")
append(getString(R.string.library_sync_conflicts, plan.conflicts.size))
append("\n")
append(plan.conflicts.take(8).joinToString("\n") { "• $it" })
}
})
.setNegativeButton(android.R.string.cancel, null)
if (count > 0) builder.setPositiveButton(R.string.library_sync_apply) { _, _ ->
runSyncTask({ sync.apply(plan) }) { (updated, conflicts) ->
AlertDialog.Builder(this).setTitle(R.string.library_sync)
.setMessage(getString(R.string.library_sync_done, updated, conflicts))
.setPositiveButton(android.R.string.ok, null).show()
}
}
builder.show()
}
}
private fun <T> runSyncTask(work: () -> T, completed: (T) -> Unit) {
val progress = AlertDialog.Builder(this).setTitle(R.string.library_sync)
.setMessage(R.string.library_sync_working).setCancelable(false).show()
thread(name = "filament-library-sync") {
val result = runCatching(work)
runOnUiThread {
if (isDestroyed || isFinishing) return@runOnUiThread
progress.dismiss()
result.onSuccess(completed).onFailure { error ->
val status = (error as? LibrarySync.RequestFailed)?.status
val message = when (status) {
401 -> R.string.library_sync_sign_in
404, 405 -> R.string.library_sync_upgrade
else -> R.string.library_sync_error
}
AlertDialog.Builder(this).setTitle(R.string.library_sync)
.setMessage(message).setPositiveButton(android.R.string.ok, null).show()
}
}
}
}
private fun editServer() {
val field = EditText(this).apply {
inputType = android.text.InputType.TYPE_CLASS_TEXT or android.text.InputType.TYPE_TEXT_VARIATION_URI
setSingleLine(true)
setHint(R.string.connection_example)
setText(preferences.getString("server", ""))
}
val dialog = AlertDialog.Builder(this).setTitle(R.string.connection_server)
.setView(field)
.setNegativeButton(android.R.string.cancel, null)
.setPositiveButton(R.string.connection_connect, null)
.create()
dialog.setOnShowListener {
dialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
val origin = serverOrigin(field.text.toString())
if (origin == null) field.error = getString(R.string.connection_invalid)
else {
select(origin)
dialog.dismiss()
}
}
}
dialog.show()
}
private fun select(origin: String?) {
preferences.edit().putBoolean("online", origin != null).apply {
if (origin != null) putString("server", origin)
}.apply()
if (origin != server) open(origin)
}
@SuppressLint("SetJavaScriptEnabled")
private fun open(origin: String?) {
backendWait?.interrupt()
backendWait = null
theme.detach()
if (::web.isInitialized) {
chooser?.onReceiveValue(null)
chooser = null
content.removeView(web)
web.destroy()
}
server = origin
val local = origin == null
val activeOrigin = origin ?: Downloads.ORIGIN
val view = WebView(this)
web = view
content.addView(view, FrameLayout.LayoutParams(-1, -1))
updateAppearance()
view.settings.javaScriptEnabled = true
view.settings.domStorageEnabled = true
if (!local) view.alpha = 0f
view.webViewClient = object : WebViewClient() {
private var startupPage = local
override fun onPageStarted(view: WebView, url: String?, favicon: android.graphics.Bitmap?) {
if (web != view) return
theme.detach()
if (startupPage && url != null && sameOrigin(Uri.parse(url), activeOrigin)) view.alpha = 0f
}
override fun shouldOverrideUrlLoading(view: WebView, request: android.webkit.WebResourceRequest): Boolean {
val url = request.url
if (url.toString() == CONNECTION_SETTINGS_URL) {
if (request.isForMainFrame && request.hasGesture()) chooseMode()
return true
}
if (sameOrigin(url, activeOrigin)) {
val path = url.path.orEmpty()
if (local && request.isForMainFrame && path == "/native/bambu-cloud-login") {
@Suppress("DEPRECATION")
startActivityForResult(Intent(this@MainActivity, BambuLoginActivity::class.java)
.putExtra(BambuLoginActivity.EXTRA_VERSION, url.getQueryParameter("plugin_version")), BAMBU_LOGIN)
return true
}
if (request.isForMainFrame && (path.contains("/artifacts/") || path.endsWith("/download"))) {
download(url.toString(), null, null, activeOrigin)
return true
}
return false
}
if (request.isForMainFrame && url.scheme in setOf("https", "http")) {
try { startActivity(Intent(Intent.ACTION_VIEW, url)) }
catch (_: android.content.ActivityNotFoundException) { }
}
return request.isForMainFrame
}
override fun shouldInterceptRequest(view: WebView, request: android.webkit.WebResourceRequest): WebResourceResponse? {
// An online page must not be able to reach the embedded backend over cleartext.
if (!local && request.url.scheme == "http") {
return WebResourceResponse("text/plain", "UTF-8", null)
}
return null
}
override fun onPageFinished(view: WebView, url: String) {
if (web != view || !sameOrigin(Uri.parse(url), activeOrigin)) return
if (local) view.evaluateJavascript(Downloads.BLOB_HOOK, null)
if (startupPage) {
view.clearHistory()
startupPage = false
}
val label = JSONObject.quote(getString(R.string.connection_settings))
val version = packageManager.getPackageInfo(packageName, 0)
val stamp = assets.open("payload.stamp").bufferedReader().use { it.readText().trim() }
val build = JSONObject.quote(getString(R.string.android_build,
version.versionName, version.longVersionCode, stamp))
view.evaluateJavascript(connectionMenuScript(label, build), null)
theme.attach(view, Uri.parse(activeOrigin)) {
view.postVisualStateCallback(0, object : WebView.VisualStateCallback() {
override fun onComplete(requestId: Long) {
if (web == view && !isDestroyed) view.alpha = 1f
}
})
}
}
override fun onReceivedError(view: WebView, request: android.webkit.WebResourceRequest,
error: android.webkit.WebResourceError) {
if (!local && web == view && request.isForMainFrame) {
view.alpha = 1f
AlertDialog.Builder(this@MainActivity).setMessage(R.string.connection_unavailable)
.setPositiveButton(R.string.connection_retry) { _, _ -> view.reload() }
.setNeutralButton(R.string.connection_settings) { _, _ -> chooseMode() }
.setNegativeButton(R.string.connection_offline) { _, _ -> select(null) }
.show()
}
}
}
if (local) view.addJavascriptInterface(downloads, Downloads.BRIDGE)
view.setDownloadListener { url, _, disposition, mimeType, _ -> download(url, disposition, mimeType, activeOrigin) }
view.webChromeClient = object : WebChromeClient() {
override fun onShowFileChooser(view: WebView, callback: ValueCallback<Array<Uri>>,
params: FileChooserParams): Boolean {
chooser?.onReceiveValue(null)
return try {
startActivityForResult(params.createIntent(), CHOOSE_FILE)
chooser = callback
true
} catch (_: android.content.ActivityNotFoundException) {
chooser = null
false
}
}
}
if (local) {
val startup = STARTING_HTML
.replace("START_THEME", if (theme.dark) "dark" else "light")
.replace("CONNECTION_SETTINGS_LABEL",
android.text.TextUtils.htmlEncode(getString(R.string.connection_settings)))
view.loadDataWithBaseURL(null, startup, "text/html", "UTF-8", null)
startLocalBackend()
backendWait = waitForBackend(view)
} else view.loadUrl("$activeOrigin/")
}
// Insert the native command into both the bundled client and older server
// clients. React can replace the sign-in page with the workspace in-place.
private fun connectionMenuScript(label: String, build: String) = """
(() => {
if (window.__webSlicerConnectionMenu) return;
window.__webSlicerConnectionMenu = true;
const entry = document.createElement('a');
entry.href = '$CONNECTION_SETTINGS_URL';
entry.textContent = $label;
entry.className = 'button';
entry.setAttribute('data-close-navigation', '');
const info = document.createElement('small');
info.textContent = $build;
info.style.display = 'block';
info.style.marginTop = '0.5rem';
// Style the footer here so the layout also works with older servers.
const signInFooter = document.createElement('footer');
signInFooter.style.cssText = 'display:grid;justify-items:start;margin-block-start:1rem;overflow-wrap:anywhere';
const place = () => {
const signIn = document.querySelector('.local-login > section');
if (signIn) {
if (signInFooter.parentNode !== signIn) signIn.append(signInFooter);
if (entry.parentNode !== signInFooter) signInFooter.append(entry, info);
return;
}
const menu = document.querySelector('[data-native-preferences]') || document.querySelector('#application-navigation > .action-menu:last-child > .action-menu-content');
if (menu && entry.parentNode !== menu) menu.prepend(entry, info);
};
new MutationObserver(place).observe(document.body, {childList: true, subtree: true});
place();
})();
""".trimIndent()
private fun startLocalBackend() {
if (localStarted) return
startForegroundService(Intent(this, ServerService::class.java))
localStarted = true
}
private fun download(url: String, disposition: String?, mimeType: String?, origin: String) {
if (!sameOrigin(Uri.parse(url), origin)) return
val cookie = if (origin == Downloads.ORIGIN) null else android.webkit.CookieManager.getInstance().getCookie(url)
downloads.fromUrl(url, disposition, mimeType, origin, cookie)
}
private fun waitForBackend(view: WebView) = thread(name = "backend-wait") {
val origin = Downloads.ORIGIN
repeat(600) {
if (Thread.currentThread().isInterrupted) return@thread
try {
val connection = URL("$origin/healthz").openConnection() as HttpURLConnection
connection.connectTimeout = 500
if (connection.responseCode == 200) {
runOnUiThread { web.loadUrl("$origin/") }
val ready = try {
connection.connectTimeout = 500
connection.readTimeout = 500
connection.responseCode == 200
} finally { connection.disconnect() }
if (ready) {
runOnUiThread { if (!isDestroyed && web == view) view.loadUrl("$origin/") }
return@thread
}
} catch (_: Exception) { }
Thread.sleep(500)
} catch (_: java.io.IOException) { }
try { Thread.sleep(500) } catch (_: InterruptedException) { return@thread }
}
}
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
updateAppearance()
theme.configurationChanged()
}
private fun updateAppearance() {
val dark = theme.dark
val background = if (dark) 0xFF20262E.toInt() else 0xFFFFFFFF.toInt()
content.setBackgroundColor(background)
if (::web.isInitialized) web.setBackgroundColor(background)
if (Build.VERSION.SDK_INT >= 30) {
val mask = WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS or
WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS
window.decorView.windowInsetsController?.setSystemBarsAppearance(if (dark) 0 else mask, mask)
} else {
@Suppress("DEPRECATION")
window.decorView.systemUiVisibility = if (dark) 0 else
android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR or android.view.View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
}
}
override fun onDestroy() {
backendWait?.interrupt()
theme.detach()
chooser?.onReceiveValue(null)
content.removeView(web)
web.destroy()
super.onDestroy()
}
@Deprecated("Activity result API is not used in this minimal host")
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
if (requestCode == CHOOSE_FILE) {
@@ -134,32 +436,94 @@ class MainActivity : Activity() {
} else super.onActivityResult(requestCode, resultCode, data)
}
@Deprecated("Back handling follows the WebView history")
override fun onBackPressed() { if (web.canGoBack()) web.goBack() else super.onBackPressed() }
@Deprecated("Handle system Back without closing the slicer task")
override fun onBackPressed() = handleBack()
private fun handleBack() {
val view = web
val origin = server ?: Downloads.ORIGIN
val url = view.url
if (url == null || !sameOrigin(Uri.parse(url), origin)) {
moveTaskToBack(true)
return
}
view.evaluateJavascript(CLOSE_WEB_OVERLAY) { handled ->
if (isDestroyed || web !== view || handled == "true") return@evaluateJavascript
val history = view.copyBackForwardList()
val previous = (history.currentIndex - 1 downTo 0).firstOrNull { index ->
sameOrigin(Uri.parse(history.getItemAtIndex(index).url), origin)
}
if (previous != null) view.goBackOrForward(previous - history.currentIndex)
else moveTaskToBack(true)
}
}
companion object {
private const val CHOOSE_FILE = 1; private const val BAMBU_LOGIN = 2
// Matches the web client's header/footer bars (--wb-panel) so the inset strips blend in.
private const val APP_BACKGROUND = 0xFF20262E.toInt()
private const val CHOOSE_FILE = 1
private const val BAMBU_LOGIN = 2
private const val CONNECTION_SETTINGS_URL = "https://web-slicer.invalid/native/connection-settings"
// Shown while the local backend starts (a few seconds): the app wordmark over a
// spinner in the client's dark theme, so the first frame is not a bare sentence.
private val CLOSE_WEB_OVERLAY = """
(() => {
const dialogs = document.querySelectorAll('dialog[open]');
const dialog = document.activeElement?.closest('dialog[open]') || dialogs[dialogs.length - 1];
if (dialog) {
if (dialog.requestClose) dialog.requestClose();
else if (dialog.dispatchEvent(new Event('cancel', {cancelable:true}))) dialog.close();
return true;
}
const target = document.querySelector('.menu-toggle[aria-expanded=true], .tool-bar-all[aria-expanded=true]');
if (target) {
if (target.matches('.menu-toggle'))
document.dispatchEvent(new KeyboardEvent('keydown', {key:'Escape', bubbles:true}));
else target.click();
return true;
}
const workbench = document.querySelector('.workbench[data-mobile-panel]:not([data-mobile-panel=""])');
if (workbench) {
document.dispatchEvent(new KeyboardEvent('keydown', {key:'Escape', bubbles:true}));
return true;
}
return false;
})();
""".trimIndent()
private fun serverOrigin(value: String): String? {
val uri = try { URI(value.trim()) } catch (_: java.net.URISyntaxException) { return null }
if (!uri.scheme.equals("https", ignoreCase = true) || uri.host == null ||
uri.userInfo != null || uri.rawQuery != null || uri.rawFragment != null ||
uri.rawPath !in listOf("", "/") || uri.port !in -1..65535 || uri.port == 0) return null
val port = if (uri.port in listOf(-1, 443)) "" else ":${uri.port}"
return "https://${uri.host.lowercase(java.util.Locale.ROOT)}$port"
}
private fun sameOrigin(url: Uri, origin: String): Boolean {
val expected = Uri.parse(origin)
fun port(uri: Uri) = if (uri.port != -1) uri.port else if (uri.scheme == "https") 443 else 80
return url.scheme == expected.scheme && url.host.equals(expected.host, ignoreCase = true) &&
url.userInfo == null && port(url) == port(expected)
}
// Shown while the local backend starts, using the app's appearance preference.
private val STARTING_HTML = """
<!DOCTYPE html><html><head>
<!DOCTYPE html><html data-theme="START_THEME"><head>
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<style>
:root{color-scheme:dark}*{box-sizing:border-box}
:root{color-scheme:dark;--bg:#101a21;--fg:#dce7ec;--muted:#a6bec9;--track:#263743;--accent:#8fe3bf}
:root[data-theme=light]{color-scheme:light;--bg:#fff;--fg:#202b30;--muted:#586771;--track:#dce3e7;--accent:#147d70}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;display:flex;flex-direction:column;align-items:center;
justify-content:center;gap:30px;font-family:system-ui,-apple-system,sans-serif;
background:#101a21;color:#dce7ec;-webkit-user-select:none;user-select:none}
background:var(--bg);color:var(--fg);-webkit-user-select:none;user-select:none}
.ring{width:60px;height:60px}
.ring svg{width:100%;height:100%;animation:spin 1s linear infinite}
.ring circle{fill:none;stroke-width:5;stroke-linecap:round}
.ring .track{stroke:#263743}
.ring .head{stroke:#8fe3bf;stroke-dasharray:150;stroke-dashoffset:110}
.ring .track{stroke:var(--track)}
.ring .head{stroke:var(--accent);stroke-dasharray:150;stroke-dashoffset:110}
.text{display:flex;flex-direction:column;align-items:center;gap:7px}
.brand{font-size:23px;font-weight:700;letter-spacing:.3px}
.msg{font-size:14px;color:#88a0ab}
.msg{font-size:14px;color:var(--muted)}
.settings{font-size:14px;color:var(--muted);padding:10px}
.msg .dots::after{content:'';animation:dots 1.5s steps(1,end) infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes dots{0%{content:''}25%{content:'.'}50%{content:'..'}75%{content:'...'}}
@@ -171,6 +535,7 @@ class MainActivity : Activity() {
<circle class="head" cx="25" cy="25" r="20"></circle></svg></div>
<div class="text"><div class="brand">Web Slicer</div>
<div class="msg">Starting the slicer<span class="dots"></span></div></div>
<a class="settings" href="$CONNECTION_SETTINGS_URL">CONNECTION_SETTINGS_LABEL</a>
</body></html>
""".trimIndent()
}
@@ -9,6 +9,7 @@ import android.content.Intent
import android.content.pm.ServiceInfo
import android.net.wifi.WifiManager
import android.os.IBinder
import android.os.ParcelFileDescriptor
import android.system.Os
import android.util.Log
import java.io.File
@@ -20,6 +21,7 @@ import kotlin.system.exitProcess
* slicer crash cannot take the WebView down with it. One run per process.
*/
class ServerService : Service() {
private var shutdownWriter: ParcelFileDescriptor? = null
private var multicast: WifiManager.MulticastLock? = null
override fun onBind(intent: Intent?): IBinder? = null
@@ -28,8 +30,11 @@ class ServerService : Service() {
startForeground()
if (!started) {
started = true
val (reader, writer) = ParcelFileDescriptor.createPipe()
shutdownWriter = writer
val shutdownFd = reader.detachFd()
acquireMulticast()
thread(name = "backend") { runBackend() }
thread(name = "backend") { runBackend(shutdownFd) }
}
return START_STICKY
}
@@ -50,12 +55,17 @@ class ServerService : Service() {
}
override fun onDestroy() {
// EOF asks Uvicorn to close lifespan tasks and their native workers.
shutdownWriter?.let { writer ->
runCatching { writer.close() }.onFailure { Log.w(TAG, "could not close backend shutdown pipe", it) }
}
shutdownWriter = null
multicast?.let { if (it.isHeld) it.release() }
multicast = null
super.onDestroy()
}
private fun runBackend() {
private fun runBackend(shutdownFd: Int) {
val payload = Payload.install(this)
val home = File(payload, "python")
val libs = applicationInfo.nativeLibraryDir
@@ -88,8 +98,8 @@ class ServerService : Service() {
}
PythonHost.redirectStdio()
val status = PythonHost.run(home.path, "$libs/libpylauncher.so",
arrayOf("webslicer", "-m", "android_main", PORT.toString()))
Log.e(TAG, "Backend exited with status $status")
arrayOf("webslicer", "-m", "android_main", PORT.toString(), shutdownFd.toString()))
if (status != 0) Log.e(TAG, "Backend exited with status $status")
// A new start gets a fresh interpreter in a fresh process.
exitProcess(status)
}
@@ -0,0 +1,99 @@
package uk.labus.webslicer
import android.content.SharedPreferences
import android.net.Uri
import android.webkit.WebMessage
import android.webkit.WebMessagePort
import android.webkit.WebView
import org.json.JSONObject
import java.util.UUID
/** One appearance preference for the embedded and server WebViews. */
internal class WebTheme(
private val preferences: SharedPreferences,
private val systemDark: () -> Boolean,
private val appearanceChanged: () -> Unit
) {
private var choice = preferences.getString("theme", null)
private var port: WebMessagePort? = null
val dark: Boolean get() = when (choice) {
"dark" -> true
"light" -> false
else -> systemDark()
}
fun attach(view: WebView, origin: Uri, ready: () -> Unit) {
detach()
val channel = view.createWebMessageChannel()
val native = channel[0]
port = native
native.setWebMessageCallback(object : WebMessagePort.WebMessageCallback() {
override fun onMessage(port: WebMessagePort, message: WebMessage) {
if (this@WebTheme.port !== port) return
val updated = message.data
if (updated !in listOf("system", "light", "dark") || updated == choice) return
choice = updated
preferences.edit().putString("theme", updated).apply()
appearanceChanged()
}
})
val ticket = UUID.randomUUID().toString()
view.evaluateJavascript(script(choice?.let(JSONObject::quote) ?: "null", systemDark(), ticket)) {
if (port !== native) return@evaluateJavascript
view.postWebMessage(WebMessage(ticket, arrayOf(channel[1])), origin)
ready()
}
}
fun configurationChanged() {
port?.postMessage(WebMessage(if (systemDark()) "dark" else "light"))
}
fun detach() {
port?.close()
port = null
}
// The server can run an older client. Use its existing preference key and
// storage event so its selector reflects the choice already made in the app.
private fun script(saved: String, dark: Boolean, ticket: String) = """
(() => {
const key = 'orca-theme';
const read = () => {
try {
const value = localStorage.getItem(key);
if (value === 'light' || value === 'dark') return value;
} catch (_) {}
return 'system';
};
let choice = $saved ?? read();
let systemDark = $dark;
const apply = () => {
document.documentElement.dataset.theme = choice === 'system'
? (systemDark ? 'dark' : 'light') : choice;
};
try { localStorage.setItem(key, choice); } catch (_) {}
window.dispatchEvent(new StorageEvent('storage', {key, newValue: choice}));
apply();
const connect = event => {
if (event.data !== '$ticket' || !event.ports.length) return;
window.removeEventListener('message', connect);
const port = event.ports[0];
port.postMessage(choice);
port.onmessage = event => {
systemDark = event.data === 'dark';
if (choice === 'system') apply();
};
matchMedia('(prefers-color-scheme: dark)').addEventListener('change', apply);
document.addEventListener('change', event => {
if (event.target instanceof HTMLSelectElement && event.target.closest('.theme-selector')) {
choice = event.target.value;
apply();
port.postMessage(choice);
}
});
};
window.addEventListener('message', connect);
})();
""".trimIndent()
}
@@ -6,4 +6,27 @@
<string name="download_failed">The download could not be saved</string>
<string name="bambu_login_done">Signed in to Bambu Lab</string>
<string name="bambu_login_failed">Bambu sign-in failed: %1$s</string>
<string name="android_build">Android %1$s (%2$d) · build %3$s</string>
<string name="bambu_login_retry">Try again</string>
<string name="connection_settings">Connection settings</string>
<string name="connection_offline">Offline on this device</string>
<string name="connection_server">Connect to a Web Slicer server</string>
<string name="connection_status">Server · %1$s</string>
<string name="connection_example">https://slicer.example.com</string>
<string name="connection_connect">Connect</string>
<string name="connection_invalid">Enter an HTTPS address without a path.</string>
<string name="connection_unavailable">The Web Slicer server could not be reached.</string>
<string name="connection_retry">Retry</string>
<string name="library_sync">Sync filament library</string>
<string name="library_sync_preview">To this device: %1$d. To the server: %2$d.</string>
<string name="library_sync_conflicts">%1$d conflicts will be left for manual review:</string>
<string name="library_sync_local">Library on this device</string>
<string name="library_sync_remote">Library on the server</string>
<string name="library_sync_compare">Compare libraries</string>
<string name="library_sync_apply">Sync changes</string>
<string name="library_sync_working">Checking the filament libraries…</string>
<string name="library_sync_done">Filaments updated: %1$d. Conflicts left for review: %2$d.</string>
<string name="library_sync_sign_in">Open the server in the app and sign in to Web Slicer before syncing.</string>
<string name="library_sync_upgrade">Update the connected Web Slicer server to a version that supports library sync.</string>
<string name="library_sync_error">Sync could not complete. Retry to compare the current libraries.</string>
</resources>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- The WebView and any framework HTTP only reach the app's own loopback backend.
<!-- Only the app's own loopback backend can use cleartext HTTP.
The backend (CPython) talks to LAN printers over its own sockets, which are
not governed by this config, so no LAN cleartext exception is needed here. -->
<network-security-config>
+32 -5
View File
@@ -127,14 +127,41 @@ Resulting split:
and MQTT. The plugin ships only in the separate cloud-enabled build, never in
the standard APK (see "Distribution decision": both are published as distinct
release APKs).
- **Web client/server:** the server runs the same host and plugin (x86_64), but
the browser cannot capture the login. It needs a device-side helper (for
example the Android app signing in on the server's behalf, or a one-off
DevTools user-agent override plus a bridge snippet for testing). Deferred until
the Android path works.
- **Web client/server:** the browser pairs a
[portable desktop helper](../desktop/bambu-login/README.md) with the user's
Web Slicer session. The helper opens Bambu's sign-in page in an isolated
window and delivers the result to the confirmed HTTPS server. Pairing links
expire after ten minutes and are single-use. In authenticated installations
each Web Slicer user has a private Bambu runtime directory. A saved physical
cloud printer uses its owner's Bambu session and follows normal printer grants.
Existing single-instance sessions require a fresh sign-in when switching
to authenticated mode.
### Device panel over the account
In Printers, **Add from Bambu Lab account** opens the account printer list.
The account dialog also offers **Add to printers** beside each device. Select
the nozzle preset in the printer wizard and save the cloud connection without
entering a LAN address or access code. The connection editor exposes
**Bambu Lab cloud** as its own host choice and reports when the build lacks
cloud support.
**Import Bambu Lab presets** opens the preset import review. The native host
downloads personal printer, process and filament presets through the plugin.
Selected presets become shared templates on confirmation. Account preset
synchronization is enabled by default after sign-in in single-user mode. In
authenticated server mode, administrators can explicitly review personal
presets before importing them into the shared template catalogue. The single-user
backend checks the
account periodically and publishes imported presets as shared template
revisions. Edits to a linked template are sent back to the corresponding
Bambu preset. When both copies changed, or a local preset already uses the
name, the sync reports a conflict and preserves both copies. New unlinked
local templates and deletions stay local. You can pause sync or request an
immediate check in the account dialog. Owned presets and open projects keep
their settings. Cloud print from the account
dialog uses the external spool.
A saved Bambu connection has `bambu_transport`: `lan` (the printer's own MQTT
broker, Developer Mode) or `cloud` (the signed-in account). A cloud connection
stores only the serial number and runs the same panel code as LAN
+28 -5
View File
@@ -4,6 +4,7 @@ The app starts this module in its own process thread. It serves the API under
/api and the built web client from the same local origin, which nginx does in
the server deployment, and listens on the loopback interface only.
"""
import asyncio
import os
import sys
from pathlib import Path
@@ -60,14 +61,36 @@ def _logging_errors(scope, send):
return wrapped
async def serve(app, port, shutdown_fd):
import uvicorn
# Keep forwarded idle connections available. Bound shutdown waits for
# open preview streams before running the backend's lifespan cleanup.
config = uvicorn.Config(app, host='127.0.0.1', port=port, log_level='info',
lifespan='on', ws='websockets', http='h11', loop='asyncio',
timeout_keep_alive=120, timeout_graceful_shutdown=3)
server = uvicorn.Server(config)
loop = asyncio.get_running_loop()
def stop():
loop.remove_reader(shutdown_fd)
server.should_exit = True
if shutdown_fd is not None:
os.set_inheritable(shutdown_fd, False)
loop.add_reader(shutdown_fd, stop)
try:
await server.serve()
finally:
if shutdown_fd is not None:
loop.remove_reader(shutdown_fd)
os.close(shutdown_fd)
def main(argv):
port = int(argv[1]) if len(argv) > 1 else 8765
shutdown_fd = int(argv[2]) if len(argv) > 2 else None
frontend = Path(os.environ['WEBSLICER_FRONTEND'])
import uvicorn
# Clients reuse idle connections; a short keep-alive lets the server close one
# just as a request is sent, which over a forwarded port surfaces as a hang-up.
uvicorn.run(build(frontend), host='127.0.0.1', port=port, log_level='info',
lifespan='on', ws='websockets', http='h11', loop='asyncio', timeout_keep_alive=120)
asyncio.run(serve(build(frontend), port, shutdown_fd))
if __name__ == '__main__':
+32 -3
View File
@@ -6,6 +6,8 @@ set -euo pipefail
cd "$(dirname "$0")/../.."
JOBS=6
export ANDROID_NDK_HOME=${ANDROID_NDK_HOME:-$HOME/android/sdk/ndk/28.2.13676358}
# OpenSSL's Perl Configure reads ANDROID_NDK_ROOT directly (not via CMake).
export ANDROID_NDK_ROOT=${ANDROID_NDK_ROOT:-$ANDROID_NDK_HOME}
logs=.work-tmp/android-deps-logs; mkdir -p "$logs"
build="cmake --build deps/build-android --parallel 1 --target"
from=${1:-}; skipping=$([ -n "$from" ] && echo 1 || echo 0)
@@ -14,7 +16,7 @@ step() {
n=$((n + 1)); local name=$1; shift
if [ "$skipping" = 1 ]; then [ "$name" = "$from" ] && skipping=0 || { echo "skip $name"; return; }; fi
echo "$(TZ=Europe/Warsaw date +%T) $n-$name"
if ! timeout 7200 python3 web/scripts/run-bounded.py -- env ANDROID_NDK_HOME="$ANDROID_NDK_HOME" "$@" > "$logs/$n-$name.log" 2>&1; then
if ! timeout 7200 python3 web/scripts/run-bounded.py -- env ANDROID_NDK_HOME="$ANDROID_NDK_HOME" ANDROID_NDK_ROOT="$ANDROID_NDK_ROOT" "$@" > "$logs/$n-$name.log" 2>&1; then
echo "FAILED $name; log: $logs/$n-$name.log" >&2; tail -40 "$logs/$n-$name.log" >&2; exit 1
fi
}
@@ -23,12 +25,39 @@ step configure CMAKE_BUILD_PARALLEL_LEVEL=$JOBS cmake -S deps -B deps/build-andr
-DSLIC3R_GUI=OFF -DORCA_HEADLESS=ON -DSLIC3R_CAD=OFF -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
"-DCMAKE_EXE_LINKER_FLAGS=-Wl,--threads=1" "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--threads=1" "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,--threads=1"
for dep in Cereal TBB Boost Blosc OpenEXR OpenVDB; do
# OpenVDB (with Blosc/OpenEXR) is SLA-hollowing only and gated behind SLIC3R_OPENVDB (OFF);
# with SLIC3R_CAD=OFF the superbuild emits no dep_OpenVDB/dep_Blosc/dep_OpenEXR targets.
for dep in Cereal TBB Boost; do
step "$dep" CMAKE_BUILD_PARALLEL_LEVEL=$JOBS $build "dep_$dep"
done
step reconfigure-serial CMAKE_BUILD_PARALLEL_LEVEL=1 cmake -S deps -B deps/build-android
for dep in GMP MPFR; do step "$dep" CMAKE_BUILD_PARALLEL_LEVEL=1 $build "dep_$dep"; done
for dep in Eigen CGAL libnoise NLopt Draco Assimp FREETYPE OCCT OpenCV OpenSSL CURL PNG EXPAT JPEG Qhull; do
# OCCT consumes the FreeType source from DL_CACHE. There is no dep_FREETYPE target: the main
# project resolves FreeType with find_package. Prefetch the tarball exactly as build-native.sh.
freetype=deps/DL_CACHE/FREETYPE/freetype-2.12.1.tar.gz
mkdir -p "$(dirname "$freetype")"
[ -s "$freetype" ] || curl --fail --location --connect-timeout 15 --max-time 120 \
https://download.savannah.gnu.org/releases/freetype/freetype-2.12.1.tar.gz --output "$freetype"
# The main project's find_package(Freetype REQUIRED) (headless emboss + libslic3r font linking)
# has no system arm64 freetype and the superbuild has no recipe (OCCT builds USE_FREETYPE=OFF), so
# cross-build FreeType into the dependency prefix. Static, with the optional deps disabled.
ft_prefix=$PWD/deps/build-android/OrcaSlicer_dep/usr/local
if [ ! -f "$ft_prefix/lib/libfreetype.a" ]; then
ft_src=deps/build-android/freetype-src
rm -rf "$ft_src"; mkdir -p "$ft_src"; tar -xzf "$freetype" -C "$ft_src" --strip-components=1
step freetype-configure CMAKE_BUILD_PARALLEL_LEVEL=$JOBS cmake -S "$ft_src" -B deps/build-android/freetype-build -G Ninja \
-DCMAKE_TOOLCHAIN_FILE=$PWD/android/cmake/android-arm64.toolchain.cmake \
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="$ft_prefix" \
-DFT_DISABLE_HARFBUZZ=ON -DFT_DISABLE_BROTLI=ON -DFT_DISABLE_BZIP2=ON -DFT_DISABLE_PNG=ON
step freetype-install cmake --build deps/build-android/freetype-build --target install --parallel $JOBS
fi
for dep in Eigen CGAL libnoise NLopt Draco Assimp OCCT OpenCV; do
step "$dep" CMAKE_BUILD_PARALLEL_LEVEL=$JOBS $build "dep_$dep"
done
# OpenSSL reads nproc, which honors OMP_NUM_THREADS; cap it to the six-job budget. The headless
# plugin runtime does NOT use dep_python3: build-headless.sh links a prebuilt python.org Android
# CPython (ORCA_HEADLESS_PYTHON_ROOT), so python3 is deliberately not built here.
for dep in OpenSSL CURL PNG EXPAT JPEG Qhull; do
step "$dep" OMP_NUM_THREADS=$JOBS CMAKE_BUILD_PARALLEL_LEVEL=$JOBS $build "dep_$dep"
done
echo "$(TZ=Europe/Warsaw date +%T) done"; du -sh deps/build-android
+4 -1
View File
@@ -66,7 +66,10 @@ cp -r resources "$payload/resources"
say "web client"
# The web client build also compiles the WebAssembly preview renderer.
(source "${EMSDK:-$HOME/emsdk}/emsdk_env.sh" >/dev/null 2>&1 && cd web/frontend && npm run build --silent >/dev/null)
cp -r web/frontend/dist "$payload/frontend"
mkdir "$payload/frontend"
# Desktop helper archives are served by the web image only.
find web/frontend/dist -mindepth 1 -maxdepth 1 ! -name bambu-login \
-exec cp -rt "$payload/frontend/" -- {} +
say "payload.zip"
(cd "$payload" && python3 -c "
+8 -3
View File
@@ -1,6 +1,6 @@
services:
app:
image: ${ORCA_IMAGE_PREFIX:-gitea.labus.uk/karol/web-slicer}-app:${ORCA_IMAGE_TAG:-0.2.2-alpha}
image: ${ORCA_IMAGE_PREFIX:-gitea.labus.uk/karol/web-slicer}-app:${ORCA_IMAGE_TAG:-0.3.1-alpha}
init: true
restart: unless-stopped
logging:
@@ -39,6 +39,11 @@ services:
ORCA_SIMPLYPRINT_OAUTH_CLIENT_ID: ${ORCA_SIMPLYPRINT_OAUTH_CLIENT_ID:-}
ORCA_SIMPLYPRINT_OAUTH_CLIENT_SECRET: ${ORCA_SIMPLYPRINT_OAUTH_CLIENT_SECRET:-}
ORCA_SIMPLYPRINT_OAUTH_REDIRECT_URI: ${ORCA_SIMPLYPRINT_OAUTH_REDIRECT_URI:-}
ORCA_SIMPLYPRINT_OAUTH_PRINTERS_READ: ${ORCA_SIMPLYPRINT_OAUTH_PRINTERS_READ:-0}
ORCA_SIMPLYPRINT_OAUTH_PRINT_HISTORY_READ: ${ORCA_SIMPLYPRINT_OAUTH_PRINT_HISTORY_READ:-0}
ORCA_SIMPLYPRINT_OAUTH_PRINTER_ACTIONS: ${ORCA_SIMPLYPRINT_OAUTH_PRINTER_ACTIONS:-0}
ORCA_PRUSACONNECT_OAUTH_CLIENT_ID: ${ORCA_PRUSACONNECT_OAUTH_CLIENT_ID:-}
ORCA_PRUSACONNECT_OAUTH_REDIRECT_URI: ${ORCA_PRUSACONNECT_OAUTH_REDIRECT_URI:-}
ORCA_POST_PROCESSORS: ${ORCA_POST_PROCESSORS:-}
ORCA_BACKUP_DIR: ${ORCA_BACKUP_DIR:-/data/backups}
ORCA_BACKUP_INTERVAL: ${ORCA_BACKUP_INTERVAL:-21600}
@@ -67,7 +72,7 @@ services:
interval: 30s
timeout: 5s
retries: 3
image: ${ORCA_IMAGE_PREFIX:-gitea.labus.uk/karol/web-slicer}-web:${ORCA_IMAGE_TAG:-0.2.2-alpha}
image: ${ORCA_IMAGE_PREFIX:-gitea.labus.uk/karol/web-slicer}-web:${ORCA_IMAGE_TAG:-0.3.1-alpha}
restart: unless-stopped
logging:
driver: json-file
@@ -81,7 +86,7 @@ services:
condition: service_healthy
demo:
profiles: [demo]
image: ${ORCA_IMAGE_PREFIX:-gitea.labus.uk/karol/web-slicer}-demo:${ORCA_IMAGE_TAG:-0.2.2-alpha}
image: ${ORCA_IMAGE_PREFIX:-gitea.labus.uk/karol/web-slicer}-demo:${ORCA_IMAGE_TAG:-0.3.1-alpha}
restart: unless-stopped
read_only: true
cpus: 0.25
+3
View File
@@ -84,6 +84,9 @@ orcaslicer_add_cmake_project(OpenCV
-DWITH_IMGCODEC_GIF=OFF
-DWITH_KLEIDICV=OFF
-DENABLE_PRECOMPILED_HEADERS=OFF
# Build only the baseline CPU code, without the per-CPU copies OpenCV picks from at runtime.
# Orca's image work is too light to gain from them, and they make OpenCV slower to build and the app bigger.
-DCPU_DISPATCH=
-DINSTALL_TESTS=OFF
-DINSTALL_C_EXAMPLES=OFF
-DINSTALL_PYTHON_EXAMPLES=OFF
+1 -1
View File
@@ -44,7 +44,7 @@ endif ()
orcaslicer_add_cmake_project(
wxWidgets
GIT_REPOSITORY "https://github.com/OrcaSlicer/Orca-deps-wxWidgets"
GIT_TAG b44c39c100975a0ac0e46f937aa3f3eae5e18631
GIT_TAG 89844cb1f80b17a5916d5274cd88317cac3e2a3c
# A shallow clone fetches only the branch head, so checking out a pinned commit fails once the
# branch moves past it.
GIT_SHALLOW OFF
+4
View File
@@ -14,6 +14,10 @@
#pragma once
// OrcaSlicer: let automation (the MCP server) record items through the test-engine hooks, which
// ImGuiWrapper implements. ImGui calls them only while ImGuiContext::TestEngineHookItems is set.
#define IMGUI_ENABLE_TEST_ENGINE
//---- Define assertion handler. Defaults to calling assert().
// If your macro uses multiple statements, make sure is enclosed in a 'do { .. } while (0)' block so it can be used as a single statement.
//#define IM_ASSERT(_EXPR) MyAssert(_EXPR)
+11 -2
View File
@@ -759,7 +759,8 @@ enum ImGuiItemStatusFlags_
ImGuiItemStatusFlags_Openable = 1 << 20, //
ImGuiItemStatusFlags_Opened = 1 << 21, //
ImGuiItemStatusFlags_Checkable = 1 << 22, //
ImGuiItemStatusFlags_Checked = 1 << 23 //
ImGuiItemStatusFlags_Checked = 1 << 23, //
ImGuiItemStatusFlags_Inputable = 1 << 24 // [OrcaSlicer, as upstream] Takes typed input (a slider or drag without ImGuiSliderFlags_NoInput, an input field)
#endif
};
@@ -2666,17 +2667,25 @@ extern void ImGuiTestEngineHook_ItemInfo(ImGuiContext* ctx, ImGuiID id,
extern void ImGuiTestEngineHook_IdInfo(ImGuiContext* ctx, ImGuiDataType data_type, ImGuiID id, const void* data_id);
extern void ImGuiTestEngineHook_IdInfo(ImGuiContext* ctx, ImGuiDataType data_type, ImGuiID id, const void* data_id, const void* data_id_end);
extern void ImGuiTestEngineHook_Log(ImGuiContext* ctx, const char* fmt, ...);
// OrcaSlicer: what a field shows and what kind of widget it is ("slider", "drag", "input", "multiline", "combo"), and the
// text TextEx() draws, for automation; upstream's test engine reads these by other means.
extern void ImGuiTestEngineHook_ItemValue(ImGuiContext* ctx, ImGuiID id, const char* kind, const char* value, ImGuiItemStatusFlags flags);
extern void ImGuiTestEngineHook_Text(ImGuiContext* ctx, const ImRect& bb, const char* text, const char* text_end);
#define IMGUI_TEST_ENGINE_ITEM_VALUE(_ID,_KIND,_VALUE,_FLAGS) if (g.TestEngineHookItems) ImGuiTestEngineHook_ItemValue(&g, _ID, _KIND, _VALUE, _FLAGS)
#define IMGUI_TEST_ENGINE_TEXT(_BB,_TEXT,_TEXT_END) if (g.TestEngineHookItems) ImGuiTestEngineHook_Text(&g, _BB, _TEXT, _TEXT_END)
#define IMGUI_TEST_ENGINE_ITEM_ADD(_BB,_ID) if (g.TestEngineHookItems) ImGuiTestEngineHook_ItemAdd(&g, _BB, _ID) // Register item bounding box
#define IMGUI_TEST_ENGINE_ITEM_INFO(_ID,_LABEL,_FLAGS) if (g.TestEngineHookItems) ImGuiTestEngineHook_ItemInfo(&g, _ID, _LABEL, _FLAGS) // Register item label and status flags (optional)
#define IMGUI_TEST_ENGINE_LOG(_FMT,...) if (g.TestEngineHookItems) ImGuiTestEngineHook_Log(&g, _FMT, __VA_ARGS__) // Custom log entry from user land into test log
#define IMGUI_TEST_ENGINE_ID_INFO(_ID,_TYPE,_DATA) if (g.TestEngineHookIdInfo == id) ImGuiTestEngineHook_IdInfo(&g, _TYPE, _ID, (const void*)(_DATA));
#define IMGUI_TEST_ENGINE_ID_INFO2(_ID,_TYPE,_DATA,_DATA2) if (g.TestEngineHookIdInfo == id) ImGuiTestEngineHook_IdInfo(&g, _TYPE, _ID, (const void*)(_DATA), (const void*)(_DATA2));
#define IMGUI_TEST_ENGINE_ID_INFO2(_ID,_TYPE,_DATA,_DATA2) if (g.TestEngineHookItems || g.TestEngineHookIdInfo == id) ImGuiTestEngineHook_IdInfo(&g, _TYPE, _ID, (const void*)(_DATA), (const void*)(_DATA2));
#else
#define IMGUI_TEST_ENGINE_ITEM_ADD(_BB,_ID) do { } while (0)
#define IMGUI_TEST_ENGINE_ITEM_INFO(_ID,_LABEL,_FLAGS) do { } while (0)
#define IMGUI_TEST_ENGINE_LOG(_FMT,...) do { } while (0)
#define IMGUI_TEST_ENGINE_ID_INFO(_ID,_TYPE,_DATA) do { } while (0)
#define IMGUI_TEST_ENGINE_ID_INFO2(_ID,_TYPE,_DATA,_DATA2) do { } while (0)
#define IMGUI_TEST_ENGINE_ITEM_VALUE(_ID,_KIND,_VALUE,_FLAGS) do { } while (0)
#define IMGUI_TEST_ENGINE_TEXT(_BB,_TEXT,_TEXT_END) do { } while (0)
#endif
//-----------------------------------------------------------------------------
+35 -9
View File
@@ -234,6 +234,7 @@ void ImGui::TextEx(const char* text, const char* text_end, ImGuiTextFlags flags)
ImRect bb(text_pos, text_pos + text_size);
ItemSize(text_size, 0.0f);
IMGUI_TEST_ENGINE_TEXT(bb, text_begin, text_end);
ItemAdd(bb, 0);
}
else
@@ -243,6 +244,7 @@ void ImGui::TextEx(const char* text, const char* text_end, ImGuiTextFlags flags)
ImRect bb(text_pos, text_pos + text_size);
ItemSize(text_size, 0.0f);
IMGUI_TEST_ENGINE_TEXT(bb, text_begin, text_end);
if (!ItemAdd(bb, 0))
return;
@@ -837,6 +839,10 @@ bool ImGui::InvisibleButton(const char* str_id, const ImVec2& size_arg, ImGuiBut
bool hovered, held;
bool pressed = ButtonBehavior(bb, id, &hovered, &held, flags);
#ifdef IMGUI_ENABLE_TEST_ENGINE
ImGuiContext& g = *GImGui;
IMGUI_TEST_ENGINE_ITEM_INFO(id, str_id, window->DC.LastItemStatusFlags);
#endif
return pressed;
}
@@ -1329,6 +1335,7 @@ bool ImGui::ImageTextButton(const ImVec2& button_size, const char* text, ImTextu
bool hovered, held;
bool pressed = ButtonBehavior(bb, id, &hovered, &held);
IMGUI_TEST_ENGINE_ITEM_INFO(id, text, window->DC.LastItemStatusFlags);
// Render
const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
@@ -1556,7 +1563,8 @@ bool ImGui::RadioButton(const char* label, bool active)
if (label_size.x > 0.0f)
RenderText(label_pos, label);
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags | ImGuiItemStatusFlags_Checkable | (active ? ImGuiItemStatusFlags_Checked : 0));
IMGUI_TEST_ENGINE_ITEM_VALUE(id, "radio", "", 0);
return pressed;
}
@@ -1603,7 +1611,8 @@ bool ImGui::BBLRadioButton(const char *label, bool active)
if (g.LogEnabled) LogRenderedText(&label_pos, active ? "(x)" : "( )");
if (label_size.x > 0.0f) RenderText(label_pos, label);
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags | ImGuiItemStatusFlags_Checkable | (active ? ImGuiItemStatusFlags_Checked : 0));
IMGUI_TEST_ENGINE_ITEM_VALUE(id, "radio", "", 0);
return pressed;
}
@@ -2052,6 +2061,8 @@ bool ImGui::BeginCombo(const char* label, const char* preview_value, ImGuiComboF
popup_open = true;
}
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags | ImGuiItemStatusFlags_Openable | (popup_open ? ImGuiItemStatusFlags_Opened : 0));
IMGUI_TEST_ENGINE_ITEM_VALUE(id, "combo", preview_value, 0);
if (!popup_open)
return false;
@@ -2168,6 +2179,8 @@ bool ImGui::BBLBeginCombo(const char *label, const char *preview_value, ImGuiCom
popup_open = true;
}
if (push_color_count > 0) { ImGui::PopStyleColor(push_color_count); }
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags | ImGuiItemStatusFlags_Openable | (popup_open ? ImGuiItemStatusFlags_Opened : 0));
IMGUI_TEST_ENGINE_ITEM_VALUE(id, "combo", preview_value, 0);
if (!popup_open) return false;
if (has_window_size_constraint) {
@@ -2933,7 +2946,8 @@ bool ImGui::DragScalar(const char* label, ImGuiDataType data_type, void* p_data,
if (label_size.x > 0.0f)
RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags | (temp_input_allowed ? ImGuiItemStatusFlags_Inputable : 0));
IMGUI_TEST_ENGINE_ITEM_VALUE(id, "drag", value_buf, temp_input_allowed ? ImGuiItemStatusFlags_Inputable : 0);
return value_changed;
}
@@ -3019,7 +3033,8 @@ bool ImGui::BBLDragScalar(const char *label, ImGuiDataType data_type, void *p_da
if (label_size.x > 0.0f) RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
if (push_color_count) { ImGui::PopStyleColor(1); }
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags | (temp_input_allowed ? ImGuiItemStatusFlags_Inputable : 0));
IMGUI_TEST_ENGINE_ITEM_VALUE(id, "drag", value_buf, temp_input_allowed ? ImGuiItemStatusFlags_Inputable : 0);
return value_changed;
}
@@ -3643,7 +3658,8 @@ bool ImGui::SliderScalar(const char* label, ImGuiDataType data_type, void* p_dat
if (label_size.x > 0.0f)
RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags | (temp_input_allowed ? ImGuiItemStatusFlags_Inputable : 0));
IMGUI_TEST_ENGINE_ITEM_VALUE(id, "slider", value_buf, temp_input_allowed ? ImGuiItemStatusFlags_Inputable : 0);
return value_changed;
}
@@ -3719,7 +3735,8 @@ bool ImGui::BBLSliderScalarIn(const char *label, ImGuiDataType data_type, void *
float value_size = CalcTextSize(value_buf).x;
RenderTextClipped(ImVec2(frame_bb.Min.x + end_x,frame_bb.Min.y),ImVec2(frame_bb.Max.x + value_size,frame_bb.Max.y), value_buf, value_buf_end, NULL, ImVec2(0.5f, 0.5f));
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags | (temp_input_allowed ? ImGuiItemStatusFlags_Inputable : 0));
IMGUI_TEST_ENGINE_ITEM_VALUE(id, "slider", value_buf, temp_input_allowed ? ImGuiItemStatusFlags_Inputable : 0);
return value_changed;
}
@@ -3833,7 +3850,15 @@ bool ImGui::BBLSliderScalar(const char *label, ImGuiDataType data_type, void *p_
if (label_size.x > 0.0f) RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags | (temp_input_allowed ? ImGuiItemStatusFlags_Inputable : 0));
#ifdef IMGUI_ENABLE_TEST_ENGINE
if (g.TestEngineHookItems)
{
char value_buf[64];
DataTypeFormatString(value_buf, IM_ARRAYSIZE(value_buf), data_type, p_data, format);
IMGUI_TEST_ENGINE_ITEM_VALUE(id, "slider", value_buf, temp_input_allowed ? ImGuiItemStatusFlags_Inputable : 0);
}
#endif
return value_changed;
}
@@ -5564,7 +5589,8 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
if (value_changed && !(flags & ImGuiInputTextFlags_NoMarkEdited))
MarkItemEdited(id);
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags | (is_readonly ? 0 : ImGuiItemStatusFlags_Inputable));
IMGUI_TEST_ENGINE_ITEM_VALUE(id, is_multiline ? "multiline" : "input", is_password ? "" : buf, is_readonly ? 0 : ImGuiItemStatusFlags_Inputable);
if ((flags & ImGuiInputTextFlags_EnterReturnsTrue) != 0)
return enter_pressed;
else
@@ -7219,7 +7245,7 @@ bool ImGui::BBLImageSelectable(ImTextureID user_texture_id, const ImVec2& size_a
if (pressed && (window->Flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiSelectableFlags_DontClosePopups) && !(g.CurrentItemFlags & ImGuiItemFlags_SelectableDontClosePopup))
CloseCurrentPopup();
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
IMGUI_TEST_ENGINE_ITEM_INFO(id, NULL, window->DC.LastItemStatusFlags);
return pressed;
}
+2
View File
@@ -0,0 +1,2 @@
node_modules/
dist/
+33
View File
@@ -0,0 +1,33 @@
# Web Slicer Bambu Login
This portable helper pairs a Bambu Lab login with an HTTPS Web Slicer
instance configured for Bambu Cloud and local authentication.
It uses an isolated browser window for the Bambu Lab sign-in page.
The signed-in Web Slicer user generates a single-use pairing link
that expires after ten minutes. The desktop helper sends the login result to
the confirmed server over HTTPS and keeps no local Bambu session after closing.
In Web Slicer open **Bambu Lab account → Desktop helper**. Download the archive for your system
and select **Create pairing link**.
Copy the pairing link, paste it into the helper and confirm the server address.
Return to Web Slicer after the helper confirms the account is connected.
## Packaging
With Node.js and npm installed, run from this directory:
```sh
npm ci
npm run package -- --platform=linux --arch=x64
npm run package -- --platform=win32 --arch=x64
npm run package -- --platform=darwin --arch=arm64
```
To make the archives available in the account dialog, serve them under
`/bambu-login/` as `WebSlicerBambuLogin-linux-x64.zip` and
`WebSlicerBambuLogin-win32-x64.zip`. Archive the entire generated directory
from `dist/`. Run
`WebSlicerBambuLogin` on Linux, `WebSlicerBambuLogin.exe` on Windows or
`WebSlicerBambuLogin.app` on macOS. Use `--arch=x64` for Intel Macs.
Packages generated with these commands are development artifacts. Production
distribution should use platform code signing and macOS notarization.
+16
View File
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self'; style-src 'self'">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Web Slicer Bambu Login</title>
<link rel="stylesheet" href="style.css">
<h1>Connect Bambu Lab to Web Slicer</h1>
<form>
<label for="link">Pairing link from Web Slicer</label>
<input id="link" type="url" autocomplete="off" required autofocus>
<button type="submit">Open Bambu Lab sign-in</button>
</form>
<p role="status" id="status"></p>
<script src="setup.js"></script>
</html>
+118
View File
@@ -0,0 +1,118 @@
const {app, BrowserWindow, dialog, ipcMain, nativeTheme, session} = require('electron');
const path = require('node:path');
const officialSignIn = 'https://bambulab.com/sign-in';
const officialOrigins = new Set(['https://bambulab.com', 'https://www.bambulab.com']);
const preferences = {
preload: path.join(__dirname, 'preload.cjs'),
contextIsolation: true,
sandbox: true,
nodeIntegration: false
};
let setup, signIn, pairing, sending;
function parseLink(value) {
const url = new URL(value.trim());
const params = new URLSearchParams(url.hash.slice(1));
const code = params.get('bambu_pairing');
const version = params.get('version');
if (url.protocol !== 'https:' || url.username || url.password || !url.pathname.endsWith('/bambu-cloud/desktop-login/redeem') ||
url.search || !code || !/^[A-Za-z0-9_-]{43}$/.test(code))
throw new Error('Paste the HTTPS pairing link from Web Slicer.');
url.hash = '';
return {origin: url.origin, endpoint: url.href, code, version: /^\d{2}(\.\d{2}){2,3}$/.test(version ?? '') ? version : '02.09.01.99'};
}
function openSignIn() {
const partition = session.fromPartition('bambu-' + crypto.randomUUID());
partition.setPermissionRequestHandler((_contents, _permission, callback) => callback(false));
partition.setPermissionCheckHandler(() => false);
partition.on('will-download', event => event.preventDefault());
signIn = new BrowserWindow({title: 'Bambu Lab sign-in', width: 820, height: 760,
webPreferences: {...preferences, session: partition}});
const window = signIn;
const contents = window.webContents;
contents.setWindowOpenHandler(() => ({action: 'deny'}));
const checkNavigation = (event) => {
if (!officialOrigins.has(new URL(event.url).origin)) event.preventDefault();
};
contents.on('will-navigate', checkNavigation);
contents.on('will-redirect', checkNavigation);
const theme = nativeTheme.shouldUseDarkColors ? 'dark' : 'light';
contents.setUserAgent(partition.getUserAgent() + ' BBL-Slicer/v' + pairing.version +
' (' + theme + ') BBL-Language/' + app.getLocale().split('-')[0]);
window.on('closed', () => {
signIn = null;
if (!sending) pairing = null;
void partition.clearStorageData().catch(() => {});
});
return window.loadURL(officialSignIn);
}
ipcMain.handle('pairing:open', async (event, value) => {
if (!setup || event.senderFrame !== setup.webContents.mainFrame || signIn || sending)
return 'Close the current sign-in before starting another one.';
try {
pairing = parseLink(value);
} catch (error) {
return error.message;
}
const result = await dialog.showMessageBox(setup, {
type: 'question', title: 'Confirm Web Slicer server',
message: 'Send the Bambu sign-in to this Web Slicer?',
detail: pairing.origin, buttons: ['Cancel', 'Continue'], defaultId: 0, cancelId: 0
});
if (result.response !== 1) {pairing = null;return '';}
try {
await openSignIn();
return 'Complete sign-in in the Bambu Lab window.';
} catch {
signIn?.close();
pairing = null;
return 'Could not open the Bambu Lab sign-in page.';
}
});
ipcMain.on('pairing:result', async (event, message) => {
const frame = event.senderFrame;
if (!signIn || frame !== signIn.webContents.mainFrame || !frame ||
!officialOrigins.has(new URL(frame.url).origin) || !pairing || sending ||
typeof message !== 'string' || message.length > 65536) return;
let body;
try {
const {command, data} = JSON.parse(message);
if (command === 'user_ticket_login' && /^[A-Za-z0-9]{4,64}$/.test(data?.ticket ?? '')) body = {ticket: data.ticket};
if (command === 'user_login' && data && typeof data === 'object' && !Array.isArray(data)) body = {session: data};
} catch {return;}
if (!body) return;
sending = true;
const {endpoint, code} = pairing;
let accepted = false;
try {
const response = await fetch(endpoint, {
method: 'POST', redirect: 'error', signal: AbortSignal.timeout(60000),
headers: {'Content-Type': 'application/json', Authorization: 'Bearer ' + code},
body: JSON.stringify(body)
});
accepted = response.status === 204;
} catch {/* Report a generic error without exposing credentials. */}
signIn?.close();
pairing = null;
sending = false;
if (setup && !setup.isDestroyed()) {
await dialog.showMessageBox(setup, {
type: accepted ? 'info' : 'error',
message: accepted ? 'Bambu Lab account linked' : 'Could not link the Bambu Lab account',
detail: accepted ? 'You can return to Web Slicer now.' : 'Create a new pairing link in Web Slicer and try again.'
});
}
});
app.whenReady().then(() => {
setup = new BrowserWindow({title: 'Web Slicer Bambu Login', width: 620, height: 360, webPreferences: preferences});
setup.webContents.setWindowOpenHandler(() => ({action: 'deny'}));
setup.webContents.on('will-navigate', event => event.preventDefault());
setup.on('closed', () => {setup = null;app.quit();});
return setup.loadFile(path.join(__dirname, 'index.html'));
});
app.on('window-all-closed', () => app.quit());
+728
View File
@@ -0,0 +1,728 @@
{
"name": "web-slicer-bambu-login",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "web-slicer-bambu-login",
"version": "0.1.0",
"devDependencies": {
"@electron/packager": "20.3.0",
"electron": "45.4.1"
}
},
"node_modules/@electron-internal/extract-zip": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/@electron-internal/extract-zip/-/extract-zip-1.0.8.tgz",
"integrity": "sha512-8iajeLFbzNwM0m3AsQZSZgYREWglAImyGvvFSWU34FgMW8sHlzdwj9QKvv9dgN7jMP591EFUF/sLOC3Jl9YIjQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=22.12.0"
}
},
"node_modules/@electron/asar": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/@electron/asar/-/asar-4.3.2.tgz",
"integrity": "sha512-2nwyO3OgmLgkYQe6TzB8FmyrBKGgmXzSO51ozoG2BpHOLPTPdQpBt/zD0MdPkhQr4UqVgw3u09y4uYxgZKhmtg==",
"dev": true,
"license": "MIT",
"dependencies": {
"glob": "^14.0.2",
"minimatch": "^11.0.1"
},
"bin": {
"asar": "bin/asar.mjs"
},
"engines": {
"node": ">=22.12.0"
}
},
"node_modules/@electron/get": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/@electron/get/-/get-5.1.0.tgz",
"integrity": "sha512-3kSBtG8ObcTVfXanm5vVJ6UnBLEVmVsRk1M+vGqCuMBV+XLCbJYuWQful+yIy0GQDsSlK0kHEriEHn7SPk4EnA==",
"dev": true,
"license": "MIT",
"dependencies": {
"debug": "^4.1.1",
"env-paths": "^3.0.0",
"graceful-fs": "^4.2.11",
"progress": "^2.0.3",
"semver": "^7.6.3",
"sumchecker": "^3.0.1"
},
"engines": {
"node": ">=22.12.0"
},
"optionalDependencies": {
"undici": "^7.24.4"
}
},
"node_modules/@electron/notarize": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-3.1.2.tgz",
"integrity": "sha512-S/EH6W/GTe3XiD4oYHW+6xuUWZWjc9F5gayMrNdmRLv7qG9KRYmYE26+RDgC1hYUZVY3qLpa1VftxuL+sL5VQg==",
"dev": true,
"license": "MIT",
"dependencies": {
"debug": "^4.4.0",
"promise-retry": "^2.0.1"
},
"engines": {
"node": ">= 22.12.0"
}
},
"node_modules/@electron/osx-sign": {
"version": "2.7.2",
"resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-2.7.2.tgz",
"integrity": "sha512-BD5ZyKDzzC1PLzWQCl1nw+X2/ErRCJGEIPwtjfOnCH+8KRLfBe/Vr9khUuEJC5bbrVACl8uO2Q2O/UqOzrcFgw==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"debug": "^4.3.4",
"isbinaryfile": "^4.0.8",
"plist": "^3.0.5",
"semver": "^7.7.1"
},
"bin": {
"electron-osx-flat": "bin/electron-osx-flat.mjs",
"electron-osx-sign": "bin/electron-osx-sign.mjs"
},
"engines": {
"node": ">=22.12.0"
}
},
"node_modules/@electron/packager": {
"version": "20.3.0",
"resolved": "https://registry.npmjs.org/@electron/packager/-/packager-20.3.0.tgz",
"integrity": "sha512-3MvgJgy6YJ5ti0oGGBKrWKdYwpTaoRrhranMDgHSQ6i5t56yZV9IRDyoXTuqBp97LiKqnZeAMe2wTcF/9+fP5g==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"@electron-internal/extract-zip": "^1.0.1",
"@electron/asar": "^4.0.1",
"@electron/get": "^5.0.0",
"@electron/notarize": "^3.1.0",
"@electron/osx-sign": "^2.2.0",
"@electron/universal": "^3.0.1",
"@electron/windows-sign": "^2.0.2",
"@malept/cross-spawn-promise": "^2.0.0",
"debug": "^4.4.1",
"filenamify": "^6.0.0",
"galactus": "^2.0.2",
"graceful-fs": "^4.2.11",
"junk": "^4.0.1",
"plist": "^3.1.0",
"resedit": "^2.0.3",
"semver": "^7.7.2",
"yargs-parser": "^22.0.0"
},
"bin": {
"electron-packager": "bin/electron-packager.mjs"
},
"engines": {
"node": ">= 22.12.0"
},
"funding": {
"url": "https://github.com/electron/packager?sponsor=1"
}
},
"node_modules/@electron/universal": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/@electron/universal/-/universal-3.0.6.tgz",
"integrity": "sha512-MonS1kfkZdSEkLZI0pdR/TCx8ecxwRSFm7sORfwIkDI9UaIbHnk4Mgeqq+Ob9qDQRV8LZ9+hHCmimpA9BRcNxw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@electron/asar": "^4.0.0",
"debug": "^4.3.1",
"plist": "^3.1.0"
},
"engines": {
"node": ">=22.12.0"
}
},
"node_modules/@electron/windows-sign": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@electron/windows-sign/-/windows-sign-2.1.0.tgz",
"integrity": "sha512-hyRE175pWNxU3R0k7B7Zwm4KpSgK/Ql+7yqUPRfnYc9K06uVPJDLvXH6oXpl/RAKbLu0Y114xuH6BdjDhF/pKA==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"debug": "^4.3.4",
"graceful-fs": "^4.2.11",
"postject": "^1.0.0-alpha.6"
},
"bin": {
"electron-windows-sign": "bin/electron-windows-sign.mjs"
},
"engines": {
"node": ">=22.12.0"
}
},
"node_modules/@isaacs/nonrecursive-glob-match": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.1.0.tgz",
"integrity": "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==",
"dev": true,
"license": "BlueOak-1.0.0"
},
"node_modules/@malept/cross-spawn-promise": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-2.0.0.tgz",
"integrity": "sha512-1DpKU0Z5ThltBwjNySMC14g0CkbyhCaz9FkhxqNsZI6uAPJXFS8cMXlBKo26FJ8ZuW6S9GCMcR9IO5k2X5/9Fg==",
"dev": true,
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/malept"
},
{
"type": "tidelift",
"url": "https://tidelift.com/subscription/pkg/npm-.malept-cross-spawn-promise?utm_medium=referral&utm_source=npm_fund"
}
],
"license": "Apache-2.0",
"dependencies": {
"cross-spawn": "^7.0.1"
},
"engines": {
"node": ">= 12.13.0"
}
},
"node_modules/@types/node": {
"version": "24.19.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz",
"integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": ">=7.24.0 <7.24.7"
}
},
"node_modules/@xmldom/xmldom": {
"version": "0.9.12",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.12.tgz",
"integrity": "sha512-5AXjrcMClTryPe9LgZrygpB1lj7s0S9E0+W+AHaVKAVyHanafK86iPSvG5xHVSp/jC+VH1UXu0TAEmY279xH7A==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=14.6"
}
},
"node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"license": "MIT"
},
"node_modules/brace-expansion": {
"version": "5.0.13",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.13.tgz",
"integrity": "sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "20 || >=22"
}
},
"node_modules/commander": {
"version": "9.5.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",
"integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^12.20.0 || >=14"
}
},
"node_modules/cross-spawn": {
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
"license": "MIT",
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/debug": {
"version": "4.4.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
"integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
"dev": true,
"license": "MIT",
"dependencies": {
"ms": "^2.1.3"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/electron": {
"version": "45.4.1",
"resolved": "https://registry.npmjs.org/electron/-/electron-45.4.1.tgz",
"integrity": "sha512-DjsJ/eQhovkjf1vYFFyh5GB8NMx+L5bdYaonvGOlWselg3DQ0fwIF0N/+2hrPsoS4whmmNswh21ym/8dgt1y5Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"@electron-internal/extract-zip": "^1.0.1",
"@electron/get": "^5.0.0",
"@types/node": "^24.9.0"
},
"bin": {
"electron": "cli.js",
"install-electron": "install.js"
},
"engines": {
"node": ">= 22.12.0"
}
},
"node_modules/env-paths": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz",
"integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/err-code": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz",
"integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==",
"dev": true,
"license": "MIT"
},
"node_modules/filename-reserved-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-3.0.0.tgz",
"integrity": "sha512-hn4cQfU6GOT/7cFHXBqeBg2TbrMBgdD0kcjLhvSQYYwm3s4B6cjvBfb7nBALJLAXqmU5xajSa7X2NnUud/VCdw==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/filenamify": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/filenamify/-/filenamify-6.0.0.tgz",
"integrity": "sha512-vqIlNogKeyD3yzrm0yhRMQg8hOVwYcYRfjEoODd49iCprMn4HL85gK3HcykQE53EPIpX3HcAbGA5ELQv216dAQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"filename-reserved-regex": "^3.0.0"
},
"engines": {
"node": ">=16"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/flora-colossus": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/flora-colossus/-/flora-colossus-3.0.2.tgz",
"integrity": "sha512-Jk78K/Tzt6saxQPGChlJw69xuFGpWyTSAS8EdU0h/FyXwD2K46yNOXmo6nRHcZ9ooekyBAzMkwmiGNt7wOC5zg==",
"dev": true,
"license": "MIT",
"dependencies": {
"debug": "^4.4.1"
},
"engines": {
"node": ">=22.12.0"
}
},
"node_modules/galactus": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/galactus/-/galactus-2.0.2.tgz",
"integrity": "sha512-HmKyTFGomdAchz4umx8MwBnrnfFmdpwiTyGA4ZOF7rya2Lmgbc9qate4yweInL+0gUBVImhaz12SBGpW3SY4Yg==",
"dev": true,
"license": "MIT",
"dependencies": {
"debug": "^4.4.1",
"flora-colossus": "^3.0.2"
},
"engines": {
"node": ">=22.12.0"
}
},
"node_modules/glob": {
"version": "14.0.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-14.0.6.tgz",
"integrity": "sha512-OwXjVP2svY5EyLY75Vek96C8qK43gqrt4xsZ+qSILdnaEiJPXkd62mcfUSNx/TQErQRdu5uM5kF67sfONragKw==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"minimatch": "^11.0.5",
"minipass": "^7.1.3",
"path-scurry": "^3.0.0"
},
"engines": {
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/graceful-fs": {
"version": "4.2.12",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.12.tgz",
"integrity": "sha512-iuyGF2E4oafQfPsRrG2wtY2ILupMhvtdrhzrxB+0VcjsPpSPttpfYdjnGFGsTi5MaJFjI1jOKHPQ6UTbTj9TAw==",
"dev": true,
"license": "BlueOak-1.0.0"
},
"node_modules/isbinaryfile": {
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz",
"integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 8.0.0"
},
"funding": {
"url": "https://github.com/sponsors/gjtorikian/"
}
},
"node_modules/isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"dev": true,
"license": "ISC"
},
"node_modules/junk": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/junk/-/junk-4.0.1.tgz",
"integrity": "sha512-Qush0uP+G8ZScpGMZvHUiRfI0YBWuB3gVBYlI0v0vvOJt5FLicco+IkP0a50LqTTQhmts/m6tP5SWE+USyIvcQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=12.20"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/lru-cache": {
"version": "11.5.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz",
"integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==",
"dev": true,
"license": "BlueOak-1.0.0",
"engines": {
"node": "20 || >=22"
}
},
"node_modules/minimatch": {
"version": "11.0.9",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.9.tgz",
"integrity": "sha512-KCFkfyjqerNlSstjlhIGNXIKZGA/6O4V4RlhZ+Dsr621SPPw0mzlypE9D9ZOoPiVefHID+j7/XuMMlqfD/F60Q==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"@isaacs/nonrecursive-glob-match": "^1.1.0",
"brace-expansion": "^5.0.12"
},
"engines": {
"node": "20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/minipass": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
"integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
"dev": true,
"license": "BlueOak-1.0.0",
"engines": {
"node": ">=16 || 14 >=14.17"
}
},
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true,
"license": "MIT"
},
"node_modules/path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/path-scurry": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-3.0.0.tgz",
"integrity": "sha512-1pTbQqH1wIwMi/eleQ5leFTTCkzFsPcgXNjwOA8YGGW/W4/kHT3dssE7Z6NH+zuqNLOzOB0uaD61yl7cAcVhgg==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"lru-cache": "^11.0.0",
"minipass": "^7.1.2"
},
"engines": {
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/pe-library": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/pe-library/-/pe-library-1.0.1.tgz",
"integrity": "sha512-nh39Mo1eGWmZS7y+mK/dQIqg7S1lp38DpRxkyoHf0ZcUs/HDc+yyTjuOtTvSMZHmfSLuSQaX945u05Y2Q6UWZg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=14",
"npm": ">=7"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/jet2jet"
}
},
"node_modules/plist": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/plist/-/plist-3.1.1.tgz",
"integrity": "sha512-ZIfcLJC+7E7FBFnDxm9MPmt7D+DidyQ26lewieO75AdhA2ayMtsJSES0iWzqJQbcVRSrTufQoy0DR94xHue0oA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@xmldom/xmldom": "^0.9.10",
"base64-js": "^1.5.1",
"xmlbuilder": "^15.1.1"
},
"engines": {
"node": ">=10.4.0"
}
},
"node_modules/postject": {
"version": "1.0.0-alpha.6",
"resolved": "https://registry.npmjs.org/postject/-/postject-1.0.0-alpha.6.tgz",
"integrity": "sha512-b9Eb8h2eVqNE8edvKdwqkrY6O7kAwmI8kcnBv1NScolYJbo59XUF0noFq+lxbC1yN20bmC0WBEbDC5H/7ASb0A==",
"dev": true,
"license": "MIT",
"dependencies": {
"commander": "^9.4.0"
},
"bin": {
"postject": "dist/cli.js"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/progress": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/promise-retry": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz",
"integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==",
"dev": true,
"license": "MIT",
"dependencies": {
"err-code": "^2.0.2",
"retry": "^0.12.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/resedit": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/resedit/-/resedit-2.0.3.tgz",
"integrity": "sha512-oTeemxwoMuxxTYxXUwjkrOPfngTQehlv0/HoYFNkB4uzsP1Un1A9nI8JQKGOFkxpqkC7qkMs0lUsGrvUlbLNUA==",
"dev": true,
"license": "MIT",
"dependencies": {
"pe-library": "^1.0.1"
},
"engines": {
"node": ">=14",
"npm": ">=7"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/jet2jet"
}
},
"node_modules/retry": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",
"integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 4"
}
},
"node_modules/semver": {
"version": "7.8.6",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz",
"integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==",
"dev": true,
"license": "ISC",
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"dev": true,
"license": "MIT",
"dependencies": {
"shebang-regex": "^3.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/shebang-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/sumchecker": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz",
"integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"debug": "^4.1.0"
},
"engines": {
"node": ">= 8.0"
}
},
"node_modules/undici": {
"version": "7.30.2",
"resolved": "https://registry.npmjs.org/undici/-/undici-7.30.2.tgz",
"integrity": "sha512-mLyPQnHwUxaM/rideoK/+KL8DaAJLRl4aBCfmX444aCSLnIaomqPLtNRe2jdCYcsk5wZzXrDIQC8ZeYNRAYyIA==",
"dev": true,
"license": "MIT",
"optional": true,
"engines": {
"node": ">=20.18.1"
}
},
"node_modules/undici-types": {
"version": "7.24.6",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz",
"integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==",
"dev": true,
"license": "MIT"
},
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"license": "ISC",
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"node-which": "bin/node-which"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/xmlbuilder": {
"version": "15.1.1",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz",
"integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8.0"
}
},
"node_modules/yargs-parser": {
"version": "22.0.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz",
"integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==",
"dev": true,
"license": "ISC",
"engines": {
"node": "^20.19.0 || ^22.12.0 || >=23"
}
}
}
}
+15
View File
@@ -0,0 +1,15 @@
{
"name": "web-slicer-bambu-login",
"productName": "Web Slicer Bambu Login",
"version": "0.1.0",
"private": true,
"main": "main.cjs",
"scripts": {
"start": "electron .",
"package": "electron-packager . WebSlicerBambuLogin --out=dist --asar"
},
"devDependencies": {
"@electron/packager": "20.3.0",
"electron": "45.4.1"
}
}
+16
View File
@@ -0,0 +1,16 @@
const {contextBridge, ipcRenderer} = require('electron');
if (process.isMainFrame) {
if (location.protocol === 'file:') {
contextBridge.exposeInMainWorld('helper', {
open: link => ipcRenderer.invoke('pairing:open', link)
});
} else if (location.origin === 'https://bambulab.com' || location.origin === 'https://www.bambulab.com') {
contextBridge.exposeInMainWorld('wx', {
postMessage: message => {
if (typeof message === 'string' && message.length <= 65536)
ipcRenderer.send('pairing:result', message);
}
});
}
}
+16
View File
@@ -0,0 +1,16 @@
const form = document.querySelector('form');
const field = document.querySelector('#link');
const status = document.querySelector('#status');
const button = form.querySelector('button');
form.addEventListener('submit', async event => {
event.preventDefault();
button.disabled = true;
try {
status.textContent = await window.helper.open(field.value);
if (status.textContent.startsWith('Complete sign-in')) field.value = '';
} catch {
status.textContent = 'Could not start sign-in. Make sure the helper is up to date.';
} finally {
button.disabled = false;
}
});
+6
View File
@@ -0,0 +1,6 @@
:root{color-scheme:light dark;font:16px system-ui}
body{max-width:520px;margin:28px auto;padding:0 22px}
h1{font-size:1.45rem;margin-bottom:24px}
form{display:grid;gap:12px}
input,button{font:inherit;padding:9px 12px}
button{justify-self:start}
+47 -39
View File
@@ -300,14 +300,14 @@ failure; so is a tool that eats the press and silently kills orbit.
A tool that mutates nothing, has no commit, and cannot fail — and therefore has no home in this
codebase. Current state, verified:
- Offer row `{"measure", "Measure", 6, …}` (`DesignOffer.hpp:120`) has `action == nullptr` and
- Offer row `{"design_measure", "Measure", 6, …}` (`DesignOffer.hpp:120`) has `action == nullptr` and
`refusal == nullptr`. The table's own contract (`DesignOffer.hpp:43-48`) is *"nullptr → kernel
support exists, no GUI path yet (row shows disabled)"*, so the row renders as
**"Measure (no GUI route)"** and is permanently disabled (`DesignPanel.cpp:6519`). With no
refusal in the row, it contributes nothing to the family's "why" line either.
- The maths exists, for MCP callers only: `resolve_ref` + `measure` (`McpControl.cpp:522`, `:546`)
— refs `{face|edge|point}`, distance = `|pa - pb|` of **representative points** (face centroid,
edge mid-sample), angle = `acos(da·db)` when both refs carry a direction.
- The maths exists, for MCP callers only: the `design_measure` CAD tool (`cad_measure` in
`Mcp/Tools/DesignInspectTools.cpp`) — refs `{face|edge|point}`, distance = `|pa - pb|` of **representative
points** (face centroid, edge mid-sample), angle = `acos(da·db)` when both refs carry a direction.
- The correct OCCT primitive is already linked and already used: `BRepExtrema_DistShapeShape`
(`GeometryEngine.cpp:31`, `:457`).
- The Prepare tab ships a full measure gizmo — `GLGizmoMeasure` (`src/slic3r/GUI/Gizmos/`) over
@@ -383,7 +383,7 @@ the same label primitive the dimension chain already draws (`render_dimensioning
| `Esc` | `TwoRefs→OneRef→Exit` | ladder routes it | — | the ladder already handles "tool armed" |
| any key | — | swallowed while the field is open | — | a query tool must not steal letters: no tool keys while Measure is armed |
| `MiddleDrag`/`RightDrag` | — | — | orbit/pan | a 3D measurement is unreadable from one angle; the camera must stay live *inside* the tool, exactly like Select |
| MCP `measure` | same engine | — | — | the RPC becomes one caller of `measure_refs`, so the agent surface and the GUI cannot disagree |
| MCP `design_measure` | same engine | — | — | the RPC becomes one caller of `measure_refs`, so the agent surface and the GUI cannot disagree |
### 9.10 Measure — three friction points, and how the architecture prevents them
@@ -409,7 +409,7 @@ lambda happened to be built rather than by anything the user can see.
### 10.1 The architectural claim: there are two Dimension tools, and they disagree
| | click-to-place (`Mode::Dimension`) | selection-based (the `sk_dimension` row) |
| | click-to-place (`Mode::Dimension`) | selection-based (the `sketch_dimension` row) |
|---|---|---|
| entry | arm the tool, pick in the viewport (`:10651`) | select first, then apply (`DesignCanvas.cpp:1417-1430`) |
| kinds it can make | Length, Diameter, Radius, Distance, DistanceToLine | **also Angle between two lines** |
@@ -437,14 +437,17 @@ cleared anyway (`:10689-10699`); abort a value field and the placed dimension **
its measured value (`cancel_dimension_value`, `:2174` — deliberate, but it means a cancelled
gesture has already added a constraint, and nothing says so).
**`apply_dimension` records a poison value.** Its per-case thresholds move nothing for
`v <= 0` (Length/Diameter/Radius, `:611-613`) or `v < 0` (Distance/DistanceToLine, `:622`, `:639`) —
and then `record_dimension_constraint(v)` runs **unconditionally** (`:659`). The file's own sibling
says it best, at the socket boundary: *"a negative/zero/NaN value that moved nothing would still be
pushed to the solver as a constraint it must satisfy and cannot, silently corrupting the sketch
rather than failing. (`apply_dimension` has the same flaw for any other caller; this guard protects
the socket, not the tool.)"* (`McpControl.cpp:1572-1577`). So the agent surface validates and the GUI
does not — the GUI is the less safe caller of its own function.
**`apply_dimension` refuses an out-of-range value before it records anything.** Its per-case
thresholds move nothing for `v <= 0` (Length/Diameter/Radius, `:611-613`) or `v < 0`
(Distance/DistanceToLine, `:622`, `:639`), and `record_dimension_constraint(v)` after them runs
**unconditionally** (`:659`): a negative, zero or NaN value that moved nothing would be pushed to the
solver as a constraint it must satisfy and cannot, silently corrupting the sketch. So a guard at the
top of `apply_dimension` refuses a value that is not finite, not above zero for a length, radius or
diameter, or negative for a distance, and says why on the status line, before it moves or records
anything. The `sketch_set_value` CAD tool (`Mcp/Tools/DesignSketchTools.cpp`) checks the same rule, and refuses a
selection with nothing to dimension, before it calls `apply_dimension`, so that its call fails with
the reason rather than reporting a value the sketch tool refused only on its status line. The GUI
and the agent surface are equally safe callers of the function.
**`record_dimension_constraint` never dedupes at all.** It `push_back`s unconditionally
(`:674`, `:684`, `:691`, `:700`), so applying the selection-path dimension twice leaves **two**
@@ -523,11 +526,12 @@ Three rules the type enforces, each closing a defect above:
contradiction you can see. `drive == Reference` renders `measured` only, and the palette is the
one already in the tab (green quote = measured, driving colour = driven).
2. **`apply(value)` returns a `WriteOutcome`** (`Ok | ClampedTo | Refused`, the base-operator type
from §0.2) — the same type for the solver path, the geometric path and the socket. The socket
guard already written in `McpControl.cpp:1572-1577` moves *into* `apply`, so the GUI cannot be the
unsafe caller of its own function any more. `Refused` keeps the field open with the typed text
and the reason, which is also what makes the `Coincident`-flip reversible: the dimension keeps
its `type` and only its value changes.
from §0.2) — the same type for the solver path, the geometric path and the MCP server. The
range guard `apply_dimension` runs becomes `apply`'s `Refused`, so every caller learns of a
refusal from the result rather than from the status line, and `sketch_set_value` in
`Mcp/Tools/DesignSketchTools.cpp` keeps no copy of the check. `Refused` keeps the field open with the typed
text and the reason, which is also what makes the `Coincident`-flip reversible: the dimension
keeps its `type` and only its value changes.
3. **One dimension per (type, operand pair) lives in one `std::vector<Dimension>`**, and the
constraint slot is a *projection* of it (`upsert` semantics from `:1074-1130`, kept). The click
path and the selection path both become thin callers of one `Dimension` builder, so the operand
@@ -611,7 +615,7 @@ Constrain session on a *committed* sketch reports "sketching", and the panel has
property of a sketch; the mode is a way of editing one.
Constraints are also the last large block of verbs living outside the offer. The offer has 92 rows
(`DesignOffer.hpp`) and the whole constraint vocabulary is **one** of them (`sk_constrain`, `:168`);
(`DesignOffer.hpp`) and the whole constraint vocabulary is **one** of them (`sketch_constrain`);
the other 20 are toolbar buttons (`DesignPanel.cpp:1516-1539`). Five enum members have no button at
all: `Distance` comes from the Dimension tool, `LockX`/`LockY` have solver bindings
(`SketchSolver.cpp:191`, `:240`, `:245`) and only a label (`DesignPanel.cpp:8051`), `PointOnLine` is produced only as
@@ -1018,18 +1022,27 @@ corner drag solves the offset so that the *opposite* corner stays put (`:7690-77
### 14.2 Verified current behaviour: the constraint table, read in the right direction
`confirm_transform` (`:8342-8445`) `remove_if`s — **returning true means REMOVED** — over every
constraint that touches a target (`is_target` checks `ea`, `eb` and `ec`):
constraint that touches a target (`is_target` checks `ea`, `eb` and `ec`).
A constraint whose every operand is a target moved with them under the one map, so it is kept unless
it measures against the sketch's fixed frame or, under Scale, a size: `Fix`, `LockX`, `LockY` and
`SymmetricAboutX/Y` are removed by every map, Horizontal and Vertical by Rotate, `DistanceX/Y` by
Rotate and Scale, `Distance`, Radius and Diameter by Scale, and a `PointOnLine` with an offset by
Scale. A rectangle moved, turned or scaled whole keeps its corners joined.
A constraint that reaches past the targets — to an entity left where it was, or to the origin or an
axis — is judged by its class:
| Mode | Removed | Kept |
|---|---|---|
| Move | Coincident, PointOnLine, PointOnObject, Concentric, Symmetric, Midpoint, **Fix, LockX, LockY**, cross-entity `Distance` | Horizontal, Vertical, Parallel, Perpendicular, Angle, EqualLength, Radius, Diameter, Collinear, **self**-`Distance` |
| Rotate | everything else — Coincident, Concentric, Tangent, Parallel, Perpendicular, Midpoint, Symmetric, PointOnLine/Object, Horizontal, Vertical, Angle, Fix, Lock | EqualLength, Radius, Diameter, self-`Distance` |
| Move | Coincident, PointOnLine, PointOnObject, Concentric, Symmetric, Midpoint, **Fix, LockX, LockY**, `Distance` | Horizontal, Vertical, Parallel, Perpendicular, Angle, EqualLength, Radius, Diameter, Collinear |
| Rotate | everything else — Coincident, Concentric, Tangent, Parallel, Perpendicular, Midpoint, Symmetric, PointOnLine/Object, Horizontal, Vertical, Angle, `Distance`, Fix, Lock | EqualLength, Radius, Diameter |
| Scale | everything except the five orientation types | Horizontal, Vertical, Parallel, Perpendicular, Angle |
| Array / PolarArray | additive: copies are appended and bound to their source through a ladder — lines get Parallel+EqualLength (linear) or EqualLength alone (polar), arcs/circles a per-copy Radius plus Concentric when the polar pivot *is* the source's centre | the originals are untouched |
Then `resolve_live()`. The rationale in the comment is real — *"Surviving classes are satisfied by
construction; the re-solve folds in the new placement"* — and the array ladder is the same
degrade-and-keep-the-first-set pattern as Batch 13's fillet, which is the right instinct.
Then `resolve_live()`. What is kept holds by construction, so the re-solve moves nothing, and the
array ladder is the same degrade-and-keep-the-first-set pattern as Batch 13's fillet, which is the
right instinct.
### 14.3 The defects
@@ -1039,15 +1052,10 @@ degrade-and-keep-the-first-set pattern as Batch 13's fillet, which is the right
`reset_tf(); // drop any in-progress transform gizmo` (`:295`). So arming Line with a pending
fillet keeps the fillet, and arming Line with a pending rotation **throws the rotation away** —
targets picked, value dialled or typed, ghost visible. Same gesture, opposite outcome, no message.
2. **The keep/drop table over-removes, silently.** For every mode there are constraint types the map
provably preserves that are removed anyway: Move removes Coincident/PointOnLine/PointOnObject even
when *all* their operands are targets (a rigid translation of a whole loop preserves them); Rotate
removes Coincident, Concentric, Tangent, Parallel, Perpendicular, Midpoint, Symmetric and
PointOnObject although a rotation preserves all of them; Scale removes Coincident, Tangent,
Midpoint, Symmetric, PointOnLine, PointOnObject and EqualLength although a uniform scale preserves
them (and it keeps Horizontal/Vertical, which only a *non-uniform* scale would break — Scale here
is uniform, so that half is right). The user sees badges vanish and the DoF readout climb, while the
geometry — which *is* correctly mapped — looks fine, so the loss stays invisible until a later edit.
2. **The class table keeps some relations a move breaks.** For a constraint reaching past the
targets, Move keeps Tangent, Collinear, `DistanceX/Y` and `SymmetricAboutX/Y`, although translating one end
of them carries it away from the other; the re-solve then pulls the moved geometry back toward
the relation, undoing part of the move.
3. **Move releases an explicit anchor.** `Fix`, `LockX` and `LockY` are removed by a translation. A
point the user pinned to protect it can be moved, and the protection silently disappears. Either the
map should obey the anchor (refuse, or carry it) or the release must be reported.
@@ -1135,10 +1143,10 @@ degrade-and-keep-the-first-set pattern as Batch 13's fillet, which is the right
none of them these), so the family is reachable only from the offer. Either assign keys from the free
letters (G I J K N Q U V W Y Z — K is already Constrain) or state that the family is deliberately
offer-only: `snaporca-fqwu` counts 47 of 86 verbs with no shortcut, and this is a sixth of them.
- **Batch 14 — derive the keep/drop table, do not maintain it.** `confirm_transform :8357-8387` is a
hand-written per-type switch that over-removes in all three mutating modes; for each `(type, map)`
pair the answer is a property of the map (does it preserve the relation?), with the genuine
exceptions (`Fix`/`Lock`, an absolute `Angle`) named as exceptions.
- **Batch 14 — derive the keep/drop table, do not maintain it.** For a constraint reaching past the
targets, `confirm_transform` is a hand-written per-type switch, and its Move column keeps relations
a translation breaks (14.3, 2); whether one end moving away from the other breaks a relation is a
property of the map, with the genuine exceptions (`Fix`/`Lock`) named as exceptions.
- **Phase 2 (3D) needs its batch list written before it starts** — otherwise it will be designed by
whoever opens the file first.
+192 -21
View File
@@ -14,7 +14,8 @@ Its coupling to the rest of the application is deliberately narrow. It adds no s
slicing pipeline and touches neither the preset system nor `Tab`. It reaches the rest of Orca
in two places: **Commit to Plate**, which hands finished solids to Prepare as ordinary model
objects (by default one assembly object with a part per body, which keeps the bodies' relative
placement, or one object per body), and one optional 3MF archive entry that carries the recipe.
placement, or one object per body) in one Prepare undo step, named after the bodies the user
named, and one optional 3MF archive entry that carries the recipe.
Everything else is contained in `src/libslic3r/CAD/` and `src/slic3r/GUI/CAD/`.
The user-facing manual lives in the wiki
@@ -123,6 +124,13 @@ A Text feature follows the same rule: it stores the outlines it was vectorised i
its string, font and height, so the project opens identically on a machine that lacks the font;
the three parameters are only what an edit reopens the dialog with.
The recipe is copied into `Model::cad_recipe` after every document change
(`DesignPanel::sync_recipe_to_model()`), so every save path writes it. A change marks the project
modified the way other project data outside Prepare's undo stack does, with the backup's change
mark and the plater's dirty flag, so the title, autosave and the unsaved-changes prompt of New
Project and Open all see it. A project that holds only a design loads no objects; it still opens
under its file's name, since `Plater::load_project()` counts a loaded recipe as a loaded project.
## The interaction contract
Three inputs carry the whole modelling loop — left click, right click and `Esc` — and the
@@ -162,7 +170,8 @@ rather than to its end points: a press that wandered past the budget at any mome
navigation, even if it comes back to where it started, which is what stops a slow, careful
orbit from ending in a menu. There is no time budget — a gesture that means something different
when it is slow is exactly what the interaction charter rules out. The raycast uses the press
position, not the release. The sketch tool sees a right press only once the release has shown it
position, not the release, scaled to the canvas's GL pixels as every mouse event the canvas passes
on is (two per logical pixel on a Retina display). The sketch tool sees a right press only once the release has shown it
was a click: the press itself goes to the camera, which may pan or orbit with that button, and the
canvas replays it to the tool on a stationary release. A tool that uses the click (to terminate a
chain, say) keeps the menu closed. Past either budget the event is navigation, and navigation
@@ -320,10 +329,14 @@ The tab is a page of Orca's main window and answers to the same settings as Prep
isometric from the front-right corner that Home returns to, not Prepare's front-left one.
- **Viewport text.** The status line and the active tool's values are drawn by the canvas in
its ImGui pass, so they go with the canvas: a top-level window over GL does not follow its
frame and was left floating over other applications.
frame and would be left floating over other applications.
- **Undo.** The tab keeps its own history (the recipe is not part of Prepare's snapshots), but
it has no Undo/Redo of its own: the top bar, `Ctrl+Z` and Edit drive it while the tab is
shown, greyed to what an undo would actually do.
shown, greyed to what an undo would actually do. Every change to the recipe is one step, a
feature rename included, and an edit the kernel refuses leaves none and keeps what was
redoable. A body's name and colour are saved with the recipe but are not in the history, and
its visibility is view state. The history is not saved with the project, so a project opens
with nothing to undo in the tab.
- **Docking.** The sidebar docks like Prepare's — either side, floating, resized, or collapsed
with the canvas's collapse button or `Shift+Tab` — through its own AUI manager under the
toolbar, because Prepare's manages the Plater and the Plater is not on this page. The button is
@@ -345,24 +358,168 @@ most: its verbs are items of their own at the top of the menu rather than a fami
is appended after the eight, so it moved no existing index, and it reads the same from the
viewport and from a row of the Bodies list.
An invariant across 93 verbs and 20 selection kinds does not survive by review, so the map
An invariant across 92 verbs and 20 selection kinds does not survive by review, so the map
exists once, as data: `scripts/CAD/tool_atlas.json` carries every verb with its row, key, icon,
accepted selections, preconditions and refusal string, and `scripts/CAD/gen_offer_table.py`
emits `src/slic3r/GUI/CAD/DesignOffer.hpp` from it. The header is checked in and never
hand-edited; `scripts/CAD/run-all-checks.sh` runs the generator with `--check` as its first
rung, which is what makes "GENERATED — DO NOT EDIT" a fact rather than a request. The generator
also refuses an atlas with a duplicate verb id, since `mcp_run_verb` resolves a verb by id and
would make the second one unreachable.
hand-edited; the `check_cad_offer_table.yml` workflow runs the generator with `--check` on every
push and pull request that touches the atlas, the generator or the header, which is what makes
"GENERATED — DO NOT EDIT" a fact rather than a request. The generator also refuses an atlas with a
duplicate verb id, since a verb is resolved by id (`mcp_run_verb`, a command's key) and the second
one would be unreachable, and a table in which an entry's name is not marked for translation in the
`Design` context (`L_CONTEXT`): every name is a command's title, which a person sees translated, and
the mark compiles to the bare string, so nothing at run time could tell it is missing.
The same table is the Design tab's Speed Dial actions and its automation commands, so the three cannot drift
apart. The header's `kDesignTools` holds 127 entries: the 92 verbs with a menu item, and 35 commands with no
menu item (`row` -1), such as `design_describe`, `sketch_draw` or `design_commit_to_plate`. An entry with a handler
(`action`, the code its menu item runs) or a `tool` block is a command of the catalog, whose key is the entry's
id and whose title is its name, unless it is a folded item: 88 commands. An entry with a handler does what its
menu item does when it is called with no arguments, and has an action of its own in the Speed Dial. An entry
with a `tool` block also runs silently, with arguments: the block is that form's access, params, examples and
whether it reports a rejected rebuild in its reply, which the header carries as JSON text (`doc`) beside the
entry's `access` and `ok_false`. An item
whose tool is a variant of a command is folded into it (`"fold": {"into", "args"}`): it is no command, keeps its
id, its place in the menu, its key and its Speed Dial action, and the command opens its tool when called with
exactly the item's arguments, as Polar array is `sketch_pattern {type: "circular"}` and the Corner rectangle
`sketch_draw {type: "rectangle_2_point"}`. 37 items fold into eight commands, the 24 shape items into
`sketch_draw` among them. An entry with a handler and a block may name the arguments that choose its own item
(`args`), as Boolean's Join item is `solid_boolean {operation: "join"}`, so that each of a command's variants opens
the same way. Two items have neither a handler nor a block, Pattern on Curve and Align to, and are shown greyed:
they are no command. Every command has a `section`, its heading in the names index the MCP server's
`tool_list` gives, and `feature_row` marks the four items whose handler works on the Feature tree's selected
row (Edit, Rename, Delete and Constrain sketch). `operations` names what a command that changes Prepare's model
reaches of `GUI/Operations` (`design_commit_to_plate`'s `delete_objects`). `modal` marks the three entries whose handler opens a dialog
that waits for an answer: a modal one for SVG (a file picker) and Color, which holds the call that opened it
until it is answered, and the Design tab's own modeless dialog for Text, which does not.
`kDesignSelectionIds` names the selection kinds in `OfferSel`'s order, the ids the verbs' `accepts` use.
The atlas and its generator sit in `scripts/CAD/` rather than in `docs/`: they are build inputs
for a checked-in header, not documentation.
## Automation surface
`McpControl` exposes the document over JSON-RPC when `ORCA_CAD_MCP` is set in the environment,
with `tools/orca_cad_mcp_bridge.py` as the client side. It describes the scene, queries
topology, measures, and runs the same verbs the offer does — it re-implements nothing, so a
scripted action and a clicked one cannot diverge. It is off unless the variable is set.
The document is automated through the app's MCP server, on every platform, with the Design tab's commands, one
per command entry of its table: what they are, how they are named and called, what each does and takes and which
menu items call it are in [mcp-tools.md](mcp-tools.md), The Design tab's commands, and how the server holds them,
their gate and their Speed Dial actions in [mcp-server.md](mcp-server.md). The commands
(`Mcp/McpToolsDesign.hpp`, `Mcp/Tools/Design*.cpp`) describe the design, read topology, measure, and run the same
verbs the offer does — they re-implement nothing, so a scripted action and a clicked one cannot diverge. Where a
GUI action is bound to a selection, a card or a dialog, its work is split into a function both callers share, and
the command calls that function with explicit arguments instead of driving the widgets; the functions the tab
shares so are below.
The catalog holds the commands only when the CAD feature is on at startup, because the main window makes the
Design page only then, so turning the feature on takes a restart. What a caller sees of that, and when the tab
refuses a call, are in mcp-tools.md, The Design tab's commands.
Face and edge ids name faces and edges of the current model, and a rebuild renumbers them while a
stale id still names a real face or edge, so the replies carry the model's `generation`: a call that
passes ids with the `generation` they were read at is refused (`stale_ids`) once the model has moved
on, rather than acting on another face or edge.
The commands add features through the kernel calls the cards use, named as the cards name them,
one checkpoint per call. A rebuild that fails is taken back with `CadDocument::rollback()`, which
leaves nothing to redo, and the status line says "Edit rejected" as it does for a refused GUI
edit; the call reports the kernel's reason. A card's own Confirm in add mode does the same: a feature whose
rebuild fails is taken back, and an add the card refuses or that adds nothing leaves no undo step, and either
way the card stays open with the reason on the status line. Commit to Plate and Export STEP confirm an open card
first, so that what is shown goes out, and stop where that Confirm does not take: nothing is sent or written and
the Design tab stays in front. Planes are named as in the cards: a
base plane through the modeling origin, the frame every feature uses, a datum Plane feature, or a
planar face, which a sketch takes with its outward normal (`CadDocument::plane_of_face()`) and where a hole or a
thread drills from the Hole card's inward face plane, its x along the face's longest edge
(`CadDocument::inward_plane_of_face()`, shared with the card). A feature is read and edited as its
card shows it: `feature_describe` and `feature_edit` share one table of each type's card fields and
ranges, and an edit goes through `replace_feature()` as the card's Confirm does in edit mode. Numeric fields are
set through `CadDocument::set_numeric_field()`, the allow-list expressions use, so a literal edit and a binding
reach the same fields. A feature stores its body indices and face and edge ids as of the model just before it,
and the rebuild replays them so; a Plane's, an Axis's and a Coordinate system's are the finished model's, where
the engine reads them (`for_each_body_ref()`). `CadDocument::recompute()` records the bodies that existed just
before each feature (`bodies_before`, not saved), and `CadDocument::history_before()` gives the history cut at a
feature, without the undo and redo stacks and the display meshes, which `body_describe {before}` replays and the
cards replay to list bodies when they edit. While a card that edits a feature is open, the viewport's pick is fed
the model before the feature (but for those three), each of its bodies where the view draws the body it became
(its placement, matched by identity, as its visibility is), and the Hole and Thread cards read the picked face's
geometry from that model too. `CadDocument::for_each_feature_ref()` and, for a datum plane,
`for_each_datum_ref()` are the kernel's own reference visitors, the lists that deleting and moving a feature
remap, from which `feature_describe` reads `used_by`.
Commit to Plate and Export STEP… are split from their button and file dialog
(`commit_to_plate()`, `export_step_to()`), so `design_commit_to_plate` and `design_export_step` run the GUI's own work,
and `design_new` is New Design's `clear_document()` without the confirmation. The Feature tree's
and Bodies list's row actions are split the same way, into cores that take an index
(`delete_feature()`, `move_feature()`, `show_feature()`, `rename_feature()`, `delete_body()`,
`rename_body()`, `set_body_color()`, `show_body()`), which the rows call with the selected one and
the automation calls without selecting anything. A tree edit the kernel refuses has its features put back by the
kernel, and `CadDocument::abandon_checkpoint()` drops the checkpoint and restores the redo branch it cleared, so
no undo step is left. `design_select` selects through `mcp_select()` what a click would select.
A body's placement, where Commit to Plate and Export STEP send it, is view state the panel keeps per body
(`m_body_xform`), keyed by the transient `uid` of the feature that made the body (`CadFeature::uid`), so that it
follows the body when the bodies are renumbered. The Move / Rotate card and Place on Face (`place_on_face()`) set
it, and so does `body_place` (mcp-tools.md, A body's placement). The section view and the
view's switches have setters that take a value, which `view_set {tab: "design"}` uses where the toolbar and the
rows only toggle, and `DesignCanvas::view_normal_to_sketch()` is the `N` key.
A sketch session opens through `begin_sketch_session()`, which a plane or face pick also runs, on the same plane
frames, so a sketch on a base plane passes through the modeling origin. A committed sketch is re-opened in the session
by `DesignCanvas::edit_sketch()` and `DesignSketchTool::begin_edit()`; mcp-tools.md (Behaviour a caller relies on)
says what `sketch_edit` and the sketch commands then do. A committed sketch's loops come from
`DesignSketchTool::loop_report(entities)`, which finds and numbers them over the whole sketch, as
`region_entity_indices_with_holes()` numbers them; how a call names one is in mcp-tools.md (The selection). The
viewport shows only the loops no extrude has taken, so its loops are numbered apart, and `DesignPanel::mcp_select()`
selects a numbered loop by finding the shown loop with its entities (`display_region_of()`), refusing one an extrude
took. `DesignPanel::default_revolve_axis_entity()` gives a sketch's only construction line, or none when it has none
or several, which the Revolve card offers first as its axis. Inside a session, `DesignSketchTool`'s scripted entry
points run the tools' own apply steps without a pointer: `fillet_scripted()` is the Fillet and Chamfer tools' Confirm
(`confirm_op()`, which reports a refused value), `trim_scripted()` a Trim or Extend click (`apply_live_trim()`),
`transform_scripted()` the transform gizmo's Confirm, for a move, rotate or scale and for a linear or circular
pattern, `mirror_scripted()` the Mirror tool's, `offset_scripted()` the Offset tool's, `add_shape_scripted()` the last
click of every drawing tool, which `sketch_draw` reaches by its `type` (the nineteen shapes, from a line to a polygon,
built by the tool's own builder and grouping, with the constraints inferred exactly, and those the tool binds inside
the shape at any slant, such as an oblique rectangle's right angles or a slot's tangencies, added where rounding left
them out, batched as the tool's inference batches them; `make_polygon()` puts a polygon's side within 1e-9 rad of
level or upright on an axis, because the rounding of its vertices' sines and cosines differs between platforms' math
libraries and would leave a different set of sides exact on each), and `constrain_scripted()` a CONSTRAIN bar button
or the Dimension tool, whose picks the planner it shares with the panel (`plan_entity_constraint()`,
`write_plan_value()`, in `SketchEngine`) turns into constraints. Each keeps the armed tool and its sticky settings,
and refuses while a gesture or a value field is pending, which the tool's apply step would take over. Text and SVG art
have argument forms beside their dialog and file picker: `sketch_text` takes the Text dialog's outline and push
(`DesignPanel::mcp_outline_text()`), and `sketch_insert_svg` adds an SVG file's outlines as Insert SVG does
(`add_imported_regions`).
Topology reads come from the kernel: `GeometryEngine::surface_info()` gives a face's surface type,
area and analytic numbers, `edge_faces()` the faces along each edge (one for a seam),
`edge_convexity()` whether two faces meet in an outside or inside corner (OCCT's fillet classification,
`ChFi3d::DefineConnectType`), and `min_distance()` the closest points of two shapes (OCCT's
`BRepExtrema_DistShapeShape`). The Plane card's Confirm and the `construct_plane` command
share `CadDocument::datum_plane_refusal()`, which refuses a construction that is missing a
reference, names a face or edge no longer on the model, or puts a tangent plane on a face that is
not a cylinder, so neither reaches the kernel's silent fallback to an offset plane; a refused
Confirm leaves no undo step.
The Thread card's pick and `solid_thread` share `CadDocument::thread_target()` (the picked cylinder's
axis frame) and `nearest_thread_standard()` (the size inferred from it). The Sweep card's path list
holds Helix features as well as sketches, and a sweep along a helix is made with a binormal
(`SketchEngine::make_sweep`). Thread, sweep and loft automation rebuilds through `recompute_guarded()`,
as the cards do: the kernel works on a worker thread while the UI thread waits in `wxYield()` behind a progress
dialog that appears after 300 ms, so the window stays live during a long build.
The tab borrows the app's shared camera when its page shows (`DesignPanel::on_tab_shown()`, which swaps it into
the plater's slot) and gives it back when the page hides, so the Design view's camera is the one the camera tools
act on while the tab is shown.
The viewport is a canvas target like Prepare's for the app's MCP server (`DesignCanvas::gl_canvas()`):
`view_set {tab: "design"}` shows the tab and points its camera, `window_screenshot` captures the view
(sketch overlay and status line included) and composites it into window captures, `mouse_gesture`
clicks and drags it at pixels, so a left click picks and a right click opens the offer, and
`widget_list` lists its in-canvas value fields. Keys sent with `keyboard_press` reach the panel's
`wxEVT_CHAR_HOOK` as a real key press does, travelling up from the focused widget, so Escape,
Enter and the tool shortcuts behave as they do for a person.
[mcp-tools.md](mcp-tools.md) describes the commands as a caller sees them, and [mcp-server.md](mcp-server.md) how
the server holds them: the table they are made from and their gate.
## Where the code lives
@@ -377,18 +534,32 @@ scripted action and a clicked one cannot diverge. It is off unless the variable
| `src/slic3r/GUI/CAD/DesignRowList.*` | the Feature tree and Bodies lists, with per-row actions |
| `src/slic3r/GUI/CAD/DesignCanvas.*` | viewport integration |
| `src/slic3r/GUI/CAD/DesignSketchTool.*` | in-canvas sketching |
| `src/slic3r/GUI/Mcp/McpToolsDesign.hpp`, `src/slic3r/GUI/Mcp/Tools/Design*.cpp` | the automation surface: the Design commands made from the table, their silent forms (`silent_forms()`) and their gate; `DesignTools.cpp` holds the gate, the registration and the Document heading's commands, and each other heading's are in a file of its own (`DesignSketchTools.cpp`, `DesignSolidTools.cpp` and so on) |
| `src/slic3r/GUI/CAD/DesignInteraction.hpp` | the Esc level contract |
| `src/slic3r/GUI/CAD/DesignOffer.hpp` | generated offer table |
| `scripts/CAD/tool_atlas.json` | source of truth for the offer |
| `src/slic3r/GUI/CAD/DesignOffer.hpp` | the generated table: the offer, the Speed Dial actions and the commands |
| `scripts/CAD/tool_atlas.json` | source of truth for the table |
## Verification
The kernel is covered by Catch2 suites in `tests/libslic3r/` (`test_caddocument`,
`test_sketchconstraints`, `test_sketchedit`, `test_sketchimport`, `test_sketchinference`,
`test_sketchprofile`, `test_slvs_constraints`), which need no display;
`scripts/CAD/run-kernel-tests.sh` builds only `libslic3r_tests` and runs them headless.
`test_sketchprofile`, `test_slvs_constraints`), which need no display. They are part of
`libslic3r_tests` in a CAD build and run under `ctest` and CI like any other suite;
`libslic3r_tests "[CadDocument]"` runs the document's cases.
The GUI half is not covered by CI, which has no OpenGL canvas or synthetic input: the ladders
in `scripts/CAD/` drive a running application in a local rig instead, and
`scripts/CAD/run-all-checks.sh` is the gate that runs all of them. A green kernel run says
nothing about the viewport, so the two are reported separately rather than as one number.
The automation surface has its own checks. `slic3rutils_tests "[Mcp][CAD]"`
(`tests/slic3rutils/test_mcp_cad.cpp`) runs the commands' argument checks and kernel calls on a
`CadDocument` or a bare `DesignSketchTool`, with no panel, and checks the table and the commands the
catalog holds; `scripts/CAD/test_gen_offer_table.py` checks the generator's refusals. On a live application,
the MCP sweep's Design tests drive the commands through `tool_call` and, through the server's UI tools, the tab
as a person does; `tools/mcp/test-entries/design.md` says what each checks. They need an English UI, and the
MCP sweep runs them on the Linux AppImage; `tools/mcp/README.md` says how to run them by hand.
Three checks in `scripts/CAD/` drive a running app through its MCP server as an agent does and
grade the sketch layer against arithmetic: `check-mcp-sketch.py`, `check-sketch-engine.py` and
`check-sketch-engine-corpus.py`, which grades it against the vector geometry of real drawings.
They need the MCP server and the CAD feature on and run on every platform; no CI job runs them.
`scripts/CAD/README.md` says how to run each.
The offer table is checked in CI: the `check_cad_offer_table.yml` workflow fails when
`DesignOffer.hpp` is not what `gen_offer_table.py` makes of `tool_atlas.json`.
+232 -7
View File
@@ -41,8 +41,9 @@ upgrades) comes from the native model list of the adapter that implements it.
## Matrix
Observation lists the `supports_*` flags; mutations list `command_actions`. Bambu LAN
rows are representative models: recordings and pressure-advance history (X1C), native
storage (P2S) and a model outside the single-nozzle upgrade scope (H2D).
rows are representative models: classic FTPS SD-card browsing with recordings and
pressure-advance history (X1C), native TLS6000 storage with print-from-storage (P2S)
and a model outside the single-nozzle upgrade scope with no browsable SD card (H2D).
`device_panel` embeds the printer's own web interface. It requires an HTTP address,
and for ordinary Moonraker an explicit Mainsail or Fluidd address. Anycubic and
Bambu LAN printers serve no such interface.
@@ -55,21 +56,245 @@ Bambu LAN printers serve no such interface.
| Moonraker, Qidi agent | status, file_browser, firmware, device_control, device_panel | pause, resume, stop, device_control |
| Moonraker, Snapmaker agent | status, file_browser, firmware, device_control, device_panel | pause, resume, stop, device_control |
| Moonraker, CrealityPrint agent | status, file_browser, firmware, device_control, device_panel | pause, resume, stop, device_control |
| Bambu LAN, X1C | status, camera, videos, diagnostics, firmware, device_control, filament_control, calibration, pa_history | pause, resume, stop, filament_control, device_control, firmware_upgrade |
| Bambu LAN, X1C | status, file_browser, file_print, camera, videos, diagnostics, firmware, device_control, filament_control, calibration, pa_history | pause, resume, stop, filament_control, device_control, start_file_print, firmware_upgrade |
| Bambu LAN, P2S | status, file_browser, file_print, camera, videos, diagnostics, firmware, device_control, filament_control, calibration | pause, resume, stop, filament_control, device_control, start_file_print, firmware_upgrade |
| Bambu LAN, H2D | status, camera, diagnostics, firmware, device_control, filament_control, calibration | pause, resume, stop, filament_control, device_control |
| Anycubic | status, device_state, file_browser, file_print, file_thumbnails, camera, firmware, device_control, filament_control | pause, resume, stop, device_control, filament_control, start_file_print |
| Elegoo Centauri Carbon | status, firmware, device_panel | pause, resume, stop |
| Elegoo Centauri Carbon 2 | status, history, file_browser, file_print, file_thumbnails, camera, videos, diagnostics, firmware, device_control, filament_control, device_panel | pause, resume, stop, resume_recovery, stop_recovery, delete_history, start_file_print, device_control, filament_control, generate_timelapse |
| Plugin agent | status, device_panel | — |
| OctoPrint, PrusaLink, Duet, Repetier, AstroBox, FlashAir | file_browser, device_panel | — |
| Creality Print LAN | status, history, file_browser, camera, firmware, device_panel | — |
| OctoPrint | status, history, file_browser, file_print, file_thumbnails, camera, camera_selection, firmware, device_panel | start_file_print |
| OctoPrint with heater limits | status, history, file_browser, file_print, file_thumbnails, camera, camera_selection, firmware, device_control, device_panel | start_file_print, device_control |
| Prusa Connect Local | device_panel | — |
| Prusa Connect Local with selected printer | status, history, file_browser, file_print, file_thumbnails, camera, camera_selection, firmware, device_panel | pause, resume, stop, start_file_print |
| PrusaLink | status, file_browser, file_print, file_thumbnails, camera, camera_selection, firmware, device_control, device_panel | pause, resume, stop, device_control, start_file_print |
| Duet | status, history, file_browser, file_print, file_thumbnails, firmware, device_control, device_panel | device_control, start_file_print |
| Repetier | status, history, file_browser, camera, camera_selection, firmware, device_control, device_panel | device_control, pause, resume, stop |
| AstroBox | status, history, file_browser, camera, firmware, device_panel | — |
| FlashAir | file_browser, device_panel | — |
| MKS, ESP3D | status, firmware, device_panel | — |
| SimplyPrint with printer monitoring | status, camera, firmware, device_panel | — |
| SimplyPrint with print history | status, history, camera, firmware, device_panel | — |
| SimplyPrint with printer actions | status, camera, firmware, device_control, device_panel | device_control, pause, resume, stop |
| Obico | status, history, camera, device_panel | pause, resume, stop |
| Flashforge legacy TCP | status, firmware, device_panel | — |
| Flashforge HTTP | status, file_browser, file_thumbnails, camera, firmware, device_panel | — |
| Ultimaker | status, history, camera, firmware, device_panel | pause, resume, stop |
| ElegooLink, OctoPrint-compatible | status, history, file_browser, camera, firmware, device_panel | — |
| 3DPrinterOS with selected printer | status, history, device_panel | stop |
| Other upload hosts and cloud services | device_panel | — |
<!-- /device-capability-matrix -->
"Other upload hosts and cloud services" are every remaining connection type:
Prusa Connect, CrealityPrint, Ultimaker, MKS, ESP3D, Obico, Flashforge,
SimplyPrint, PrinterOS and ElegooLink printers other than the Centauri Carbon
models. They upload files but expose no Device reads or commands.
Prusa Connect,
SimplyPrint without printer monitoring, and 3DPrinterOS without a selected printer. They upload files but expose no Device reads or commands.
With the `printers.actions` grant, Device can pause or resume a SimplyPrint
job whose execution ID is present in the current observation. It rereads the
job before sending the action for the selected printer. Device offers
cancellation when SimplyPrint confirms the matching job belongs to the account
holder and requires no reason or comment. The SimplyPrint panel handles
additional cancellation options such as reasons and comments.
SimplyPrint uploads use the temporary-file workflow. The saved connection
offers browser sign-in when its service URLs match the registered SimplyPrint
OAuth application. With a SimplyPrint
OAuth registration approved for `printers.read`, set
`ORCA_SIMPLYPRINT_OAUTH_PRINTERS_READ=1` before authorizing the account. If the
account grants the scope, the connection can select an organization printer
and display its state, temperatures, and current print progress and elapsed
time when SimplyPrint reports them. A connection with `print_history.read`
can also display the current layer and remaining time from the active job's
details. Device also displays the reported printer
firmware and SimplyPrint agent versions. With the account’s camera permission,
Device can show the latest notification snapshot from the SimplyPrint CDN.
With `ORCA_SIMPLYPRINT_OAUTH_PRINT_HISTORY_READ=1` and an OAuth grant for
`print_history.read`, Device pages through recent results for the selected
printer when the cloud reports a total, including the recorded print duration.
History permissions determine which jobs are visible. With
`ORCA_SIMPLYPRINT_OAUTH_PRINTER_ACTIONS=1` and the account's
`printers.actions` grant, Device can set idle nozzle and bed temperatures
using the printer model's reported limits. Device also offers chamber control
when the printer model and telemetry indicate active heating. SimplyPrint
clamps chamber requests to the model's limit. If SimplyPrint reports a lower
confirmed target, the command receipt records the applied temperature. Selecting a printer is
optional and does not change where uploads go.
3DPrinterOS can select a printer from the organization associated with the
connected session and display its state, progress and reported temperature
channels. The service returns temperature arrays without sensor labels. History shows the ended
print jobs among the 100 latest jobs returned for that printer. The selection is optional
and leaves upload and cloud print preparation available. Cancellation requires
a single identifiable active cloud job and targets that job ID.
Stock Creality Print LAN connections read unsolicited WebSocket status,
heater temperatures, job progress, reported timing, speed and installed firmware version through the
printer’s existing endpoint.
The same connection can read print history on firmware that serves it and
browse the printer’s G-code catalogue. For
HTTP connections, Device relays the printer’s port 8080 camera when it serves
an image. Models that only offer WebRTC have no preview in Device.
OctoPrint projects job progress and temperatures from the authenticated REST API.
Device can start a reviewed existing local or SD card file while the printer
is idle if the host reports a file timestamp or content hash.
The review shows the estimated print duration when OctoPrint has analyzed
the file. Device shows a thumbnail when OctoPrint exposes one for the file.
The job response identifies the uploaded file but carries no identity unique to
an execution of that file. OctoPrint can emit print lifecycle events to connected
clients, but its REST command accepts no job precondition. An external client
cannot bind a reviewed command to an execution if the active job changes before
OctoPrint processes it. Device shows job status and the embedded OctoPrint
interface provides pause, resume, cancellation and heater targets. The stock API reports current and target temperatures, and its
printer profile describes the available heaters. Neither provides the
hardware's maximum safe targets. With explicit per-heater limits in the saved
connection, Device can set the target for a reported heater while the printer
is idle. It reads the printer state and checks the limit again before sending
the command.
History shows the latest recorded outcome per retained local file on OctoPrint and
AstroBox and OctoPrint-compatible ElegooLink hosts. The compatible ElegooLink
adapter also lists local files for browsing. These hosts report their
installed server software version. PrusaLink
uses the numeric job ID from its v1 status API in both the reviewed token and
the command URL. Older PrusaLink endpoints that lack v1 telemetry fall back to
the OctoPrint-compatible read path. Native status includes print speed, flow
ratio, head position, fan RPM and time until the next filament change when
reported. PrusaLink previews use the thumbnail reference
for the selected file in either the v1 or legacy catalogue. Device can start
a previously stored file through the v1 file API after checking its metadata
and the printer state. The review displays print duration and material mass
when the file metadata provides them. PrusaLink reports installed printer firmware
and host software versions through its version endpoint. When the PrusaLink host
provides a camera list, Device lets the user choose a connected camera and
display its latest image. Hosts exposing only a default snapshot use that
image. Firmware without camera endpoints reports the camera as unavailable. The
Python PrusaLink host can also set idle nozzle and bed temperatures using
the limits its API enforces for those heaters. Device can home individual
axes or all axes when the host reports IDLE or READY. During printing or a
pause,
it can adjust speed and flow when their current values and the active job ID
are reported. Device rechecks the reviewed job and settings before sending
the adjustment.
Prusa Connect uses its separate per-printer upload API. In Prusa Connect,
open the printer’s Settings and copy the Prusa Connect key from API keys.
The default host is `https://connect.prusa3d.com`. Its connection settings offer
browser sign-in for the Prusa MCP resource when the server has
`ORCA_PRUSACONNECT_OAUTH_CLIENT_ID` and
`ORCA_PRUSACONNECT_OAUTH_REDIRECT_URI` configured. The redirect URI is the
registered HTTPS URL for `/api/v1/oauth/prusaconnect/callback`. Account sign-in
and disconnection preserve the printer's upload key. The account holder can
renew a session using its refresh token. A refresh token claimed by an
interrupted request requires a new browser sign-in once the access token
expires. The account holder can read the authenticated MCP tool catalogue
from Diagnostics in the connection settings or through
`POST /api/v1/oauth/prusaconnect/tools` for the saved connection. The
response contains tool names and schemas, and the server keeps the bearer
token private. Prusa describes printer status and job controls in its
[Prusa MCP documentation](https://www.prusa3d.com/fr/p/prusa-mcp/).
The tool catalogue is diagnostic only. Device monitoring requires a
verified mapping from the saved connection to an account printer and that
printer's telemetry. Reviewed job controls additionally require a way to
address the specific job the user reviewed.
Prusa Connect Local uses the self-hosted server's REST API. A bearer token
with read access lists the available printers, and the saved printer UUID
selects the source of job status, temperature readings and firmware version. Device can also
open the server's web interface for operator actions. The send workflow
uploads G-code to a writable server storage using a token with write access.
Prusa Connect replaces a file already at the selected path. Web Slicer checks
the returned byte count and SHA-256 before acknowledging the upload. On a
requested start, Web Slicer checks that the selected printer is idle or has
finished or stopped its previous job. It also checks for writable USB
storage and verifies that the server still reports the uploaded checksum. Prusa Connect transfers the file and returns the printer's
start acknowledgement. An existing different file on the printer is preserved.
For an active job with a server job ID, Device offers the pause, resume and
stop verbs reported for the printer and allowed by the API token. Before
sending a verb it rereads the job and printer state from Prusa Connect.
The server executes the verb against the current job at delivery time because
its command API addresses the device UUID and has no job precondition.
History displays up to 500 finished jobs retained for the selected printer.
Records containing a USB file path can open that path in Device.
Device can relay MJPEG or a JPEG snapshot from cameras assigned to that printer.
The relay uses the configured Prusa Connect Local server and keeps its bearer token private.
The file browser lists printer storage and displays embedded previews when
the server finds one. Browsing printer storage requires operate access. Device
can start an existing USB file after rechecking its size and modification time
and the state of the selected printer. It can also delete a versioned file
that the printer reports as writable when no print is active.
OctoPrint can select among configured HTTP camera feeds on the printer host.
Sources configured as still images refresh while the camera panel is open.
AstroBox and compatible ElegooLink printers expose their default HTTP camera when configured on
the printer host. The existing image relay checks response content and keeps
camera addresses private. Repetier offers a choice among the selected printer’s
configured HTTP cameras. Duet reads printer telemetry and the mainboard firmware version from the
native object model over RRF 3 or DSF. When the standalone object model
endpoint is absent, Duet uses the older RRF status and configuration endpoints.
Duet Software Framework connections, including servers that identify their
RRF API as an emulation, use `/machine/model` and fall back to
`/machine/status` when the model endpoint is absent.
The object model supplies bed and chamber heater mappings, including
additional slots and readings from individual heaters in a group. Device can
set a bed or chamber target while Duet is idle if every heater in that slot
reports valid bounds. It checks the common range before sending the command
and verifies the resulting target. On RepRapFirmware 3.3 and later it can
also set or switch off the active tool’s nozzle when the tool has one
reported heater with valid bounds.
Duet history displays the last job retained by the object model, including
its duration and outcome when reported. An explicit Duet volume and path can
open the job’s source in the file browser. Device previews PNG, JPEG and QOI
images embedded in stored Duet G-code using firmware thumbnail endpoints.
It can start an existing G-code file by volume and path after rechecking the
file metadata and confirming the printer is idle. The review shows the
print duration estimate or simulation duration if reported. Standalone RRF
acknowledges queueing the command. On Duet Software Framework, the synchronous
code reply is checked for rejection before recording the start.
Repetier can set nozzle and bed temperatures while idle using the limits
from the selected printer configuration. For multiple nozzles, it addresses
each tool explicitly on identified Repetier-Firmware and Marlin printers. A successful response
confirms that Repetier accepted the command. Repetier reads telemetry and up
to 500 recent history entries for the selected
printer slug, including bed and chamber temperature arrays when available.
It can relay the configured HTTP webcam on the Repetier Server host or an
explicitly allowed camera origin and read the installed server software version.
When the printer list includes progress and job timing, Device displays the
reported percent and the remaining estimate from the server’s computed times.
When the status omits the active filename, the adapter looks for a
single running entry in the printer’s job list. A running entry with a queue
ID and creation timestamp also enables pausing a running print, resuming a
paused print or stopping either. Pausing uses the Repetier Server command
`@pause` and follows the server’s configured cooldown behavior.
Device checks the current queue entry and printer state before sending the
action. Repetier addresses the active job on that printer at delivery time. The history retains the server’s numeric status code. MKS and ESP3D
show M105 temperatures, M27 SD-file progress and M115 firmware identification
when the printer reports it. The SD report
can represent a running or paused job. Legacy Flashforge TCP uses read-only
console queries for machine state, temperatures and firmware. While printing
or paused, Device displays the file name, progress and current layer when the
printer reports them.
Flashforge HTTP exposes its recent
stored files and their thumbnails as a read-only catalogue and reads
progress, sensor values, and installed firmware version from its authenticated detail report, and relays a
configured camera on the same printer host. Ultimaker reads job timing and
temperatures through its local v1 printer API and the installed firmware version
through its local system API. With Digest pairing and a current job UUID,
Device can pause, resume or abort after rereading the job and printer state.
The local API applies the command to the job active at delivery. Its history shows up to 50 recent jobs from
the printer’s local history API. Device relays the default HTTP camera feed
when the printer exposes it on the configured host.
Device refreshes still snapshots from Obico, OctoPrint, SimplyPrint, PrusaLink
and Prusa Connect Local every ten seconds while the camera is open and the
browser tab is visible.
For Obico, it relays snapshots from the same origin
as the configured server. The image request uses the snapshot URL provided by
Obico and keeps account credentials on the authenticated API request.
Obico uses the selected printer ID and unique print ID in its state token.
An acknowledged control means that Obico forwarded it. A fresh observation
reports the printer's resulting state. History shows up to 500 recent
records and omits entries belonging to other printers on the same account.
Every listed mutation ends in a durable receipt: `running`, then `acknowledged`
(`succeeded` for file deletions and actions), `failed` or `uncertain`. A receipt
+70 -21
View File
@@ -7,6 +7,18 @@ diameter, density and notes. It has no physical-spool inventory, remaining-mass
accounting, batch tracking or storage location. These are outside the product
model; an optional inventory integration can reference the product separately.
A library manager can start a filament product from a system or imported
filament preset. The picker supports search, material and manufacturer filters,
and groups printer-specific variants by filament. The preset fills the draft with product metadata, including
material, manufacturer, color, diameter and density. Saving creates the
independent product. It is immediately usable on the owner's printers; per-printer
tuning is added only where a printer needs it.
Bambu AMS observations report slot metadata and assignment identity. To use a
slot in a project, assign and confirm the product in Device and select its
compatible slicing profile. The project records the slot and the confirmed
assignment revision so that dispatch can check it against the live printer.
## Ownership and visibility
Products belong to explicit filament libraries, stored in the instance database.
@@ -17,21 +29,30 @@ private default library supports single-user use without a separate setup step.
Transferring a library detaches its former owner's default-library identity, so
future default-library creation does not expose transferred data to that account.
A product is explicitly made available on physical printers. A printer user can
read a product only while it is available on a printer that account can access.
Their product projection contains only accessible printer/configuration links;
it does not expose other profiles, library membership or account ownership.
Library owners/managers can inspect their products even before making them
available on a printer. Library management does not grant printer monitoring,
Availability follows ownership rather than per-printer membership. A product is
available on every physical printer whose owner owns or manages the product's
library. A printer can opt out of a single product: `filament_product_printers`
stores only those exclusions (`enabled=0`); an absent row means available. Adding a
product or a printer therefore needs no membership writes, and transferring a library
or changing its managers moves availability with it. Nobody, including an instance
administrator, can make a product available on a printer whose owner has no role in
its library. Instance administration is deliberately not a library role here: an
administrator's own printers would otherwise receive every account's inventory.
A printer user can read a product only while it is available on a printer that
account can access. Their product projection contains only accessible
printer/configuration links; it does not expose other profiles, library membership
or account ownership. Library owners/managers can inspect their products on any
printer they can see. Library management does not grant printer monitoring,
control, calibration editing or preset-saving permissions. Those continue to be
checked against the physical machine's current grants.
This separates a school's laboratories: two laboratories can maintain independent
libraries on the same server. Sharing a product between two printers within one
laboratory does not require duplicating its identity. Access to one printer does
not reveal products available exclusively on another printer, even when both
products belong to the same library. Instance administrators retain instance-wide
access. Account and library identities are never exported as native preset owners.
libraries on the same server, and a library reaches only its owner's and managers'
printers. Sharing a product between two printers of one owner does not require
duplicating its identity. Membership grants on another owner's printer do not carry
the member's own libraries onto it. Instance administrators retain instance-wide
read access. Account and library identities are never exported as native preset owners.
## Native slicing profiles
@@ -39,15 +60,42 @@ access. Account and library identities are never exported as native preset owner
presets. Each linked preset remains owned by exactly one physical machine
configuration through `machine_presets` and `machine_profiles`. Existing detached
snapshots and immutable native revision pins remain authoritative for tuning.
A native preset can belong to only one product. Linking requires library management,
product availability on the destination printer, and permission to edit filament
settings and save presets on that printer.
A native preset belongs to exactly one product; no filament preset exists without
one. Presets created by the printer library are enrolled in the owner's default
library in the same transaction, a link can be moved to another product but not
removed, and startup migration restores a missing link from the preset's origin
product. Linking requires library management, product availability on the
destination printer, and permission to edit filament settings and save presets on
that printer.
Per-printer presets are lazy. Until a (machine configuration, product) pair has
a native preset, it resolves to that configuration's own filament preset of the same material
(or one with an unknown material), composed with the product's identity. That base
already carries the printer's compatibility and extruder-variant layout, so nothing
is adapted beyond the shared identity fields. Lazy resolution writes nothing. The
first tuning or project selection of a pair creates its preset from that base,
with the identity written in, and links it as the preferred profile in one native
publication transaction. A printer user can select an available library product
for a project and create that deterministic preset without tuning permissions.
Later requests return the same preset, and edits go through the ordinary preset
editors. A configuration without a usable base reports a conflict rather than
borrowing another printer's tuning.
Product metadata and native tuning are separate writes. Renaming a product or
changing its colour does not rewrite calibrated settings or existing projects.
Removing availability hides the product and its profiles from printer users;
it does not delete native snapshots. Retiring a product preserves those snapshots
and immutable project revisions.
Opting a printer out hides the product and its profiles from that printer's users;
it does not delete native snapshots.
Adding a product or a printer creates no presets; each printer only owns the
presets selected at setup and those created on first use or tuning. Deleting a
product retires its presets on every printer it reached. It requires library
management and permission to edit filament and save presets on each affected
printer. Printer defaults move to a remaining preset.
It is refused while one of those presets is a printer configuration's only filament
preset, because that preset is the configuration's base for every untuned product.
Deleting a printer removes its presets' product links and opt-outs; the products
stay in their libraries. In both cases immutable native revisions remain available
to existing projects.
Profile resolution takes product, physical machine and machine-configuration IDs.
A sole compatible profile is selected directly; a unique preferred profile resolves
@@ -55,10 +103,11 @@ multiple candidates. Otherwise the caller must choose explicitly. No setting is
inferred from a material family name, no nozzle diameter is treated as a physical
measurement, and tuning is not shared across printers by changing product identity.
Project selection presents products with compatible slicing profiles for the
selected machine configuration. A single profile or a unique preferred profile
needs no extra choice; multiple unpreferred calibrations require an explicit
selection. Products without suitable tuning are not silently mapped by material.
Project selection presents the library products available on the selected printer.
A single compatible profile or a unique preferred profile needs no extra choice.
Multiple unpreferred calibrations require an explicit selection. An untuned product
uses a suitable base on the selected configuration. The selection reports a
conflict when that configuration has no suitable base.
Creating a project composes product type, manufacturer, default colour, diameter
and density with the selected native tuning snapshot. These common material
+49
View File
@@ -0,0 +1,49 @@
# Filament slots
A project filament slot represents a material selection. The number of slots is
independent of the printer's nozzle count: a printer may run fewer materials
than it has nozzles when a tool is unused, or more materials than it has nozzles
when several materials feed the same path.
The sidebar lets the user add and remove slots. An FFF project retains at least
one slot. Changing the printer's extruder count does not add or remove slots,
and saved filament selections are restored at their saved length.
Mixed-filament slots are virtual slots in the same list.
The filament list and its per-slot settings, such as colours and filament maps,
must remain aligned as slots are added or removed. Purge volumes have a
filament-by-filament matrix for each nozzle, so their layout depends on both
the slot count and the nozzle count.
## Tool addressing
On a non-Bambu printer without `single_extruder_multi_material`, a filament
slot is addressed as the physical tool of the same number:
`GCodeWriter::toolchange()` writes `T<slot>`, and `ToolOrdering` maps filament
`i` to extruder `i`. A used slot past the configured tool count can therefore
name a tool the machine does not have.
On a multi-tool printer of this kind, deleting or merging a physical slot before
another physical slot asks for confirmation: later slot numbers, and therefore
their tool numbers, will shift. Cancel leaves the slots unchanged.
`Print::validate()` adds a non-blocking warning for that case. It uses
`Print::extruders()`, so the wipe-tower filament is included, and adds plate
tool changes that match `ToolOrdering`'s mode, sequence and index conditions.
A change stored above the final printed layer is not filtered at validation
time and can still warn.
Mixed slots are expanded to their physical components first, so a virtual slot
does not warn on its own. The GUI shows the warning through the existing
validation notification, and the command-line slicer logs it; both continue
slicing.
Single-extruder multi-material (MMU) printers and Bambu Lab printers are exempt.
On a Bambu Lab printer, G-code addresses a filament and a nozzle with
`M1020 S<filament> H<nozzle>`. Filament grouping assigns filaments to available
nozzles and falls back to the master tool when no better nozzle match exists. A
single-extruder multi-material printer feeds every filament through its shared
nozzle.
Published 3MF material import has its own capacity and placeholder rules; slot
count independence does not change those rules.
+4 -1
View File
@@ -51,7 +51,10 @@ bare printable key in the frame hook would swallow that character in every text
The dialog refuses such chords and `ShortcutRegistry::load()` drops them from the config.
Space counts as typing. The speed dial's default is the one bare Space, and
`MainFrame` leaves it to a focused control that uses Space itself (text fields, buttons,
combo boxes), so it opens the dial from the canvases and the tab strip only.
combo boxes), so it opens the dial from the canvases and the tab strip only. Selecting a page
with a 3D view (Prepare, Preview, the Design tab) gives the view the keyboard: the page's own
`SetFocus()` would hand it to its first focusable control, a sidebar control there, which keeps
Space until the pointer enters the view.
`MainFrame::handle_global_shortcut` skips a chord that `KeyChord::edits_text()` reports
while a text field has the focus (a wx text entry, spin control, web view or ImGui
+566
View File
@@ -0,0 +1,566 @@
# MCP Server
The MCP server lets an AI agent drive a running OrcaSlicer through the Model Context Protocol. A developer's agent
reproduces a GitHub issue: it loads the files, picks presets, changes settings, clicks through the GUI, slices, takes
screenshots before and after a fix and saves the steps as a replay. A user drives OrcaSlicer from Claude Code, Codex,
Cursor or Claude Desktop. The server is off by default.
This document is the server's architecture and the principles its commands are built on. The commands themselves,
how they are named and grouped, what each does and takes, which calls open a dialog and the behaviour a caller relies
on, are in [mcp-tools.md](mcp-tools.md), and each command's description and schema, which `tool_describe` gives, is
its manual. The Design tab, whose commands run on the same server, is in [design-tab.md](design-tab.md).
## Terms
- **Command**: one function the app can be asked to run, with a key (`object_mirror`), a JSON schema and a
description. MCP lists it as a tool.
- **Action**: an entry of the Speed Dial, the app's command palette. A command's actions run it with fixed
arguments, and most of them are its menu items.
- **Person's form**: a call whose arguments are exactly one of the command's actions'. It does what a person's pick
of that action does, which may ask in a dialog; any other call runs from its arguments and opens nothing.
- **Front end**: anything that runs commands: an MCP client over HTTP or the stdio bridge, Action Replay, the Run
Script panel, a `--run` file, a plugin, and a person's pick in the Speed Dial or a menu.
- **Job**: a call that runs on a thread of its own and can outlive its reply; `app_wait {for: "job"}` returns its
result.
- **Guard**: a command's class, `Inspect`, `Recover` or `Mutate`, which decides when it may run.
- **Operation**: a function of the operations layer (`GUI/Operations/`), which holds what a command, a dialog and
the plugin API share. A call's *background operation* is the slice, export or worker job it started and holds.
- **Journal**: the session's record of the calls that changed something, which `replay_export` turns into a
**replay**, a JSON file of calls that `replay_run`, `--run` and Action Replay run again.
- **GUI instruments**: what driving the GUI needs beyond running commands: the UI inspector, the menu capture, ImGui
item recording and, on Wayland, window-state hooks.
## Architecture
```
MCP client ──HTTP──▶ McpEndpoint ◀──HTTP── orca-slicer --mcp-stdio ◀── stdio client
(HTTP server, protocol, token, discovery file)
│
▼
Action Replay ──▶ AutomationRuntime ── McpCore: arguments, guards, admission,
Run Script ──▶ │ jobs (JobRegistry), Journal
--run, plugins ─▶ │
▼
a person's pick ──▶ CommandCatalog (NativeCommands): Mcp/Tools/<Place>Tools.cpp
│
UiInvoker: every wx call on the UI thread
│
┌──────────────────┼───────────────────────┬────────────────────────┐
▼ ▼ ▼ ▼
Operations layer GUI automation: Capture: Replay engine,
(GUI/Operations/) UiInspector, ModalTracker, ScreenCapture, Python runner
│ SyntheticInput, page agent McpRecorder
▼
Plater, Tab, Sidebar, GCodeViewer and the other owners
```
| Component | Its job | Code |
|---|---|---|
| `McpEndpoint` | The MCP server and nothing else: HTTP, the protocol, the request gate, the token, the discovery file, taking over a port another window gives up | `Mcp/McpEndpoint.cpp`, `McpHttpServer`, `McpProtocol` |
| `AutomationRuntime` | Runs commands for every front end; owns the dispatch core, the jobs, the journal, the UI invoker, the `ModalTracker`, the recorder and the scopes a run, a plugin or a client leaves state in | `Mcp/AutomationRuntime.cpp` |
| `McpCore` | Dispatches a call: checks its arguments, applies its guard and operation admission, runs it inline or as a job, journals it | `Mcp/McpCore.cpp` |
| `CommandCatalog` | Every command, built once at startup and sealed, so any thread reads it | `CommandCatalog.hpp`, `NativeCommands.cpp`, `Mcp/Tools/` |
| `ActionRegistry` | The Speed Dial's actions, a command's among them | `ActionRegistry.cpp` |
| Operations layer | What more than one interface does, in one place: checks, refusals, undo, the owner calls | `GUI/Operations/` |
| GUI automation | Sees the GUI as a person does and acts on it: the inspector and its refs, input, dialogs, web pages | `Mcp/UiInspector.cpp`, `Mcp/ModalTracker.cpp`, `Mcp/WebPages.cpp` |
| Capture | Screenshots and recordings | `Mcp/ScreenCapture.cpp`, `Mcp/McpRecorder.cpp` |
| Replay engine | Runs replays, and describes one for Action Replay | `Mcp/McpReplay.cpp`, `Mcp/McpReplaySummary.cpp` |
| Python runner | Runs a script as the main program of a run, with the plugin API | `plugin/PythonScriptRunner.cpp`, `plugin/PythonSession.hpp` |
| stdio bridge | Serves stdio clients and starts the app on demand | `Mcp/McpStdioBridge.cpp` |
The server runs inside the GUI process, because most of what an agent reproduces is GUI behaviour. `GUI_App` owns
the runtime and the endpoint, and neither exists until something needs it: before then there is no thread, socket,
modal-dialog hook or synthetic input state. The endpoint holds the runtime by reference, and the runtime does not
know the endpoint, so every front end but MCP runs with the server off. The core that uses no wx (the command
catalog's type, the dispatch core, the hand-off to the UI thread, the jobs, the journal, argument checking, the
protocol and HTTP transport, the replay model, the stdio bridge and the token) is the library
`libslic3r_automation`, unit-tested without the GUI.
## Design principles
1. **One command, every route.** A command is one function, `run(args, context)`, with JSON arguments that match its
schema. `tools/call`, `tool_call`, a replay step, a script's or plugin's call, a Speed Dial pick and a menu item
all reach it by its key and run it alike, so a feature added once reaches agents, replays, scripts and people.
2. **A command does what the GUI does, through the GUI's code.** What a command shares with a dialog or another
interface is an operation, which the dialog calls too, so the two cannot drift apart. A command writes a value
through the control that sets it, and acts on the selection by selecting as a person would, so the app answers
with its own undo steps, notifications and dialogs.
3. **A call either asks or runs from its arguments.** The person's form asks as the menu item does; any other call
opens nothing and takes the dialog's answers as arguments, or refuses with the question as its reason. So an agent
can work without a person, and a person's pick behaves as it always has.
4. **The UI thread is never blocked by a request, nor re-entered.** Handlers run off the UI thread and post every wx
call to it; a guard keeps a change out of a modal dialog and out of another call's nested event loop. A call that
outlives its reply budget becomes a job, and the server never retries a change.
5. **A call owns its result.** A slice or export the call started is its background operation, numbered so it is
never taken for someone else's, and one runs at a time, so no call changes the project under another's.
6. **A replay does the same thing again.** The journal records each call in its schema's form, with indices rather
than per-process ids, locators rather than refs, and the values a call resolved from saved state; defaults are
fixed values, never what a person last set.
7. **Agents find by listing, and replies say what they hold.** An agent lists a catalog and reads the manual of what
it picked, since a word search does not match a person's words to a command. Descriptions state what a reply
holds, what every tool shares is said once, and a reply's default size fits a client's reply cap.
8. **Nothing leaves the machine, and secrets stay hidden.** The server binds to loopback and wants a token, scripts
run under the plugin audit, and captions, the activity log, dialog text and URLs mask secrets.
9. **It costs nothing until used.** The runtime and the endpoint start on first use, and the GUI instruments, which
cost every frame, are on only while something drives the GUI.
10. **Input stays inside the app.** Input goes in as wx events, never through the OS or the window manager, so no
command needs OrcaSlicer in front and the app never takes the keyboard from the person's other app.
## Transport
The endpoint is `http://127.0.0.1:<port>/mcp`, bound to loopback; the default port is 13619, since 13618 is the
OAuth callback server. It is stateless Streamable HTTP: each POST carries one JSON-RPC message, with no SSE stream,
no `Mcp-Session-Id` and no batching. `McpHttpServer` serves every socket on one I/O thread and runs each request on a
thread of its own, because a handler can block for a whole reply budget. Connections are capped, and at the cap the
one stalled longest on its client is evicted, never one being handled, so a recovery call gets through. Sockets are
not inherited by child processes, which would otherwise keep the port bound after the server closes it.
Every request is checked before any JSON is parsed: path, method, a loopback `Host` against DNS rebinding, a loopback
`Origin` when sent, the bearer token in constant time, the content type and a size cap. No CORS headers are sent.
`McpProtocol` serves the handshake era (2025-11-25, 2025-06-18) and the 2026-07-28 era, whose requests carry their
version in `_meta` and need no handshake.
A tool result is one compact JSON text block plus any images. No tool declares an `outputSchema`: Claude Code shows
its model a tool's description and input schema but never its output schema, and fails a call whose structured
content does not match it, so a schema would teach nothing and could turn a call that ran into an error. Failures
are `isError` results the model can act on (mcp-tools.md, How a failure shows). Before validation the server reads
what agents commonly send in place of the schema's form (`normalize_arguments()`): an argument under a name the tool
does not take as one it does, a value in another JSON form, an enum value under the other argument whose enum takes
it. Each came from the bench, where it was an agent's first guess many times over, and the journal records the
schema's form.
The server `instructions` fit the 4096 characters clients keep. Clients that defer tools load only names and the
instructions at first, so the instructions say first how to find what to call, then what many tools share: never
retry a call that returned a job, a call with an action's arguments may ask, the paging shape, 0-based indices, ids.
## Security, token and discovery
The bearer token is 32 random bytes in `<datadir>/mcp/token`, owner-only (created 0600 on POSIX, the per-user ACL on
Windows) and kept out of AppConfig, whose writes use default permissions. `ORCA_MCP_TOKEN` overrides it for one run.
Deleting the file and turning the server off and on issues a new token. While serving, `<datadir>/mcp/server.json`
holds the URL, port, pid and token, so the stdio bridge and the test harness connect without the launch environment;
it is written owner-only and removed on stop only by the process it names, since windows sharing a configuration
folder share the file.
## Lifecycle
The endpoint opens at startup, before the first startup dialog, when `--mcp`, `--mcp-port` or the `mcp_enabled`
preference asks, so an agent can answer the TLS prompt or the setup wizard. The runtime starts on first use by any
front end. `app_state.ready` stays false until the main window, the Prepare canvas's OpenGL and the tab pages are
up, since a 3MF save needs GL for its thumbnail and a GTK web view made too early loses its message handler; after
10 s it stops waiting, since a hidden canvas or a busy person can hold either back for ever.
When the app closes, the endpoint closes and the runtime stops: waiting calls wake with "shutting down", new calls
are refused, and auto-answer rules end. Nothing is freed then, since a call may still be on the UI thread's stack in
a nested loop; both are freed outside any event loop once their threads have left, or left in place after 10 s,
since freeing under a call that never returns would crash. A language change rebuilds the GUI and only suspends the
runtime: refs go stale and UI calls ask for a retry.
Windows that share a configuration folder share the port, and the bind is exclusive: the first window serves, and
the others retry and take over when it closes. Windows meant to serve side by side need their own `--datadir` or
`--mcp-port`. Turning the server off in Preferences closes only the endpoint, since the call that opened Preferences
may itself be an MCP call; closing it ends the client's auto-answer rules, recording and held presses, so a person
using the app afterwards never has a prompt answered for them.
## Threading
Tool handlers never run on the UI thread. Anything that touches wx runs in a closure that `ToolContext::run_ui()`
posts through `UiInvoker` and waits for. A closure not started within 10 s is abandoned, and one that reaches a UI being
rebuilt is refused; either way the call says it is safe to retry, unless a step of it already ran (one of its
closures, or a call it made). The call then says part of it ran and that it may have done some or all of what was
asked, since a click that hangs the app has already run by the time the next closure waits. After a change a tool
makes one more round trip (`settle()`), so the events the change queued are handled before the reply. A person's pick is the one call that runs on the UI thread itself, in place.
**Guards.** The guard is checked in the closure, on the UI thread, since the app can change between posting and
running. mcp-tools.md (When a command may run) lists the commands of each.
| Class | What it holds | Behind a modal or inside another call |
|---|---|---|
| `Inspect` | reads, lists, screenshots, `widget_list`, the recording commands | runs |
| `Recover` | answering dialogs, `job_cancel`, `window_set`, GUI input aimed at the topmost modal | runs |
| `Mutate` | everything else | refused, naming the dialogs |
A change inside another UI call's nested loop (a modal, a progress dialog, `wxYield`) would re-enter code that is in
the middle of a call, which is why a mutate call is refused there. The input tools are recover calls so that they can
answer the dialog that holds the app, and apply the mutate checks themselves once their target is outside it.
**Jobs.** Observation runs on the request thread; every tool that can activate UI runs as a job, since a click can
open another modal. The request waits up to the reply budget, 45 s, under Codex's 60 s tool timeout, then replies
`{status: "running", job}`. A handler that opens a modal blocks in its loop, so a probe posted into that loop reads
the open dialogs, and the reply becomes `blocked_by_dialog` with a note on how to answer the dialog and how the next
such call runs without asking, so an agent learns it from the call that asked.
**Platforms.** On macOS a native picker or message box pauses wx's pending events, and every posted closure with
them, so the server answers from the snapshot the tracker publishes for any thread, and native dialogs are answered
ahead by a `dialog_auto_answer` rule. Running closures some other way inside the Cocoa modal session would re-enter
the app while the dialog is up. On Windows and Linux a native dialog's loop runs the closures, and on Windows the
dispatcher also wakes the UI thread with a message, which menus' and system dialogs' loops need. On GTK a window the
compositor isn't drawing gets no frames, so a call that times out says so instead of giving a misleading reason.
**Followed calls and the person mark.** A run a person starts (Action Replay, the Run Script panel, `--run`) outlives
any reply, so the runtime follows it on a thread of its own and hands its result to the window that started it. Its
jobs carry the person mark, so a script under a person's run runs as the person's (Python scripts, Identity).
### Operations
Slicing and G-code export finish in the background process, and arrange, orient and the gizmos' jobs on the Plater's
job worker. A call that starts such work holds it as its background operation until it ends, so its reply is the
work's outcome and `job_cancel` stops it. The worker does not record who queued a job, so a call that finds it idle
at the start of one of its UI closures and busy at the end has started one and claims it; a job a person starts in
that window is claimed too, a known cost of the rule.
**Admission.** While a background operation runs, every other `Mutate` call is refused, whichever client, replay or
script sends it, and so are changes while the worker runs a job no call holds; reads are not. The check runs as the
call arrives and again in each UI closure, so a call admitted just before an operation began still can't change the
project under it.
**Identity.** An operation never takes another's completion for its own. `Plater` numbers slice requests and runs and
keeps a project revision, so a slice knows its own runs, and is `superseded` when someone else slices or edits the
project during them. Each plate's outcome comes from its last own run, and statistics come only while the project is
as the slice left it. The rules are in `Operations/RunStatus`, free of wx and `Plater`, so they are unit-tested.
**Idle.** `app_wait {for: "idle"}` holds when no modal is open, nothing slices, the job worker and every gizmo's
background work are idle, and no job runs but the caller and its ancestors, so a replay waiting for idle doesn't wait
on itself.
## The operations layer
The Speed Dial, the MCP commands and the plugin API (`orca.host`) ask the app to do things by name, and what one does
another often does too. The checks, the refusal and its wording, the undo snapshot and the order of the owner calls of
such a function are in one place, `src/slic3r/GUI/Operations/` (namespace `Slic3r::GUI::Ops`), and each interface
converts its arguments and results around it. Where a dialog does the same work (Clone, Preferences, the Plugins
window, the Printer Selection and System Filaments dialogs, AMS sync, Fix Model), the dialog calls the operation too.
**What is an operation.** An effect, or a rule about one owner's state that its own widgets also apply, is a public
method of the owner (`Plater`, `Sidebar`, `Tab`, `GCodeViewer`). What an automation caller invokes by name is an
operation when more than one interface reaches it, and always for a new command. A caller calls an operation to
change something and an owner to read. A function with one entry point is left as it is until a second appears.
**Shape.** An operation is a free function, `Outcome<Result> op(const Args&)`, over plain structs (no JSON, no
`wxString`, no GUI pointer). An `Outcome` holds the result or a `Refusal`: a `kind` (`Precondition`, `Busy` or
`Failed`), a stable `code`, one English message marked for translation, and `names` that help the caller. The Speed
Dial shows the message translated; a tool and a Python exception carry it in English with its code, so a refusal
reads the same through every route.
**Rules.** An operation runs on the UI thread and returns at once: background work returns a ticket and a status
function, and the caller owns the wait, the timeout and the cancel. It takes its function's undo snapshot once, after
its checks. It adds no guard and asks nothing: an answer a caller may give is a field of `Args`. An owner method whose
menu item asks in a dialog takes the answer where a caller can give one (a path, a size, `keep_z`), which skips that
dialog. For its other questions and messages it takes `Prompts`: `Ask` does as the menu item does, and `Skip` runs
without them, each method saying what it answers in their place. An `Args` that passes the choice on holds a `Prompts`
too. An operation includes owner headers, libslic3r and wx, and nothing of `GUI/Mcp`, `plugin/`, JSON or pybind11; the
dispatch core includes nothing of it. A command does what a person's action does by running the code that action runs,
not by writing the model or the config beside it: a dialog's OK is split into a function both call, and a command that
acts on the object list's selection selects the row first.
**Keeping it so.** A command names the operations it reaches (`reaching()`), and the command reference lists them.
`test_operations` requires every command outside the Design tab that is not read-only to name one, or to be on its
exception list with a reason (it runs what its arguments name, drives the GUI, changes the session, has one entry
point, runs its menu item's function, or steps a history).
## Tool catalog
The commands are the process's `CommandCatalog` (`NativeCommands::instance()`), built once at startup, before the
runtime starts, and sealed, so any thread reads it. `register_all_commands()` gathers each place's commands from its
file, `Mcp/Tools/<Place>Tools.cpp`, and sorts them by place, the first word of their names, in the order mcp-tools.md
gives. A command is made with a maker that sets its guard and where it runs (`inspect_tool()`, `mutate_tool()`,
`recover_input_tool()`, or `menu_command()` for one made from menu items). `tools/list` shows the commands that run
from arguments; `tool_list` lists the rest (the menu items that take no arguments, the Design tab's commands, the
plugins' operations), and `tool_call` runs any of them.
**Access labels.** Each tool's MCP annotations mark what a call does by its nature, not everything a call could
reach. Codex asks before every call of a destructive tool and Claude Code runs read-only calls in parallel, so
labelling by reach would put a confirmation on calls an agent makes all the time. `destructive` is a command whose
every call deletes what a person made, with no undo; a command that loses work only when an argument says so, or that
runs what its arguments name, is not. mcp-tools.md lists the commands of each label.
**Indices and ids.** Every argument that names an object, part or instance by index has a twin that names it by the id
`object_list` reports. The index is what the app works by and moves when things before it go; the id stays with its
thing, so a stale id is refused where a stale index would quietly name another. A call's ids are read as indices on
the UI thread just before the command runs, so commands read indices only, and the journal records the indices,
since ids belong to one process.
**Descriptions and replies.** A description gives what the tool does, the arguments that change it, `Reply:` with its
fields, then edge cases, and what several tools share is written once (the locator grammar in `widget_list`, the
paging shape in the server instructions), since every session loads the whole list. An argument name means one thing
across the tools (mcp-tools.md, Naming). A name that misses is answered with the closest names, or with why the
catalog left it out (the CAD feature off at startup). Lists page as `{items, offset, total}`, and defaults are sized
so the bare call fits a client's reply cap. Numbers reach a client rounded, since a double's last digits are noise
that costs tokens; a call asks for them whole with `_meta` `"orcaslicer/exact_numbers": true`. Paths are absolute,
since a relative one would resolve against the GUI's working directory, and travel as UTF-8.
### Design tab: the Design commands
The Design tab's commands are made from one table, `kDesignTools` in `CAD/DesignOffer.hpp`, generated from
`scripts/CAD/tool_atlas.json`, which is also the tab's right-click menu and its Speed Dial actions (design-tab.md, The
offer is generated, not hand-written). An entry's description, closed schema, access and the operations it names all
come from the table, and its silent form, in `Mcp/Tools/Design<Heading>Tools.cpp`, is bound to it by id. They join
the catalog only when it is built with the CAD feature on, since the catalog is sealed at startup; otherwise a call by
one of their names is told why (`design_unavailable`). They are not listed, so a session that never opens the tab
pays only for their names, at the end of `tool_list`'s description.
A call that chooses a menu item opens that tool, as the menu does; any other call runs the silent form on the UI
thread under the mutate guard. `design_gate()` refuses by cause first, and the entry's `access` decides what the tab
lets through while a card, a Move or a sketch session is open. A failed rebuild is rolled back, so the design is as it
was and the call is left out of a replay. mcp-tools.md (The Design tab's commands) has how they are named, called,
refused and journaled.
## Speed Dial catalog
`action_list` and `action_run` serve the Speed Dial's `ActionRegistry`: the commands' actions, plates, recent
projects, plugin scripts and pages, and settings on request. A menu item and the command that does its job are one
command, so the items of one job are actions of one command, each with the arguments that pick its variant (Mirror >
Along X Axis is `object_mirror {axis: "x"}`). An action keeps its menu item's id, title, section and icon, because a
person's pins and run counts are stored under the id. The Design tab's actions are live: there while the tab is shown,
in its mode, with the CAD feature on.
**One function, two contexts.** A call's context is the core's; a person's pick has a `PersonContext`, which runs in
place on the UI thread with no job, no journal entry and no endpoint, so every action works with the server off. A
long command a person picks runs as a job on the runtime's core instead, with the same guards and admission as a
call, and shows its result as a notification. The makers place a command's function on the thread it needs:
`ui_command()` on the UI thread, `long_command()` where its call runs, and `with_person_form()` and
`with_menu_item_forms()` for a command whose person's form asks; `silent: true` runs such a command from its
arguments, and the journal keeps it.
**action_run** runs an action as a call with its arguments would, after re-making the live families (plates, recent
projects, the Design tab's actions), so it finds the app as it is. It is journaled as that `action_run`, so a replay
never passes the action arguments it does not take, and an agent's runs never reorder the Speed Dial.
## GUI automation
The GUI commands (mcp-tools.md, Driving the GUI) let an agent see the app as a person does and act where the typed
commands don't reach: a dialog, a gizmo's panel, a web page, a menu item with no command.
- **Seeing.** `UiInspector` turns the shown windows into a text tree: widgets, list rows, menus, the 3D toolbar and
gizmos, the canvases' ImGui items (from ImGui's test-engine hooks, on only with the instruments) and web pages'
elements. It reads an element as a person sees it, a field by the setting it edits or its label, so the tree is
enough to act on without a screenshot. A ref is never reused and goes stale with its element; a locator names an
element by what a person sees, so it holds across runs, and the journal records locators.
- **Acting.** An element is activated through its owner's own dispatch (`wxEVT_MENU`, a toolbar's click action, a
control's semantic event), and only custom-drawn widgets and the 3D views get synthesized mouse events, since a
native control acts on what the system tells it. An element gets the state a person would see before it is listed
or clicked. `SyntheticInput` holds the keys and buttons of a gesture for the code that reads hardware state, and a
press is released by whoever made it or when its owner ends. The camera is turned with `view_set`, never a drag,
since what a drag does is the user's mouse setting.
- **Menus.** A native menu loop holds the UI thread until a person closes the menu, so a menu a call opens is
captured instead of shown: listed in the reply, or its item dispatched as a pick from a shown menu is. Other menus
opened while a call runs are closed unseen and noted.
- **Dialogs.** `ModalTracker`, a `wxModalDialogHook`, sees every `ShowModal()`, native dialogs included, keeps the
modal stack the guards read and publishes a snapshot for other threads. A dialog's message is read as a person
reads it, with secrets masked. `dialog_answer` presses a wx dialog's own button, so its handler runs, and presses a
native message box through the OS on Windows and Linux. An auto-answer rule answers a dialog as it opens: a picker
takes its path as a person's choice would, and a wx dialog's button is pressed once its loop runs, since its
handler does the dialog's work.
- **Web pages.** Every web view, plugins' included, is read and driven by one page agent
(`resources/web/mcp/page_agent.js`) that the server sends in with the request when a page lacks it, so no host
needs a change. It lists a page after Playwright's accessibility snapshot, and sends what a person's input sends,
since synthesized DOM events get no default action. A page's messages to its host are held while an action runs,
so a page that closes its dialog can't destroy the web view under the call.
- **Windows.** `window_set` changes only geometry and checks the whole request before anything changes. A window
manager may apply a request later or change it, so the call waits until the window shows what was asked. Wayland
has no request to place a window, so positions are refused there.
The windows a person keeps for themself (the Run Script panel, the Agent Activity pane, the Python scripts dialog,
Action Replay's prompts) are named `kHiddenFromAutomation`, so no tool or auto-answer rule acts in them.
## Screenshots and recording
`window_screenshot` captures on the UI thread and encodes off it. The canvas capture forces a frame of a 3D view and
reads it back before the swap, so it is exactly what is drawn on every platform. The window capture takes a window
and composites the 3D views into it, since window capture loses OpenGL content on several platforms, and says
`approximate` where it may differ from the screen.
| Platform | Window capture |
|---|---|
| Windows | Windows Graphics Capture, which reads what DWM composed, covered or not; `PrintWindow` would repaint the window and flash it |
| macOS 14.4 and later | ScreenCaptureKit, the app's own windows only, which needs no Screen Recording permission |
| macOS before 14.4 | the content view drawn into a bitmap, approximate |
| Linux X11 | `XGetImage` of the window |
| Linux Wayland | the window's widgets drawn into a bitmap, approximate |
A recording has to stay light, since it runs while the app works. The UI thread only captures, on a timer that fires
inside modal loops too and backs off when capturing is slow; `RecordingSink`, which uses no wx, writes the frames as
JPEG into a Matroska file, which keeps their real times and plays as it is, and drops a frame rather than wait for
the disk. `recording_encode` runs the system `ffmpeg`, never a program a call names, at constant quality, which suits
a mostly still screen. Captions name the calls that act, with secrets masked. While any recording runs the tab bar
shows a REC pill, so a person always knows the app is being recorded.
## Replays and the journal
A replay is a JSON file of calls, which one engine (`McpReplay.cpp`, wx-free) runs for `replay_run`, `--run` and
Action Replay:
```jsonc
{ "orca_replay_version": "0.2.0", "name": "repro #12345", "vars": {"model": "${replay_dir}/part.stl"},
"steps": [
{"tool": "project_import", "args": {"paths": ["${vars.model}"]}},
{"tool": "plate_slice", "expect": {"/plates/0/outcome": {"eq": "ok"}}},
{"tool": "window_screenshot", "args": {"target": "canvas", "save_path": "${out_dir}/preview.png", "overwrite": true}}
]}
```
`orca_replay_version` is the format's semver: a minor version adds tools or fields, a major one renames or removes
them, and while the major version is 0 a build reads only its own minor version. The step fields, placeholders and
matchers are in `replay_run`'s description. Steps are child calls of the replay's job, so they are not journaled and a
replay's wait for idle doesn't wait for itself.
**The journal** records the client calls that change something, plus the waits, screenshots and recordings a replay
needs, in the schema's form, with locators for refs and indices for ids. A call that runs as a job is judged by its
final result, so a replay never repeats a call that did nothing, and one that asked in a dialog stays, since the
steps after it answer that dialog. It keeps a bounded number of recent calls, so a long session can't grow it without
limit.
**`--run FILE`** runs a replay or a Python script once the GUI is ready, then closes the app and exits 0 when it
passed, 1 when a step failed and 2 when the file is invalid; `--outputdir` is where files saved without a path go.
A `--run` launch is never handed to a running instance, so its exit code is its own, and its session is the run's, so
a person's unsaved-project backup is still offered at their next launch.
**Action Replay** is a window where a person opens, writes and replays a file, whole or a step at a time. A replay is
a file people pass around, so before a run the window describes each step and flags what reaches beyond the project:
writing a file outside the output folder, changing presets, replacing the project, sending to a printer, or running a
program. When a step would replace a project with unsaved changes, it asks whether to save first. The window's
prompts are the person's own, so no tool and no auto-answer rule a replay registers answers them.
## Python scripts
A Python script is a `.py` file or a code string that runs on the plugin interpreter as the main program of a run,
with the whole plugin API and without being packaged as a plugin. A person runs one in the Run Script panel or with
`--run file.py`; an agent sends one with `script_run`, and a plugin's code may too. A script that runs under
`python file.py`, or code written for a plugin's `execute()`, runs here unchanged. A *file run*, whose `filename`
names an existing file, gets `__file__`, `sys.argv`, imports from its folder and its PEP 723 dependencies, installed
into the package folder plugins share; code sent as text gets none of that. The outcome (`finished`, `raised`,
`cancelled`, `timed_out`) is reported in a successful result, so the journal keeps the call and a replay of it fails
again. What a script can rely on:
- **Runs overlap**, an agent's beside a person's, so a run's output, `__main__`, `sys.argv` and identity are keyed by
the run bound to the calling thread, and carried into the threads and pool tasks it starts.
- **Imports.** A file run imports from its folder without anyone changing `sys.path`, and an edited helper is
compiled afresh on the next run. `sys.modules` is one cache, so overlapping scripts from different folders share a
helper of the same name; helpers want distinct names.
- **The end of a run.** Like `python file.py`, a run ends once its code, its non-daemon threads, its window callbacks
and its pool tasks are done. Then it shuts down the pools its code created and calls its `atexit` functions once.
Pool workers are shared by every run and belong to none.
- **Stop.** `job_cancel` and `timeout_s` interrupt the run, again every second until it ends, but never inside the
host's own bookkeeping; five seconds after the first stop the run stops waiting for its work. Code blocked in a C
call holds the run until it returns.
- **Windows.** What a run opens closes with it. A window callback runs on the UI thread, so it can't call tools,
which wait for the UI thread, and hands work to the script's own code. While a modal the run opened is up, tool
calls that change the project are refused, so interactive scripts use modeless windows.
- **Idle.** A `script_run` job doesn't count as busy for `app_wait {for: "idle"}`, though the calls it makes do, so a
macro waiting for the person doesn't hold every agent's wait.
**Identity.** A person's script runs under the audit identity `(script)` and an agent's under `(mcp)`, told apart by
the person mark. The plugin audit ([plugin-permissions.md](plugin-permissions.md)) judges a script as it judges a
plugin, but a script has no install state to hold a grant, so it is never asked. A plugin's own `script_run` runs
under the plugin's identity and grants.
**The setting.** One switch, `python_scripts_unrestricted`, off by default, decides how scripts are judged. Off, a
script's own code is held to OrcaSlicer's folders and denied programs, threads and the network; on, it may do what
the audit allows any plugin. The audit is a Python audit hook, not a sandbox: the tools a script calls run
OrcaSlicer's own code and are not judged. Only a person changes the switch, in a dialog no tool reaches, and
`app_state.python.scripts_unrestricted` tells an agent what its script may do.
The Run Script panel is a dock pane where a person runs a file, a `# %%` cell or a console line in a live session,
which keeps its globals between pieces of work and is an unjournaled person's job. Its Stop interrupts the work now
running while the session goes on; Restart session, opening or closing a script and quitting end the session as a
stopped run ends.
## Plugins and the tools
A plugin's code calls the commands through `orca.host.tools` only with the tools permission or full access, asked for
at load or when it first calls, as its other permissions are ("Calling OrcaSlicer's tools" in
[plugin-permissions.md](plugin-permissions.md)). The tools run OrcaSlicer's own code, which the plugin audit doesn't
judge, so a plugin's other grants bound its Python code and not what it asks the tools to do, and each call is logged
with the plugin's key. A call runs as a job owned by the plugin, never journaled, so the session tools are scoped to the
plugin, and what its calls leave behind ends when it unloads or loses the permission, from which moment its calls are
refused; a call made before that leaves nothing behind for the client.
A plugin may offer operations, `plugin.<plugin>.<name>`, which `tool_list` lists and `tool_call`, scripts and replay
steps run. They are a source of the command catalog, looked up after its own commands, and run as jobs under the
plugin's identity, guarded and journaled as a change when the plugin declares one.
## Agent Activity pane
View › Agent Activity shows a dock pane that lists, live, every call automation makes in the app, reads included:
an agent's, a replay's, a script's and a plugin's, with the dialogs auto-answer rules answered. A person's own picks
are left out. Each call into the core names its origin, and `ActivityLog` (no wx) lists only while the pane is open.
It masks what captions mask, and fails closed where masking can't be complete. The pane only watches.
## stdio bridge
`orca-slicer --mcp-stdio [--datadir DIR] [--mcp-port N]` serves clients that speak only stdio. It forwards each
message to the instance the discovery file names, and starts OrcaSlicer only for a tool call, so a session
registered user-wide that never calls a tool never opens the app. Until an instance answers, it answers the handshake,
`tools/list` and the rest itself from the same command catalog, with the server's exact replies, which needs a
catalog built without the runtime, so registering a command never reads app state. A tool call with nothing
answering starts `orca-slicer --mcp` and waits for it to be ready. If a running instance without MCP takes that
launch over, each tool call says to turn the server on in Preferences, and a failed start is not tried again, so a
stuck start never makes every call another launch. A request that could not be sent, or was refused because the
token changed, is sent once more; one that lost its reply is never sent again, since it may have run. Every request
has a deadline, so a server that never replies can't hang the agent.
## Making a feature reachable
A change to the GUI needs nothing for automation until someone writes its command: until then the GUI commands (GUI
automation) reach it as a person does. A menu item of the Design tab is an entry of `tool_atlas.json` either way (A
Design command, below).
A feature is a command, named for its place, then its verb (mcp-tools.md, Naming), declared in its place's file:
1. **Build it** with `inspect_tool()` for pure observation or `mutate_tool()` for a change, label it, give it a
schema, a description in the order above and one to three examples. A new place word goes in `kPlaceWords`, and
a new heading in `kHeadingOrder`.
2. **Put what it does in an operation** of `GUI/Operations` and name it with `reaching()`, or join
`test_operations`' exception list with a reason. The handler reads its arguments, resolves its targets, calls
the operation and shapes the reply; all wx work is in `ctx.run_ui()`, and a change ends with `settle()`.
3. **Make its menu items its actions** (`NativeCommands::action()`), with the arguments that pick the variant, and
give the command its person's form. The call with arguments must not prompt.
The command then appears in `tools/list` or `tool_list`, `tool_describe`, the Speed Dial and replays. A new or
changed command changes the command reference, `tests/data/command_catalog.json`, where a reader outside the app sees
every command and which the skill's action list is written from (`tools/mcp/gen_skill_reference.py`). The test "the
checked-in command reference matches the catalog" fails until it is regenerated: run
`slic3rutils_tests "[Reference]"` with `ORCA_UPDATE_COMMAND_REFERENCE=1` and check the file in.
#### A Design command
A Design command is an entry of `scripts/CAD/tool_atlas.json` instead:
1. Name it by its place, then its verb (`solid_shell`), and add its entry under its heading: a menu item with its
argument form (a `tool` block), a menu-only item, an argument-only command, or a folded variant of a command that
exists.
2. Wire a menu item's handler in `DesignPanel`, which the entry's `action` names.
3. Run `scripts/CAD/gen_offer_table.py`, which writes `DesignOffer.hpp` and refuses a table that breaks its rules.
4. Write its silent form in its heading's `Design<Heading>Tools.cpp` and bind it by id. A change an operation stands
for goes through the operation, and several Prepare edits share one outer snapshot, so the call is one undo step.
5. Update the counts and names `tests/slic3rutils/test_mcp_cad.cpp` pins, keep `tool_list`'s names index within 4096
characters, and regenerate the command reference. A new heading also needs its file in `src/slic3r/CMakeLists.txt`
and `localization/i18n/list.txt`.
## Configuration
- `--mcp` opens the endpoint at startup, and `--mcp-port N` on that port (0 takes the preference's).
- `--mcp-stdio` runs the stdio bridge in place of the app.
- `--run FILE` with `--outputdir DIR` runs a replay or a script (Replays and the journal).
- `--unrestricted-scripts` lets scripts run unrestricted for the run, and `--cad` turns the Design tab on.
A flag turns its setting on for the run and never writes the configuration. AppConfig holds `mcp_enabled` (off) and
`mcp_port` (13619). Preferences › General › AI features turns the server on, shows its port and address, and copies
the setup for an agent (Claude Code, Codex, opencode and others). HTTP is the default, since its URL stays the same
whichever build runs and nothing runs on the agent's side; the cost is that OrcaSlicer must be running with the
server on, and a registration holds the token, so a new token or port means copying the setup again. Stdio suits an
agent that should open OrcaSlicer on demand, and its setup names this executable, so it breaks when the program
moves. `--run` beside a slicing action, where no GUI starts, is refused rather than left unrun.
## Testing
The wx-free core is tested by `automation_tests` (`tests/automation/`), which links nothing of the GUI library, so a
wx include in a core unit fails to compile. What needs the GUI library is tested in `tests/slic3rutils/`
(`slic3rutils_tests "[Mcp],[CommandCatalog],[Operations],[ImGuiWrapper]"`). `[CommandCatalog]` checks the catalog's
rules, `[Reference]` the checked-in command reference, and `[Mcp][CAD]` the Design commands (design-tab.md,
Verification); `tests/AGENTS.md` says where a new case goes.
End to end, the MCP sweep (`tools/mcp/run_sweep.py`) drives the built app through its server, as an agent does:
[tools/mcp/TESTS.md](../../tools/mcp/TESTS.md) holds its rules and the index of its tests, and
[tools/mcp/README.md](../../tools/mcp/README.md) says how to run it. No sweep test sends a print job or reaches a
physical printer.
File diff suppressed because it is too large Load Diff
+10 -4
View File
@@ -290,11 +290,17 @@ explicit reapplication is available. Available products and their tuning profile
are choices rather than an automatic project slot list. A fresh machine selection defaults to one
material slot; explicit selections preserve their order and repeated assignments.
The native template's material list is retained as source data, independently of
that initial slot count. The printer creation form explicitly selects compatible
filament templates to copy, with search and a selected count.
that initial slot count. Adding a printer is a three-step flow: the model and
the nozzle variants to create (each variant gets its own preset name), then
filaments, then an optional connection. Model cards choose only the model; variants
are ticked beside the chosen card. The filament step summarises the owner's library,
whose products are available on the new printer without copying. Catalog filaments
are an optional addition, required only while the library is empty. Without a
choice, each variant copies the printer's own default filament as its base settings.
Copied templates create independent native tuning linked to material products in
an owned filament library. Product availability is explicit for each physical
machine; it does not transfer library management or printer control. A nozzle
an owned filament library. Every product in the owner's libraries is available on
the machine unless it opts out; availability does not transfer library management
or printer control. A nozzle
switch retains the selected products where compatible tuning resolves uniquely
and requests an explicit library decision otherwise. Device-slot choices and
dispatch validation follow the [filament product model](filament-products.md).
+64 -7
View File
@@ -33,6 +33,7 @@ Permissions are stored per plugin key. A plugin can hold:
| `threading` | boolean | Permission to start a Python thread with `_thread.start_new_thread`. |
| `events` | target list | Audited events that expose no target, keyed as `<Category>:<event>`, for example `Socket:socket.__new__`. Matched verbatim. |
| `full_access` | boolean | Turns off the permission decision for the plugin. See "Full access". |
| `tools` | boolean | Permission to call OrcaSlicer's tools through `orca.host.tools`. See "Calling OrcaSlicer's tools". |
Create and delete grants are independent of read and read/write grants. An empty list grants
no folders; an absolute folder path grants operations directly inside that folder, while a path
@@ -172,6 +173,22 @@ order:
After a granted root event with a target, the hook records the operation frame so the
nested events of the same operation are not asked again.
### Python scripts
A Python script run from the Run Script panel, with `--run` or by an agent's `script_run`
is not a plugin, but its events are judged here under an identity of its own, `(script)` or `(mcp)`
(see "Python scripts" in [mcp-server.md](mcp-server.md)). A script has no sidecar, so it holds
no grant and is never asked: steps 1 to 3 apply to it, and any other event is denied with a
`PermissionError` that names the setting below. A file run also reads the folder of its file,
through a per-call scoped root.
The "Run Python scripts unrestricted" setting (`python_scripts_unrestricted`: Preferences, AI features,
Python scripts; off by default) lifts this for every script, and so does the command line's
`--unrestricted-scripts` for one run, without writing the setting: while either is on, a script's event
is allowed right after step 1, so only the denied paths stay blocked. No plugin's key is a script identity: a
local plugin's key keeps only the letters, digits, `_`, `-` and `.` of its file name, and a cloud plugin's is
its UUID.
## Permission prompts
### Declared permissions during load
@@ -185,6 +202,8 @@ GUI-thread caller is rejected when another prompt is active instead of blocking
Denying the request aborts the load. A readable sidecar with `full_access` accepts the
declaration without a prompt and without adding a grant.
`request_permissions(tools=True)` is one more bucket of that combined prompt, as `threading=True` is.
Network URLs passed to `request_permissions(network=...)` are normalized to
`scheme://host` before prompting or storing, so one approval covers every path and port
on that host and also authorizes raw sockets to it. A relative filesystem tree grant is
@@ -196,7 +215,8 @@ sidecar show the absolute scope it covers.
An event that is not covered by a saved grant or an implicit rule is either put to the
user or denied. If the caller is on the wx main thread and no audit prompt is active, the
modal runs inline. Otherwise, as on the Script workflow, the plugin-load worker, or the
slicing worker, the current event is denied and the prompt is queued for the GUI thread.
slicing worker, the current event is denied and the prompt is queued for the GUI thread. A
plugin's tool call without the tools grant takes the same path from its Script worker.
`AuditPromptQueue` serializes runtime prompts, one-time recursive-delete consent, and
load-time declarations, so at most one is shown at a time,
including during a modal dialog's nested event loop. An event raised inside that loop is
@@ -279,7 +299,7 @@ The following are denied before any allowed root or full-access check:
Grants and install state live in `.install_state.json` in the plugin root. The
`permissions` object stores `fs_read`, `fs_readwrite`, `fs_create`, `fs_delete`, `network_http`,
`network_socket`, `process`, `threading`, `events`, and `full_access`. It never stores a
`network_socket`, `process`, `threading`, `tools`, `events`, and `full_access`. It never stores a
recursive-delete consent: that approval and any retry approval are in memory only, so accepting
one does not widen the plugin's saved delete scope. The file is
written by `write_install_state`, the single writer for the sidecar schema. In-process
@@ -295,6 +315,7 @@ Reading is deliberately fail-closed:
form. Reading never rewrites the file.
- `full_access` is enabled only by an explicit JSON boolean. A missing key, a string, a
number, or any other type reads as false.
- `tools` is granted only by a JSON `true`; a missing key or any other value reads as `false`.
A sidecar that exists but cannot be read is never overwritten, because it may still hold
grants and capability choices. The one exception is a plugin load: if the sidecar is a
@@ -343,8 +364,8 @@ lowercase `scheme://host`, dropping port, path, query and fragment. Bare hosts,
schemes, wildcards and URLs carrying userinfo are refused rather than guessed. Network
entries cover every port, path and query on the host.
The dialog warns before enabling full access. Grants stored
while full access is on are inert and apply again when full access is off. Turning full access
The dialog warns before enabling full access. The OrcaSlicer tools switch is a yes/no switch like
Threading's. Grants stored while full access is on are inert and apply again when full access is off. Turning full access
on does not delete the stored lists. A permission change affects subsequent audit decisions,
not operations already authorized.
@@ -353,6 +374,35 @@ On Linux and macOS, create and delete operations using a directory file descript
against its resolved path. If that path cannot be resolved, the operation is denied, even with
full access.
## Calling OrcaSlicer's tools
`orca.host.tools` lets a plugin call every command a plugin caller has: an agent's commands, less the few
[mcp-tools.md](mcp-tools.md) refuses a plugin (`replay_export`) or limits to its own jobs. Through them it reaches
the project, presets and files, post-processing scripts (which run as programs), the window, and its dialogs,
permission requests included. A plugin holding it can therefore give itself any other permission,
which is why its prompt says so. `orca.host.tools.list()` and `describe()` only read the
catalog and need no permission, and operations a plugin offers with `orca.register_operation` stay
free; a Python script a person or an agent runs is not a plugin and is unaffected.
The grant is `tools` true or full access, read from the sidecar on every call. A plugin's own call asks
for it as an undeclared audited event does, on the plugin's Script worker before the call is admitted
(`PluginAuditManager::request_tools_permission` in `admit_plugin_call`): without the grant the call is
refused and the prompt queued (see "Runtime prompts"), and a Yes is saved, so the plugin's next call
works. A sidecar that exists but cannot be read refuses the call without asking, as a declaration is refused,
since a Yes could not be saved there. The admission on the UI thread checks the grant again without asking
(`PluginManager::plugin_may_call_tools`), so a grant withdrawn in between cannot reopen the plugin's
scope, and every call a plugin owns, its script and replay runs' children included, is checked again
where the MCP core runs it (`JobRegistry::tools_refused` in `McpCore::run`). Each refuses with
`orca.host.tools.ToolError`, `details["code"] == "tools_not_allowed"`.
When a Plugins-dialog edit leaves a plugin without the tools, `AutomationRuntime::plugin_tools_withdrawn`
asks its running calls to stop and ends its scope and its running runs' scopes, popping their
auto-answer rules, ending their recording and releasing their held presses, as an unload does, but
without blocking it, so a later grant works without a reload. A call that passed its check just before
is refused the moment it would leave such an effect behind: the plugin is marked withdrawn until a call
admitted under a new grant opens its scope again, and the places that publish a press or start a
recording check the scope is still open (`require_owner_scope`).
## Full access
Full access is a per-plugin boolean that turns off the permission decision. It does not
@@ -360,7 +410,8 @@ remove the audit hook. For recognized events it is reached after the uncondition
denied-path check, so the application configuration, the cloud user-secret file,
certificates, configuration paths, and `.install_state.json` stay blocked from direct
Python access. Everything else that the audit hook recognizes is allowed without a grant
or a prompt, and declared permissions are accepted without prompting. The read-only
or a prompt, and declared permissions are accepted without prompting. It also allows the plugin's
tool calls. The read-only
`resources_dir()` root is a normal-mode restriction only: full access permits writes there
when the operating system allows them. The denied `cert` keyword still blocks the bundled
certificate.
@@ -405,7 +456,10 @@ never treated as an opt-out.
- **Host APIs are not audit events.** Calls into OrcaSlicer's Python host APIs, such as
preset updates or UI actions, execute C++ host code and follow that API's contract. The
audit hook judges the Python-level filesystem, network, process and thread events it is
given, not the host API's internal work.
given, not the host API's internal work. `orca.host.tools` is gated by the tools permission
instead (see "Calling OrcaSlicer's tools"), and once granted it reaches every command a plugin
caller has: the files those tools write, post-processing scripts, and dialogs, permission
prompts included.
- **Denied paths are a direct-access block.** Path laundering through a symlink,
hardlink, subprocess, or Windows 8.3 short name is outside the model. A tree grant is
canonicalized for matching, but the deny check itself is base-name and component based.
@@ -461,7 +515,10 @@ never treated as an opt-out.
- `src/slic3r/plugin/PluginManager.hpp` / `.cpp` - `mutate_plugin_permissions`,
`revoke_plugin_permissions`, `get_install_state`.
- `src/slic3r/GUI/PluginsDialog.cpp` - permission editor payloads, native confirmations,
and the full-access request path.
the full-access request path, the tools switch and its withdrawal call.
- `src/slic3r/GUI/Mcp/McpPluginCaller.cpp`, `JobRegistry.hpp` / `.cpp`, `McpCore.cpp`,
`AutomationRuntime.hpp` / `.cpp` - the tools checks (`admit_plugin_call`, `tools_refused`),
`plugin_tools_withdrawn` and `require_owner_scope`.
- `tests/slic3rutils/test_plugin_audit.cpp`, `tests/slic3rutils/test_plugin_install.cpp`,
`tests/slic3rutils/test_plugin_lifecycle.cpp` - audit decision, sidecar, and permission
mutation coverage.
+440 -43
View File
@@ -42,10 +42,18 @@ retypes, and where needed adds, the candidates inside its intersection, like
painting does.
An **intersection** is a continuous part of the external perimeter's centerline
that lies inside the modifier's slice on that layer. It is a portion of the
perimeter, never a chord through the object. The centerline lies half an
extrusion width inside the model surface and depends on print settings, so a
modifier must reach clearly past the surface to cross it unambiguously.
whose model surface lies inside the modifier's slice on that layer. It is a
portion of the perimeter, never a chord through the object. The centerline lies
about half an extrusion width inside the printed wall and is invisible to the user,
who places modifiers against the model surface. Extraction therefore
reconstructs that surface from the centerline, clips it, and carries the
result back onto the centerline along the normal (see
[Surface reconstruction](#surface-reconstruction)). A modifier acts when it
reaches the reconstructed surface, which lies a margin of 5 µm inside the model
surface, and has no effect when it stays inside the body, even if it crosses the
centerline. A modifier that enters the model by less than the margin does not
act. An open extrusion (a thin wall printed as one line) is left out: its
G-code does not depend on where the seam is.
### Terms
@@ -133,7 +141,11 @@ threads without locking.
## Perimeter preparation
The seam placer works on external perimeter loops, including the walls of
holes. For objects with Precise Seam volumes, consecutive duplicate points and
holes. Precise Seam processes closed loops only: an open extrusion (a thin wall
printed as one line) keeps its ordinary seam candidates, and modifiers are not
evaluated on it. A modifier that crosses only such a wall has no effect, and the
"had no effect" warning names it when it was evaluated on a closed loop. For
objects with Precise Seam volumes, consecutive duplicate points and
the repeated closing point of each extrusion loop are removed: adjacent
extrusion paths share endpoints, and the resulting zero-length edges would
prevent point insertion at their junctions. Distinct visits to one point of a
@@ -142,13 +154,197 @@ original points, so ordinary seam candidates are unaffected.
Each polygon is made counter-clockwise. A single `PreparedPerimeter` is then
built for all modifiers of that perimeter. It holds a validity check (at least
three points, no consecutive or closing duplicates), the bounding box, and the
clipping line: the polygon as an open polyline with its first point repeated at
the end. The preparation borrows the polygon and is used only while the polygon
three points, no consecutive or closing duplicates), the bounding box, the
clipping line (the polygon as an open polyline with its first point repeated at
the end), the side of the air (outside a contour, inside a hole, by the loop
role) and the surface shift. The surface line is built from it on the first
request, so perimeters that no modifier approaches never pay for it.
The **surface shift** is the distance from the centerline to the model surface
the user sees, less a margin. Its nominal value is `d = w/2 - c - m`:
- `w` is the region's nominal external perimeter width, the flow the perimeter
generator uses for the outer loop on that layer, first layer included. A loop
of the classic generator takes the width of its own outer wall line instead
(`ExtrusionPath::width` of its first external perimeter path): with thin wall
detection off, an island too narrow for two lines and short enough is printed
with a thinner line, inset by half of that width. Bridged paths lie on the
same centerline with the overhang flow's width and are not asked; a loop
without an external perimeter path keeps the region's width.
- `c` is the XY compensation that moved this wall away from the model,
positive towards air: `xy_contour_compensation` for a contour and minus
`xy_hole_compensation` for a hole (a positive value enlarges holes). It is
zero where slicing skips compensation, for multi-material painting with
several filaments. It is also zero for a hole on a layer with several
regions when the hole setting is negative: slicing then clips the regions by
the compensated islands, and clipping cannot add the material that would make
the hole smaller. Both values are taken once per object in
`SeamPlacer::init()`, so they describe the outer contours and holes of the
object. A wall on the boundary between two regions of one object is
compensated differently by slicing, and there the surface is not restored
exactly (see [Known limitations](#known-limitations)). Modifier slices are not
compensated, so they stay in the frame of the model.
- `m` is `SURFACE_MARGIN` (5 µm). A modifier face placed flush against a model
face would otherwise touch the reconstructed surface by rounding noise and
act on some layers only; the margin moves that unstable position 5 µm deep,
where it is not reached by accident.
**Measured shift.** On the layers with elephant foot compensation (printing
directly on the bed, below `elefant_foot_compensation_layers`) and on every
layer of Arachne perimeters (not in spiral vase mode, which uses the classic
generator), the centerline does not lie at depth `w/2`: elephant foot
compensation shrinks the contour the perimeters are built on by an amount that
changes along it, and Arachne lines vary in width. There the shift is measured:
`d(P) = D(P) - c' - m` at a point `P` of the centerline, where `D(P)` is the
depth of `P` below the boundary of the layer's islands (`Layer::lslices`) and
`c'` the part of `c` those islands contain. The depth is the offset from `P` to
the nearest point of the boundary, projected on the normal of the edge (at a
vertex, the larger of the projections on its two edges' normals). At an inner
corner the nearest point is the corner of the boundary, farther away than
either side; its projections are the distances to the sides.
- Slicing stores the islands of an elephant foot layer from before that
compensation, and those of other layers as the perimeters see them, so `D`
includes the elephant foot compensation at that point and the half width of
the line actually printed there. The islands contain the XY compensation
(`c' = c`), except on an elephant foot layer with several regions: slicing
keeps those islands from before a negative contour compensation and applies
it to the perimeters only, so there `c'` is zero for contours.
- A distance is accepted only within the range of the wall's own line: from half
the narrowest line the generator prints to half the widest, widened by the
elephant foot compensation of the layer, by the part of `c` missing from the
islands, by half the difference between line width and spacing (Arachne keeps
a precise outer wall that much deeper where it prints one line) and by the
slicing resolution plus 1 µm. The narrowest line is half the nominal width for
Arachne, which splits a wall into two lines narrower than its minimum bead
width, and slightly under it for the classic generator, which prints narrow
loops thinner; the widest is twice the nominal width for Arachne and the
nominal width for the classic generator. A distance outside that range does not
come from the wall's own surface: the wall is thinner than a line, or it lies
on the boundary between two regions, which the islands do not contain. Such a
point takes the nominal shift.
- Every vertex is measured, and an edge longer than 0.5 mm (the step at which
elephant foot compensation is resampled) also at points at most 0.5 mm apart
along it. If they all follow the straight change between its vertices within
the snapping radius, the edge stays one piece; otherwise they all split it.
- A negative value is taken as zero. A perimeter whose values all equal the
nominal shift within the snapping radius keeps the constant shift, so a wall at
its nominal depth gives exactly the result of the nominal shift. A perimeter
whose largest value is within the snapping radius keeps the centerline; a
single point at zero does not change that.
- The measurement is decided per loop. A loop with fuzzy skin is measured on its
smooth centerline (see [Fuzzy skin](#fuzzy-skin)). A noisy line itself is never
measured: the noise moves it off the smooth outline, so measuring would pull
its points within the range back to the outline while the points outside it
kept the noise. A loop without a smooth centerline on a layer where any region
adds fuzzy skin to the outer walls of that kind of loop keeps the nominal shift,
since nothing tells an unchanged loop from a noisy one that lost its centerline.
- The islands are indexed once per layer and only on layers where a Precise
Seam modifier has a region, and only loops that some modifier on the layer
approaches are measured.
A shift within the snapping radius is treated as zero: extraction then clips the
centerline itself. The preparation borrows the polygon and is used only while the polygon
is unchanged: strong processing returns immediately after inserting its point,
and weak processing collects all segments before it inserts anything. An
invalid perimeter receives no Precise Seam processing.
### Fuzzy skin
Fuzzy skin is applied by the perimeter generator, which resamples a loop and moves
its points off the smooth centerline (Arachne's extrusion mode changes the line
width instead). Only the noisy line reaches the seam placer, and a surface
shifted from it would repeat the noise. The generator therefore keeps the
centerline before texturing of an external loop whose points the texture
changed, in `ExtrusionLoop::untextured` (classic `traverse_loops()`, Arachne
`traverse_extrusions()`, which copies the junctions only where the layer has
fuzzy skin on that kind of loop). A list of points equal to the printed one is
not kept. The field is kept for every such loop, whether or not the object has
Precise Seam volumes, because adding a volume does not regenerate perimeters
(see [Print invalidation](#print-invalidation)). Copying, moving, reversing or
turning the start of the loop keeps it, and so do the simplification and arc
fitting of its paths after the generator, which leave the same textured loop;
giving the loop other geometry must reset it.
For such a loop the preparation has two polygons: the smooth centerline, from
which the surface is reconstructed and on which the shift is measured, clipping,
binding, segments, lengths, Center and full containment are worked out; and the
noisy loop, into which the results are inserted. Both are normalized alike (no
repeated points, counterclockwise).
- **Pairs.** A segment keeps the surface points its ends were carried from, and
merging intervals keeps the pair of the outer end, also across vertex zero. An
arc still collapses into its vertex, but the end keeps its real point on the
arc: a zero-length segment has the two ends of its piece of arc, and separate
pieces of one arc make one vertex point from the piece nearest the arc's start
to the end of the farthest. A vertex point that continues a segment gives the
segment's end its arc point. Left and Right take the pair of their end.
Center, the middle by length of the smooth segment, takes as its pair the point
of the shifted edge at the same parameter (shift profile included), the middle
of the arc or bridge at a vertex (of the piece covered, for a zero-length
segment), the point where the shifted edges meet at a vertex without either
(collinear edges; the smooth point itself, as an emergency fallback, should
the edge have no element left), or the crossing `K` in the dead stretch of a
concave corner.
- **Transfer.** The line through the surface point and the smooth point is
intersected with the edges of the noisy loop within a window of the smooth
point, and the crossing nearest to it is taken; an edge lying along the line
gives its point nearest to the smooth point. The window is an estimate from the
settings, not a measured distance or a proven bound, computed separately for
contours and holes: only the regions that texture the loop's kind count, as
FuzzySkin.cpp decides it. Regions texture a loop one after another, each over the
result of the previous ones, so it adds up the amplitudes of their different
noises (regions that differ only in which walls they texture make one noise).
An amplitude is the thickness times the largest value of its noise module:
Perlin, Billow and RidgedMulti add octaves and can exceed one. These bounds rest
on the range libnoise states for its coherent noise, from -1 to 1.
Arachne's combined mode moves a point by half its change of width, which adds
half the smallest width it keeps. On top come the largest point distance, the
farthest a chord cutting a convex corner passes from the smooth point, and a
micrometre of rounding. There are three outcomes:
- **exact**: such a crossing exists;
- **approximate**: the pair coincides (the centerline path, where the surface
is the centerline) or the line crosses nothing within the window; the
nearest point of the noisy loop within the window is taken, and counted in
the log;
- **failed**: not even that; the point is a discarded fragment, with its
counter, log marker and the type in the warning. A strong segment whose point
fails takes no part; a weak zone with a failed boundary is dropped.
- **Strong modifiers** choose the segment and the point on the smooth loop, ties
included, and insert the carried point into the noisy one. Among candidates
that are carried the noise never changes the winner; a candidate whose
transfer fails drops out, and the next one wins.
- **Weak zones** carry each boundary separately. Before anything is inserted, a
policy, not a proven guarantee, tells some zones whose boundaries came out in
the reverse order. It assumes that the points of a zone's true noisy arc lie
within the window of the smooth zone, as its carried boundaries do; the window
is an estimate. A short zone's true arc then stays within a circle around its
smooth boundary, however much the noise lengthens it, while the arc round the
rest of the loop leaves that circle wherever the loop spreads beyond it; its
length tells nothing, as the noise may lengthen a stretch many times over. With
a threshold of four windows on the smooth loop:
- for a zone shorter than that, the circle lies around its smooth left boundary
with the zone's length plus a window for radius. The zone is reversed when the
noisy arc from its carried left boundary forward to its right one leaves the
circle; otherwise it keeps its order when the arc from the right boundary
forward to the left one leaves it; with both arcs inside, it is reversed when
the first arc is the longer;
- otherwise, for a zone whose rest of the loop is that short, the same holds
around its smooth right boundary, with the rest's length plus a window for
radius and the arcs swapped: the arc from the right boundary forward to the
left one is the rest's;
- otherwise the order is not checked; a transfer onto another part of the loop
there is a limitation of the direct transfer.
An arc leaves the circle when either carried boundary or a vertex of the noisy
loop between them, across its start, lies outside; boundaries on one edge with
the second behind the first make an arc round the whole loop. A reversed zone
is reduced to its left boundary, a zero-length zone that types the one
candidate there. This is a declared degradation, counted in the log: it
happens, for example, for a piece of a convex corner's arc where the noisy
loop cuts the corner inside it, since the lines through the corner then cross
the noise behind it in the reverse order.
## Segment extraction
`extract_perimeter_segments()` turns one modifier's regions on one layer into
@@ -156,24 +352,79 @@ segments of the perimeter, each with its geometry and its position on the
source contour. Both modifier kinds consume these segments; the extractor is
told the modifier type so that it prepares only the data that type needs.
### Surface reconstruction
The surface is the set of points on the air side at the shift `d` from the
centerline. `build_surface_line()` builds it as a closed line whose every edge
remembers its source:
- **Shifted edge.** Each source edge moved along its normal into the air. With a
constant shift along the edge, the shift is rounded once per edge, so the
shifted edge is an exact integer translate of its source and keeps its
parameters. Where a measured shift changes along the edge, the shifted edge is
a chain of straight parts through the points moved by the shift at its
vertices and at its measured interior points; each part maps linearly onto the
range of parameters of the source edge between those points.
- **Arc.** Where shifted edges diverge (a convex vertex as seen from the air),
an arc around the vertex whose radius is the shift at that vertex,
approximated by chords with a sagitta of at most 40 units. Both shifted edges
take that shift at the vertex, so the line stays continuous; with no shift
there they meet at the vertex itself. A reversal of direction turns by half a
circle.
- **Crossing.** Where shifted edges cross (a concave vertex) at a point `K`
inside both of the parts meeting there, they end exactly at `K`: no part of
them lies beyond it. A part trimmed this way covers only part of its range of
the source edge, and its parameters are carried over proportionally. Both
trims of one part must leave at least 4 units of it.
- **Bridge.** At any other concave vertex (shifted edges crossing beyond the end
of one of them, as in a fillet finer than the shift), a straight edge between
the ends of the full shifted edges, carried onto the vertex like an arc. The
shifted edges keep their tails beyond the crossing.
Each crossing is the end of a **dead stretch**: the part of the centerline
around the vertex that has no surface of its own. It is recorded at once, with
the elements of the surface line that end and start at `K`. Resolving these
corners exactly matters on shallow corners, such as the many vertices of a
tessellated hole: there the parts of the full shifted edges beyond `K` stay
within micrometers of the surface, and a modifier boundary crossing them would
split the segment.
The surface line is not filtered further: every part of it counts as surface,
even where it comes closer than `d` to another part of the centerline. The
centerline is itself the model contour shifted inwards by half the line width,
so shifting it back by slightly less returns to that contour and does not fold:
a concave fillet of radius `r` on the surface is a fillet of radius `r + d` on
the centerline, and a sharp inner corner stays sharp and resolves exactly. The
line folds only on corners that are not resolved exactly: a very sharp inner
corner that the slicer bevels, a sharp change of the measured shift, or relief
finer than the shift (see [Known limitations](#known-limitations)). There the tails and bridges
of the line stay part of it, and the user's rule that a modifier enters the wall
by a clear depth keeps such corners out of play. A general offset of the polygon
could not replace the surface line: it rounds and cuts corners and loses the
link to source edges.
### Clipping
Regions whose bounding box does not overlap the perimeter's are skipped. The
clipping line is intersected with each remaining region by `intersection_pl()`,
which clips an open path against an `ExPolygon` with its holes attached, using
the nonzero rule. Clipping an open line yields only pieces of the perimeter, so
a modifier crossing the whole object produces two separate pieces rather than a
chord through the body. Holes in a modifier and several regions of one modifier
simply produce more pieces. The line is cut at vertex zero, so a piece crossing
that vertex arrives as two fragments. A border that only touches the line can
come back as a single point; such fragments carry no coverage and are dropped
before binding.
Regions whose bounding box does not overlap the perimeter's, enlarged by the
shift, are skipped. The surface line, as an open path closed at its start, is
intersected with each remaining region by `intersection_pl()`, which clips open
paths against an `ExPolygon` with its holes attached, using the nonzero rule.
Clipping an open line yields only pieces of the surface, so a modifier crossing
the whole object produces two separate pieces rather than a chord through the
body. Holes in a modifier and several regions of one modifier simply produce
more pieces. The line is cut at its start, so a piece crossing it arrives as two
fragments. A border that
only touches the surface can come back as a single point; such fragments carry
no coverage and are dropped before binding. With a shift of zero the
centerline's own clipping line is clipped instead, without offsets or contact
rules.
### Binding fragments to source edges
Clipper returns coordinates only. Insertion needs the source edge of every
point, and coordinates alone are ambiguous where a contour visits the same
point twice. Each fragment is therefore bound to the source edges it covers,
point twice. Each fragment is therefore bound to the edges of the line it was
clipped from (the surface line, or the centerline for a shift of zero),
producing intervals: an edge index with a parameter range on that edge.
- **Exact path.** For fragments with interior points, the second point is used
@@ -214,11 +465,39 @@ normal path never pays for them:
Both outcomes are recoveries, not failures: they show no user warning but leave
a log marker.
### Carrying the surface onto the centerline
Intervals on the surface line are carried onto the centerline through their
source:
| Surface | Centerline |
| --- | --- |
| Shifted edge, parameters `t0..t1` | the same source edge, the same parameters (proportionally on a trimmed part or a part of a split edge) |
| Arc or bridge around a vertex | that vertex, as a **vertex point** |
| Both ends of a dead stretch covered | the whole centerline between them |
A point of an edge with a constant shift moves back by subtracting that edge's
integer shift, which is the same as following the normal. On an edge whose
shift changes, the point is the one at the same parameter of the source edge.
The last rule covers the crossing point `K` of a concave corner: when the
modifier covers the surface on both sides of `K`, the centerline around the
vertex, which has no surface of its own, joins them. When only one side is
covered, the segment ends under the modifier's crossing, outside the dead
stretch. An end counts as covered when coverage ends within the snapping radius
of it on the same edge of the surface line, so a modifier boundary passing
exactly through `K` covers it.
### Assembling segments
The intervals are sorted by edge and parameter. Intervals on the same occurrence
of an edge are united when they overlap or meet, by parameter or at the same
integer point; equal coordinates on different edges are never united. A
integer point; equal coordinates on different edges are never united. A vertex
point adds no edge: next to coverage that reaches its vertex it disappears, and
alone it forms a **zero-length segment**, a single point with no edges, where
the modifier reached the surface only around a convex corner. Its strong target
is the vertex in every mode, and as a weak zone it types the one candidate
there. A
parameter of 1 is stored as parameter 0 of the next edge, so intervals on
adjacent edges meet exactly at their shared vertex. Consecutive intervals that
meet form one `PerimeterSegment`, and the last segment is joined with the first
@@ -250,8 +529,12 @@ Enforced, Neutral and Blocked take part in the usual priority order (see
[Weak modifiers](#weak-modifiers)).
The perimeter is fully contained when the united intervals cover every source
edge from parameter 0 to 1. A modifier boundary that merely touches the
perimeter counts as well:
edge from parameter 0 to 1, which is the case when the modifier covers the whole
surface: every shifted edge and every dead stretch. A modifier that covers the
whole centerline but leaves part of the surface outside gives ordinary segments.
An uncovered part of a single arc carries onto one vertex, a gap of zero
length, and so still counts as full containment. A modifier boundary that merely
touches the perimeter counts as well:
- At a vertex or on an axis-aligned edge, clipping splits the line exactly at the
touch, the pieces meet at one point, and the coverage is complete.
@@ -270,7 +553,8 @@ where insertion collapses it, exactly up to edges shorter than 2 µm:
each end then snaps onto it from its own edge.
A cheap filter runs first: both cases bring the segment's ends within 2 µm of
each other.
each other. A zero-length segment covers nothing and is never full containment,
although its ends coincide.
## Strong modifiers
@@ -284,7 +568,7 @@ before anything is inserted, together with the source edge it lies on:
Arc length is the sum of Euclidean edge lengths, not the chord or a vertex count.
`insert_strong_seam_point()` selects the longest segment of the first modifier
that has one. Exactly equal lengths are resolved by the prepared target points:
that has one; a zero-length segment loses to any other. Exactly equal lengths are resolved by the prepared target points:
greater bed Y first, then smaller X; a complete tie keeps the first segment.
Slice coordinates already include instance rotation and have the bed axes;
centering and XY translation do not change this order. Nearly equal lengths are
@@ -348,6 +632,16 @@ lowest priority first; a whole-perimeter zone types every candidate. Blocked
and Enforced zones therefore take precedence over painting, and Neutral clears
painting inside its zone.
A loop on which a candidate is left Enforced by a zone has exact ends (see
[Seam alignment](seam-alignment.md)): the zone ends at its inserted boundaries,
so alignment and the Random position keep the seam between them. The mark is one
per loop and is set after painting has typed the candidates. A run enforced on
the same loop only by paint near the layer keeps its candidates, but the seam no
longer passes its ends either. A zone reduced to a single candidate holds the
aligned seam on that candidate: alignment cannot smooth its shift between
layers, which may show where the loop differs from layer to layer, as with
fuzzy skin.
## Numeric tolerances
Coordinates are integers in scaled units: 1 nm by default, and 10 nm when a bed
@@ -363,7 +657,11 @@ larger. The enforced subdivision step is a physical distance and stays 0.2 mm.
| Value | Role |
| --- | --- |
| `MACHINE_PRECISION_SQUARED` (2.5 units², about 1.6 nm) | A point lies on an edge if it is this close. It absorbs Clipper's truncation of cuts to whole units (under √2 units from the edge) and never bridges a real gap: a one-unit uncovered gap stays a gap. |
| `TOLERANCE_LINEAR` (1000 units, 1 µm) | Insertion snaps points this close to an existing vertex, and helper points are placed this far from boundaries. The same radius bounds the rounding fallback, contacts and the sub-micron full-containment rule, so those decisions match what insertion would produce anyway. |
| `TOLERANCE_LINEAR` (1000 units, 1 µm) | Insertion snaps points this close to an existing vertex, and helper points are placed this far from boundaries. The same radius bounds the rounding fallback, contacts and the sub-micron full-containment rule, so those decisions match what insertion would produce anyway. It is also the reach of a dead-stretch end, the smallest surface shift, and the agreement of measured shifts with the nominal shift and with a straight change along an edge. |
| `SURFACE_MARGIN` (5000 units, 5 µm) | The reconstructed surface lies this far inside the model surface, so a modifier flush with a model face does not act. |
| `SURFACE_ARC_SAGITTA` (40 units) | Maximum sagitta of the chords of surface arcs. |
| `SHIFT_SAMPLING_STEP` (0.5 mm) | Largest spacing of shift measurements along an edge, the step at which elephant foot compensation is resampled. |
| Slicing resolution plus 1 µm | Widens the accepted range of measured depths: perimeters are built on a contour simplified by the resolution. |
| `enforcer_oversampling_distance` (0.2 mm) | Maximum step of enforced subdivision. |
Raising the on-edge tolerance would not help with cuts beside a vertex: more
@@ -409,18 +707,19 @@ The causes are:
the first flagged modifier in print and volume order is named, followed by
"(N in total)" when there are several. The type name reuses the menu's
translation.
- **modifier "<name>" of "<object>" had no effect on the seam (it might not reach
the centerline of the printed perimeter):** a modifier was evaluated on at
least one perimeter and never gave a segment, full containment or a discarded
fragment. Only the first such modifier in print and volume order is named,
followed by "(N in total)" when there are several.
- **modifier "<name>" of "<object>" had no effect on the seam:** a modifier was
evaluated on at least one perimeter and never gave a segment, full containment
or a discarded fragment. Only the first such modifier in print and volume order
is named, followed by "(N in total)" when there are several.
Only the effect is certain, so the cause is given as a hint. A modifier is
Only the effect is certain, so the text names no cause. A modifier is
evaluated only when its turn comes: on a perimeter where a higher strong
modifier placed the seam, lower strong and all weak modifiers are not
evaluated. A modifier that was never evaluated is not reported, since nothing
is known about it. A point contact gives no segment and does not count as
reaching the perimeter.
is known about it. One that was overridden on the perimeters it crosses and
evaluated only on others it does not reach is reported, although it does reach
the model surface; a cause given in the text would mislead there. A point
contact gives no segment and does not count as reaching the perimeter.
The log records the following diagnostic markers:
@@ -437,16 +736,73 @@ The log records the following diagnostic markers:
Failures and recoveries are counted separately. The first 10 of each per
`init()` call are logged in detail, in parallel processing order; if a limit is
exceeded, one summary marker reports the total and the number omitted.
exceeded, one summary marker reports the total.
## Known limitations
- **The modifier must reach the perimeter centerline.** Contacts are taken as
clipping returns them, without offsets or tangency rules, so boundaries that
only graze the centerline are the user's responsibility. Several near-touches
on inclined edges can leave several segments separated by gaps of a few units;
their zones then cover nearly the whole perimeter instead of being treated as
full containment.
- **Where the shift is not measured, or only approximately.** A noisy loop
without its smooth centerline
(sliced data loaded from a cache) gets a surface that repeats the noise. A
measured point moves along the normal of its
edge by the depth projected on that normal: where elephant foot compensation
changes along a wall, the centerline's edges are inclined to the outline, and
the surface falls short of it by `D * (1 / cos a - cos a)` for an inclination
`a`, a few micrometers for usual changes. A closed Arachne loop of
a single line (a ring thinner than two lines) gets a surface on its contour or
hole side only.
- **Fuzzy skin.** The crossing nearest to the smooth point is taken without
knowing which part of the noisy loop a noisy point came from: with steep noise,
or where another part of the same loop lies within the window (a thin part, an
acute corner), the nearest crossing may belong to another place than the one
the smooth point was textured into. Points carried without the line
(approximate outcome) do not lie on it, and weak zones whose boundaries reverse
are reduced to one point. The window is estimated from the settings. A transfer
fails only when neither a crossing nor a nearest point of the noisy loop lies
within the window, so a boundary that the noise moved farther may be carried
onto another crossing or point within it instead; inner points of a noisy arc
farther than the window can mislead the order policy. The order of a
weak zone's boundaries is checked only where the zone or the rest of the loop is
shorter than four windows; where both are longer, boundaries carried onto
another part of the loop are not noticed. A loop that lies wholly within the
circle of that check (its spread comparable with the window) leaves the
decision to the lengths of the two noisy arcs: noise lengthening one of them
unevenly may then reduce a correct zone or miss a reversal. When both smooth
arcs are shorter than four windows, the zone's rule takes priority. Sliced data loaded from a cache keeps only the
extrusions, without the untextured centerline: such loops keep the noisy
surface and the nominal shift, so the same project may get another seam after
loading. The tests only clear the field by hand; they do not go through
writing and loading the cache. A closed thin wall that the classic generator
builds outside its loops has no untextured centerline either.
- **Grazing contacts.** Contacts are taken as clipping returns them, without
tangency rules, so boundaries that only graze the surface are the user's
responsibility. Several near-touches on inclined edges can leave several
segments separated by gaps of a few units; their zones then cover nearly the
whole perimeter instead of being treated as full containment.
- **Concave corners not resolved exactly.** At a very sharp inner corner that
the slicer bevels, at a sharp change of the measured shift, with a noisy loop
without its smooth centerline whose points are closer than the trim of a corner
(`d * tan(turn / 2)`) or with
artificially fine relief, the surface line keeps its tails and bridges. A modifier boundary
closer than `d` to such a corner can give an extra segment, the
multiple-intersection warning and a local distortion of the segment of up to
`d`; a modifier in the air closer than `d` to such a corner can act. `d`
bounds the distortion, not the movement of the seam: if the distortion changes
which segment of a strong modifier is the longest, the seam moves to another
segment, which may lie at any distance.
- **Walls between regions.** XY compensation is taken once per object, for its
outer contours and its holes. Where an external perimeter runs along the
boundary between two regions of one object (regions whose perimeters are
generated separately), slicing compensates that boundary differently: a
negative compensation does not move it, and a positive one moves it according
to the order of the regions. With a nonzero compensation the reconstructed
surface of such a wall is therefore off the real region boundary by the
amount of the compensation, and a modifier near that boundary may act or not
act accordingly. Restoring it exactly would need the shift actually applied to
each part of the loop, since one loop can contain both such a boundary and a
compensated outer contour. The measured shift does not change this: the
islands do not contain such a boundary, so its points fall outside the
accepted range and take the nominal shift, except near the place where the
boundary meets the outer contour.
- **Self-touching perimeters.** Extraction keeps distinct visits of one
coordinate apart through its source-edge bindings, but the consumers locate
inserted points by coordinates. A weak zone is typed and subdivided from the
@@ -566,6 +922,26 @@ last modifier would.
type changes and ordering; [3DScene.cpp](../../src/slic3r/GUI/3DScene.cpp)
defines the colors.
- [Segment extraction tests](../../tests/libslic3r/test_precise_seam.cpp) cover
surface reconstruction (convex and concave corners, holes), crossing the surface without reaching the centerline, modifiers
inside the body, arcs giving zero-length segments, dead stretches covered or
not, contacts and flush faces on straight, inclined and tessellated walls,
full containment of the surface versus the centerline (also with part of one
arc uncovered), a fully covered concave fillet finer than the shift, reversals, nearly collinear vertices,
vertex points at vertex zero and on holes, the bounds of the surface shift,
and independence of contour origin and direction. A shift that changes along
the perimeter is checked at vertices, arcs and a vertex without shift, at a
resolved concave corner and on a split long edge swept by a boundary; its
measurement against an outline at the nominal depth, deeper, beyond the
accepted range, with compensation inside and outside the outline, within the
margin, and with a step along an edge. Fuzzy skin: the transfer onto hand-made
noisy loops across a straight edge, at an acute corner, with several crossings,
along an edge on the line, and its three outcomes; the surface pairs of segment
ends, of a piece of arc, of separate pieces of one arc, across the start of the
loop, and of Center inside an edge, at a vertex, at a collinear vertex (also
vertex zero and a changing shift) and in a dead stretch; a loop keeping its
untextured centerline when copied, reversed or turned. A boundary swept in sub-micron steps across shallow concave
vertices of tessellated holes and notches must move a single segment end
monotonically. On the centerline they cover
clipping and binding: holes and components, contour origin and reversal,
repeated coordinates, collinear vertices and rounding, rollback and the
diagnostic limits, the rounding fallback on synthetic and real Clipper
@@ -573,8 +949,15 @@ last modifier would.
gaps on inclined edges and around vertices.
- [Precise Seam tests](../../tests/fff_print/test_precise_seam.cpp) cover the
consumers: strong targets in every mode, including a midpoint on an existing
vertex or the closing edge, longest-arc selection and tie order in bed axes,
priorities, weak boundaries that coincide or share an edge, enforced
vertex or the closing edge and a zero-length segment, longest-arc selection
(also of a longer segment over a zero-length one) and tie order in bed axes,
zero-length weak zones of every type, with fuzzy skin strong points chosen on
the smooth loop and inserted into the noisy one or discarded when they cannot be
carried, and weak zones short, zero-length at a convex corner, reversed (for
every type, also on a loop that lies wholly within the circle of the order
check), across the start of both loops, long or short with noise
lengthening only their part of the loop and almost all round, also with noise
lengthening only the short rest (each for every type), priorities, weak boundaries that coincide or share an edge, enforced
subdivision, whole-perimeter weak zones with painting and priorities, weak
zones over painting's oversampled candidates, the warning type masks, usage
tracking for the "had no effect" and whole-perimeter Blocked warnings, volume
@@ -582,7 +965,21 @@ last modifier would.
alignment, raft layer indexing and structured slices. End-to-end tests slice
a real object with Precise Seam
volumes and check the outer wall starts in the exported G-code: every strong
mode under several seam positions and with a raft, Enforced and Blocked zones,
mode under several seam positions and with a raft, a modifier reaching only
0.1 mm into the model, contour and hole walls under positive and negative XY
compensation with both generators, a first layer with a wider line, a narrow
island the classic generator prints with a thinner line, the
measured shift on elephant foot layers with both generators (the same
modifier depth as above, flush and slightly deeper modifiers, a hole, a thin
part they cannot shrink fully, a raft), XY compensation together with elephant
foot compensation in one region and in several, an Arachne wall narrower than
its line, fuzzy skin on contours or holes (measured on the smooth centerline;
which loops keep it; with sine noise a modifier acts at the model surface, not
at the noise, also on part of a wall; a weak zone; Arachne's combined mode with
the smallest noise; elephant foot compensation in one region and in several; a
closed classic thin wall; loops whose untextured centerline is cleared by hand,
as loading cached data leaves them), a modifier
crossing only an open thin wall, Enforced and Blocked zones,
a perimeter blocked all round under every seam position, a modifier with a
hole, and the user warning.
- [Seam placer tests](../../tests/fff_print/test_seam_placer.cpp) cover
+4 -2
View File
@@ -42,7 +42,7 @@ presets are never serialized — they have their own storage and their own lifec
| `resources/profiles/` | `<vendor>.opc` alone — the profile and its preset JSONs both pruned | What the app ships with and what installing copies from; read directly for vendors not installed |
| `<data_dir>/system/` | `<vendor>.opc` alone, or `<vendor>.json` + `<vendor>/` after an update | What the user has installed |
| `<data_dir>/system/` (dev build) | `<vendor>.json` + `<vendor>/` + `<vendor>.opc` written at runtime | A developer tree caches as it parses |
| `<data_dir>/cache/wizard_profile_data.json` | The wizard's derived vendor catalog plus the stamps it was built from | Written and read by the setup wizard only; never shipped (see "The wizard's profile-data cache") |
| `<data_dir>/cache/wizard_profile_data.json` | The wizard's derived vendor catalog plus the stamps it was built from | Written and read by the setup wizard and the commands that list and install printer models (`Ops::printer_profile_data()`); never shipped (see "The wizard's profile-data cache") |
Two forms of the same vendor therefore exist, and the system's central rule is that
**a vendor's cache is the whole of it**. Where a cache ships or is installed, no profile
@@ -273,7 +273,9 @@ function of the vendor set: each vendor's name and version, in load order. A pro
change requires a version bump, so name and version determine a vendor's content
wherever its copy sits; which directory served it is deliberately **not** stamped,
and installing or removing a copy at an unchanged version leaves the cache valid. So
the wizard caches the *derived JSON*, not another form of the inputs:
the wizard caches the *derived JSON*, not another form of the inputs
(`Ops::printer_profile_data()`, `GUI/Operations/InstallOps.cpp`, which `printer_list_models`,
`printer_install` and `printer_uninstall` read the catalog through too):
`<data_dir>/cache/wizard_profile_data.json` holds the stamp list and the catalog. On
open, the wizard computes the current stamps (one version peek per vendor) and, when
they match, serves the catalog from the file — no bundle built, no preset installed.
+27 -14
View File
@@ -70,9 +70,10 @@ coroutine loop are described in
- **Filament:** `slot_number` identifies the slot. If `preset_name` is omitted,
the transaction targets the preset currently assigned to that slot. If supplied,
it requests that preset for the slot and selects it through the normal UI flow;
the name must be among the presets offered by that slot's dropdown, with one
exception: the preset currently assigned to the slot stays targetable even when the
slot's dropdown hides it (for example an incompatible-but-selected preset). Selecting
the name must be among the presets offered by that slot's dropdown, with two
exceptions: a hidden preset that suits the printer is shown in the selectors first,
and the preset currently assigned to the slot stays targetable even when the
slot's dropdown omits it (for example an incompatible-but-selected preset). Selecting
a different preset changes the slot-to-preset mapping. In both cases the transaction
edits the shared preset, not an isolated slot override.
- **Process and printer:** omitting `preset_name` targets the currently active
@@ -80,6 +81,9 @@ coroutine loop are described in
dropdown. It must be one of the choices the dropdown currently offers, rather
than merely any preset present in the collection. This is particularly important
for process presets, whose selectable choices can depend on the current context.
A hidden preset that suits the printer (a system printer or filament the setup
wizard has not added) is shown in the selectors first and stays shown until the
app restarts.
- A transaction targets exactly one preset. Multi-preset transactions are not
supported: applying them would require switching among targets while the
application has only one managed edited copy per collection.
@@ -216,21 +220,30 @@ undo decisions the user already accepted in an earlier dialog. Target resolution
preserves those side effects and then verifies the resulting edited target.
Filament `preset_name` is an additional integration on top of `Tab::select_preset()`:
selecting a different name for a slot also updates the slot-to-preset mapping and its
dependent UI/configuration state, mirroring the filament branch of the Plater's normal
selection path (`PresetBundle::set_filament_preset()` plus the project/selection refresh,
the dynamic filament list, the conditional support-filament flushing recalc, the slot
combo refresh and its AMS sync badge). A mixed-color virtual slot is not targetable.
once the filament tab edits the preset, a different name for a slot is assigned to the
slot by `GUI::Ops::assign_filament_preset()`, the operation the MCP `preset_select` command
calls too (docs/HLSD/mcp-server.md, "The operations layer"). It does what picking the
preset in the slot's sidebar selector does (`Sidebar::select_filament_preset()`): the
slot's colour settings follow the preset, the slot-to-preset mapping, the dynamic
filament list and the slot's AMS sync badge are updated, the flushing volumes are
recalculated as the automatic calculation's setting says, the project is marked changed
and every plate's slice result is invalidated. The tab is not switched a second time,
which would ask again about changes the first switch transferred. A mixed-color virtual
slot is not targetable.
Process and printer dropdown choices are constrained by visibility and compatibility,
and compatibility may depend on the active context. Target resolution checks the tab
and compatibility may depend on the active context. Target resolution
(`GUI::Ops::resolve_preset()`, the rule the `preset_select` command resolves by, which
words its refusals) checks the tab
dropdown's actual items before the selection flow, so a target the user cannot pick
fails without raising that flow's unsaved-edit prompt; a name two entries carry is
rejected as ambiguous. A filament `preset_name` resolves against the requested slot's
own sidebar selector rather than the tab's, so that slot's compatibility filter is the
one that applies. A name the slot's dropdown does not show is rejected unless it names
that slot's current assignment (a hidden or incompatible-but-selected preset), which
stays targetable.
rejected as ambiguous. A hidden preset that suits the printer is shown in the
selectors first, as for the command, and a process or printer selection that leaves
another preset edited is refused by `GUI::Ops::select_preset()`. A filament
`preset_name` resolves against the requested slot's own sidebar selector rather than
the tab's, so that slot's compatibility filter is the one that applies. A name the
slot's dropdown still does not show is rejected unless it names that slot's current
assignment (an incompatible-but-selected preset), which stays targetable.
`commit()` applies its batch through `Tab::apply_preset_config_values`, which parses and
validates the whole batch before touching the edited preset and restores the edited
+11
View File
@@ -119,6 +119,12 @@ draws while an object is dragged, measure the rise from the plate and apply only
the nozzle cone and the head body. An object away from the toolhead, which only
the rod or the lid can reach, is left to the precise check. The ring the user
sees touches the object's outline exactly when the pre-slice check trips.
Arrange and Fill bed follow the rule too: they keep objects the toolhead radius
away from the tower, or only the nozzle cone when none of the objects they place
is taller than the nozzle height, and keep those taller than the rod clearance
out of its Y span. They measure the height from the plate. For the rod that is
stricter than the precise check, which only refuses an object that rises past
the rod clearance above the compacted tower.
## Merging sparse layers
@@ -209,6 +215,11 @@ read as off rather than compacting or merging in one place and not another.
- [GLCanvas3D.cpp](../../src/slic3r/GUI/GLCanvas3D.cpp) and
[PartPlate.cpp](../../src/slic3r/GUI/PartPlate.cpp) draw the compacted tower's
keep-out outlines live while the user drags.
- [ArrangeJob.cpp](../../src/slic3r/GUI/Jobs/ArrangeJob.cpp) grows the tower's
arrange polygon by the clearance that
[Arrange.cpp](../../src/libslic3r/Arrange.cpp) picks for the objects being
placed, and Arrange.cpp keeps objects taller than the rod clearance out of its
Y span.
- [Rule tests](../../tests/libslic3r/test_wipe_tower.cpp) cover the gating of
both settings, the per-layer predicates, the compacted z, the merge rule's run
flushing, height conservation, the nozzle cap and the first-layer exemption,
+1 -1
View File
@@ -14,7 +14,7 @@ can be pasted into an issue.
## What it does
`run_scene_benchmark()` in `src/slic3r/GUI/SceneBenchmark.cpp` is reached from Help >
Benchmark 3D Scene, the command palette and Preferences > Graphics. After a confirmation
Benchmark 3D Scene, the Speed Dial and Preferences > Graphics. After a confirmation
it starts a new project, which asks to save the current one if needed, loads the
OrcaSliced Combo handy model and arranges it. A small dialog in a corner of the 3D view
then shows the progress; every other window is disabled until the run ends, so a click
+6 -2
View File
@@ -49,8 +49,9 @@ no penalty and do not change candidate ranking. Precise Seam modifiers apply aft
classification and take priority over it.
Random placement samples an outgoing edge of its selected candidate. On loops with exact
green ranges, an Enforced candidate followed by a non-Enforced candidate contributes no outgoing
edge length: the endpoint belongs to the paint, but the following segment leaves the permitted run.
green ranges, and on loops with an Enforced zone of a Precise Seam modifier in effect, an Enforced
candidate followed by a non-Enforced candidate contributes no outgoing edge length: the endpoint
belongs to the paint or the zone, but the following segment leaves the permitted run.
This also respects weak modifiers that retype part of a painted run as Blocked or Neutral.
On loops with exact red ranges, a permitted candidate followed by a Blocked candidate contributes no outgoing
edge length, so Random cannot sample toward the closed red boundary. A zero-length selected
@@ -243,6 +244,9 @@ Properties:
### Allowed arc
- For an Enforced C on a loop with exact ends: the Enforced run itself, which ends at the paint.
A loop with an Enforced zone of a Precise Seam modifier in effect counts as one here and for
Random placement only: the zone ends at its inserted boundaries, and its candidates are typed by
the zone, not by painted ranges.
- For another Enforced C: the Enforced run, extended past each open end by the oversampling distance
(0.2 mm) but never into a Blocked candidate. The run ends sit on candidates and move in sampling
steps between layers, and Rear tends to choose the candidate right at an end; without the
+27 -2
View File
@@ -466,6 +466,14 @@ Explicit plate transfer remains authoritative until a subsequent geometry edit,
so a relative transfer can intentionally keep an outside instance assigned.
`POST /projects/{id}/slice` accepts `revision` and optional `plate: {index, origin}`.
Manual slice requests and the post-processing plan endpoint accept optional
`temporary_settings` with scalar settings, literal strings, serialized settings
and indexed elements. Planning and job execution export an isolated 3MF from the
same project revision and draft values. The existing setting permissions apply
to both the supplied edits and their effective result. The job keeps its input
settings for execution without publishing a project revision or changing any
library preset. Post-processing plans review the effective temporary input.
Multi-plate projects require explicit context. `POST /projects/{id}/slice-all`
accepts the same revision and an optional `plates` list of origin overrides,
defaulting other plates to the native layout. It atomically queues one job per
@@ -3044,8 +3052,16 @@ panel URL must match the saved connection. The desktop localhost client
registration is not reused for a web application.
Each login generates a private PKCE verifier and S256 challenge. It requests
`user.read files.temp_upload`, exchanges the one-time code without Bearer or
API-key headers and verifies the account and granted scopes through TokenInfo.
`user.read files.temp_upload`. Deployments with a SimplyPrint registration
approved for printer reads can also opt in to requesting `printers.read` with
`ORCA_SIMPLYPRINT_OAUTH_PRINTERS_READ=1`. Registered deployments can also
request `print_history.read` and `printers.actions` through
`ORCA_SIMPLYPRINT_OAUTH_PRINT_HISTORY_READ=1` and
`ORCA_SIMPLYPRINT_OAUTH_PRINTER_ACTIONS=1`, respectively, when printer reads
are enabled. It exchanges the one-time code
without Bearer or API-key headers and verifies the account and granted scopes
through TokenInfo. Optional scopes appear in the connection only when granted
and are dropped if a refresh no longer grants them.
These provider requirements follow the [SimplyPrint OAuth reference](https://apidocs.simplyprint.io/#api-oauth2).
Only validated user ID/name/email and optional company ID appear publicly.
Access and refresh tokens reside in the private SQLite session table;
@@ -3155,6 +3171,15 @@ is invented. API-key authentication is supported, optionally with Basic for a
fronting proxy. Digest and `none` are rejected rather than inheriting incompatible
PrusaLink settings.
The optional `/oauth/prusaconnect` flow authorizes the official Prusa MCP
resource for the saved Prusa Connect connection. It requires a registered
public client ID and HTTPS callback via `ORCA_PRUSACONNECT_OAUTH_CLIENT_ID`
and `ORCA_PRUSACONNECT_OAUTH_REDIRECT_URI`. The exact callback path is
`/api/v1/oauth/prusaconnect/callback`. The flow uses browser-bound state and
PKCE, with the MCP issuer and resource fixed. Its account-state, refresh and
tools routes require the printer revision. Disconnecting the MCP account
preserves the independently configured per-printer upload key.
Dispatch requests optionally set `queue_after_upload=true`, mutually exclusive
with `start_after_upload`. The default remains upload-only. Connect's legacy
multipart POST uses `to_print=True` or `to_queue=True`, or neither for upload-only;
+50
View File
@@ -105,6 +105,49 @@ searches listen for announcements on UDP 2021; those LAN broadcasts must reach
that namespace. Docker bridge networking and VLAN boundaries can prevent their
arrival. Use direct IP configuration when broadcasts cannot reach the app.
### Prusa Connect Local
Pair the printer with your self-hosted Prusa Connect server. In Prusa Connect,
open **Settings → API credentials** and create a token. The token acts within
the permissions of the Prusa account that issued it. Use `read` for printer
status, firmware, history and camera viewing. Use `operate` for browsing
printer storage, uploading and starting G-code, and controlling a running print.
Configure a writable storage resource on the Prusa Connect server for uploads
and keep a writable USB drive in the printer for transferring an upload to it.
In Web Slicer, open the connection settings of the physical printer and choose
**Prusa Connect Local**. Enter the server URL as reachable from the Web Slicer
backend and paste the token in **API token**. Save, select the printer from
the server's list, and save the selection. For a local HTTPS certificate,
provide the issuing CA in the connection settings.
### Prusa Connect cloud sign-in
Use the public HTTPS address of your Web Slicer deployment for the OAuth
callback. Register a public OAuth client for that exact callback using
[Prusa MCP's OAuth server metadata](https://mcp.prusa3d.com/.well-known/oauth-authorization-server).
For an installation without an existing client ID, the published registration
endpoint accepts a dynamic client registration:
```sh
curl --fail-with-body https://mcp.prusa3d.com/register \
-H 'Content-Type: application/json' \
-d '{
"client_name": "Web Slicer",
"redirect_uris": ["https://slicer.example.com/api/v1/oauth/prusaconnect/callback"],
"grant_types": ["authorization_code", "refresh_token"],
"response_types": ["code"],
"token_endpoint_auth_method": "none"
}'
```
Set `ORCA_PRUSACONNECT_OAUTH_CLIENT_ID` to the returned `client_id`
and `ORCA_PRUSACONNECT_OAUTH_REDIRECT_URI` to the registered callback.
Restart the application. In the settings of a saved Prusa Connect printer,
sign in with your Prusa account. The connection's Diagnostics can then show
the MCP tools that the authorized account can access. File upload continues
to use the printer's own Prusa Connect key.
## Reverse proxies
Set the complete public browser origins in `.env`, for example:
@@ -324,6 +367,13 @@ known limitations. Users need only `compose.yaml` and `.env`. Do not create a
Gitea release or upload release attachments. Do not advertise images before
the registry and startup of the published images have been checked.
The web image serves portable Linux and Windows Bambu desktop helper archives
under `/bambu-login/`. They are built from the helper source in the same
revision. Bambu Cloud itself requires separately supplied native host and
networking plugin binaries configured through
`ORCA_BAMBU_CLOUD_HOST` and `ORCA_BAMBU_CLOUD_PLUGIN`. The standard app image
does not include those binaries.
## Public static demo
The optional `demo` image uses the same GUI build and release tag. It contains
+2 -2
View File
@@ -13623,11 +13623,11 @@ msgid "%1% modifier \"%2%\" of \"%3%\" (%4% in total) covers an entire perimeter
msgstr ""
#, possible-boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr ""
#, possible-boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr ""
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15449,13 +15449,13 @@ msgstr "El modificador %1% \"%2%\" de \"%3%\" (%4% en total) cobreix un perímet
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "el modificador \"%1%\" de \"%2%\" no ha tingut cap efecte sobre la costura (potser no arriba a la línia central del perímetre imprès)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "el modificador \"%1%\" de \"%2%\" no ha tingut cap efecte sobre la costura"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "el modificador \"%1%\" de \"%2%\" (%3% en total) no ha tingut cap efecte sobre la costura (potser no arriba a la línia central del perímetre imprès)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "el modificador \"%1%\" de \"%2%\" (%3% en total) no ha tingut cap efecte sobre la costura"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15501,13 +15501,13 @@ msgstr "Modifikátor %1% „%2%“ objektu „%3%“ (celkem %4%) pokrývá cel
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "modifikátor „%1%“ objektu „%2%“ neměl na šev žádný vliv (možná nezasahuje ke středové linii tištěného obvodu)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "modifikátor „%1%“ objektu „%2%“ neměl na šev žádný vliv"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "modifikátor „%1%“ objektu „%2%“ (celkem %3%) neměl na šev žádný vliv (možná nezasahuje ke středové linii tištěného obvodu)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "modifikátor „%1%“ objektu „%2%“ (celkem %3%) neměl na šev žádný vliv"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15218,13 +15218,13 @@ msgstr "Modifizierer „%2%“ (%1%) von „%3%“ (%4% insgesamt) deckt eine ga
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "Modifizierer „%1%“ von „%2%“ hatte keine Auswirkung auf die Naht (er erreicht möglicherweise nicht die Mittellinie der gedruckten Wand)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "Modifizierer „%1%“ von „%2%“ hatte keine Auswirkung auf die Naht"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "Modifizierer „%1%“ von „%2%“ (%3% insgesamt) hatte keine Auswirkung auf die Naht (er erreicht möglicherweise nicht die Mittellinie der gedruckten Wand)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "Modifizierer „%1%“ von „%2%“ (%3% insgesamt) hatte keine Auswirkung auf die Naht"
# AI Translated
msgid "Seam placement may differ from expected."
+2 -2
View File
@@ -13619,11 +13619,11 @@ msgid "%1% modifier \"%2%\" of \"%3%\" (%4% in total) covers an entire perimeter
msgstr ""
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr ""
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr ""
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -14883,13 +14883,13 @@ msgstr "El modificador %1% «%2%» de «%3%» (%4% en total) cubre un perímetro
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "el modificador \"%1%\" de \"%2%\" no tuvo efecto en la costura (puede que no alcance la línea central del perímetro impreso)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "el modificador \"%1%\" de \"%2%\" no tuvo efecto en la costura"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "el modificador \"%1%\" de \"%2%\" (%3% en total) no tuvo efecto en la costura (puede que no alcance la línea central del perímetro impreso)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "el modificador \"%1%\" de \"%2%\" (%3% en total) no tuvo efecto en la costura"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15044,13 +15044,13 @@ msgstr "%1% motako \"%2%\" aldatzaileak (\"%3%\" objektukoak, guztira %4%) perim
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "\"%2%\" objektuaren \"%1%\" aldatzaileak ez du eraginik izan josturan (baliteke inprimatutako perimetroaren erdiko lerrora ez iristea)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "\"%2%\" objektuaren \"%1%\" aldatzaileak ez du eraginik izan josturan"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "\"%2%\" objektuaren \"%1%\" aldatzaileak (%3% guztira) ez du eraginik izan josturan (baliteke inprimatutako perimetroaren erdiko lerrora ez iristea)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "\"%2%\" objektuaren \"%1%\" aldatzaileak (%3% guztira) ez du eraginik izan josturan"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15028,13 +15028,13 @@ msgstr "Le modificateur %1% « %2% » de « %3% » (%4% au total) couvre un pér
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "le modificateur « %1% » de « %2% » n’a eu aucun effet sur la couture (il n’atteint peut-être pas la ligne médiane du périmètre imprimé)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "le modificateur « %1% » de « %2% » n’a eu aucun effet sur la couture"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "le modificateur « %1% » de « %2% » (%3% au total) n’a eu aucun effet sur la couture (il n’atteint peut-être pas la ligne médiane du périmètre imprimé)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "le modificateur « %1% » de « %2% » (%3% au total) n’a eu aucun effet sur la couture"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15368,13 +15368,13 @@ msgstr "%1% módosító „%2%” (objektum: „%3%”, összesen: %4%) a teljes
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "a(z) \"%2%\" \"%1%\" módosítója nem volt hatással a varratra (lehet, hogy nem éri el a nyomtatott kerület középvonalát)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "a(z) \"%2%\" \"%1%\" módosítója nem volt hatással a varratra"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "a(z) \"%2%\" \"%1%\" módosítója (összesen %3%) nem volt hatással a varratra (lehet, hogy nem éri el a nyomtatott kerület középvonalát)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "a(z) \"%2%\" \"%1%\" módosítója (összesen %3%) nem volt hatással a varratra"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15294,13 +15294,13 @@ msgstr "Il modificatore %1% \"%2%\" di \"%3%\" (%4% in totale) copre un intero p
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "il modificatore \"%1%\" di \"%2%\" non ha avuto effetto sulla cucitura (potrebbe non raggiungere la linea centrale del perimetro stampato)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "il modificatore \"%1%\" di \"%2%\" non ha avuto effetto sulla cucitura"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "il modificatore \"%1%\" di \"%2%\" (%3% in totale) non ha avuto effetto sulla cucitura (potrebbe non raggiungere la linea centrale del perimetro stampato)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "il modificatore \"%1%\" di \"%2%\" (%3% in totale) non ha avuto effetto sulla cucitura"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15808,13 +15808,13 @@ msgstr "「%3%」の %1% モディファイア「%2%」(合計%4%個) は外周
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "「%2%」のモディファイア「%1%」は継ぎ目に影響しませんでした (印刷される外周の中心線に届いていない可能性があります)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "「%2%」のモディファイア「%1%」は継ぎ目に影響しませんでした"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "「%2%」のモディファイア「%1%」(合計%3%個) は継ぎ目に影響しませんでした (印刷される外周の中心線に届いていない可能性があります)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "「%2%」のモディファイア「%1%」(合計%3%個) は継ぎ目に影響しませんでした"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15521,13 +15521,13 @@ msgstr "\"%3%\"의 %1% 수정자 \"%2%\"(총 %4%개)이(가) 둘레 전체를
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "\"%2%\"의 수정자 \"%1%\"이(가) 재봉선에 영향을 주지 않았습니다(출력된 둘레의 중심선에 닿지 않았을 수 있습니다)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "\"%2%\"의 수정자 \"%1%\"이(가) 재봉선에 영향을 주지 않았습니다"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "\"%2%\"의 수정자 \"%1%\"(총 %3%개)이(가) 재봉선에 영향을 주지 않았습니다(출력된 둘레의 중심선에 닿지 않았을 수 있습니다)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "\"%2%\"의 수정자 \"%1%\"(총 %3%개)이(가) 재봉선에 영향을 주지 않았습니다"
# AI Translated
msgid "Seam placement may differ from expected."
+39
View File
@@ -127,6 +127,8 @@ src/slic3r/GUI/Jobs/SLAImportJob.cpp
src/slic3r/GUI/Jobs/UpgradeNetworkJob.cpp
src/slic3r/GUI/AboutDialog.cpp
src/slic3r/GUI/ActionRegistry.cpp
src/slic3r/GUI/ActionReplayDialog.cpp
src/slic3r/GUI/AgentActivityPanel.cpp
src/slic3r/GUI/AMSMaterialsSetting.cpp
src/slic3r/GUI/ExtrusionCalibration.cpp
src/slic3r/GUI/AmsMappingPopup.cpp
@@ -152,6 +154,32 @@ src/slic3r/GUI/CameraPopup.cpp
src/slic3r/GUI/ConnectPrinter.cpp
src/slic3r/GUI/HMSPanel.cpp
src/slic3r/GUI/MainFrame.cpp
src/slic3r/GUI/Mcp/McpPersonContext.cpp
src/slic3r/GUI/Mcp/Tools/AppTools.cpp
src/slic3r/GUI/Mcp/Tools/CatalogTools.cpp
src/slic3r/GUI/Mcp/Tools/DesignBodyTools.cpp
src/slic3r/GUI/Mcp/Tools/DesignConstructTools.cpp
src/slic3r/GUI/Mcp/Tools/DesignHistoryTools.cpp
src/slic3r/GUI/Mcp/Tools/DesignInspectTools.cpp
src/slic3r/GUI/Mcp/Tools/DesignSketchTools.cpp
src/slic3r/GUI/Mcp/Tools/DesignSolidTools.cpp
src/slic3r/GUI/Mcp/Tools/DesignSurfaceTools.cpp
src/slic3r/GUI/Mcp/Tools/DesignTools.cpp
src/slic3r/GUI/Mcp/Tools/FilamentTools.cpp
src/slic3r/GUI/Mcp/Tools/GuiTools.cpp
src/slic3r/GUI/Mcp/Tools/ObjectTools.cpp
src/slic3r/GUI/Mcp/Tools/PlateTools.cpp
src/slic3r/GUI/Mcp/Tools/PluginTools.cpp
src/slic3r/GUI/Mcp/Tools/PresetTools.cpp
src/slic3r/GUI/Mcp/Tools/PrinterTools.cpp
src/slic3r/GUI/Mcp/Tools/ProjectTools.cpp
src/slic3r/GUI/Mcp/Tools/RecordingTools.cpp
src/slic3r/GUI/Mcp/Tools/ViewTools.cpp
src/slic3r/GUI/Mcp/PythonScriptsDialog.cpp
src/slic3r/GUI/Mcp/RecordingSettings.cpp
src/slic3r/GUI/RecordingDialog.cpp
src/slic3r/GUI/RecordingIndicator.cpp
src/slic3r/GUI/RunScriptPanel.cpp
src/slic3r/GUI/MediaPlayCtrl.cpp
src/slic3r/GUI/MediaFilePanel.cpp
src/slic3r/GUI/ImageGrid.cpp
@@ -167,6 +195,16 @@ src/slic3r/GUI/NotificationManager.hpp
src/slic3r/GUI/NotificationManager.cpp
src/slic3r/GUI/ObjectDataViewModel.cpp
src/slic3r/GUI/OpenGLManager.cpp
src/slic3r/GUI/Operations/ExportOps.cpp
src/slic3r/GUI/Operations/InstallOps.cpp
src/slic3r/GUI/Operations/GizmoOps.cpp
src/slic3r/GUI/Operations/ObjectOps.cpp
src/slic3r/GUI/Operations/PlateOps.cpp
src/slic3r/GUI/Operations/PluginOps.cpp
src/slic3r/GUI/Operations/PreferenceOps.cpp
src/slic3r/GUI/Operations/PresetOps.cpp
src/slic3r/GUI/Operations/PrinterOps.cpp
src/slic3r/GUI/Operations/ProjectOps.cpp
src/slic3r/GUI/OptionsGroup.cpp
src/slic3r/GUI/OptionStateRegistry.cpp
src/slic3r/GUI/PrintOptionsDialog.cpp
@@ -399,3 +437,4 @@ src/slic3r/GUI/PostProcessor.cpp
src/slic3r/GUI/TaskManager.cpp
src/slic3r/GUI/Widgets/ProgressDialog.hpp
src/slic3r/GUI/Widgets/StepCtrl.cpp
src/slic3r/GUI/Widgets/WebViewHostDialog.cpp
+4 -4
View File
@@ -15325,13 +15325,13 @@ msgstr "Modifikatorius %1% „%2%“ objekto „%3%“ (iš viso %4%) apima vis
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "objekto „%2%“ modifikatorius „%1%“ neturėjo įtakos siūlei (galbūt jis nesiekia spausdinamo perimetro vidurio linijos)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "objekto „%2%“ modifikatorius „%1%“ neturėjo įtakos siūlei"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "objekto „%2%“ modifikatorius „%1%“ (iš viso %3%) neturėjo įtakos siūlei (galbūt jis nesiekia spausdinamo perimetro vidurio linijos)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "objekto „%2%“ modifikatorius „%1%“ (iš viso %3%) neturėjo įtakos siūlei"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -16362,13 +16362,13 @@ msgstr "Aanpasser \"%2%\" (%1%) van \"%3%\" (%4% in totaal) bedekt een volledige
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "aanpasser \"%1%\" van \"%2%\" had geen effect op de naad (mogelijk reikt deze niet tot de middellijn van de geprinte perimeter)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "aanpasser \"%1%\" van \"%2%\" had geen effect op de naad"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "aanpasser \"%1%\" van \"%2%\" (%3% in totaal) had geen effect op de naad (mogelijk reikt deze niet tot de middellijn van de geprinte perimeter)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "aanpasser \"%1%\" van \"%2%\" (%3% in totaal) had geen effect op de naad"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15632,13 +15632,13 @@ msgstr "Modyfikator „%2%” (%1%) obiektu „%3%” (łącznie %4%) obejmuje c
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "modyfikator „%1%” obiektu „%2%” nie wpłynął na szew (może nie sięgać linii środkowej drukowanego obrysu)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "modyfikator „%1%” obiektu „%2%” nie wpłynął na szew"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "modyfikator „%1%” obiektu „%2%” (łącznie %3%) nie wpłynął na szew (może nie sięgać linii środkowej drukowanego obrysu)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "modyfikator „%1%” obiektu „%2%” (łącznie %3%) nie wpłynął na szew"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -14375,12 +14375,12 @@ msgid "%1% modifier \"%2%\" of \"%3%\" (%4% in total) covers an entire perimeter
msgstr "O modificador %1% \"%2%\" de \"%3%\" (%4% no total) cobre um perímetro inteiro"
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "o modificador \"%1%\" de \"%2%\" não teve efeito na costura (talvez não alcance a linha central do perímetro impresso)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "o modificador \"%1%\" de \"%2%\" não teve efeito na costura"
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "o modificador \"%1%\" de \"%2%\" (%3% no total) não teve efeito na costura (talvez não alcance a linha central do perímetro impresso)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "o modificador \"%1%\" de \"%2%\" (%3% no total) não teve efeito na costura"
msgid "Seam placement may differ from expected."
msgstr "A posição da costura pode diferir do esperado."
+4 -4
View File
@@ -14849,12 +14849,12 @@ msgid "%1% modifier \"%2%\" of \"%3%\" (%4% in total) covers an entire perimeter
msgstr "Модификатор «%2%» (%1%) модели «%3%» (всего: %4%) охватывает периметр целиком"
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "модификатор «%1%» модели «%2%» не повлиял на шов (возможно, он не достигает осевой линии печатаемого периметра)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "модификатор «%1%» модели «%2%» не повлиял на шов"
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "модификатор «%1%» модели «%2%» (всего: %3%) не повлиял на шов (возможно, он не достигает осевой линии печатаемого периметра)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "модификатор «%1%» модели «%2%» (всего: %3%) не повлиял на шов"
msgid "Seam placement may differ from expected."
msgstr "Размещение шва может отличаться от ожидаемого."
+4 -4
View File
@@ -16548,13 +16548,13 @@ msgstr "Modifieraren \"%2%\" (%1%) för \"%3%\" (%4% totalt) täcker en hel peri
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "modifieraren \"%1%\" för \"%2%\" hade ingen effekt på sömmen (den kanske inte når mittlinjen för den utskrivna perimetern)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "modifieraren \"%1%\" för \"%2%\" hade ingen effekt på sömmen"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "modifieraren \"%1%\" för \"%2%\" (%3% totalt) hade ingen effekt på sömmen (den kanske inte når mittlinjen för den utskrivna perimetern)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "modifieraren \"%1%\" för \"%2%\" (%3% totalt) hade ingen effekt på sömmen"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15255,13 +15255,13 @@ msgstr "ตัวปรับแต่ง %1% \"%2%\" ของ \"%3%\" (ทั
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "ตัวปรับแต่ง \"%1%\" ของ \"%2%\" ไม่มีผลต่อรอยตะเข็บ (อาจไม่ถึงเส้นกึ่งกลางของเส้นรอบวงที่พิมพ์)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "ตัวปรับแต่ง \"%1%\" ของ \"%2%\" ไม่มีผลต่อรอยตะเข็บ"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "ตัวปรับแต่ง \"%1%\" ของ \"%2%\" (ทั้งหมด %3% รายการ) ไม่มีผลต่อรอยตะเข็บ (อาจไม่ถึงเส้นกึ่งกลางของเส้นรอบวงที่พิมพ์)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "ตัวปรับแต่ง \"%1%\" ของ \"%2%\" (ทั้งหมด %3% รายการ) ไม่มีผลต่อรอยตะเข็บ"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15182,13 +15182,13 @@ msgstr "\"%3%\" nesnesinin %1% değiştiricisi \"%2%\" (toplam %4%), bir çevren
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "\"%2%\" nesnesinin \"%1%\" değiştiricisinin dikiş üzerinde etkisi olmadı (basılan çevrenin merkez çizgisine ulaşmıyor olabilir)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "\"%2%\" nesnesinin \"%1%\" değiştiricisinin dikiş üzerinde etkisi olmadı"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "\"%2%\" nesnesinin \"%1%\" değiştiricisinin (toplam %3%) dikiş üzerinde etkisi olmadı (basılan çevrenin merkez çizgisine ulaşmıyor olabilir)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "\"%2%\" nesnesinin \"%1%\" değiştiricisinin (toplam %3%) dikiş üzerinde etkisi olmadı"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15533,13 +15533,13 @@ msgstr "Модифікатор «%2%» (%1%) обʼєкта «%3%» (усьог
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "модифікатор \"%1%\" обʼєкта \"%2%\" не вплинув на шов (можливо, він не досягає осьової лінії надрукованого периметра)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "модифікатор \"%1%\" обʼєкта \"%2%\" не вплинув на шов"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "модифікатор \"%1%\" обʼєкта \"%2%\" (усього %3%) не вплинув на шов (можливо, він не досягає осьової лінії надрукованого периметра)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "модифікатор \"%1%\" обʼєкта \"%2%\" (усього %3%) не вплинув на шов"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15982,13 +15982,13 @@ msgstr "Modifier %1% \"%2%\" của \"%3%\" (tổng cộng %4%) bao phủ toàn b
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "modifier \"%1%\" của \"%2%\" không có tác dụng lên đường nối (có thể nó không chạm tới đường tâm của chu vi được in)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "modifier \"%1%\" của \"%2%\" không có tác dụng lên đường nối"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "modifier \"%1%\" của \"%2%\" (tổng cộng %3%) không có tác dụng lên đường nối (có thể nó không chạm tới đường tâm của chu vi được in)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "modifier \"%1%\" của \"%2%\" (tổng cộng %3%) không có tác dụng lên đường nối"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15641,13 +15641,13 @@ msgstr "“%3%”的%1%修改器“%2%”(共 %4% 个)覆盖了整条墙"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "“%2%”的修改器“%1%”对接缝没有影响(它可能未触及所打印墙的中心线)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "“%2%”的修改器“%1%”对接缝没有影响"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "“%2%”的修改器“%1%”(共 %3% 个)对接缝没有影响(它们可能未触及所打印墙的中心线)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "“%2%”的修改器“%1%”(共 %3% 个)对接缝没有影响"
# AI Translated
msgid "Seam placement may differ from expected."
+4 -4
View File
@@ -15937,13 +15937,13 @@ msgstr "「%3%」的%1%修改器「%2%」(共 %4% 個)覆蓋整道牆"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "「%2%」的修改器「%1%」對接縫沒有作用(可能未觸及所列印牆的中心線)"
msgid "modifier \"%1%\" of \"%2%\" had no effect on the seam"
msgstr "「%2%」的修改器「%1%」對接縫沒有作用"
# AI Translated
#, boost-format
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam (it might not reach the centerline of the printed perimeter)"
msgstr "「%2%」的修改器「%1%」(共 %3% 個)對接縫沒有作用(可能未觸及所列印牆的中心線)"
msgid "modifier \"%1%\" of \"%2%\" (%3% in total) had no effect on the seam"
msgstr "「%2%」的修改器「%1%」(共 %3% 個)對接縫沒有作用"
# AI Translated
msgid "Seam placement may differ from expected."
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><circle cx="7.5" cy="7.5" r="7" style="fill:none;stroke:#949494;stroke-linecap:round;stroke-linejoin:round"/><circle cx="7.5" cy="7.5" r="3.5" style="fill:#f04438"/></svg>

After

Width:  |  Height:  |  Size: 255 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><circle cx="7.5" cy="7.5" r="7" style="fill:none;stroke:#949494;stroke-linecap:round;stroke-linejoin:round"/><rect x="4.5" y="4.5" width="6" height="6" rx="1" style="fill:#f04438"/></svg>

After

Width:  |  Height:  |  Size: 271 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M1.5,3.5H4l1.5-2h4l1.5,2h2.5a1,1,0,0,1,1,1v8a1,1,0,0,1-1,1H1.5a1,1,0,0,1-1-1v-8A1,1,0,0,1,1.5,3.5Z" style="fill:none;stroke:#949494;stroke-linecap:round;stroke-linejoin:round"/><circle cx="7.5" cy="8.5" r="3" style="fill:none;stroke:#009688;stroke-linecap:round;stroke-linejoin:round"/></svg>

After

Width:  |  Height:  |  Size: 385 B

+293 -1
View File
@@ -1,6 +1,6 @@
{
"name": "Anycubic",
"version": "02.04.00.10",
"version": "02.04.00.11",
"force_update": "0",
"description": "Anycubic configurations",
"machine_model_list": [
@@ -48,6 +48,10 @@
"name": "Anycubic Kobra 3 Max",
"sub_path": "machine/Anycubic Kobra 3 Max.json"
},
{
"name": "Anycubic Kobra 3 Max V2",
"sub_path": "machine/Anycubic Kobra 3 Max V2.json"
},
{
"name": "Anycubic Kobra 3 V2",
"sub_path": "machine/Anycubic Kobra 3 V2.json"
@@ -518,6 +522,10 @@
"name": "0.56mm Standard @Anycubic Kobra S1 Max 0.8 nozzle",
"sub_path": "process/0.56mm Standard @Anycubic Kobra S1 Max 0.8 nozzle.json"
},
{
"name": "fdm_process_anycubic_kobra_3_max_v2_common",
"sub_path": "process/fdm_process_anycubic_kobra_3_max_v2_common.json"
},
{
"name": "0.12mm High Quality @Anycubic Kobra 3 V2 0.4 nozzle",
"sub_path": "process/0.12mm High Quality @Anycubic Kobra 3 V2 0.4 nozzle.json"
@@ -545,6 +553,110 @@
{
"name": "0.48mm Standard @Anycubic Kobra 3 V2 0.8 nozzle",
"sub_path": "process/0.48mm Standard @Anycubic Kobra 3 V2 0.8 nozzle.json"
},
{
"name": "fdm_process_anycubic_kobra_3_max_v2_nozzle_0.25",
"sub_path": "process/fdm_process_anycubic_kobra_3_max_v2_nozzle_0.25.json"
},
{
"name": "fdm_process_anycubic_kobra_3_max_v2_nozzle_0.4",
"sub_path": "process/fdm_process_anycubic_kobra_3_max_v2_nozzle_0.4.json"
},
{
"name": "fdm_process_anycubic_kobra_3_max_v2_nozzle_0.6",
"sub_path": "process/fdm_process_anycubic_kobra_3_max_v2_nozzle_0.6.json"
},
{
"name": "fdm_process_anycubic_kobra_3_max_v2_nozzle_0.8",
"sub_path": "process/fdm_process_anycubic_kobra_3_max_v2_nozzle_0.8.json"
},
{
"name": "0.06mm Standard @Anycubic Kobra 3 Max V2 0.25 nozzle",
"sub_path": "process/0.06mm Standard @Anycubic Kobra 3 Max V2 0.25 nozzle.json"
},
{
"name": "0.08mm Standard @Anycubic Kobra 3 Max V2 0.25 nozzle",
"sub_path": "process/0.08mm Standard @Anycubic Kobra 3 Max V2 0.25 nozzle.json"
},
{
"name": "0.10mm Standard @Anycubic Kobra 3 Max V2 0.25 nozzle",
"sub_path": "process/0.10mm Standard @Anycubic Kobra 3 Max V2 0.25 nozzle.json"
},
{
"name": "0.12mm Standard @Anycubic Kobra 3 Max V2 0.25 nozzle",
"sub_path": "process/0.12mm Standard @Anycubic Kobra 3 Max V2 0.25 nozzle.json"
},
{
"name": "0.14mm Standard @Anycubic Kobra 3 Max V2 0.25 nozzle",
"sub_path": "process/0.14mm Standard @Anycubic Kobra 3 Max V2 0.25 nozzle.json"
},
{
"name": "0.08mm Standard @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "process/0.08mm Standard @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "0.12mm Standard @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "process/0.12mm Standard @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "0.16mm Standard @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "process/0.16mm Standard @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "0.20mm Standard @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "process/0.20mm Standard @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "0.24mm Standard @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "process/0.24mm Standard @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "0.28mm Standard @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "process/0.28mm Standard @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "0.18mm Standard @Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "process/0.18mm Standard @Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "0.24mm Standard @Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "process/0.24mm Standard @Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "0.30mm Standard @Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "process/0.30mm Standard @Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "0.36mm Standard @Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "process/0.36mm Standard @Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "0.42mm Standard @Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "process/0.42mm Standard @Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "0.20mm Standard @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "process/0.20mm Standard @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
},
{
"name": "0.24mm Standard @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "process/0.24mm Standard @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
},
{
"name": "0.32mm Standard @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "process/0.32mm Standard @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
},
{
"name": "0.40mm Standard @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "process/0.40mm Standard @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
},
{
"name": "0.48mm Standard @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "process/0.48mm Standard @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
},
{
"name": "0.56mm Standard @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "process/0.56mm Standard @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
}
],
"filament_list": [
@@ -596,6 +708,10 @@
"name": "Anycubic ABS @Anycubic Kobra 3 Max 0.8 nozzle",
"sub_path": "filament/Anycubic ABS @Anycubic Kobra 3 Max 0.8 nozzle.json"
},
{
"name": "Anycubic ABS @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Anycubic ABS @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Anycubic ABS @Anycubic Kobra 3 V2 0.4 nozzle",
"sub_path": "filament/Anycubic ABS @Anycubic Kobra 3 V2 0.4 nozzle.json"
@@ -636,6 +752,10 @@
"name": "Anycubic ASA @Anycubic Kobra 3 Max 0.8 nozzle",
"sub_path": "filament/Anycubic ASA @Anycubic Kobra 3 Max 0.8 nozzle.json"
},
{
"name": "Anycubic ASA @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Anycubic ASA @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Anycubic ASA @Anycubic Kobra 3 V2 0.4 nozzle",
"sub_path": "filament/Anycubic ASA @Anycubic Kobra 3 V2 0.4 nozzle.json"
@@ -780,6 +900,10 @@
"name": "Anycubic PETG @Anycubic Kobra 3 Max 0.8 nozzle",
"sub_path": "filament/Anycubic PETG @Anycubic Kobra 3 Max 0.8 nozzle.json"
},
{
"name": "Anycubic PETG @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Anycubic PETG @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Anycubic PETG @Anycubic Kobra 3 V2 0.4 nozzle",
"sub_path": "filament/Anycubic PETG @Anycubic Kobra 3 V2 0.4 nozzle.json"
@@ -848,6 +972,10 @@
"name": "Anycubic PLA @Anycubic Kobra 3 Max 0.8 nozzle",
"sub_path": "filament/Anycubic PLA @Anycubic Kobra 3 Max 0.8 nozzle.json"
},
{
"name": "Anycubic PLA @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Anycubic PLA @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Anycubic PLA @Anycubic Kobra 3 V2 0.2 nozzle",
"sub_path": "filament/Anycubic PLA @Anycubic Kobra 3 V2 0.2 nozzle.json"
@@ -900,6 +1028,10 @@
"name": "Anycubic PLA Galaxy @Anycubic Kobra 3 V2 0.8 nozzle",
"sub_path": "filament/Anycubic PLA Galaxy @Anycubic Kobra 3 V2 0.8 nozzle.json"
},
{
"name": "Anycubic PLA Glow @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Anycubic PLA Glow @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Anycubic PLA Glow @Anycubic Kobra 3 V2 0.4 nozzle",
"sub_path": "filament/Anycubic PLA Glow @Anycubic Kobra 3 V2 0.4 nozzle.json"
@@ -912,6 +1044,10 @@
"name": "Anycubic PLA High Speed @Anycubic Kobra 3 Max 0.4 nozzle",
"sub_path": "filament/Anycubic PLA High Speed @Anycubic Kobra 3 Max 0.4 nozzle.json"
},
{
"name": "Anycubic PLA High Speed @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Anycubic PLA High Speed @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Anycubic PLA High Speed @Anycubic Kobra 3 V2 0.4 nozzle",
"sub_path": "filament/Anycubic PLA High Speed @Anycubic Kobra 3 V2 0.4 nozzle.json"
@@ -956,6 +1092,10 @@
"name": "Anycubic PLA Matte @Anycubic Kobra 3 Max 0.4 nozzle",
"sub_path": "filament/Anycubic PLA Matte @Anycubic Kobra 3 Max 0.4 nozzle.json"
},
{
"name": "Anycubic PLA Matte @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Anycubic PLA Matte @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Anycubic PLA Matte @Anycubic Kobra 3 V2 0.4 nozzle",
"sub_path": "filament/Anycubic PLA Matte @Anycubic Kobra 3 V2 0.4 nozzle.json"
@@ -996,6 +1136,10 @@
"name": "Anycubic PLA Silk @Anycubic Kobra 3 Max 0.4 nozzle",
"sub_path": "filament/Anycubic PLA Silk @Anycubic Kobra 3 Max 0.4 nozzle.json"
},
{
"name": "Anycubic PLA Silk @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Anycubic PLA Silk @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Anycubic PLA Silk @Anycubic Kobra 3 V2 0.4 nozzle",
"sub_path": "filament/Anycubic PLA Silk @Anycubic Kobra 3 V2 0.4 nozzle.json"
@@ -1032,6 +1176,10 @@
"name": "Anycubic PLA+ @Anycubic Kobra 3 Max 0.4 nozzle",
"sub_path": "filament/Anycubic PLA+ @Anycubic Kobra 3 Max 0.4 nozzle.json"
},
{
"name": "Anycubic PLA+ @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Anycubic PLA+ @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Anycubic PLA+ @Anycubic Kobra S1 0.4 nozzle",
"sub_path": "filament/Anycubic PLA+ @Anycubic Kobra S1 0.4 nozzle.json"
@@ -1096,6 +1244,10 @@
"name": "Anycubic PEBA 95A @Anycubic Kobra 3 Max 0.4 nozzle",
"sub_path": "filament/Anycubic PEBA 95A @Anycubic Kobra 3 Max 0.4 nozzle.json"
},
{
"name": "Anycubic PEBA 95A @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Anycubic PEBA 95A @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Anycubic PEBA @Anycubic Kobra S1 Max 0.4 nozzle",
"sub_path": "filament/Anycubic PEBA @Anycubic Kobra S1 Max 0.4 nozzle.json"
@@ -1136,6 +1288,10 @@
"name": "Anycubic TPU @Anycubic Kobra 3 Max 0.8 nozzle",
"sub_path": "filament/Anycubic TPU @Anycubic Kobra 3 Max 0.8 nozzle.json"
},
{
"name": "Anycubic TPU @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Anycubic TPU @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Anycubic TPU @Anycubic Kobra 3 V2 0.4 nozzle",
"sub_path": "filament/Anycubic TPU @Anycubic Kobra 3 V2 0.4 nozzle.json"
@@ -1164,18 +1320,78 @@
"name": "Generic TPU @Anycubic",
"sub_path": "filament/Generic TPU @Anycubic.json"
},
{
"name": "Anycubic ABS @Anycubic Kobra 3 Max V2 0.25 nozzle",
"sub_path": "filament/Anycubic ABS @Anycubic Kobra 3 Max V2 0.25 nozzle.json"
},
{
"name": "Anycubic ABS @Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "filament/Anycubic ABS @Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "Anycubic ABS @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "filament/Anycubic ABS @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
},
{
"name": "Generic ABS @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Generic ABS @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Generic ABS @Anycubic Kobra 3 0.4 nozzle",
"sub_path": "filament/Generic ABS @Anycubic Kobra 3 0.4 nozzle.json"
},
{
"name": "Anycubic ASA @Anycubic Kobra 3 Max V2 0.25 nozzle",
"sub_path": "filament/Anycubic ASA @Anycubic Kobra 3 Max V2 0.25 nozzle.json"
},
{
"name": "Anycubic ASA @Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "filament/Anycubic ASA @Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "Anycubic ASA @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "filament/Anycubic ASA @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
},
{
"name": "Anycubic ASA @Anycubic Kobra 3 0.4 nozzle",
"sub_path": "filament/Anycubic ASA @Anycubic Kobra 3 0.4 nozzle.json"
},
{
"name": "Anycubic PETG @Anycubic Kobra 3 Max V2 0.25 nozzle",
"sub_path": "filament/Anycubic PETG @Anycubic Kobra 3 Max V2 0.25 nozzle.json"
},
{
"name": "Anycubic PETG @Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "filament/Anycubic PETG @Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "Anycubic PETG @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "filament/Anycubic PETG @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
},
{
"name": "Generic PETG @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Generic PETG @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Anycubic PETG @Anycubic Kobra 3 0.4 nozzle",
"sub_path": "filament/Anycubic PETG @Anycubic Kobra 3 0.4 nozzle.json"
},
{
"name": "Anycubic PLA @Anycubic Kobra 3 Max V2 0.25 nozzle",
"sub_path": "filament/Anycubic PLA @Anycubic Kobra 3 Max V2 0.25 nozzle.json"
},
{
"name": "Anycubic PLA @Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "filament/Anycubic PLA @Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "Anycubic PLA @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "filament/Anycubic PLA @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
},
{
"name": "Generic PLA @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Generic PLA @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Anycubic PETG @Anycubic Kobra 3 V2 0.6 nozzle",
"sub_path": "filament/Anycubic PETG @Anycubic Kobra 3 V2 0.6 nozzle.json"
@@ -1192,6 +1408,50 @@
"name": "Anycubic PLA Silk @Anycubic Kobra 3 V2 0.8 nozzle",
"sub_path": "filament/Anycubic PLA Silk @Anycubic Kobra 3 V2 0.8 nozzle.json"
},
{
"name": "Anycubic PLA Glow @Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "filament/Anycubic PLA Glow @Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "Anycubic PLA Glow @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "filament/Anycubic PLA Glow @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
},
{
"name": "Anycubic PLA High Speed @Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "filament/Anycubic PLA High Speed @Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "Anycubic PLA High Speed @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "filament/Anycubic PLA High Speed @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
},
{
"name": "Anycubic PLA Matte @Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "filament/Anycubic PLA Matte @Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "Anycubic PLA Matte @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "filament/Anycubic PLA Matte @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
},
{
"name": "Anycubic PLA Silk @Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "filament/Anycubic PLA Silk @Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "Anycubic PLA Silk @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "filament/Anycubic PLA Silk @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
},
{
"name": "Generic PLA Silk @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Generic PLA Silk @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Anycubic PLA+ @Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "filament/Anycubic PLA+ @Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "Anycubic PLA+ @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "filament/Anycubic PLA+ @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
},
{
"name": "Anycubic PLA @Anycubic Kobra 2 Max 0.4 nozzle",
"sub_path": "filament/Anycubic PLA @Anycubic Kobra 2 Max 0.4 nozzle.json"
@@ -1276,6 +1536,18 @@
"name": "Anycubic PLA-CF @Anycubic Kobra S1 Max 0.8 nozzle",
"sub_path": "filament/Anycubic PLA-CF @Anycubic Kobra S1 Max 0.8 nozzle.json"
},
{
"name": "Anycubic TPU @Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "filament/Anycubic TPU @Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "Anycubic TPU @Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "filament/Anycubic TPU @Anycubic Kobra 3 Max V2 0.8 nozzle.json"
},
{
"name": "Generic TPU @Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "filament/Generic TPU @Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Generic TPU @Anycubic Kobra 3 0.4 nozzle",
"sub_path": "filament/Generic TPU @Anycubic Kobra 3 0.4 nozzle.json"
@@ -1413,6 +1685,26 @@
{
"name": "Anycubic i3 Mega S 0.4 nozzle",
"sub_path": "machine/Anycubic i3 Mega S 0.4 nozzle.json"
},
{
"name": "fdm_anycubic_kobra_3_max_v2_common",
"sub_path": "machine/fdm_anycubic_kobra_3_max_v2_common.json"
},
{
"name": "Anycubic Kobra 3 Max V2 0.25 nozzle",
"sub_path": "machine/Anycubic Kobra 3 Max V2 0.25 nozzle.json"
},
{
"name": "Anycubic Kobra 3 Max V2 0.4 nozzle",
"sub_path": "machine/Anycubic Kobra 3 Max V2 0.4 nozzle.json"
},
{
"name": "Anycubic Kobra 3 Max V2 0.6 nozzle",
"sub_path": "machine/Anycubic Kobra 3 Max V2 0.6 nozzle.json"
},
{
"name": "Anycubic Kobra 3 Max V2 0.8 nozzle",
"sub_path": "machine/Anycubic Kobra 3 Max V2 0.8 nozzle.json"
}
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

@@ -1,23 +1,8 @@
<svg width="430" height="430" viewBox="0 0 430 430" fill="none" xmlns="http://www.w3.org/2000/svg">
<path opacity="0.9" fill-rule="evenodd" clip-rule="evenodd" d="M368.377 412.523L374.006 417.939L377.421 418.271L372.967 414.354L368.377 412.523Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M373.927 417.992L368.301 412.558L364.834 418.797L368.702 424.569L373.927 417.992Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M368.777 424.583L374.014 418.026L377.441 418.331L373.326 422.933L368.777 424.583Z" fill="white"/>
<path d="M393.901 415.736H392.397L393.928 417.902L394.694 416.863L393.901 415.736Z" fill="white"/>
<path d="M390.735 418.926L386.924 415.551V417.182L391.963 421.632V415.736H390.735V418.926Z" fill="white"/>
<path d="M396.399 415.736L394.363 418.522V421.449H395.597V418.921L397.921 415.736H396.399Z" fill="white"/>
<path d="M382.474 416.806L383.764 419.294H383.281L382.668 420.494H384.373L384.871 421.449H386.248L383.17 415.474L382.474 416.806Z" fill="white"/>
<path d="M386.924 421.449V421.452H388.152V419.166L386.924 418.087V421.449Z" fill="white"/>
<path d="M382.103 417.545L380.096 421.45H381.468L382.787 418.887L382.103 417.545Z" fill="white"/>
<path d="M413.853 419.118C414.05 419.069 414.235 418.982 414.398 418.862C414.619 418.701 414.797 418.489 414.917 418.242C415.036 417.996 415.093 417.724 415.082 417.45C415.089 417.185 415.031 416.922 414.913 416.684C414.794 416.447 414.619 416.243 414.402 416.09C414.23 415.961 414.035 415.868 413.827 415.814C413.544 415.754 413.255 415.727 412.966 415.736H412.657V416.95H413.098C413.289 416.935 413.48 416.965 413.657 417.038C413.729 417.079 413.788 417.141 413.827 417.214C413.867 417.288 413.884 417.372 413.878 417.454C413.884 417.551 413.861 417.647 413.811 417.731C413.761 417.815 413.687 417.88 413.599 417.92C413.424 417.982 413.238 418.008 413.052 417.997H412.657V419.197H413.098C413.352 419.202 413.606 419.175 413.853 419.118Z" fill="white"/>
<path d="M398.496 416.768C398.086 417.291 397.866 417.939 397.872 418.604C397.873 419.063 397.98 419.516 398.183 419.928C398.386 420.34 398.681 420.699 399.046 420.979C399.487 421.316 400.008 421.532 400.559 421.603V420.364C400.101 420.266 399.697 419.997 399.43 419.611C399.254 419.358 399.146 419.064 399.118 418.757C399.091 418.45 399.143 418.141 399.271 417.86C399.372 417.626 399.523 417.418 399.712 417.249C399.957 417.04 400.249 416.895 400.564 416.828V415.586C400.158 415.634 399.764 415.763 399.409 415.966C399.055 416.169 398.744 416.442 398.496 416.768Z" fill="white"/>
<path d="M402.331 417.525L403.293 416.76C403.057 416.439 402.756 416.171 402.411 415.972C402.052 415.772 401.658 415.644 401.25 415.595V416.837C401.684 416.923 402.07 417.169 402.331 417.525Z" fill="white"/>
<path d="M423.393 417.525L424.357 416.76C424.12 416.44 423.82 416.171 423.475 415.972C423.117 415.772 422.723 415.644 422.314 415.595V416.837C422.747 416.924 423.133 417.169 423.393 417.525Z" fill="white"/>
<path d="M413.886 419.578C413.895 419.618 413.9 419.659 413.9 419.7C413.91 419.805 413.883 419.911 413.825 419.999C413.766 420.088 413.679 420.154 413.578 420.186C413.41 420.231 413.236 420.251 413.062 420.244H412.667V421.445H413.07C413.335 421.45 413.599 421.426 413.858 421.374C414.053 421.33 414.236 421.249 414.399 421.134C414.621 420.977 414.801 420.768 414.923 420.525C415.051 420.277 415.118 420.002 415.118 419.724C415.12 419.469 415.069 419.215 414.967 418.981C414.692 419.305 414.307 419.518 413.886 419.578Z" fill="white"/>
<path d="M419.56 416.768C419.15 417.291 418.93 417.939 418.938 418.604C418.939 419.063 419.044 419.517 419.248 419.928C419.451 420.34 419.747 420.699 420.111 420.979C420.552 421.317 421.074 421.532 421.625 421.603V420.364C421.165 420.266 420.76 419.997 420.493 419.611C420.317 419.358 420.211 419.064 420.183 418.757C420.155 418.45 420.208 418.141 420.334 417.86C420.435 417.626 420.585 417.417 420.775 417.249C421.019 417.039 421.313 416.895 421.627 416.828V415.586C421.221 415.634 420.828 415.763 420.473 415.966C420.118 416.169 419.808 416.442 419.56 416.768Z" fill="white"/>
<path d="M401.243 420.366V421.608C401.649 421.564 402.041 421.438 402.396 421.237C402.75 421.036 403.061 420.764 403.306 420.439L402.335 419.687C402.067 420.04 401.679 420.282 401.243 420.366Z" fill="white"/>
<path d="M423.398 419.687C423.128 420.042 422.735 420.285 422.295 420.366V421.608C422.701 421.564 423.093 421.438 423.449 421.237C423.803 421.036 424.113 420.764 424.359 420.439L423.398 419.687Z" fill="white"/>
<path d="M417.626 415.736H416.396V421.449H417.626V415.736Z" fill="white"/>
<path d="M405.92 419.832C405.795 419.532 405.74 419.206 405.761 418.882V415.736H404.528V418.994C404.517 419.344 404.564 419.692 404.665 420.026C404.76 420.31 404.915 420.571 405.119 420.79C405.302 420.994 405.519 421.164 405.761 421.292C406.002 421.426 406.264 421.517 406.536 421.564V420.309C406.28 420.229 406.062 420.06 405.92 419.832Z" fill="white"/>
<path d="M407.999 418.886C408.02 419.216 407.962 419.547 407.832 419.85C407.689 420.074 407.468 420.237 407.212 420.309V421.564C407.485 421.52 407.748 421.43 407.99 421.297C408.231 421.164 408.449 420.993 408.634 420.79C408.84 420.571 408.996 420.311 409.091 420.026C409.191 419.692 409.237 419.344 409.228 418.994V415.736H407.999V418.886Z" fill="white"/>
<path d="M411.97 415.736H410.74V421.449H411.97V415.736Z" fill="white"/>
<g fill="#fff">
<path opacity=".9" fill-rule="evenodd" clip-rule="evenodd" d="m358.377 382.523 5.629 5.416 3.415.332-4.454-3.917z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="m363.927 387.992-5.626-5.434-3.467 6.239 3.868 5.772zm-5.15 6.591 5.237-6.557 3.427.305-4.115 4.602z"/>
<path d="M383.901 385.736h-1.504l1.531 2.166.766-1.039zm-3.166 3.19-3.811-3.375v1.631l5.039 4.45v-5.896h-1.228zm5.664-3.19-2.036 2.786v2.927h1.234v-2.528l2.324-3.185zm-13.925 1.07 1.29 2.488h-.483l-.613 1.2h1.705l.498.955h1.377l-3.078-5.975zm4.45 4.643v.003h1.228v-2.286l-1.228-1.079z"/>
<path d="m372.103 387.545-2.007 3.905h1.372l1.319-2.563zm31.75 1.573a1.6 1.6 0 0 0 .545-.256 1.67 1.67 0 0 0 .684-1.412 1.61 1.61 0 0 0-.68-1.36 1.7 1.7 0 0 0-.575-.276 3.6 3.6 0 0 0-.861-.078h-.309v1.214h.441c.191-.015.382.015.559.088a.44.44 0 0 1 .221.416.48.48 0 0 1-.279.466 1.4 1.4 0 0 1-.547.077h-.395v1.2h.441a3 3 0 0 0 .755-.079m-15.357-2.35a2.93 2.93 0 0 0-.624 1.836 3.01 3.01 0 0 0 1.174 2.375c.441.337.962.553 1.513.624v-1.239a1.84 1.84 0 0 1-1.129-.753 1.78 1.78 0 0 1-.159-1.751 1.75 1.75 0 0 1 .441-.611c.245-.209.537-.354.852-.421v-1.242a3.05 3.05 0 0 0-2.068 1.182m3.835.757.962-.765a2.9 2.9 0 0 0-.882-.788 3.2 3.2 0 0 0-1.161-.377v1.242c.434.086.82.332 1.081.688m21.062 0 .964-.765a2.9 2.9 0 0 0-.882-.788 3.2 3.2 0 0 0-1.161-.377v1.242c.433.087.819.332 1.079.688m-9.507 2.053q.014.06.014.122a.465.465 0 0 1-.322.486 1.7 1.7 0 0 1-.516.058h-.395v1.201h.403q.399.007.788-.071.295-.067.541-.24a1.75 1.75 0 0 0 .719-1.41 1.8 1.8 0 0 0-.151-.743c-.275.324-.66.537-1.081.597m5.674-2.81a2.92 2.92 0 0 0-.622 1.836 3 3 0 0 0 1.173 2.375 3.15 3.15 0 0 0 1.514.624v-1.239a1.84 1.84 0 0 1-1.132-.753 1.78 1.78 0 0 1-.159-1.751 1.7 1.7 0 0 1 .441-.611 1.9 1.9 0 0 1 .852-.421v-1.242a3.05 3.05 0 0 0-2.067 1.182m-18.317 3.598v1.242a3 3 0 0 0 2.063-1.169l-.971-.752a1.8 1.8 0 0 1-1.092.679m22.155-.679c-.27.355-.663.598-1.103.679v1.242c.406-.044.798-.17 1.154-.371a3 3 0 0 0 .91-.798zm-5.772-3.951h-1.23v5.713h1.23zm-11.706 4.096c-.125-.3-.18-.626-.159-.95v-3.146h-1.233v3.258c-.011.35.036.698.137 1.032.095.284.25.545.454.764.183.204.4.374.642.502.241.134.503.225.775.272v-1.255a1.12 1.12 0 0 1-.616-.477m2.079-.946c.021.33-.037.661-.167.964a1.08 1.08 0 0 1-.62.459v1.255a2.4 2.4 0 0 0 .778-.267c.241-.133.459-.304.644-.507a2.1 2.1 0 0 0 .457-.764 3.3 3.3 0 0 0 .137-1.032v-3.258h-1.229zm3.971-3.15h-1.23v5.713h1.23z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

@@ -0,0 +1,39 @@
{
"type": "filament",
"name": "Anycubic ABS @Anycubic Kobra 3 Max V2 0.25 nozzle",
"inherits": "Anycubic ABS @Anycubic Kobra 3 Max V2 0.4 nozzle",
"from": "system",
"setting_id": "cT93s5AV0CWH0vvn",
"filament_id": "OF223rZv",
"instantiation": "true",
"filament_max_volumetric_speed": [
"2"
],
"cool_plate_temp": [
"0"
],
"cool_plate_temp_initial_layer": [
"0"
],
"filament_flush_temp": [
"nil"
],
"filament_flush_volumetric_speed": [
"nil"
],
"hot_plate_temp": [
"100"
],
"hot_plate_temp_initial_layer": [
"100"
],
"textured_plate_temp": [
"100"
],
"textured_plate_temp_initial_layer": [
"100"
],
"compatible_printers": [
"Anycubic Kobra 3 Max V2 0.25 nozzle"
]
}
@@ -0,0 +1,141 @@
{
"type": "filament",
"name": "Anycubic ABS @Anycubic Kobra 3 Max V2 0.4 nozzle",
"inherits": "fdm_filament_abs",
"from": "system",
"setting_id": "LuWN1dGaxVTOpo0a",
"filament_id": "OF223rZv",
"instantiation": "true",
"fan_min_speed": [
"1"
],
"filament_vendor": [
"Anycubic"
],
"filament_flow_ratio": [
"0.98"
],
"filament_max_volumetric_speed": [
"5"
],
"close_fan_the_first_x_layers": [
"5"
],
"cool_plate_temp": [
"35"
],
"cool_plate_temp_initial_layer": [
"35"
],
"enable_pressure_advance": [
"1"
],
"eng_plate_temp": [
"45"
],
"eng_plate_temp_initial_layer": [
"45"
],
"fan_cooling_layer_time": [
"20"
],
"fan_max_speed": [
"15"
],
"filament_density": [
"1.05"
],
"filament_deretraction_speed": [
"0"
],
"filament_end_gcode": [
"; filament end gcode"
],
"filament_long_retractions_when_cut": [
"nil"
],
"filament_minimal_purge_on_wipe_tower": [
"41"
],
"filament_retract_before_wipe": [
"0%"
],
"filament_retract_lift_above": [
"0.3"
],
"filament_retract_lift_below": [
"499"
],
"filament_retract_lift_enforce": [
"All Surfaces"
],
"filament_retract_restart_extra": [
"0"
],
"filament_retract_when_changing_layer": [
"1"
],
"filament_retraction_distances_when_cut": [
"nil"
],
"filament_retraction_length": [
"0.8"
],
"filament_retraction_minimum_travel": [
"1"
],
"filament_retraction_speed": [
"30"
],
"filament_start_gcode": [
"; filament start gcode"
],
"filament_wipe": [
"1"
],
"filament_wipe_distance": [
"1"
],
"filament_z_hop": [
"0.4"
],
"filament_z_hop_types": [
"Slope Lift"
],
"full_fan_speed_layer": [
"100"
],
"hot_plate_temp": [
"95"
],
"hot_plate_temp_initial_layer": [
"95"
],
"nozzle_temperature": [
"250"
],
"nozzle_temperature_range_low": [
"230"
],
"pressure_advance": [
"0.03"
],
"slow_down_layer_time": [
"16"
],
"slow_down_min_speed": [
"20"
],
"temperature_vitrification": [
"60"
],
"textured_plate_temp": [
"95"
],
"textured_plate_temp_initial_layer": [
"95"
],
"compatible_printers": [
"Anycubic Kobra 3 Max V2 0.4 nozzle"
]
}

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