forked from upstream-mirrors/OrcaSlicer
Compare commits
555 Commits
upstream-sync
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 727f1facd0 | |||
| f9d7f3976e | |||
| 2065d46e9e | |||
| 5def368984 | |||
| e256b71922 | |||
| fa3be04fab | |||
| 98c41a0543 | |||
| 519f4ae24a | |||
| 089b35e85f | |||
| 3ea5da5b77 | |||
| ef56275336 | |||
| b9692e0f28 | |||
| cb7a043f38 | |||
| e089e1c858 | |||
| bd67f27cbb | |||
| faf9525d08 | |||
| 51580cba0d | |||
| 6c828b8c4e | |||
| 2a15f3d003 | |||
| 9fbc75d730 | |||
| 40deb7c6b9 | |||
| c7e54cdd16 | |||
| 71791b78c6 | |||
| dc76dab3bc | |||
| 70cd8c7517 | |||
| 15b7d6a00a | |||
| 4390202507 | |||
| 79b7c35c21 | |||
| 4c807cea37 | |||
| 9ef67ca356 | |||
| 62383a088f | |||
| 48e502be3d | |||
| ec513f9952 | |||
| 6792068523 | |||
| bab411a2d0 | |||
| b52f566a7c | |||
| db11fb252b | |||
| 06b93e79a8 | |||
| ad9e764ab9 | |||
| 053393a716 | |||
| 9f22e9cfe2 | |||
| 725f48bbb6 | |||
| d9bfec20b9 | |||
| 2f160f57e7 | |||
| a853f17926 | |||
| a3dac88bc6 | |||
| 05a0ec5a65 | |||
| a3932789e6 | |||
| 337c2104c2 | |||
| 0578c92f34 | |||
| 7766782872 | |||
| 0b9aced879 | |||
| 600d7ad612 | |||
| 6364b8e382 | |||
| 1711389cff | |||
| 8860ed9523 | |||
| e6ee465c41 | |||
| 2d9905ea0e | |||
| 937614d392 | |||
| 970cb98bc7 | |||
| 54c58247a1 | |||
| b1b9380b66 | |||
| ca699c5137 | |||
| 5fb182d916 | |||
| 40ef729302 | |||
| 37a7caa3e9 | |||
| f33868f415 | |||
| 3e3c222148 | |||
| 5cbcb74559 | |||
| b9fd3c81c6 | |||
| 1e0ba34506 | |||
| cc198184d7 | |||
| 7ea37bba17 | |||
| f574343a31 | |||
| ddb7612e92 | |||
| 55bb1a3ec6 | |||
| 75ef0abea9 | |||
| 5598375bed | |||
| 429fd9b134 | |||
| ae547dbd7a | |||
| 952b815148 | |||
| 1de201d5ef | |||
| 47a9d3c170 | |||
| 19611b7c74 | |||
| 1b05049550 | |||
| 16c0fd4fa9 | |||
| 8ffb0b8d55 | |||
| 519c423ae8 | |||
| 1a58ccaebc | |||
| b7969d2829 | |||
| f0e78ae4a2 | |||
| 52fec6d7aa | |||
| 6a1916eb9b | |||
| 593a767aa5 | |||
| 5355ec7eb4 | |||
| a3d5eddb05 | |||
| bec7d2a436 | |||
| 0b1a15207a | |||
| e40b2835c9 | |||
| c79f7a45bc | |||
| 8eea8a2b4b | |||
| 83be263660 | |||
| ecdb04e477 | |||
| e71c37e194 | |||
| 89b6556e1a | |||
| 9b5af05956 | |||
| e131a96fad | |||
| 3156364fbf | |||
| ecdafe0c54 | |||
| b63795ae9c | |||
| eff9954a2b | |||
| b3aeca388c | |||
| 34abc82e8f | |||
| 4dde3772d8 | |||
| 76b32f3499 | |||
| 78ea1dafa4 | |||
| 3045177729 | |||
| 402daee475 | |||
| 333c74f6c2 | |||
| 82d4d9d444 | |||
| 19a39e0de4 | |||
| 913f3bab44 | |||
| d416334258 | |||
| 5f1b3b1e44 | |||
| 4bcc22c782 | |||
| e04a46b35f | |||
| db175f28dd | |||
| ad7c25e465 | |||
| 7cbcadc94d | |||
| 7da1d45b1e | |||
| 7c6274c8b0 | |||
| ab24d0cc46 | |||
| e4b6b4bf26 | |||
| 063f561a4b | |||
| 4021330350 | |||
| 7e6ac09481 | |||
| 0925b81bc1 | |||
| 10d53371db | |||
| 355cdccc3b | |||
| 590a5fad45 | |||
| 45c622a96c | |||
| 1998cffa95 | |||
| 35aeefc5cd | |||
| 12827df9c7 | |||
| 670474dd91 | |||
| 7c5b776f1a | |||
| d89a3740d7 | |||
| 063c64ac21 | |||
| ebdb0d679d | |||
| 0ba3662b53 | |||
| e5d3ae22a7 | |||
| 07b27f6696 | |||
| 64489ac814 | |||
| f959c091e5 | |||
| 7d14a04449 | |||
| 63bb8d2301 | |||
| 1f13933e7d | |||
| bc1a71b126 | |||
| 64c5abf365 | |||
| 5d0a3f388a | |||
| 5b657cffa1 | |||
| ade9d83eee | |||
| 5bb979e0e5 | |||
| 21e7781299 | |||
| cf598b71a3 | |||
| 0f12bbcc9c | |||
| a55545e0a4 | |||
| 89fa84c6a8 | |||
| 5ebddcdd11 | |||
| 0e31e126c1 | |||
| 8968d2712b | |||
| 06f771e507 | |||
| d7a6efa88a | |||
| 271c8c1044 | |||
| 6129d3bed1 | |||
| 2e4cc2817e | |||
| ba1fdfc72e | |||
| 54d00aa0b8 | |||
| 60ca264f11 | |||
| 0aebd2b0e8 | |||
| d5ede7c7f6 | |||
| 6cf2429d5c | |||
| 9f0521437d | |||
| 733616d4b3 | |||
| bd5c905bb0 | |||
| 74c7dea7ed | |||
| 73fd903c41 | |||
| bd9f5261ab | |||
| a0663e6eb5 | |||
| 7cdc829ab3 | |||
| 7fbacdfe7a | |||
| fe6c70d736 | |||
| f829169077 | |||
| 2b15a60dce | |||
| 48446d151d | |||
| ad24fe6f06 | |||
| b54844ed3c | |||
| 125ee6a275 | |||
| de9bf38b71 | |||
| d030ead647 | |||
| 9e6243bbbe | |||
| ec200ceabf | |||
| 5c30e3ee97 | |||
| d528c0ea9a | |||
| 61e3b9c5eb | |||
| d42123d2f1 | |||
| 04603d6ccd | |||
| 055edc0982 | |||
| 755459931e | |||
| c0dac580a1 | |||
| bb22a2416f | |||
| bf9bc48e53 | |||
| 221269a146 | |||
| 48f5d1edcb | |||
| 7ae3d228b3 | |||
| 4723f694ca | |||
| d93901f2ab | |||
| b92cc124c8 | |||
| fb8c93a90b | |||
| b3dcf0ac7d | |||
| be0188dfad | |||
| 6609ca0503 | |||
| 808dd7dff8 | |||
| 188d11c5e9 | |||
| 8a339fc100 | |||
| 188782518d | |||
| 01adacf334 | |||
| 529752ad0c | |||
| 3fd9c26805 | |||
| d74b2e4f10 | |||
| b2ffb7f10e | |||
| f047c606d9 | |||
| c82388cec4 | |||
| f9896430c3 | |||
| e552ff65b1 | |||
| bcda8ef4fa | |||
| 193b80a613 | |||
| 9d585c6c2d | |||
| 9b57301b9e | |||
| 5c559bf378 | |||
| 71a1f4f6f2 | |||
| e4538b5262 | |||
| ce7f703e68 | |||
| 4e020aaf23 | |||
| 966f5613a3 | |||
| 7c5db9e7c1 | |||
| d43eb75ba8 | |||
| 58fc8a7c1f | |||
| e56fd1ed44 | |||
| 3f90d6ccf6 | |||
| 9c18af5435 | |||
| cd9218c1d6 | |||
| 38f12b1357 | |||
| 79d5833e28 | |||
| 39baf6d917 | |||
| 538e67b033 | |||
| 18eb4f8459 | |||
| 6a601166e4 | |||
| 7cfbda4c62 | |||
| b4408536f1 | |||
| 3d4782e7d6 | |||
| 5eefef82fc | |||
| 755af907c6 | |||
| eae8929b41 | |||
| 6b79a61ff3 | |||
| 7694a2e1f0 | |||
| 5c671c7995 | |||
| bfca086490 | |||
| 0c2f19d4e1 | |||
| bf86aeae79 | |||
| 821b602c4d | |||
| d0c70bef7b | |||
| 30d283fe75 | |||
| 074be951e5 | |||
| bff0641b28 | |||
| 2b52191901 | |||
| 91d9cf01d0 | |||
| a816435087 | |||
| 8474bc9e2d | |||
| 888ee0dff3 | |||
| a0db07311b | |||
| f66ed2d6e4 | |||
| 0518ffeb09 | |||
| 6d7d598a9d | |||
| efc29fdb80 | |||
| e33657fa45 | |||
| 82d1f6adfa | |||
| aefb6b3d66 | |||
| 10f9054f06 | |||
| 08bd6b56f1 | |||
| fcbfbaaf91 | |||
| df459143cc | |||
| fc9fcdd0d4 | |||
| a31c95e273 | |||
| 1281de4cdc | |||
| 5c561b17df | |||
| a63458c94e | |||
| ec6e124658 | |||
| 6d563f72c2 | |||
| f611c3b488 | |||
| 27cbe5a04b | |||
| e6250eca57 | |||
| 6122352058 | |||
| 3283fa0016 | |||
| d3f57df99f | |||
| f9c0411c0c | |||
| bca0a9857f | |||
| 8bb0196353 | |||
| 122f106aee | |||
| a629d3590f | |||
| f399cdd79f | |||
| 37e136acac | |||
| b1500e4aae | |||
| 5026ada896 | |||
| 918fc04533 | |||
| 7f8af3beeb | |||
| 3c6752abf9 | |||
| ee42f3922c | |||
| 2e46806600 | |||
| b85dbded55 | |||
| 56d7f9e815 | |||
| d51fb9f4ed | |||
| 7db95f5c1e | |||
| 15bb082ce2 | |||
| fdf335472c | |||
| 3ba8743720 | |||
| b92d6b51ae | |||
| 7e4b791589 | |||
| e7bcdbe01e | |||
| 867ba9b005 | |||
| b30dfcd51b | |||
| 97809fe274 | |||
| b4ffa1ecfd | |||
| af80804f24 | |||
| 3f314bad3f | |||
| b595b8b02f | |||
| 070f377eb2 | |||
| fa029465a3 | |||
| 26ad77def2 | |||
| 0b9c6b5d09 | |||
| 9d7778ec86 | |||
| 8c1ada5aab | |||
| 190d6848b0 | |||
| 6afa573668 | |||
| ddfce90df4 | |||
| f6b6b5793d | |||
| f779174c7b | |||
| f12b73014f | |||
| 58b1236f60 | |||
| 28203ae06d | |||
| f81887ca13 | |||
| d57a06f3f4 | |||
| e0f528a431 | |||
| cff75e0ac3 | |||
| fd6f2934eb | |||
| 04b533f493 | |||
| cbf5226d13 | |||
| 0584100037 | |||
| 23a104bc85 | |||
| 4f6821f059 | |||
| d25593e29b | |||
| 5fa42c1294 | |||
| e3f3f019a2 | |||
| 6cd2ce1a2e | |||
| f80433cff0 | |||
| 5a351f9cb1 | |||
| 1d63e52dec | |||
| bbda030f4d | |||
| ba02e96c27 | |||
| d64e10f4dd | |||
| 74c98e197c | |||
| 152168ee8a | |||
| 81b93dd687 | |||
| 0604f25fd9 | |||
| ef23583a9a | |||
| 03bda45dcf | |||
| 053d409abb | |||
| 8cccdf82d0 | |||
| 38eadbe007 | |||
| d2ab05eebf | |||
| ae6aba41f3 | |||
| 5698fe1f7e | |||
| 241240f844 | |||
| bf85189501 | |||
| 72f9c4b28c | |||
| dc96ff4ee5 | |||
| ab5f665e0a | |||
| ccfd16c51e | |||
| 4eb5952232 | |||
| 54c5c8d2a7 | |||
| 3a1be8ff96 | |||
| e40a8a7ed5 | |||
| 528d1d78f8 | |||
| fece418ae0 | |||
| b4be9d8374 | |||
| 72dc14c9d6 | |||
| 69cd4ff3cd | |||
| c143a06dcf | |||
| 822775179b | |||
| 924a9dad9c | |||
| 1ef24b7d34 | |||
| 0616068e26 | |||
| a9c73c76b2 | |||
| 636367d143 | |||
| 869d8a9b96 | |||
| f5368b0483 | |||
| e7f7c4d1e9 | |||
| 8bb18e84bf | |||
| 5e426b2cb7 | |||
| ef301e132d | |||
| 693b018dd3 | |||
| a24bac6737 | |||
| 69349c3f55 | |||
| 042d6bc455 | |||
| eb3ab975cf | |||
| 58ff1f5244 | |||
| 6e9bdca2da | |||
| 0935d49c83 | |||
| 5d17d49ab7 | |||
| d8d436a589 | |||
| 3f73a72998 | |||
| af5ced0496 | |||
| 0aaf097a0c | |||
| 70b11c5174 | |||
| c15fc319d4 | |||
| 88a366dfb2 | |||
| 4dd989a9e3 | |||
| 3460d52058 | |||
| c2169c81d6 | |||
| 699f518227 | |||
| fe98638cff | |||
| a3239db64f | |||
| d5f6f33957 | |||
| 5a5e7b50b5 | |||
| 9bda81acf4 | |||
| 90bb0e6192 | |||
| 5bfebec540 | |||
| 97999d5123 | |||
| e96da420c2 | |||
| 017963d5a5 | |||
| 3b245fbc7b | |||
| cbb2c7ad40 | |||
| 45188c9956 | |||
| 7a5f2a3cab | |||
| 7a01a8bfea | |||
| 0ed0aa7e35 | |||
| 1236c0793a | |||
| f2eddb7b48 | |||
| 5b2fee9b10 | |||
| 9c1d0e20ec | |||
| 0b9c47be29 | |||
| 348c801203 | |||
| 70ca70ceb3 | |||
| 70842d3165 | |||
| 643319c40b | |||
| 025a17a875 | |||
| d56a80515f | |||
| fe12c41057 | |||
| cd76a0ffdd | |||
| ae5ccfbaa0 | |||
| 4e11be7f3f | |||
| 65d5867d61 | |||
| 3a0dc1785d | |||
| 15ee17cf92 | |||
| e5dcdd1247 | |||
| dc7f494d2b | |||
| 7fef3a331d | |||
| 6663dcbfb3 | |||
| 0548b7ea5e | |||
| be94a6a0da | |||
| 09aa257c76 | |||
| a52e232385 | |||
| eedd56991c | |||
| 8b5bbcb7e8 | |||
| 56b03d7bdf | |||
| 17a745e30c | |||
| af8feda3b9 | |||
| 75d117f669 | |||
| 5e5571a99f | |||
| 3050fbc6a6 | |||
| 11ec4d8970 | |||
| 8f61a3a34e | |||
| e4ee75e749 | |||
| ec0f3d864f | |||
| f776208c94 | |||
| ee0314dee2 | |||
| cc05d87607 | |||
| 99018203de | |||
| f31843dcd1 | |||
| 39705d7bb9 | |||
| 55bc33dad3 | |||
| d6447efdb4 | |||
| 7136e78c5b | |||
| b9127cb454 | |||
| b90392d393 | |||
| a07f29cf4f | |||
| 9f164e2a7b | |||
| e4889b6acb | |||
| b3d3374f8b | |||
| d6e2cd0a46 | |||
| 457ed1aacb | |||
| fb07e32a9f | |||
| 16df8452f6 | |||
| 7bafc3928c | |||
| 58fee96e30 | |||
| a4dffc92de | |||
| 385471a32f | |||
| 4439b743a8 | |||
| 48deb31a50 | |||
| 15277639a0 | |||
| 6c1518aa61 | |||
| c56d9968a1 | |||
| 1761c4b0e6 | |||
| c9db694c32 | |||
| 2496ee0908 | |||
| bd26585ec1 | |||
| 80e2128c1b | |||
| 86a88267a8 | |||
| a63410029a | |||
| db75a6dc37 | |||
| 0fc5b70cf4 | |||
| fe6259ca08 | |||
| 5c05a8e662 | |||
| 8cf1075d89 | |||
| f5254f90aa | |||
| 7791044458 | |||
| 854430d747 | |||
| f4f997b8e0 | |||
| 809cbc9801 | |||
| b1af9a68eb | |||
| 964fa5e741 | |||
| c7b9cd6741 | |||
| d8e41ea138 | |||
| fb918fa900 | |||
| 603d38b9c9 | |||
| 1f06eda308 | |||
| 23f04a5bc4 | |||
| 71e4d23e88 | |||
| c8c37986ac | |||
| 91f4bd2bcc | |||
| 6ffe80a6a8 | |||
| e74be335ba | |||
| 1b13b1aaf3 | |||
| 84b1a28446 | |||
| 367030a20e | |||
| 47747478d5 | |||
| 39d921d921 | |||
| 0fed1f6077 | |||
| c47e1843d9 | |||
| 30e4af9e68 | |||
| f30a969b60 | |||
| 22e5d79410 | |||
| 47a90ff25e | |||
| dc522e59e4 | |||
| 16c4ef8675 |
+8
-2
@@ -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.
|
||||
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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()
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
@@ -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 ||
|
||||
|
||||
@@ -73,3 +73,7 @@ web/frontend/dist-demo/
|
||||
|
||||
# Persistent application data beside compose.yaml.
|
||||
/data/
|
||||
|
||||
# Upstream scratch/planning dirs.
|
||||
.superpowers/
|
||||
docs/sf-plan/
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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__':
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
Vendored
+3
@@ -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
|
||||
|
||||
Vendored
+1
-1
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
node_modules/
|
||||
dist/
|
||||
@@ -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.
|
||||
@@ -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>
|
||||
@@ -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());
|
||||
Generated
+728
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
});
|
||||
@@ -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}
|
||||
@@ -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
@@ -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`.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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).
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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 "Размещение шва может отличаться от ожидаемого."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
+39
@@ -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"
|
||||
]
|
||||
}
|
||||
+141
@@ -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
Reference in New Issue
Block a user