Import 191 brand-specific filament presets for the K2 family of
printers (K2, K2 Plus, K2 Pro), lifted from
CrealityOfficial/CrealityPrint v7.1.1 under AGPL-3.0 (compatible
with OrcaSlicer AGPL-3.0).
Brand coverage:
CR-series: CR-PLA, CR-PLA Matte, CR-PLA Fluo, CR-Silk,
CR-TPU, CR-ABS, CR-Nylon
Hyper-series: Hyper PLA, Hyper PLA-CF, Hyper ABS, Hyper PA-CF,
Hyper PA6-CF, Hyper PAHT-CF, Hyper PA612-CF,
Hyper PC, Hyper Marble, Hyper Stardust,
Hyper L-W PLA, Hyper PPA-CF
Third-party: eSUN PLA+ / PLA-HS / PLA-Matte / PLA-Silk /
PLA-CF / PLA-LW / PLA-Lite, PolySonic PLA /
PLA Pro, Panchroma PLA Matte / Satin, Soleyin
Ultra PLA, HP Ultra PLA, HP-ASA, HP-TPU
Ender PLA variants and CrealityPrint per-K2 Generic versions of
PLA, ABS, ASA, PA, PA-CF, PAHT-CF, PET, etc.
This closes the matching gap exposed by the CFS filament-sync
work. When the K2 reports spool brand Hyper PLA or CR-PLA, the
existing Creality vendor only had a generic Creality Generic PLA
@K2-all preset to fall back to, so per-brand temps / PA / cooling
tuning was lost on every sync.
Schema and naming are drop-in compatible -- CrealityPrint
references the K2/K2 Plus/K2 Pro machine names already present in
OrcaSlicer Creality vendor (Creality K2 0.4 nozzle, etc), so no
machine-side changes or compatible_printers rewrites are required.
K2 SE filaments and the PETG/PP/PPS/HIPS family are deferred. K2
SE machine profile is not yet in OrcaSlicer Creality vendor, and
the PETG/PP/PPS/HIPS family relies on fdm_filament_* base
templates that do not exist in Orca Creality vendor -- importing
those bases from CrealityPrint did not make them register as valid
parents at preset-load time. Coverage for the missing families
will land in a follow-up once the loader requirements for new
bases are understood.
Vendor version bumped to 02.03.02.75 to trigger the per-user
profile refresh on next launch. Source attribution captured in
resources/profiles/Creality/NOTICE.md.
The agent fetch_filament_info() path does not fire for Creality
K-series hosts because Sidebar::build_filament_ams_list()
short-circuits when no MachineObject is bound. MachineObject is a
BBL cloud-connected-printer concept that does not apply to LAN
Moonraker-style hosts like the K2 -- the AMS-sync icon click was a
no-op for them.
Mirror what Creality Print own slicer does (explicit Auto Mapping
button bypassing the BBL plumbing): when the user clicks the
existing AMS-sync icon and host_type=crealityprint, dispatch to a
new Sidebar::sync_filaments_from_creality_cfs() that reads the
active printer host config, confirms the printer is a CFS-capable
K-series board, queries boxsInfo over the printer WS on port 9999,
scores each loaded slot against the user filament presets and
builds a filament_ams_list entry with the matched filament_id,
colour and slot indices, then routes through
PresetBundle::sync_ams_list so the filament combo widgets get the
same rebuild as BBL printers and runs the BBL post-sync refresh
sequence (on_filament_count_change + combo update + select_preset
+ export_selections + update_dynamic_filament_list).
No new UI surface -- the existing AMS-sync icon does the right
thing per host_type. Match-and-resolve logic is hoisted out of the
agent anonymous namespace into public statics so the sidebar can
call it without duplicating scoring rules.
K-series printers (K2, K2 Plus, K2 Pro) ship with Mainsail on port
4408. Port 80 hosts only the Creality control/upload API, which
returns 404 for unknown paths and renders as a blank/404 page in
Orca Device tab.
Override CrealityPrint::get_print_host_webui() to default to
http://<host>:4408/ when the user has not explicitly set
print_host_webui, giving K-series owners a complete printer
dashboard in the Device tab out of the box.
Score visible compatible filament presets against the CFS spool
(vendor, brand_name, type) tuple to pick the right preset:
+20 preset name contains the brand_name as a substring
(eg Hyper PLA in Hyper PLA @Creality K2 0.4 nozzle)
+10 preset name contains the vendor substring (eg Creality)
Requires preset.filament_type to equal the spool base type so a
PETG preset is never auto-picked for a PLA spool. Falls back to
filaments.filament_id_by_type(base_type) when nothing scores.
Considers both base/system presets and user-derived copies -- K2
owners frequently keep tweaked copies of system presets (per-spool
PA, temps), so filtering to bases-only would skip exactly the
presets users care about most.
Subclass of MoonrakerPrinterAgent for K-series Creality printers
(K2, K2 Plus, K2 Pro) with CFS support. Registers in
NetworkAgentFactory under host_type=crealityprint. Overrides
fetch_filament_info() to defer to base when the host is not a
CFS-capable K-series board, otherwise query the boxsInfo WebSocket
on port 9999, parse the box hierarchy into CFSSlot[], and publish
each loaded slot as an AmsTrayData entry via build_ams_payload()
so they surface in Orca filament UI.
boxsInfo schema reference (verified against K2 Combo F021 firmware
v1.1.260206):
materialBoxs[].materials[] fields: id, state, vendor, type, name,
color, pressure, rfid, percent. state=1 means loaded; box.type=0
is a CFS unit, type=1 is the external spool holder (handled by
the upload dialog).
Accepted CFS boxes are renumbered sequentially since the K2 raw
box.id has gaps for the external spool holder. Model detection is
delegated to CrealityPrint::supports_multi_color_print() added in
PR #13291.
When the spool holder is selected for printing, use the opGcodeFile
command with enableSelfTest instead of colorMatch + multiColorPrint.
This matches the protocol used by CrealityPrint desktop for spool
holder prints.
- Detect spool holder mode: any colorMatch entry with box_id 0
- Spool holder: send opGcodeFile + enableSelfTest (single command)
- CFS: send colorMatch + multiColorPrint (existing behavior)
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Show the spool holder (external filament roll) as a selectable option
in the K2 Plus filament mapping dialog. Previously only CFS slots were
shown because the box state filter excluded the spool holder.
- Only skip inactive CFS boxes (type 0, state != 1); spool holder
(type 1) is always available
- Label spool holder slots as "Ext - {type}" in the dropdown
- Auto-match priority is now:
1. CFS exact (type + color)
2. CFS type-only
3. Ext exact (type + color)
4. Ext type-only
5. Positional default
- When Ext is selected (by user or auto-match), disable other combos
since firmware does not support mixing CFS and spool holder
Signed-off-by: Igor Mammedov <niallain@gmail.com>
When the filament mapping dialog opens, automatically select the best
matching CFS slot for each gcode filament by comparing color and type.
Falls back to positional index if no exact match is found.
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Query CFS material slots and show colored dropdowns to map gcode
filaments to physical printer slots. Color mapping is passed through
extended_info as colorMatch entries for the multi-color print protocol.
Signed-off-by: Igor Mammedov <niallain@gmail.com>
---
v4:
- Use gcode tool index (T1A, T1B, ...) as colorMatch id instead of
CFS slot tool_id — firmware expects the gcode filament identifier,
not the destination slot
Add enableSelfTest checkbox to CrealityPrintHostSendDialog that
persists across sessions via AppConfig. The checkbox state is
passed to the upload via extendedInfo().
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Add model_name() to map firmware model codes (F008, F012, F021)
to human-readable names (K2 Plus, K2 Pro, K2). Update the send
dialog init() to detect multi-color support and show a group box
with the printer name.
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Add CrealityPrintHostSendDialog scaffolding: an empty dialog class
that inherits from PrintHostSendDialog, and Plater wiring to use
it when the host type is CrealityPrint.
Signed-off-by: Igor Mammedov <niallain@gmail.com>
For supported models, start_print() sends colorMatch (filament-to-slot
mapping) followed by multiColorPrint (with optional calibration via
enableSelfTest) instead of the legacy opGcodeFile command. The dialog
passes color mapping and calibration settings through extended_info.
Signed-off-by: Igor Mammedov <niallain@gmail.com>
---
v4:
- Skip "path" form field in multipart upload for multi-color printers
(extra field breaks K2 Plus firmware parser)
- Use fire-and-forget ws.write() for colorMatch and multiColorPrint
instead of ws_send_and_read() (printer sends response asynchronously)
Add query_boxes_info() to discover loaded materials in the CFS
(Creality Filament System) via websocket. Returns the boxsInfo
JSON with slot details (type, color, vendor, temperature range).
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Add a reusable websocket helper that sends a JSON command and loops
reads until finding a response containing the expected key. This
handles the printer's unsolicited status messages that arrive on
connect before the actual response. Returns empty string on timeout
instead of throwing.
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Consolidate websocket connection setup into a reusable helper.
Migrate from tcp::socket to beast::tcp_stream for timeout support.
Set SO_RCVTIMEO read timeout (3s) and connect timeout (5s).
Refactor query_boxes_info() and start_print() to use ws_connect().
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Parse the model field from the /info JSON response to enable
model-specific features. Add supports_multi_color_print() which
returns true for K2-platform printers (K2 Plus, K2 Pro, K2).
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Change start_print() from void to bool with a wxString& msg
out-parameter, matching the error handling pattern used by Duet,
MKS, ESP3D and Flashforge. On failure, the error message is now
reported to the user via error_fn instead of being silently
swallowed. Use BOOST_LOG_TRIVIAL for logging instead of std::cerr.
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Move duplicate get_host_from_url() implementations from ElegooLink and
OctoPrint into Http as a static method using the curl_url API. This
eliminates code duplication and provides a single reliable URL host
extraction utility for all print host implementations.
Signed-off-by: Igor Mammedov <niallain@gmail.com>
get_host_from_url() returns host:port which may cause
boost::asio::ip::make_address() to fail when a port is present,
bypassing the direct IP upload path and falling through to DNS
resolution via upload_inner_with_host(). Use get_host_from_url_no_port()
to extract just the host.
Signed-off-by: Igor Mammedov <niallain@gmail.com>
* unify footer
adds "Done" Buttons,
standardize "Reset" Buttons,
adds disabled logic to "Reset" Buttons
* adds ImGuiWrapper::COL_WARNING = ColorRGB:Warning,
replaces ColorRGB::Warning
* consistently display warnings,
moves assermbly warning after footer,
make cut warnings warning color
* adds separator above cut warnings
* adds tooltip entry in move, rotate & scale for auto-drop
* use wrapper tooltip in wrapper->button for consistent text color
* restructures brim ears button,
renames "Reset" button in painting tools to "Erase All",
small styling fixes
* small adjustments,
moves "Edge detection" checkbox in painting tool underneath,
moves "Section View" in Brim ears tool after buttons,
moves warnings in Assemble tool under footer
* small brim ear tool structure changes,
adds separator between "Head Diameter" and "Max angle",
adds tooltip to "Auto-generate" button,
rewords shortcut descriptions to match other tools
---------
Co-authored-by: Hanno Witzleb <hannowitzleb@gmail.com>
* adds UI and preview plane for multiple dovetail cuts
* adds multiple dovetail cuts to perform_with_groove()
* adds ui text info for spacing, adjusts max_val for gap to respect plate dimensions
* adds spacing before multpile UI
* adjusts wording, adjust gap max by count
---------
Co-authored-by: Hanno Witzleb <hannowitzleb@gmail.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
* Add logic to handle the left, middle and right buttons being assigned to do nothing, pan or rotate
* Add entries for setting the drag actions to preferences
* Allow the label text in preferences to wrap
* Show mouse mappings in Help -> Keyboard Shortcuts
* Re-add preferences in updated layout
* Add camera mouse options under camera
* Change mouse action strings to use L() for localization
* Display "None" when it is selected instead of blank in keyboard shortcuts
---------
Co-authored-by: Rob O <robertolabode@gmail.com>
Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
load_selections() and update_selections() size the parallel project_config
arrays (filament_colour, filament_colour_type, filament_map) off
filament_presets.size(). When the saved list is shorter than the printer's
nozzle count — never-used printer, hand-trimmed conf, or fewer filament_NN
entries than nozzles — the loaded colors get truncated and the sidebar
starts up one combo short.
## Summary
- skip CLI thumbnail generation when an OpenGL/GLFW context cannot be
created, allowing export workflows to continue in headless/automation
environments
- guard filament variant remapping against missing config options and
out-of-range variant indexes
- log warnings instead of dereferencing invalid config state during
CLI/profile-driven export
## Context
These guards came out of automating OrcaSlicer CLI exports for printer
workflows. In that flow, slicing/export can still be valid even when
thumbnail rendering is unavailable, but the current path can proceed
into OpenGL thumbnail setup after context creation fails. Separately,
malformed or mismatched filament/profile state can index past option
vectors during multi-filament value remapping.
## Test plan
- `git diff --check`
- `cmake --build build/arm64 --config RelWithDebInfo --target OrcaSlicer
-- -j4`
# Description
Fixes a macOS object-list filament editor crash/glitch where the
filament column could enter Cocoa native text editing and expose
`wxCustomRendererObject: 0x...` or crash while committing an invalid
`DataViewBitmapText` value.
The visible `wxCustomRendererObject` glitch was observed on macOS
through Cocoa `wxDataViewCtrl` editing. The underlying unsafe
assignment/variant/editor assumptions are not inherently macOS-only, so
the defensive data-path fixes are cross-platform.
Changes:
- Adds an explicit `DataViewBitmapText` assignment operator that avoids
copying the `wxObject` base, matching the existing copy constructor.
- Rejects unexpected variant types before reading object-list
name/filament values as `DataViewBitmapText`.
- Hardens filament editor value extraction against unexpected editor
controls.
- On macOS, routes filament-column editing through the custom
bitmap-choice renderer instead of `wxDataViewCtrl::EditItem()`, avoiding
native text editing of `wxCustomRendererObject`.
Fixes https://github.com/OrcaSlicer/OrcaSlicer/issues/13682
Previous PR with conversation:
[#13684](https://github.com/OrcaSlicer/OrcaSlicer/pull/13684)
This should fix the crash observed by @Noisyfox as we're addressing the
underlying problem of presenting the `wxCustomRendererObject`.
## Tests
Validated on macOS arm64. Repeated double-click/edit attempts on an
unselected object's filament cell no longer show
`wxCustomRendererObject` and no crash reproduced.
<!--
> A guide for users on how to download the artifacts from this PR.
-->
[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
This can be enabled in Preference->Developer->Keep painted feature after
mesh change.
<img width="731" height="633" alt="init"
src="https://github.com/user-attachments/assets/8b195486-538e-4eda-9e77-bfdf1a794306"
/>
TODO:
- [ ] Bug fixes
- [ ] Make it faster
- Keep painting after other mesh operations such as reload from
disk/simplify/boolean operation etc:
- [x] Planar cut
- [x] Dovetail cut
- [x] Cut with part assigned to other side
- [x] Split to parts
- [x] Split to objects
- [x] Mesh boolean gizmo
- [x] Mesh boolean in right click
- [x] Reload from disk/replace stl (won't work well if mesh changed too
much)
- [x] Fix model
- [x] Simplify/smooth (this two won't work well due to too much mesh
changes)
- [x] Add options in settings since I think this will be experimental
for a long time until being tested by a lot of ppl
* Expose Antialiasing velues
Expose Antialiasing multipliers.
Default to 4 as current implementation but enables the user to disable it to improve performante or increase sampling to improve quality.
* FXAA
* Improve descriptions
* Require restart when MSAA setting changes
Detect changes to the OpenGL MSAA (multisample anti-aliasing) preference when opening Preferences and prompt the user to restart the application to apply the change. Adds a constant key for the MSAA setting, stores the previous value, checks for changes (similar to the existing FXAA handling), and shows a warning dialog explaining the restart will close the current project without saving. If the user accepts, recreate_GUI is invoked to apply the MSAA change immediately.
* Revert "Require restart when MSAA setting changes"
This reverts commit dde134d346c3849598c91d025d2faed1b51c8a22.
* Menu and FPS options
* Fix FPS limiter and remove VSYNC
* Grouped FPS settings and mode up rigth fps counter
---------
Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
FlowRateCalibrationDialog was missing the SetSizeHints call that every
other calibration dialog in calib_dlg.cpp uses (Cornering, Pa, Pa Pattern,
Max Volumetric Speed, Temperature, Retraction, VFA, Input Shaping). Without
it, the dialog has no enforced minimum size: on wxGTK, iconizing the main
window while the dialog is open triggers a layout/refresh that re-runs
Fit() with transient zero-sized children, collapsing the dialog to ~222x249
px with the OK button clipped and unreachable. The window manager then
honors the (incorrect) small geometry hint, so the user cannot resize it
back manually.
Two changes:
* Add v_sizer->SetSizeHints(this) after Fit() in the constructor, matching
the pattern used by all other dialogs in this file. This locks in the
correct minimum the first time Fit() runs, before any iconize event.
* Remove the redundant Fit() from on_dpi_changed. With SetSizeHints in
place the WM enforces the minimum, but the unconditional Fit() on every
DPI/refresh signal was the trigger for the shrink path; Refresh() alone
is sufficient here.
Co-authored-by: Packerlschupfer <packerl@schupfer.at>
* Add tooltips to Transfer buttons
Set contextual tooltips for the Discard, Transfer and Save buttons when a dependent preset is present. The code computes the previous and new profile names and provides localized explanatory tooltips that clarify that switching will discard changes, transfer "New Value" settings, or save changes into the current profile. This improves UX by making the consequences of each action explicit.
* added some endlines
Co-Authored-By: yw4z <yw4z@outlook.com>
---------
Co-authored-by: yw4z <yw4z@outlook.com>
* Remove unused `get_printer_preset` calls.
* `Plater::check_printer_initialized` should skip nozzle flow type checks if nozzle is unknown.
Also remove unnecessary `is_multi_extruders` check.
* Remove unused `CalibUtils::is_same_nozzle_diameters()` fn.
* Simplify `CalibUtils::check_printable_status_before_cali`.
The single-arity can delegate to the vectorized arity.
* Add `DevExtruderSystem::NozzleDiameterMatchesOrUnknown` to simply checks.
* Update `CalibrationPresetPage::update_sync_button_status()` to use `NozzleDiameterMatchesOrUnknown`.
Simplify logic by iterating over each extruder and checking for diameter and volume type match.
The previous code had several mistakes (from what I could tell):
- `curr_obj->is_multi_extruders()` doesn't imply exactly 2 extruders
- the single/multi branch served no purpose
- the single branch failed to check the volume type
* Specify `std::fabs` and add explicit import.
Ref: https://github.com/OrcaSlicer/OrcaSlicer/pull/13330#discussion_r3133613736
Not sure how idiomatic this is in C++ / OrcaSlicer codebase, but CoPilot suggested it and it seems reasonable.
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
* Support file uploads and the device details page for CC2 printers.
* Resolved build issues for Linux and macOS.
* 1. Added `ElegooPrinterWebViewHandler` to handle WebUI messages for Elegoo printers. Other printers will keep the current behavior.
2. Added a static `get_print_host_webui` method in `PrintHost` to retrieve the printer WebUI URL.
* Improved timeout handling for CC2 file upload and SN info APIs.
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
* perf: speed up startup and show progress in splash screen
Cold-start was ~15 s. Profiled in GUI_App::on_init_inner: 5 s in
preset_bundle->load_presets (sequential vendor loading of ~3000 JSON
profile files), 3.7 s in new MainFrame(), and a 1.5 s splash screen
that closed long before init finished — so the user stared at a
frozen blank screen for several seconds with no feedback.
Changes:
- PresetBundle::load_system_presets_from_json: parallelize vendor
loading with TBB. ORCA_FILAMENT_LIBRARY is loaded first
synchronously (it is the inheritance base for filaments); the
remaining vendors are loaded in parallel into separate PresetBundle
instances, then sequentially merged. On a typical setup this drops
load_presets from ~5 s to ~3.5 s; the saving scales with vendor
count and CPU cores.
- SplashScreen: remove the wxSPLASH_TIMEOUT flag so the splash stays
visible until the main window is shown explicitly, and add status
updates at each slow init phase ("Loading printer and filament
profiles", "Creating main window", "Loading current preset",
"Showing main window"). The splash is destroyed right after
mainframe->Show(true).
- MainFrame: FileHistory::LoadThumbnails moved to a detached
background thread. The previous synchronous call opened every recent
3MF file at startup — on macOS that triggered the TCC permission
dialog for ~/Downloads mid-launch, freezing the whole app until the
user clicked. Letting it run in the background means the UI is
responsive from the start and thumbnails populate when ready.
* revert: keep LoadThumbnails on the main thread (review feedback)
SoftFever pointed out the detached thread introduces race conditions
(e.g. MainFrame::open_recent_project() reading while the thread writes
m_thumbnails) and that thumbnails may not appear if the homepage shows
before it finishes. LoadThumbnails already uses tbb::parallel_for
internally, so the call-site offload gave no real speedup. Reverted to
the original synchronous call. The macOS TCC-dialog concern that
motivated this will be handled properly in the lazy-init refactor.
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
fix(printconfig): register enable_filament_dynamic_map and has_filament_switcher options
PR #13388 (X2D Support) added import/export for these options in
bbs_3mf.cpp but never registered them in PrintConfig.cpp. Loading any
.3mf containing these keys throws UnknownOptionException at
PartPlate.cpp:6153 when config->apply() looks up the missing definition.
* bbl device selector search box
* align file and more menus with its button
* fix multiline inputbox border color on windows
* fix multiline inputbox border color on windows
* preferences: use content width on combobox dropdowns
* about: match version text size on macOS
* msg dialog improvements
* fix canvas menu overlapping with sliced plates toolbar
* bbl bind dialog button placement
* bbl color picker
* Update StepMeshDialog.cpp
* drop file dialog
* drop dialog revert fonts
* revert windows multiline border
* Update StepMeshDialog.cpp
* update
* Flushing Volumes: match style of combobox
* fix hyperlink color on canvas notifications
* fix possible issues with shared profiles notification