This is the detailed development reference. For installation, images and reverse proxies, start with the fork README and deployment guide. Historical per-feature verification below describes its original fixture and does not certify current hardware.
Orca Web development
Network diagnostics use explicit targets in
POST /api/v1/diagnostics/network/test (targets, mode, timeout_seconds).
Optional defaults come from ORCA_NETWORK_TEST_TARGETS, forwarded by Compose:
export ORCA_NETWORK_TEST_TARGETS='[{"name":"HTTP reference","url":"http://example.org/"},{"name":"HTTPS reference","url":"https://example.org/"}]'
GET /api/v1/diagnostics/network/configuration reads those defaults without
contacting them. An unset variable leaves the list empty. Tests measure server
connectivity, use no printer/account credentials, and stop on request disconnect.
When a reverse proxy terminates TLS or rewrites Host, set ORCA_ALLOWED_ORIGINS
to the browser's public origin, e.g. https://orca.example.com, when running
Compose. Multiple origins are comma-separated and include any non-default port.
The backend still accepts direct same-origin requests and rejects mutations from
other origins. Forwarding headers alone do not authorize an origin.
The client can be built and hosted separately: set VITE_ORCA_API_URL to the
complete API base URL (for example https://slicer.example/api/v1) during
npm run build:web. All JSON requests, geometry, preview artifacts, downloads
and job events use that base. By default they use /api/v1 on the current host.
Add each separately hosted client's origin to the backend's
ORCA_ALLOWED_ORIGINS; it controls CORS preflights and mutation authorization.
The Docker client build accepts the same variable as a build argument. API
documentation is served at /api/v1/docs, with machine-readable schemas at
/api/v1/openapi.json, so both remain reachable through the standard API proxy.
See docs/HLSD/web-api.md for revision, unit and binary transport semantics.
web/examples/slice.py is a standalone HTTP client (requires httpx):
python web/examples/slice.py https://slicer.example/api/v1 model.3mf -o result.gcode --username admin --setting layer_height=0.2
The project belongs to a physical machine: pass --machine NAME, or --printer TEMPLATE to use a machine made from that printer template (created on first use).
Without either, the client uses the remembered or the only machine.
ElegooLink uses type=elegoolink and the native printer_model identifier from
the printer profile. Centauri CC and CC2 use their distinct upload protocols;
other models reuse OctoPrint. CC supports optional print_options.elegoo
(time_lapse, heated_bed_leveling, build_plate=pte|pc) and a configurable
websocket_url for SDCP start. CC2 supports upload only, with its native default
access code when no explicit api_key is configured. The effective capabilities
API distinguishes these variants before a client offers actions.
3DPrinterOS uses type=printeros, the cloud base URL and a valid session in
private api_key. Read cloud projects and printer types through the corresponding
/printer/cloud-projects and /printer/printer-types APIs (or named-printer
equivalents), then send print_options.printeros with printer_type_id and
optional project_id or project_name. The receipt includes a service-panel
link; upload itself does not start printing. Plain and sliced 3MF artifacts are
transferred unchanged.
3DPrinterOS browser login starts with POST /api/v1/auth/printeros/logins
(id, current revision, optional printer_id). Resolve its relative
browser_url against the API origin and navigate there, then poll
GET /api/v1/auth/printeros/logins/{id}. This uses the native service's consent
page and token polling, without an OAuth registration or entering a password
into Orca Web. Local disconnect uses POST /api/v1/auth/printeros/logout with
the current revision and optional printer ID. Cancellation uses
POST /api/v1/auth/printeros/logins/{id}/cancel.
SimplyPrint connections use type=simplyprint, host=https://api.simplyprint.io/
and an existing Bearer access token in private api_key. Optional
simplyprint_panel_url defaults to https://simplyprint.io/. Uploads return an
external_url for finishing import and choosing queue/print in the service panel;
the backend receipt means temporary upload only. Both plain G-code and native
sliced 3MF are accepted, with bounded streaming chunks for large artifacts.
For SimplyPrint account login, register a web OAuth application and set
ORCA_SIMPLYPRINT_OAUTH_HOST, ORCA_SIMPLYPRINT_OAUTH_PANEL_URL,
ORCA_SIMPLYPRINT_OAUTH_CLIENT_ID and ORCA_SIMPLYPRINT_OAUTH_REDIRECT_URI.
The URLs must match the connection, with the redirect ending in
/api/v1/oauth/simplyprint/callback. Set optional
ORCA_SIMPLYPRINT_OAUTH_CLIENT_SECRET for a confidential registration; public
registrations omit it. Compose forwards these variables. The API flow mirrors
the Obico routes below under /api/v1/oauth/simplyprint, including browser
launch and local logout, and uses PKCE. Shared account sessions refresh tokens
once after a definite HTTP 401, preserving the account captured by queued jobs.
A lost refresh receipt requires a new login. Manual tokens remain supported.
Obico account login uses a registered confidential OAuth application. Configure
ORCA_OBICO_OAUTH_HOST, ORCA_OBICO_OAUTH_CLIENT_ID,
ORCA_OBICO_OAUTH_CLIENT_SECRET and ORCA_OBICO_OAUTH_REDIRECT_URI on the backend;
Compose forwards these optional variables. The host must match the saved Obico
connection, including its base path. Register the public API URL ending in
/api/v1/oauth/obico/callback as the redirect URI. The client secret belongs
only on the server. Leaving all four variables empty disables account login;
existing manually configured tokens still work.
GET /api/v1/oauth/obico reports registration availability. To authorize a saved
connection, POST /api/v1/oauth/obico/logins with a new UUID id, current
revision and optional local saved printer_id. Navigate the browser to the
returned browser_url; this also supports a separately hosted frontend without
third-party cookies. The callback returns login status without returning tokens;
GET /api/v1/oauth/obico/logins/{id} supports polling by an independent client.
The saved connection exposes only oauth_account and oauth_expires_at.
POST /api/v1/oauth/obico/logout takes the current revision and optional printer
ID to disconnect locally. It does not revoke tokens in other clients or change
captured dispatch history. An expired/revoked token requires a fresh login;
automatic refresh is not performed. Reverse proxies should omit callback and
authorization-launch query strings from access logs. The API removes them from
the ASGI server's logged scope and sends no-store/no-referrer responses.
Flashforge connections use type=flashforge. For HTTP, set the full API host
URL (including port 8898 or a proxy base path), flashforge_serial_number and
private api_key access code. With both credentials empty, the connection uses
legacy TCP; console_host and console_port override the host's address and
default port 8899. An incomplete credential pair is rejected. Both modes accept
plain G-code and the original sliced 3MF artifact. Explicit print intent is sent
with upload; legacy TCP also supports starting a previously acknowledged file.
The connection's /capabilities?revision=N endpoint exposes effective transport
capabilities; /printer/types describes defaults before connection configuration.
HTTP has no separate filename-start action. HTTP IFS slots are available through
the saved connection's /filament-slots endpoint. The job's /filament-mapping
proposal reads its frozen material requirements and selects the closest loaded
color within the native material-type aliases; all_plates=true uses the batch
union. Accept or edit the proposal with print_options.flashforge containing
use_material_station, mapping, leveling_before_print and time_lapse_video.
Each mapping names source_index, one-based slot_id, material_name and
canonical slot_color. The owned upload checks live slots again before sending
the file. Multi-material HTTP jobs require IFS; external mode is available for
a single tool. New preparation options require complete sliced metadata, while
legacy jobs without usage metadata retain ordinary external uploads.
POST /api/v1/printer/discover?type=flashforge performs bounded
native UDP discovery (probe port 48899, receive port 18007) and returns names,
HTTP addresses and serial numbers without saving a connection. The backend
needs a network namespace with access to those LAN broadcasts.
Browser contract checks can run with ORCA_E2E_SEPARATE_API=1 to host the client
and API on different origins. ORCA_WORKER selects an alternative native worker
for backend and browser tests.
POST /api/v1/projects/new creates an empty native 3MF project and requires
name and machine: {machine_id, profile_id}; optional owned process/material
IDs select its initial settings. Add physical machines through the Printers
workspace before opening a model. Each machine owns editable printer profiles,
each with independent process and material presets, and one optional connection.
Upstream and imported presets are templates copied into that library. Updates
require reviewing individual parameter changes; importing a template never
silently changes a machine. See the physical-machine design.
Uploads use POST /api/v1/imports and its durable file-transfer/decision endpoints.
New model projects require a physical-machine selection. Each 3MF import chooses
geometry only, full project settings or temporary inspection. Geometry mode
retains authored shapes and transforms while removing presets, slicing overrides
and painting. Full import keeps supported settings in the project without
overwriting the owned library. Ordinary meshes use native placement rules after
selecting the destination bed.
Every edit autosaves an immutable revision. POST /projects/{id}/save takes
revision and an optional name, setting a manual checkpoint without another
geometry revision. POST /projects/{id}/copy takes revision and name, copies
the exact snapshot and geometry into a new independent project, and marks its
initial revision as saved. Historical revisions may be copied after a conflict;
the copy request can additionally carry settings, literal strings, indexed
elements, transforms, instances, placements and structure edits. These rejected
local edits are applied to the requested historical snapshot before publishing
the independent project. If native validation fails, no project is created.
Model-upload conflict copies use the durable import queue and retain the
captured physical assignment. The browser retains rejected changes for recovery.
Unsubmitted form drafts still require applying or explicitly discarding them.
Copies share neither history nor slicing jobs. A client can reopen a project through
?project={id} in a separate tab or after reloading.
At startup the client offers the most recently opened/updated project's server autosave when its snapshot differs from the manual checkpoint. Accepting opens the current server head; skipping clears the client selection and leaves server data available in the project list. A direct project URL also shows this choice. With an empty live-project list, available backup archives prompt recovery through the existing independent-copy dialog, or dismissal. Neither choice replays jobs.
The header's “Katalog profili” opens shared printer/material availability. Search by vendor or name; the wizard displays up to 100 matches and its result selection actions apply to the complete search result. Saving uses its own revision counter. Existing project settings and user-library entries remain independent of the enabled system selection.
“Wspólna biblioteka presetów” inside the profile panel captures committed project
printer, process or a selected logical filament slot. “Zapisz nowy preset” creates
a named entry; “Zapisz nową wersję w bibliotece” explicitly updates the chosen
entry with compare-and-swap protection. Library conflicts stay within that panel
and retain the project edits. Refresh or save under another name to resolve one.
Saving a library entry does not switch the project automatically: select the
new entry in the profile set and apply it. New selections pin the displayed
library revisions. Applied snapshots are embedded in the native project; later
library updates do not rewrite existing projects. Imported project-only presets
also appear among choices for that project. A source scope's native variant arrays
are retained when saving a filament, rather than reducing it to the first nozzle.
API routes and storage semantics are described in docs/HLSD/web-api.md.
“Aktywny stół” selects the rendered plate and the input for “Potnij model”. The tree can select an instance on another plate and switch context automatically. Center/drop/fit use the active origin. “Współrzędne stołu” can override the inferred native grid origin for an imported layout, leaving model positions and project revision unchanged. Apply this form before slicing. Each job keeps its exact origin, so returning to its result does not reinterpret coordinates. Native preview headers already contain bed geometry in project coordinates.
“Potnij wszystkie stoły” creates a durable batch and skips plates without
printable instances. “Wynik cięcia” selects a particular plate/job after reload;
“Anuluj całą serię” cancels unfinished work. Once all jobs complete,
“Pobierz G-code wszystkich stołów” downloads a ZIP of the exact native results
and a manifest identifying revision, job and plate. A failure on one plate leaves
completed plate downloads available. The API exposes /projects/{id}/plates,
/slice, /slice-all, /batches/{id}, /batches/{id}/cancel and
/batches/{id}/artifacts/gcode independently of this client.
Automatic server backups run independently of open clients. Their interval and
retention are persisted through /api/v1/backups/settings (interval_seconds,
minimum 60; keep, minimum 1), also editable in “Kopie zapasowe i odzyskiwanie”.
Defaults are six hours and seven archives, with an initial backup on first
startup. ORCA_BACKUP_INTERVAL and ORCA_BACKUP_KEEP set initial defaults;
ORCA_BACKUP_DIR selects storage (default /data/backups in Docker).
Mount a separate destination there when backups need to survive data-volume
loss. Backup failures appear in /api/v1/backups and the client.
POST /api/v1/backups creates an archive on demand. SQLite's online backup
captures a consistent database first; the archive then copies all immutable
project revisions and geometry it references, original uploads/project assets,
and completed job artifacts. Partially received uploads are excluded.
Archives contain state.sqlite, manifest.json and data/ files, and are
downloadable through /api/v1/backups/{id}/download. Retention deletes the
oldest archives after a successful backup.
POST /api/v1/backups/{id}/projects/{project_id}/recover takes a name and
recovers that project's archived head into a new independent, manually saved
project. Live projects remain untouched; printer jobs are never replayed.
For full server recovery, stop the server and restore into a new empty directory:
python web/examples/restore_backup.py orca-backup.zip /path/to/new-data
The restore tool validates the archive/database, remaps all immutable revision
paths to the new directory, and publishes the restored directory atomically.
It preserves project history/checkpoints and completed artifacts. Pending printer
requests are cancelled or marked uncertain so starting the restored server cannot
replay them. Point ORCA_DATA (or the Docker data volume) at that directory.
The application uses a native orca-headless worker, a FastAPI server and a
React/Three.js client. The browser client follows desktop OrcaSlicer feature for
feature; the decisions about intended differences and the parity work still
planned are recorded in desktop-parity.md.
Isolated Compose checks cover the native
worker, project/artifact persistence, backup recovery and desktop/touch Chromium
workflows. Printer delivery tests use Moonraker emulators; physical KX-Bridge
validation remains separate. The preview renders a selectable layer and move
range with every desktop view type (line type, filament, tool, speeds, height,
width, flows, layer times, fan, temperature, pressure advance, acceleration,
jerk and summary).
New slicing results carry the desktop renderer's default palettes. The preview's
“Typy ścieżek” legend lists roles from the whole print and lets each be hidden.
For native previews it also shows each role's native estimated time and share
of analyzer total time, using the selected normal/stealth mode. These statistics
remain global when hiding paths or narrowing the visible layers.
Travel and wipe paths have separate controls and their native colors. Older
stored previews remain readable. New previews use the shared native libvgcode
renderer in WebAssembly for path geometry.
The worker now exports native global range variants and layer timings through
the same conversion and range calculations as the desktop. The browser already
uses the native material palette, layer metadata and global numeric color scales.
Numeric legends retain their meaning when changing layers. Travel/wipe controls
select the native range variants; layer-time coloring offers linear/logarithmic
scales and normal/stealth timings when available.
New slicing results additionally expose a versioned converted-input binary
artifact (native-preview) for the native WebAssembly viewer. The browser loads
this buffer once per opened result and updates native layer/color/role settings
without downloading geometry again. The renderer shares the Three.js camera and
bed context. Older results without renderer-role metadata use indexed JSON paths.
New results initially show the entire print. The lower/upper layer sliders select
a range and keep their bounds ordered. “Tylko ta warstwa” shows the selected upper
layer; “Cały wydruk” restores the full range. These controls preserve the loaded
geometry and camera. Older JSON previews retain their single-layer control.
“Pierwszy ruch” and “Ostatni ruch” select an inclusive sequence of G-code lines,
using the same grouping as the desktop viewer, including interpolated arcs.
“Wszystkie ruchy” restores the current layer range. The readout shows endpoint
line IDs, XYZ and estimated elapsed print time. Changing layers or visible roles,
travels or wipes resets this sequence; color/time modes preserve the selected steps.
“Znaczniki G-code” lists the native markers present in the print: seams,
retractions/unretractions, filament/color changes, pauses and custom G-code.
Checkbox defaults and color swatches come from the native viewer. Toggling a
marker keeps the loaded geometry and camera and resets the move sequence.
On desktop, preview controls scroll beside the 3D scene. On mobile, the scene
appears above a bounded scrollable controls panel. Model importing and instance
editing tools are available in “Model”; preview controls are available in “Po cięciu”.
“Statystyki wydruku” shows the completed job's native time estimates, total
filament length, weight, profile cost and filament-change count, plus any slicing
warnings. These values belong to that job's project revision, including when
the project has since changed. Costs use the profile's units; the browser does
not infer a currency or calculate its own estimates.
Native results also offer “Podsumowanie” and “Filament” coloring. These use the
desktop viewer's color-print palette and gray color-print-option layers; “Narzędzie”
uses tool colors. Their “Użyte filamenty” legend lists only extrusion-used tools,
with IDs and colors taken from the native viewer. In “Filament”, each used
material also shows model/support/flush/tower consumption in meters and grams
when present. Checkboxes select the displayed categories and their total; they
do not change the print. The server obtains these amounts through native
filament-volume conversion. Older results without usage breakdowns retain the
color/ID legend.
“Drukarka” opens the Moonraker connection settings, including the API key, custom CA certificate and optional Mainsail/Fluidd address. Settings persist on the server; empty secret fields keep existing credentials unless explicitly cleared. “Sprawdź połączenie” tests the saved settings. Conflicting changes from another device require reloading the saved settings. Saving alone does not contact the printer.
After slicing, “Wyślij do drukarki” opens the destination and filename dialog. “Prześlij plik” uploads without starting; “Prześlij i uruchom wydruk” requests both. An acknowledged upload can also be started separately. The dialog restores stored dispatches when reopened and shows progress, errors and uncertain delivery. Interrupting communication closes the connection; it cannot retract a command already received by the printer. Mainsail/Fluidd remains the printer monitor.
The backend exposes durable Moonraker dispatch through
POST /api/v1/jobs/{id}/dispatches and /api/v1/dispatches/{id}. Upload-and-start
must be requested explicitly; uploaded files can also receive a separate
/start request. /cancel interrupts pending or active communication. Active
requests interrupted during delivery remain uncertain and are not replayed.
The browser preserves an unanswered send request's token locally so an explicit
retry refers to the same server operation. The token generator supports LAN HTTP.
Reopening a project retrieves its most recent slicing job from the server;
completed G-code and preview remain accessible after browser reloads.
New results also retain their sliced bed outline. Changing the current project's
printer or bed shape marks that result as stale but preserves its native preview
scene and statistics. Old artifacts without a stored outline use the current bed.
Project edits have persistent undo/redo history. The toolbar can restore the last manual save; this restoration can itself be undone. Desktop shortcuts are Ctrl/Cmd+Z and Ctrl/Cmd+Shift+Z (also Ctrl/Cmd+Y for redo), except while editing a text/number field, where the browser keeps its normal field editing behavior. History survives server restarts and does not change existing slicing snapshots.
“Parametry” groups fields by the core's categories. “Zakres parametrów” filters
process, filament or printer settings using Orca's native preset option lists;
“Wszystkie” also retains settings outside those lists. The search includes keys,
short/full labels and categories, and combines with the scope and complexity
filters. Explicitly SLA-only definitions are omitted from this FFF editor.
Filtering does not change stored settings. With a supporting adapter, fields use
Orca's shared process dependency rules for visibility, availability and dynamic
labels. Primitive vector values have separate controls; editing one retains its
siblings. Parameter and profile edits include native automatic corrections in
the same undoable revision. Selection lists save immediately; text and numeric
fields save on Enter or when focus leaves them. Enter during IME composition
does not submit; Enter in multiline G-code inserts a newline and focus leaving
the field saves it. With a supporting worker, scalar strings use literal text
metadata and edits so newlines, backslashes and quotes survive project reloads.
Before slicing a loaded project, pending
process-rule corrections are applied once; an already corrected project keeps
its revision. Nullable numeric fields offer “Dziedzicz”; the action discards an
uncommitted draft and stores native nil. An inherited numeric value appears
as an empty input with that placeholder; entering a value creates an override.
Nullable boolean and enum lists also include “Dziedzicz”. With supporting native
metadata, inherited filament controls display their global printer retraction
or process ironing source value. Changing the source refreshes the hint while
retaining stored nil and other explicit overrides. Older adapters omit these
hints. Turning an override off and on again restores the value last entered in
the session, as desktop does. Older adapters retain serialized-value controls.
The scene sidebar edits a selected instance's native position, Euler rotation and scaling numerically. One application of the form creates one undoable revision. Positive nonuniform scale is supported, and proportional scaling retains the current aspect ratio. A selector accessible on desktop and mobile chooses the instance to edit. Native scale and non-Z rotation changes apply to all copies of the object; copies retain their separate XY positions and world Z rotations. Shape changes use desktop's auto-drop and sinking rules. The selector also chooses the instance to copy or delete. Copies share native object geometry/settings and start at the source position; move the new instance before slicing. Deleting the last instance leaves an empty project which retains settings, saves and supports undo. Canvas handles and numeric fields move, rotate and scale instances and parts in world, object and part frames; arrangement, plate selection, origins, model imports and per-plate slicing are supported.
“Otwórz model lub projekt” creates a project; “Dodaj modele do projektu” imports
one or more files into the current scene, including an empty project. A .3mf
offers the same mode chooser at either entry point: geometry adds to the current
project, full content opens separately, inspection saves nothing implicitly.
Ordinary new mesh geometry is centered on the current bed,
while existing objects keep their poses. Importing a batch is one undoable edit;
camera framing expands to include the imported models. Source files stay on the
server. The batch upload limit is 512 MiB and 64 files.
Projects record one physical machine, its owned profile and revision-pinned
process/material choices. The selector remembers the last profile actually
assigned to a project for each machine; it does not detect installed hardware.
Geometry-only imports use the explicitly selected destination configuration.
A full 3MF import retains supported file configuration and placement as project
overrides. Unbound alpha projects require re-import with an explicit assignment.
Independent API clients can inspect GET /api/v1/machines and pass machine
to POST /api/v1/projects/new; /workspace describes recent project context
without assigning a machine implicitly.
Unapplied profile choices are protected by the same discard guard as other drafts. Importing
geometry alone does not infer a printer or supply a usable machine G-code setup.
Orca and Prusa 3MF files use native readers under the chosen import policy,
including supported local configuration. Temporary inspection offers model and
painting views, searchable settings, object/transform details and an archive
inventory which distinguishes auxiliary data from rendered content. Explicit
actions can copy inspected machine/process/material settings into the library.
Closing removes temporary files; abandoned inspections expire after 24 hours.
STEP/STP models use Orca's native importer with the desktop default tessellation
settings; editing those import preferences is not yet available in the browser.
Click or tap a model to select its instance; the scene highlights the selection without fetching geometry again. Dragging the camera or a two-finger gesture does not change selection. The instance selector remains available for precise choice. “Dopasuj widok” frames all visible geometry (the bed for an empty project) and is also available in the slicing preview. Camera operations leave server data intact.
Local build
On the Linux homelab, prefix each build or native-backed test command below
with python3 web/scripts/run-bounded.py -- (run from the repository root).
The examples show tool arguments; they are not permission to bypass the guard.
Docker builds use a separately bounded builder as described in
deployment.
Build Orca's core dependencies using deps/CMakeLists.txt. Required targets for
the headless executable are dep_Cereal dep_libnoise dep_NLopt dep_OCCT dep_OpenCV dep_TBB dep_Eigen dep_Draco dep_Assimp dep_OpenVDB dep_CGAL.
Configure this superbuild with -DORCA_HEADLESS=ON -DSLIC3R_GUI=OFF -DSLIC3R_CAD=OFF for the web
worker; this avoids desktop-only dependencies and OpenGL discovery. GUI
dependencies remain enabled by default for desktop builds.
web/scripts/build-native.sh [--deps] runs these steps through the bounded runner
with the homelab job limits. It builds dependencies only with --deps or when
they are missing, uses ccache and the mold linker when installed, and skips the
bundled CPython's profile-guided optimization unless ORCA_PYTHON_PGO=1; release
images keep it.
Set CMAKE_BUILD_PARALLEL_LEVEL=1 when configuring the dependencies to control
nested builds. Use a fresh CMake build directory to avoid cached system versions
of CGAL, Boost, Eigen or TBB overriding the dependency prefix.
cmake -S . -B build/headless -G Ninja \
-DORCA_HEADLESS=ON -DSLIC3R_GUI=OFF -DSLIC3R_CAD=OFF \
-DSLIC3R_STATIC=ON -DSLIC3R_PCH=OFF -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$PWD/deps/build/OrcaSlicer_dep/usr/local"
cmake --build build/headless --target orca-headless --parallel 6
python3 -m venv web/.venv
web/.venv/bin/python -m pip install -e 'web/backend[test]'
web/.venv/bin/uvicorn orca_web.app:create_app --factory --host 127.0.0.1 --port 8000
In a second terminal:
npm --prefix web/frontend ci
npm --prefix web/frontend run build:renderer
npm --prefix web/frontend run dev
Open the Vite address. Requests under /api are proxied to the local backend.
The renderer build requires CMake, Ninja and an activated Emscripten SDK; the
Docker build pins SDK 6.0.11. EMCMAKE can point to an SDK's emcmake executable
instead of adding it to PATH. npm run build builds the native module and client;
generated JS/WASM in src/generated are ignored and bundled with hashed filenames.
build:web only bundles an already built module and is used by the Docker stage.
ORCA_WORKER, ORCA_RESOURCES and ORCA_DATA override server paths. Run one
application process: it owns the queue consumer and child worker lifecycle.
web/.venv/bin/python -m pytest web/backend/tests
python3 tests/cli/test_headless_worker.py build/headless/src/headless/orca-headless "$PWD"
npm --prefix web/frontend run build
Set ORCA_TEST_DESKTOP to a built desktop orca-slicer executable to also run
the native STEP project headless→desktop→headless compatibility test. It uses
an isolated data directory and existing reference profiles, compares geometry
and slicing settings, and checks that added desktop preset metadata survives.
Browser tests use the built native worker and start isolated local API/frontend
servers. Run from web/frontend:
Playwright clears only test-results/playwright by default. For an archived run,
use --output=test-results/<run> and keep its JSON report outside that output
directory. Standalone browser receipts in sibling directories then survive later
runs. Physical-machine scenarios use separate worker options at file scope to
restart single-process Chromium between scenarios, with one worker and the same
run data directory.
npx playwright install chromium
npm run typecheck:e2e
npx playwright test
ORCA_E2E_PREVIEW=1 npx playwright test --grep 'import, native profiles'
Select Firefox with ORCA_E2E_BROWSER=firefox after installing it with
npx playwright install firefox. This uses Firefox for both the desktop and
small-screen touch projects. Playwright does not provide isMobile emulation
for Firefox, so the latter tests touch input and a mobile viewport in desktop
Firefox, rather than running Android Firefox. Multi-touch camera injection uses
Chromium CDP; the Firefox touch project verifies tapping and mouse camera dragging.
Actual Android gestures and browser-specific behavior still need device checks.
ORCA_E2E_CHROMIUM_EXECUTABLE optionally selects an installed Chromium-family
binary, such as Helium, while retaining Playwright's separate temporary browser
profile. Point it at the browser binary rather than a launcher that reads the
user's flags or settings. This option cannot be combined with Firefox.
When an installed browser includes component uBlock Origin, the test fixture
waits for its filter initialization before opening the application in each new
context. It reads readiness from that temporary context's extension background;
filtering remains enabled. This avoids uBlock's startup reload of tabs with
requests made before the initial filter load completed.
To run the browser suite against a separate test deployment, set
ORCA_E2E_BASE_URL=http://127.0.0.1:18880. This disables the local test servers
and exercises that deployment's frontend and API together. The suite creates
projects, so use an isolated Compose project and data volume.
ORCA_TEST_RESOURCES selects an alternative native resource directory for native
worker, profile API and browser tests. This lets printer-specific test profiles
be exercised without modifying the bundled system profiles. Browser tests cover
desktop and touch/mobile layouts; traces and screenshots go to test-results/.
Docker Compose
The root Compose file uses prebuilt release images. See deployment for source builds and publication status.
docker compose up -d --wait
The frontend address is http://SERVER:8080. WEB_PORT, LAN_BIND and
the release image settings configure the published port, bind address and image selection.
The application defaults to one CPU, 3 GiB RAM, no swap, 128 processes/threads,
and one native worker process. ORCA_CPUS, ORCA_MEMORY_LIMIT, and
ORCA_NATIVE_CONCURRENCY override the corresponding limits. Stateful plugin
pages use a separate worker budget: ORCA_PLUGIN_SESSION_LIMIT (1–4, default 1).
Open pages therefore leave the ordinary slicing slot available; both budgets
share the same container RAM/CPU/process limits. The memory+swap
limit equals the RAM limit, so increasing RAM does not enable swap.
BUILD_JOBS defaults to one. Runtime container limits do not constrain Docker
image builds or the Docker daemon; builds need separate builder resource limits.
On the development homelab, do not build images without those limits.
The API is accessible through the frontend proxy; the app container has no
published port. Project data lives in ./data beside compose.yaml, mounted
at /data. Create it with ownership writable by UID/GID 1000:1000; it survives
container replacement. Building the native dependencies can take substantial
time on a cold build.
The app healthcheck probes /api/v1/liveness without starting a worker.
Authenticated /api/v1/health probes the native protocol and returns HTTP 503
for a missing, incompatible or non-runnable worker.
Stopping or restarting the app interrupts its active slicing job. It preserves
queued jobs for the next startup and leaves saved projects unchanged. Interrupted
work is not automatically retried; user cancellation has a separate status.
Back up the complete /data directory with the application stopped, including
SQLite state and referenced project/artifact files. A database-only backup does
not contain models. Restore the matching data backup when rolling back a version
with incompatible storage changes. Engine updates require rebuilding the image
and passing native compatibility tests.
Stop the application before creating a consistent data archive:
umask 077
docker compose stop
docker compose run --rm --no-deps -T --entrypoint tar app -C /data -czf - . > orca-data-backup.tar.gz
docker compose up -d --wait
Keep the archive together with the source revision and image versions used to
create it. Before updating, run the native compatibility and browser tests above,
then pull the matching release images and replace the containers with docker compose up -d --wait.
For recovery, use the matching application version in a separate directory
with its own Compose file, .env, and empty data directory writable by
UID/GID 1000:1000. With the services stopped, extract the full archive using
docker compose run --rm --no-deps -T --entrypoint tar app -C /data -xzf - < orca-data-backup.tar.gz,
then start with docker compose up -d --wait. A different Compose project name
alone does not isolate the host data directory.
Manual testing instance
Use a separate Compose project to keep manual projects and printer settings apart from automated validation. The preview overlay contains only the application and frontend; it does not include a Moonraker emulator. Build its local images:
# Build on a bounded builder using docs/deployment.md, then tag the validated pair:
docker tag gitea.labus.uk/karol/web-slicer-app:0.1.0 orca-web-preview-app
docker tag gitea.labus.uk/karol/web-slicer-web:0.1.0 orca-web-preview-web
export LAN_BIND=127.0.0.1 WEB_PORT=18881 ORCA_CPUS=1 ORCA_MEMORY_LIMIT=3g
docker compose -p orca-headless-preview -f compose.yaml -f web/deploy/compose.preview.yaml up -d --no-build --wait
Open http://127.0.0.1:18881 on the server. For other LAN devices, set LAN_BIND
to the server's LAN IP and rerun the same Compose command; use that IP in the
browser address. Local login and HTTPS-only cookies are required by default;
see docs/deployment.md for administrator setup and HTTP development. The named volume
orca-headless-preview_orca-data retains manual projects across container
replacement. Keep using the same project name and overlay when stopping,
restarting or backing up this instance.
ORCA_PREVIEW_RESOURCES optionally selects a complete resource directory mounted
read-only in the worker. The default is the repository's resources. The local
KX-Bridge test bundle is under
docs/superpowers/test-assets/kx-bridge/container-resources; set the variable to
its absolute path before starting to use those test presets. That bundle contains
documented metadata adaptations of the supplied profile, and leaves printing
parameters and machine G-code unchanged. It is an ignored local testing asset,
not part of the tracked application.
For initial manual checks, import a model, select printer/process/filament presets, change exposed parameters, inspect and edit the model, then slice and inspect the layers, paths and print statistics. Download the resulting G-code or save/download the project. In “Drukarka”, configure your Moonraker or KX-Bridge address; saving settings alone does not contact the printer. “Prześlij plik” uploads without starting. Starting is a separate explicit action, or can be requested with “Prześlij i uruchom wydruk”.
Remaining differences from the desktop are listed in desktop-parity.md. Delivery has been tested with emulators; physical KX-Bridge printing and normal desktop GUI exchange of the supplied KX profile still need verification. Mobile browser layouts are covered by automated tests, while actual Android Firefox and Windows Zen device checks remain pending.
Isolated Compose validation
Build test images from the same Dockerfiles used by the deployment:
# Use the same already built and validated image pair:
docker tag gitea.labus.uk/karol/web-slicer-app:0.1.0 orca-headless-validation-app
docker tag gitea.labus.uk/karol/web-slicer-web:0.1.0 orca-headless-validation-web
export LAN_BIND=127.0.0.1 WEB_PORT=18880
docker compose -p orca-headless-validation -f compose.yaml -f web/deploy/compose.test.yaml up -d --no-build --wait
web/.venv/bin/python web/deploy/verify_compose.py prepare
docker compose -p orca-headless-validation -f compose.yaml -f web/deploy/compose.test.yaml up -d --no-deps --no-build --force-recreate --wait app web
web/.venv/bin/python web/deploy/verify_compose.py verify
web/.venv/bin/python web/deploy/verify_compose.py interruption
Use a fresh test data volume for prepare. The Moonraker fixture runs only on
the internal test network, records uploaded artifact hashes and accepts simulated
start requests. It never controls printer hardware. The verifier checks native
OBJ/STEP import, profiles, saving, slicing, preview, exact upload bytes, explicit starts
and their idempotency after container replacement. It exports a .3mf alongside
its state file for desktop compatibility checks. Add --settings-normalization
to prepare to require the normalization capability and verify that native
corrections create one revision before slicing, stale requests preserve the
archive, and a second normalization preserves the corrected revision and bytes.
For another isolated deployment, pass --project, --url, --state and any
additional --compose-file overrides to each verifier invocation. The project
and override files must match the Compose commands used to start that deployment.
ORCA_TEST_RESOURCES can point
to a complete resource tree mounted read-only over the test image's resources;
that tree must contain real files rather than links to paths on the host.
The interruption check stops only the validation app during native slicing,
then restarts it and verifies that the active job is interrupted, its project
is unchanged and queued work completes. It also rechecks the saved artifacts
and simulated printer receipts. Run it before switching to the restore overlay.
Run the browser suite with ORCA_E2E_BASE_URL=http://127.0.0.1:18880 from
web/frontend to exercise the actual nginx proxy and containerized API.
The printer/send tests start HTTP emulators on the host. On a Linux Docker host,
set ORCA_E2E_BRIDGE_ADDRESS to the host's Docker bridge address (obtain it with
docker network inspect bridge --format '{{(index .IPAM.Config 0).Gateway}}').
The test servers bind only that interface, allowing the app container to reach
them. Local API tests use 127.0.0.1 by default.
After prepare and the replacement check, validate backup recovery with a fresh
orca-restored-data test volume. Keep the Moonraker fixture running so the same
receipt history detects any duplicate simulated start:
docker compose -p orca-headless-validation -f compose.yaml -f web/deploy/compose.test.yaml stop app web
docker compose -p orca-headless-validation -f compose.yaml -f web/deploy/compose.test.yaml run --rm --no-deps -T --entrypoint tar app -C /data -czf - . > orca-validation-backup.tar.gz
docker compose -p orca-headless-validation -f compose.yaml -f web/deploy/compose.test.yaml -f web/deploy/compose.restore.test.yaml run --rm --no-deps -T --entrypoint tar app -C /data -xzf - < orca-validation-backup.tar.gz
docker compose -p orca-headless-validation -f compose.yaml -f web/deploy/compose.test.yaml -f web/deploy/compose.restore.test.yaml up -d --no-deps --no-build --force-recreate --wait app web
web/.venv/bin/python web/deploy/verify_compose.py verify
The original test volume remains available. Run recovery checks before the browser tests, which create additional projects and change test printer settings.
The selection editor supports World/Object/Part reference axes, relative position and rotation, absolute stored Euler angles, percentage scales, physical dimensions and reset. Groups use World; a shared part is edited through its selected instance and changes all copies. Absolute position is the reference-aligned selection center; the earlier single-instance form displays the stored instance offset. The two values can differ for asymmetric geometry. In the dimensions/scale form, proportional mode uses the last edited axis.
Choose “Uchwyty 3D” to enable move arrows, rotation rings or scale handles. Snap intervals use mm/degrees/percent; zero disables snapping. Dragging previews locally and commits one server revision on release. Escape, touch cancellation, a second touch or capture loss cancels the gesture. Numeric fields remain available for precise entry. API clients use selection-state/selection-transform and may retain rejected operations in the independent-copy selection_transforms array.
“Baza resetu” selects the checkpoint/initial project, frozen selected preset, system parent or option-definition defaults. Each available field shows whether it differs and has a reset arrow. Indexed arrows change only that material/nozzle entry. A failed local input can be discarded with the same arrow; if the stored value already equals the base, this clears the draft/error without another revision. Concurrent checkpoint changes reject stale reset tokens and retain the requested value in the ordinary conflict-copy workflow.
Custom G-code fields expose “Placeholdery i edytor G-code”. The dialog stages an independent draft, searches native names/descriptions and shows scalar/vector types and context-specific availability. Insertion replaces the selected text or uses the remembered cursor; optional braces and an editable vector index support both complete expressions and names inside existing expressions. Native reserved tag checks use the project's printer context. They are warnings with an explicit save-anyway action, not complete syntax validation. Escape/cancel preserves the original field until the staged text is applied.
“Wygląd stołu” uploads PNG/SVG textures and STL bed models (up to 32 MiB).
Artwork is embedded in the project 3MF, retained in revisions/copies/backups,
and drawn in preparation and slicing preview. Clearing an override restores
available system artwork from the printer profile. Imported desktop file paths
that are not embedded remain unavailable until the corresponding file is uploaded.
The public /bed-assets API describes and serves artwork for a specified project
revision; independent clients need no access to the server filesystem.
“Sprawdzenie projektu” reports native preparation errors and warnings for the
active plate. A diagnostic can select its affected object/instance or open its
setting. Messages from slicing and G-code analysis stay with the immutable job
revision; reopening the page retains failed-job diagnostics too. Independent
clients can call POST /projects/{id}/validation with the same revision/plate
body as slicing. Diagnostics remain read-only; they do not create queue jobs.
“Aktualizacje profili” in the header
checks vendor versions, reviews changelogs and installs or postpones a validated
proposal. Required updates have a separate install action and cannot be postponed.
ORCA_PROFILE_UPDATE_URL overrides the desktop-compatible profile feed for a
mirror or controlled test service. Installation publishes a managed resource
snapshot in the data volume; existing projects keep their saved configuration.
The browser displays persistent pending proposals after reopening. Feed checks
can be manual or enabled automatically in the dialog (off by default). The
settings API also accepts a check interval. Status polling itself never contacts
the remote feed. Native validation rejects new missing artwork references and
invalid bundle versions/dependencies; transient download failures retry up to
three times.
Fork maintainers can use GET /api/v1/upstream-release to inspect the latest
published upstream release. Set ORCA_UPSTREAM_VERSION to the upstream base
version of the fork (for example v2.3.0); the fork's own version number is not
used for comparison. ORCA_UPSTREAM_REPOSITORY selects the GitHub repository
and defaults to OrcaSlicer/OrcaSlicer; set it to an empty value to disable
checks. Checks occur when this API is called, share a six-hour cache across
clients, and expose uncertainty or network failures as informational statuses.
?refresh=true refreshes with a one-minute cooldown. This API supplies release
information for manual fork maintenance. No browser controls consume it yet.
G-code post-processing on the server
Install scripts in the backend container or mount a trusted scripts directory
read-only. Map the exact entries used in the native post_process setting to
server argv vectors with ORCA_POST_PROCESSORS, for example:
{"strip-comments":{"argv":["/usr/bin/python3","/opt/orca/scripts/strip_comments.py"],"timeout":30}}
The setting entry in this example is strip-comments. A registration may also
use an existing desktop command as its key and map it to the appropriate server
program. The executable uses an absolute server path; arguments are passed
literally and the private G-code filename is appended. Empty configuration
means no programs are enabled. Registration is server configuration, not an
upload-and-execute endpoint.
Use POST /api/v1/projects/{id}/post-processing/plan with revision and plate
to review program availability, arguments and file hashes, then pass its token
as post_process_token to /slice. For /slice-all, supply a
post_process_tokens map for the selected plate indices. Changed files or
settings require a new plan. Scripts receive the normal SLIC3R_* settings,
SLIC3R_PP_HOST=File, and SLIC3R_PP_OUTPUT_NAME; an .output_name file may
rename the download. Preserve the G-code file in place. The API captures program
errors and bounded output, regenerates the native preview and transport archive,
and publishes only a complete result. Script installations and the environment
mapping are deployment configuration and must be provisioned separately when
restoring a backup on another server; job snapshots cannot enable a removed
server program.
Orca Cloud account API
The shared account is separate from saved printers. GET /api/v1/oauth/orca
reports configuration and GET .../methods discovers enabled sign-in methods.
Native service URLs and the public application key are defaults; override them
with ORCA_CLOUD_API_URL, ORCA_CLOUD_AUTH_URL, ORCA_CLOUD_URL and
ORCA_CLOUD_PUBLIC_KEY. Compose forwards these variables. An optional
ORCA_CLOUD_CA_FILE names a CA file inside the backend container; mount it when
needed. HTTP clients verify TLS and use bounded requests.
For browser PKCE login, set ORCA_CLOUD_REDIRECT_URI to the public API URL ending
in /api/v1/oauth/orca/callback. The authentication server must allow the
redirect_allow_pattern returned by configuration, including its state query.
POST to .../logins with id, account revision and enabled provider, then
navigate to its browser_url. This supports an independently hosted frontend.
Email/password login uses POST .../password; an existing client session can be
verified and installed through POST .../session. These paths also work without
a browser callback registration. The service returns account information while
storing tokens privately on the server. Full server backups include credentials.
GET .../account exposes account revision and expiration. POST .../logout
disconnects that revision locally. Optional revoke=true also sends the native
remote logout request; the response reports confirmed or unconfirmed revocation.
Neither sign-in nor sign-out modifies printer settings or project presets.
POST .../refresh takes the account revision and optional force (default
true). force=false refreshes within 15 minutes of expiry. A background check at
startup and every minute renews cached sessions, including after a restart.
Rotation does not change the account revision. Shared-workspace processes
serialize token rotation; logout or a new login fences any delayed result.
Transient failures retain credentials and retry once, then return HTTP 503.
A rejected refresh returns HTTP 401 and the account becomes
authentication_required; sign in again. No tokens are returned to the client.
Cloud downloads use /api/v1/cloud/orca/profile-sync. GET with account
revision returns its cursor and bindings. POST to .../reviews with
{"revision":1,"full":false} creates a native-validated preview. Neither the
library nor its cursor changes during preview. Read/cancel it using
.../reviews/{id}?revision=1.
POST to .../reviews/{id}/commit with revision, the returned library_token,
expected (all referenced local preset IDs and revisions), and choices:
[{"remote_id":"...","action":"download"}], one per proposed change.
keep_local retains that local copy and detaches its cloud binding. Add
acknowledge_substitutions:true when accepting native conversion warnings.
Library edits, account changes or another cursor commit require a new preview.
Downloads and the cursor are committed together; existing projects retain their
pinned settings. Completed receipts return the original saved versions on retry.
Publishing uses POST .../profile-sync/publications with a fresh id UUID,
account revision, profile:{"id":"...","revision":1} and optional
kind:"publish" (default) or kind:"delete". ancestor_name can select a
retained personal ancestor. Review its native content, then POST
.../publications/{id}/commit with revision and its token.
GET the publication or collection with ?revision=... to inspect its durable
status. Repeating a commit returns its receipt without another mutation.
An unsent intent can be cancelled at .../{id}/cancel using the same fields.
For conflict, create a fresh preview containing conflict_id and its
resolution_token; only its separate confirmation enables force publication.
Alternatively POST .../{id}/download with account revision and confirm the
returned download review. For uncertain, POST .../{id}/reconcile with
revision: it reads the desired state without retrying the write. read_back
confirms matching current data, while an original lost acknowledgement remains
explicit. HTTP details are available in outcome. Expired or changed source/
account reviews require a new intent; an existing UUID is never replayed.
Standalone browser receipts
Some focused browser harnesses under web/frontend/tests/ save historical
verification receipts under ignored docs/superpowers/gui-audit/. On a fresh
checkout create that output directory before invoking those harnesses. It is
local output, not a checked-in fixture. Standard Playwright tests use their
per-test test-results/ directories. Never point a harness at a live data volume.
The Moonraker panel smoke test runs official Mainsail or Fluidd assets through
the isolated relay, against a local HTTP/WebSocket peer. Unpack a release from
Mainsail or
Fluidd outside the repository,
then run from the repository root (append mobile for the phone viewport):
python3 web/scripts/run-bounded.py -- sh -c 'cd web/frontend && node tests/p3-moonraker-panel.browser.mjs /absolute/path/to/unpacked/panel'
It checks startup, live job updates, pinned HTTP and WebSocket routing, and connection cleanup with separate UI/API authorities. It uses disposable data, requires no native worker or printer, and does not redistribute the panel assets.
The physical-printer 3MF browser scenario uses a single driver so Chromium, the
API and native imports fit the homelab's task limit. It runs desktop and phone
viewports against one disposable data directory, with actual software WebGL,
and writes screenshots, traces and a receipt. Build the web client first, then
run from web/frontend/ with Node 22.23 or newer:
python3 ../scripts/run-bounded.py -- env \
ORCA_BROWSER_REPORT_DIR=test-results/three-mf-verification \
UV_THREADPOOL_SIZE=1 IGL_NUM_THREADS=1 LP_NUM_THREADS=1 \
node --single-threaded --single-threaded-gc --v8-pool-size=1 \
--experimental-strip-types e2e/verify-three-mf.mjs
The harness creates a temporary SwiftShader.ini limiting its renderer workers
and removes it on exit. An existing different configuration is preserved and
reported as an error. The fixture server uses port 18765 and starts with its own
data under the bounded runner's temporary directory.
Local accounts and static demo verification
A regular npm run build:web creates the application in dist/ and a public,
static demo in dist-demo/ from the same components. The demo uses three prepared
MIT models; local form changes do not alter their geometry/toolpaths. It never
connects to the application API. See the design and
deployment instructions.
Regenerate prepared examples only after changing their models or native output:
python3 web/scripts/run-bounded.py -- web/.venv/bin/python web/scripts/build-demo-data.py
The exporter creates disposable state and slices all three models; normal builds
reuse checked-in fixtures. From web/frontend/, the focused UI checks use:
python3 ../scripts/run-bounded.py -- env UV_THREADPOOL_SIZE=1 GOMAXPROCS=1 NODE_OPTIONS=--v8-pool-size=1 node node_modules/@playwright/test/cli.js test --config playwright.auth.config.ts
python3 ../scripts/run-bounded.py -- env UV_THREADPOOL_SIZE=1 GOMAXPROCS=1 NODE_OPTIONS=--v8-pool-size=1 node node_modules/@playwright/test/cli.js test --config playwright.demo.config.ts
python3 ../scripts/run-bounded.py -- env UV_THREADPOOL_SIZE=1 GOMAXPROCS=1 NODE_OPTIONS=--v8-pool-size=1 node --single-threaded --single-threaded-gc --v8-pool-size=1 e2e/verify-local-accounts.mjs
The last scenario uses the built application, real accounts, the native worker and disposable data. It checks the teacher's submitted model/toolpath/settings review after the student's live project changes. It does not contact a printer. The demo browser test serves only static files, checks actual WebGL drawing, permits local field edits and verifies that no API request leaves the browser.
Anycubic Kobra X over LAN
In the physical printer's Connection section, choose Anycubic Kobra X (LAN) and enter the printer IP. Enable LAN mode on its touchscreen. The backend must reach HTTP 18910 and MQTT/TLS 9883. Use Test connection before creating or saving the printer. New Kobra X templates suggest this type automatically; existing connections remain unchanged.
No separate KX-Bridge container or Anycubic account is required. If firmware needs a TLS client identity, expand Optional TLS client identity and supply your own PEM certificate and key. The pair is stored privately and is not included in public connection responses. No manufacturer certificates are distributed.
Before printing, refresh the physical slots and review the filament mapping in Print preparation. Upload-only never starts the printer; start, pause, resume and stop use the normal dispatch/status controls. A missing acknowledgement is reported as uncertain and is never retried automatically. Refresh status before making another decision. Read-only hardware checks passed on Kobra X firmware 1.2.0.2: connection, status, temperatures and four toolhead slots. Uploads, commands, physical printing and ACE hardware are not yet verified.
See protocol and limits and credits and licenses.
The Device tab loads a shared overview with current status, temperatures, physical filament slots and firmware. The native controls include heater targets, homing/jogging, fan, light, speed, material editing, loading/unloading and detected ACE dryers. Files can be listed, previewed and deleted; printing a stored file requires source-material metadata so its physical filament mapping can be reviewed. Files lacking that metadata can still be sent from their sliced project.
The camera starts only on request. Its original FLV stream is relayed privately and played through mpegts.js (magicxqq / xqq and contributors, Apache-2.0), whose original notices appear in the browser component credits. No video decoding, ffmpeg process or persistent media cache is added to the server. Stop or leave the panel to close the stream.
Opening a model from another application
Send a multipart file to POST /api/v1/imports/open-model using the normal
Web Slicer session and CSRF header. Accepted formats are 3MF, STL, STEP and
STP, up to 512 MiB. The response is the durable import job. Its Location
header opens the Web Slicer UI, which follows the job and opens the resulting
project. API clients can poll GET /api/v1/imports/{id}.
The endpoint opens a new project. It uses the user's remembered printer or
their only visible printer. Clients can provide machine_id and, optionally,
profile_id in the query string. STL dimensions are kept, STEP uses native
tessellation defaults, and 3MF is opened as geometry with the destination
printer's settings. Optional rescaling and texture painting are skipped.
For a public model URL, link to the Web Slicer base URL with the fragment
#open-model=<encoded-model-url>. Add &filename=<encoded-filename> if the
download URL does not end in a supported extension. The browser downloads
the file without credentials. Cross-origin downloads require CORS on the model
host. The API never fetches model URLs.
Applications with private files can open a tab with
#open-model-from=<encoded-sender-origin>&request=<32-hex-digit-request-id>.
After the user has signed in, Web Slicer sends its opener a message with
protocol: "web-slicer.open-model.v1", type: "ready", and request.
The opener checks the window and origin and replies with the same protocol
and request, type: "file", and a browser File in file. Web Slicer
replies with accepted after queuing the import, or failed if it cannot
queue it. Both sides address their messages to the exact target origin.
Keep the opener relationship for this flow.