Commit Graph
1126 Commits
Author SHA1 Message Date
Kiss Lorand c01ac8ff44 Validate excluded bed area (#17209) 2026-11-06 22:39:38 -03:00
Grant Harkness bac7112046 Keep the Moonraker print host's port across sessions (#17257)
A print host with a port connected once, then failed in every later session. The agent announced the bare IP, that overwrote the saved address, and the next launch went to port 80. The announce now keeps host:port. For Moonraker, Qidi, Snapmaker and CrealityPrint, connect() also takes the port from the dev_id when the saved dev_ip has none, which repairs records saved by 2.5.0.
2026-11-06 17:37:26 -06:00
HanifKoh d4e57d8606 Use Index Arrays in the Minimum Spanning Tree (#17251)
prim() kept its working state in hash maps keyed by pointer and looked them up for every remaining vertex on every step. It now uses arrays indexed by vertex, with the same tie-break, so the tree and its edge order are unchanged.
2026-11-06 16:44:11 -06:00
Ian Bassi 9612260bb5 Fix multiline infill paths that start mid-line and end on themselves (#17341) 2026-11-06 17:53:29 -03:00
Ian Bassi 4cfdccfe45 Fix adaptive and TPMS infill paths that start mid-line and end on themselves (#17334) 2026-11-06 15:11:58 -03:00
932b492252 feat: Add plugin permission management to the Plugins dialog (#17285)
* feat: permissions tab in plugin dialog ui draft

* feat: allow full access, make threading a boolean

* fix: clang-tidy

* feat: save changes button

* fix: clang-tidy

* fix: only allow permission editing when plugin not loaded

* fix: plugin permission drafts, target validation, and sidecar synchronization

* fix: minor html/css changes

* fix: Make plugin permission edits immediate and thread-safe

* refactor: rehaul UI

* fix: add don't show again to request permission dialog

* fix: permission request dialog ui

* fix: clean up plugin permission dialog and mutation APIs

* fix: retry Windows plugin permission file replacement

* test: extract and cover plugin permission validators

* fix: show clear denial for worker plugin file operations

* fix: clang-tidy

* docs: clarify plugin filesystem permissions and clean up declaration

* fix: handle the 3 states of install state read

* fix: match equivalent paths for exact filesystem grants

* fix: preserve unreadable plugin state and allow socket grant editing

* Recover plugins whose install-state file cannot be parsed

---------

Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-11-07 00:00:18 +08:00
Kris Austin b5c4ccd9c5 Fill every filament slot when a project has fewer filaments than tools (#17330)
Opening a project with fewer filaments than the printer has tools tops
up filament_presets and the flush matrix, but leaves filament_colour
and the other per-filament arrays at the project's count. Slicing then
fails the flush matrix check, and an overwriting filament sync reads
past the end of those arrays.

load_current_presets() used to fill the arrays on every load. Since
#15385 it compares against filament_presets, which the top-up has
already raised, so it no longer runs. Grow the arrays where the project
is loaded.
2026-11-06 09:23:38 -06:00
Lam Wei Lun 719fdcf4dd By object: keep rotated copies of an object in their list order (#17286)
* By object: order rotated copies of an object by their list position

Copies of one object that differ in rotation get one PrintObject each, and
print.objects() lists those groups by transformation. sequential_print_
clearance_valid() keyed the instances by their object's index, which all
copies share, so std::stable_sort kept the transformation grouping and every
second copy on a rotated plate printed out of place.

Key each instance by its position in the model's object and instance lists
instead. No key repeats, so the sort no longer depends on being stable, and
arrange_order is then the list order the G-code export and the sequence
labels already print in.

Fixes #17260.

* Keep the sequential printed-copy tests in step with the list order

The new by-object test rotated a cube centred on its corner, which moved the
footprint by half the cube and closed the 12 mm grid gap under the 2 mm
clearance distance, so validation rejected the plate. Centre the mesh on the
object origin so the rotation turns the footprint in place.

Sequential clearance warned the copy that print.objects() listed first, which
for a plate of rotated copies was the rotated one. Copies now print in object
list order, so print validation warns the first copy in the list; expect that
copy from the preview as well, and drop the now incorrect header comment.
2026-11-06 21:30:38 +08:00
2ec1a0732f Plugin audit: keep non-Latin path names intact in the keyword check (#16925)
* Keep non-Latin path names intact in the plugin audit keyword check

is_denied_path_keyword() lowercased every path component with
std::tolower(), which follows the C locale. With a single-byte locale,
which the UI language sets on Windows (Russian_Russia.1251), that
rewrites bytes of UTF-8 sequences: "Новая папка" is no longer valid
UTF-8, and has_denied_config_extension() then throws "boost::filesystem
::path codecvt to wstring: partial" while turning it back into a path.
The exception left the CPython audit hook, so the plugin call never
returned, and the app crashed later in PyFrame_GetCode.

The keyword check now uses the file's ascii_lower(), which lowercases
A-Z only; the keywords are ASCII, so matching stays case-insensitive.
ascii_lower() itself no longer goes through a locale-aware
boost::algorithm::to_lower(), so the network permission keys get the
same guarantee. The audit hook also no longer lets any C++ exception
reach the interpreter: a check that fails denies the event, like an
unanswered prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Address review: narrower try in audit_hook, shorter comments, a test for the catch

- Wrap only audit_plugin_event() in the try, so release_frames() is called
  once after the event is decided.
- Shorten the ascii_lower() comment and drop the one that repeated it.
- Use only the .1251 locale in the non-Latin path test.
- Test that a permission prompt that throws denies the event, which
  reaches the new catch on every platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: GNUGiminot <215263196+GNUGiminot@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
2026-11-06 20:35:44 +08:00
cb80a0db84 Fix/wipetower klipper m400 stalls (#17246)
* WipeTower2: on Klipper, sync motion only before temperature commands

Follow-up to #15133. On Klipper, flush_planner_queue() emitted M400 at
every toolchange boundary, stalling the toolhead over the tower. Keep the
sync only before M104/M109/M591, and drop the sync line left behind when
GCode.cpp strips the interface-temperature M109.

End the deretraction placeholder with a newline: without the M400 that
used to follow it, the next tower move was glued to the placeholder line,
skipped post_process_wipe_tower_moves and kept tower-local Y.

Creator 5 Pro, 247 toolchanges: 1235 M400 -> 247 (~30 min saved).

* Update src/libslic3r/GCode.cpp

Good point, done. The strip now uses flush_planner_queue_command() and follows whatever the tower writes.

Co-authored-by: Kris Austin <kris.austin@gmail.com>

* tests: move the wipe tower slice and shared checks into one helper

* WipeTower2: keep the sync at the end of the unload on Klipper

[change_filament_gcode] and Tn are macros on Klipper; their non-motion
parts run when parsed, so without the sync a filament-change macro could
run while the unload and ramming moves are still queued.

Creator 5 Pro, 247 toolchanges: 494 M400 instead of 1235 (247 in this PR
before). The other boundary flushes, which stalled the toolhead over the
tower, stay removed.

* tests: check the unload sync before each change_filament_gcode

* WipeTower2: don't sync the cooldown after the interface wipe

The reset to the base temperature after the interface wipe isn't
timing-critical, but its M400 stopped the head over the tower before the
tower perimeter. Test print, Creator 5 Pro, 247 toolchanges: 3:22 with
the sync, 3:17 without it.

* tests: check only the interface cooldown for a missing sync

* WipeTower2: skip the cooldown sync on Klipper only

---------

Co-authored-by: Kris Austin <kris.austin@gmail.com>
Co-authored-by: GhZserG <ghzserg@zmod.link>
2026-11-06 18:58:00 +08:00
Lam Wei Lun a620d804ef By layer: keep As object list copies in their list order (#17232)
By layer: order As object list copies by their list position

sort_object_instances_by_model_order() keyed every instance on its object's
index when it initialized the order, so all copies of an object tied.
print.objects() does not list the copies in list order either: copies with a
different rotation live in separate PrintObjects, ordered by transformation,
so the ties were broken by that grouping and the copies printed as 2, 4, 6,
1, 3, 5. std::sort reordering the ties made it worse from 17 instances up.

Number the instances by their position in the model's object and instance
lists instead. No order key repeats, so a plain sort is enough; the renumber
after it compacts this print's instances to 1..n. The other intra-layer orders
and the by-object path are unaffected.

The new test rotates every second copy, which fails on every platform before
this change, MSVC included.
2026-11-05 21:40:41 +08:00
HanifKoh 70c12f5cba Warn When an Object Overrides Settings Spiral Vase Mode Needs (#17240)
Enabling spiral vase mode in the GUI resets sparse infill, wall loops and
top shell layers in the global config only. An object, part or height range
that overrides them keeps its own values, and its layers with infill or more
than one wall are printed without spiralizing, with no hint as to why.

Print::validate now warns once per such object, naming it and the first
conflicting setting so the notification jumps to it.
2026-11-05 13:45:43 +08:00
Lam Wei LunandHanif Koh bd3e9aeb96 fix: stop the Speed Dial dismissing itself on the first open (#17245)
* fix: stop the Speed Dial dismissing itself on the first open

Opening the dial with Space and not touching anything closed it again a
moment later, on GNOME and KDE, X11 and Wayland, and only on the first open.

The dial hides on wxEVT_ACTIVATE(false), but wxGTK does not deliver that
event to the window that lost the focus: gtk_frame_focus_out_callback sends
it to g_activeFrame, the toplevel that was activated last (wx
src/gtk/toplevel.cpp:192-205). A deactivation that belongs to another
window, or the same one arriving while the dial is still taking the focus,
therefore read as "the user dismissed the dial". The first open is the only
one that maps the window, moves it, resizes it to its content and grabs
focus into a web view that has never held it, so it is the only open
exposed to that ordering.

Validate the dismissal instead of trusting the event: arm a 150 ms one-shot,
cancelled by any activation, and hide only if the dial is still shown and
its window is no longer active. On GTK ask the window with
gtk_window_is_active(), because wxTopLevelWindow::IsActive() resolves
through wx focus tracking, which does not follow the focus that WebKit's
native widget takes. Also skip the pre-map focus grab on the first open: at
that point wxGTK has not mapped the window yet, so the grab cannot land.

speed_dial_should_hide() is a free function, so the rule is covered by
tests/slic3rutils/test_speed_dial_dismiss.cpp without a GUI.

* docs(wxwidgets-skill): document the validated Speed Dial deactivation

Section 10 described the dial's old handler, which hid on every
wxEVT_ACTIVATE(false). The skill is the review ground truth, so it has to
match the code: the deactivation is now validated after a settle interval
against the window's real active state, because wxGTK sends that event to
the last activated toplevel whatever window lost the focus.

* Ignore Page Changes of Inner Books in the Main Tab Handler

The main frame's tab-panel handler receives the page-changed event of
any book inside a page, because wxBookCtrlEvent propagates and the
Calibration page's Tabbook has no handler of its own. It then treated
the inner page switch as a main tab change: it reset the selected tab,
toggled the undo/redo buttons and called SetFocus() on the current page.

On wxGTK, SetFocus() on a child of a visible but inactive top-level
window presents that window. While the Calibration page is built in the
background after start-up, this re-activated the main window and the
Speed Dial, which hides when it loses the focus, closed by itself a
moment after its first open on Linux.

Only act on events whose object is the main tab panel.

* Include wx/timer.h Where the Speed Dial Binds Its Timer

* Describe the Real Cause of the Speed Dial's First-Open Close

The deferred, re-checked hide absorbs a focus bounce shorter than its
delay. It did not stop the first-open close, which was the main frame
activating itself from its tab handler; say so in the comments, the
test and the skill reference instead of describing a misdelivered
deactivation.

---------

Co-authored-by: Hanif Koh <hanifkoh@outlook.com>
2026-11-05 11:34:33 +08:00
HanifKoh dd0079ec64 Start the Orca Cloud Sync Cursor at Zero (#17263)
Fixes #17256

On a machine with no saved `sync_state`, the first `sync/pull` sent whatever was in memory as `?cursor=`. The server answered 400, nothing was downloaded, and the account's presets never arrived because only a 410 clears the cursor.

`SyncState::last_sync_timestamp` now starts at zero, so a session with no saved state pulls everything. `SyncPullResponse::next_cursor` had the same problem on a 304, where a stray value would have been saved to `sync_state` and sent on every later pull, so it and the other scalars in `ProfileUpsert` and `SyncPushResult` start at zero too.
2026-11-04 13:57:23 -06:00
Lam Wei Lun 6839c9d344 Invalidate filament grouping when the AMS material inventory changes (#17195)
Print::m_extruder_filament_info feeds filament grouping, but it was a plain
member with no change detection and no invalidation entry point. Changing only
the device-side AMS material inventory, such as a spool colour, therefore left
a finished slice valid: Print::apply() reported UNCHANGED, the grouping steps
stayed done, and export re-emitted the previous G-code with a stale
filament_map.

Compare the inventory in Print::apply() and invalidate the grouping steps when
it changed:

- set_extruder_filament_info() now only stashes the payload, so apply() can
  compare it against the installed one and act on the change under the state
  lock.
- The comparison projects both payloads exactly as grouping does: colour, type,
  tray name, support flag and filament id per tray. Volatile AMS keys such as
  remaining amount, temperatures and filament_changed therefore do not count.
- A changed inventory invalidates psWipeTower and psSkirtBrim, matching what
  extruder_ams_count already does, and escalates to APPLY_STATUS_INVALIDATED
  only when a step was actually taken back.
- A payload carrying no tray configs at all is treated as "not known yet"
  rather than "no filaments", so an AMS reconnect does not invalidate a
  finished slice, while clearing the last spool still does.
- The Plater hands the inventory to apply() before applying, so the change
  rides the same pass.

Adds comparator tests for the inventory projection and an integration test that
drives process() and apply() over a two-extruder auto-match print.
2026-11-04 21:45:25 +08:00
Kris Austin 0b1d825142 Fix the freeze before the Creality send dialog opens on a printer without a CFS (#17177)
Fixes #17128

Clicking Print on a Creality printer asked it for its CFS slots on the UI thread, with the 10 s command timeout. A K1C without a CFS never answers that query, so OrcaSlicer froze for 10 s on every click.

The send dialog now opens right away and reads the printer on a background thread. Upload works at once, and Upload and Print turns on when the read ends. The slot query waits 5 s, or the full 10 s once the printer reports `"cfsConnect": 1`, and stops as soon as it reports `"cfsConnect": 0`. When there is no filament mapping, the dialog says whether the printer reports no CFS, lists no slots, or can't be reached.
2026-11-04 07:40:11 -06:00
anjis 3bda653448 Fix Type 1 wipe tower filament statistics for non-Bambu printers (#17199) 2026-11-04 09:31:08 -03:00
Ian Bassi d607d7f4ad Fix gap infill printing with the outer wall filament with classic walls (#17229) 2026-11-04 09:30:34 -03:00
Ian Bassi 9afa96e92f Fill internal solid Spiral Inset with Arachne walls
Internal solid infill fell back to fixed width loops so that Arachne's open
walls would not be printed after an outward spiral, which ends at the edge
and travelled back to the centre for them. Fixed width loops leave strips
up to two lines wide in the middle of an island and wedges where it
branches: on calicat.3mf they need 218 mm of gap fill against 53 mm with
Arachne, and with gap fill off for internal solid those gaps stay empty.

Keep Arachne for every solid surface and print each open wall at the centre
end of the nearest spiral instead: before an outward spiral, which starts
there, and after an inward one, which ends there.
2026-11-04 08:56:28 -03:00
Ian Bassi 88c4c1e915 Print gap fill after the lines next to it in fills that keep their order
insert_gap_fill() put each piece of gap fill wherever it added the least
travel, which could be before the extrusions bordering it: the centre gap
of a Spiral Inset printed before the spiral that starts there, and gaps
where spirals meet printed before the later spiral. Each piece now only
goes after the last extrusion of its fill that passes within half its
widest width and a line spacing of it.
2026-11-04 08:56:28 -03:00
99fada6aab Travel back from a lift at the lifted height, then descend (#16933)
* Travel back from a lift at the lifted height, then descend

After a tool change on the Bambu Lab prime tower, the nozzle is lifted
at the tower and then travels to the next object. That travel is forced
to set the layer Z, which sent it down the final branch of
travel_to_xyz(): it cancelled the lift and emitted one combined XYZ move,
so the nozzle sank over the print and left color streaks. When the
nozzle is lifted and the target is lower, move in XY first and descend
at the target, as the branch already does after a filament change.

Fixes #14968

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep a lifted nozzle up over every travel that descends to the print

A multi-point avoid-crossing or exclusion-volume travel now stays at the
lifted height and descends only at its last point. The split descent also
covers printers with an axis remap, takes its Z move from the target
position, and is skipped when X and Y do not change. The test parses with
GCodeReader and runs with arc fitting both off and on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Check exclusion volumes from the height a lifted nozzle travels at

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Merge the lifted and multi-point travel branches into one loop

The 2-point travel, the lifted detour and the avoid-crossing detour now
share one loop; a detour only moves to the layer height at its first point
when the nozzle is not staying lifted. A new test lifts at each layer change
of a concave part with avoid crossing walls on, so lifted detours of more
than two points are checked for a nozzle that comes down before the end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep an exclusion-volume detour lifted when its lift is still pending

A retraction leaves its lift pending until the first leg of the travel.
The interpolated-Z detour only checked for a lift already made, so it
lifted on the first leg and then lowered at each later waypoint. A lift
the first leg will make now skips the interpolation, so the detour stays
lifted and descends at its last point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Kris Austin <kris.austin@gmail.com>
2026-11-04 08:27:10 -03:00
HanifKoh 23f82fa631 Count the Fake Printer's Close Frame When It Arrives (#17210)
The fake printer counted a close frame when its read completed, which
Beast does only after sending the reply and tearing the socket down. The
agent's stop returns on the reply, and the test then releases the printer,
which closes the socket. When that close beat the teardown, the read
failed with another error, the frame went uncounted, and the test waited
out its 10 s for nothing.

The control callback sees the close frame before the reply goes out, so
counting there leaves no window, and the wait helper is no longer needed.
2026-11-04 19:23:04 +08:00
HanifKoh 7e3d5d4d04 Ignore a Print Sequence Count That Does Not Match Its Values (#17243)
* Ignore a Print Sequence Count That Does Not Match Its Values

get_other_layers_print_sequence split other_layers_print_sequence into
other_layers_print_sequence_nums groups and read the layer range from the
first two entries of each, checking the layout with an assert that Release
builds compile out. A count raised without its values, as a command line
override does on a project storing the default placeholder, read past a
one-element vector. A count that does not divide the values, or groups too
short for a range and one extruder, now give no custom sequence, as the
default pair does.

* Log the Ignored Print Sequence and Test the Two-Group Case

A pair that is ignored now says so in the log, since the removed assert was
the only sign of it. The test covers two groups that divide the values but
have no extruder, and names the negative-count case.
2026-11-04 19:09:57 +08:00
Lam Wei Lun 78134d24c6 Keep the Speed Dial anchored to the main window (#17242)
fix: keep the Speed Dial anchored to the main window

The dial is a long-lived hidden window. Its origin was computed once, at
construction (DPIAware's CenterOnParent and create_webview's), and never
again, so moving or resizing the main frame - or dragging it to another
display - left the dial at the centre of the frame's original rect. Wayland
only looked correct because the compositor places the window there.

Re-derive the origin from the parent's current screen rect on every open,
again once the window is mapped (GTK drops a position requested before the
map), and on a DPI change. The origin comes from the fixed 540x282 box
rather than the current client height, so the content-driven resize does
not move the window while the user types. On GTK, clear the dialog's
default CENTER_ON_PARENT hint so the window manager stops overriding the
computed coordinates.

The geometry is a free function, so the centring and the work-area clamp
are testable without a GUI.
2026-11-04 17:14:04 +08:00
HanifKoh 1c9f6f9318 Join Precise-Z Sliver Layers to the Prime Tower Layer Below (#17204)
* Join Precise-Z Sliver Layers to the Prime Tower Layer Below

Precise Z height ends each object at its exact top, so another object's
layers can print a few microns above these. Each sliver became its own
wipe tower layer, and a tool change on it was sized for that height: a
0.0009 mm layer asked for a 230 mm ramming band, which grew the tower
past the bed ("Prime tower is partially outside the printable area").
Once sized correctly, G-code export lost step with the tower and threw
"append_tcr was asked to do a toolchange it didn't expect".

A tower layer thinner than half the printer's minimum layer height now
joins the tower layer below: ToolOrdering records the tower layer each
layer prints on and whether it finishes it, the tower plans the joined
tool changes on that layer's z and height, and the G-code neither
advances the tower on a joined layer nor finishes the layer before it.

* Finish a Joined Prime Tower Layer on Its Last Tool Change

The joined layer always finished the tower layer, so a joined layer that
changed no tools asked for a result after the layer below had taken them
all and threw "Wipe tower generation failed". The layer that finishes is
now the last of the group that changes tools, or the last one when none
does, matching how a single layer merges its finish into a tool change.

A joined layer also reset the Type 1 tower's first print, so smooth
timelapse replayed the tower layer's wall and threw the same error.

Layers are now joined below the printer's minimum layer height instead of
half of it: precise Z height can move a layer off by up to a layer height,
and the 0.04-0.08 mm layers left on their own still grew the tower off the
bed.

* Print Joined Prime Tower Purges at the Tower Layer's Z

A joined layer printed its purges at its own nozzle height, up to just
under the minimum layer height above the tower layer, so the beads were
not pressed onto it. The emitter now descends to the tower layer's z for
a joined layer, travelling over the tower first and climbing back after,
the way it already does for a tower compacted below the objects.

Layers sliced at exactly the minimum layer height sum to gaps a hair
under it and were joined to the layer below; an EPSILON margin keeps
them apart.

* Travel Over the Prime Tower Before a Joined Layer Descends

With no change_filament_gcode and no nozzle change, the Type 1 emitter
descended to the joined tower layer's z while the head was still over the
part, then travelled to the tower at that z. It now travels over the tower
first. The tests check that every descent below the object layer happens
over the tower.
2026-11-04 13:14:01 +08:00
Kuzuri 05a92cd0cf By object: only the part of an object above the rod can collide with it (#15544)
The by-object "too tall" check used each object's whole footprint to decide whether the rod can hit it. An object that reaches above extruder_clearance_height_to_rod now uses only the Y range of its geometry above the rod. That range is widened by how far the rod reaches past half the radius (extruder_clearance_dist_to_rod) and kept inside the footprint. It is used for both the print order and the too-tall check.

Objects below the rod keep the footprint, so on profiles with the lid below the rod they still get the rod height when they share a Y band with a later object. Objects with a draft shield or a skirt tall enough to reach the rod also keep the footprint. The mesh walk accounts for a raft.

Tests cover fins facing away, facing each other and one of each (print order), raised objects, a draft shield and a tall skirt, the A1 mini Distance to rod, two boxes closer than Distance to rod, a raft, the lid below the rod with and without a raft, and a rotated instance.

Most stock profiles leave Distance to rod at the default 40, which can be less than the printer's real reach. Until those values are measured, a narrow top closer to a neighbor than the real reach can still pass.
2026-11-03 21:34:08 -06:00
Valerii Bokhan 0b041740b1 Fix Wipe Inward retraction splitting and sandwich wall offsets (#17160) 2026-11-03 21:41:16 -03:00
Kuzuri 8cdc68a6a0 Sequential print: keep copies of one object in their list order (#17217)
The by-object ordering from #14987 broke ties in its ready queue by object_index, which every copy of an object shares. std::sort isn't stable, so on a plate with enough copies it could shuffle them. The copies then printed out of list order, and validation warned that one was printed later than its place in the list to avoid a collision, even though nothing had been held back.

Ties now use each instance's place in the object list, the same order the fallback uses. The test validates 200 copies on a grid and checks there's no reorder warning and the copies keep their list order.
2026-11-03 15:23:16 -06:00
SoftFever 55e760a483 Split .py plugin dependencies only at the commas between items (#17196) 2026-11-03 16:07:56 +08:00
Damir Galeevandyw4z fa5f7e3db4 Keep original body names when importing STEP, AMF and 3MF geometry (#17050)
* Keep original body names when importing STEP, AMF and 3MF geometry

STEP, AMF and 3MF bodies keep the names stored in the file. The three formats share one geometry import path with matching dialogs, per-format Preferences and cleanup of unsupported characters. AMF body groups load as one object, nested groups are flattened, and a CAD 3MF is imported as geometry.

* Use the app's widgets in the geometry import dialogs

Check boxes, radio buttons and the name replacement field in the STEP,
AMF/3MF and name cleanup dialogs now use the app's own controls instead
of the native ones; the name cleanup preview uses the dialogs' label font.

* Address review: AMF layout, Open Project cancel, part visibility

- AMF: the import dialog offers "Separate objects (as before)" first and
  uses it by default, so files from PrusaSlicer and Slic3r, which keep a
  whole plate in one constellation, load as separate objects again. The
  assembly modes are opt-in.
- File > Open Project with a CAD 3MF replaces the project only after the
  import dialogs were answered and the file was read with geometry to load.
  A Cancel or an empty file keeps the current project, its unsaved state,
  notifications and preview state; close_with_confirm() can hand back its
  closing steps for this.
- The object list no longer changes the model while it checks whether a
  single-object import hides its parts: ModelObject::hides_imported_parts()
  is used by the list, Split to parts and its menu check, and the painting
  gizmos' list update shows or hides the parts when painting changes.
  Removing the part rows keeps the object a container for its instances.
- Progress: staged reading takes the first part of the bar and never goes
  back within a file; the load loop takes the rest.
- A constellation id equal to an object id is logged as a warning.
- set_import_volume_order() is defined next to sort_objects().

* Address review: part rename on drag, Multi-part check for unplaced AMF

- Dragging a part of an imported object cancels a name editor that is
  still open before the part rows are rebuilt. On GTK the editor opened by
  pressing the selected row outlived the deleted row and wrote its name
  into another part.
- The Multi-part check reads zero for objects the file does not place, as
  min_z() did in Release builds, instead of their mesh height: the meshes
  are already centered by then, so different heights asked the question
  where main does not.
- Non-printable AMF groups skip the Multi-part question only in the
  assembly modes; Separate objects asks as before.
- The first AMF load mode is "Load as separate objects".

---------

Co-authored-by: yw4z <ywsyildiz@gmail.com>
2026-11-03 14:14:17 +08:00
Ian Chua fcab66ca9e fix: revert native device tab flag (#17162) 2026-11-02 22:09:49 +08:00
HanifKoh 5fb129f1f3 Read a Retyped Option From the Preset Cache as a JSON Profile Would (#17047)
A vendor's installed preset cache survives an app upgrade, and the
dictionary records the type every option was written as. When a build
reads a cache written by a build that typed an option differently, the
reader dropped the option and the preset fell back to the collection
default, which is not what the vendor's JSON says. enable_arc_fitting
became an enum in 2.5.0-beta, so every vendor whose bundle was not bumped
between the alpha and the beta now loads with arc fitting off from the
alpha's cache, and the alpha reads the beta's cache the same way.

Read such a value by the writer's type and hand its text to
set_deserialize through a scratch config, so handle_legacy and the
bool/enum substitution run on it exactly as for a JSON profile and a
failed parse leaves nothing behind. A text this build cannot place is
still dropped, reported once per key per file.
2026-11-02 17:20:33 +08:00
fa1k3andSoftFever 5fd0edf5cc Apply the Z shrinkage compensation to height ranges (#16491)
The height ranges are uncompensated print heights. The layer height profile
clipped them against the compensated object height, and the region ranges
were compared with the compensated slices and volume boxes without scaling,
so the range's layer height and its settings ended up at different heights.

The region ranges are now scaled by the Z compensation (not on belt printers,
whose slices are taken in the rotated frame), and the cached regions are only
reused while their ranges are unchanged.

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-11-02 14:59:49 +08:00
Joseph RobertsonandClaude Opus 5.5 3ac1b0078d Belt printer: lay the brim as high above the belt as the part's outer wall (#16757)
On a belt the brim and the part's outer wall didn't land at the same
height above the belt, so no single endstop or Y offset setting worked
for both (#16705). Brim lines sat at a fixed 0.75 layer height above
the belt. The outer wall where it rests on the belt sits half a layer
up, because the layer is sliced at mid-height, plus half its width
times tan(tilt), because it is inset half a width from the slice edge.
At 45 degrees with 0.32 mm layers and a 0.4 mm wall that is 0.24
against 0.36 mm. Brim lines now sit at the clearance of the outer wall
that rests on the belt in their own band's layer, with XY contour
compensation included. Each line's bead is built from its spacing and
clearance, so it fills its cell however small the clearance gets.
Flow::with_cross_section(), used before, delivers only a quarter of the
area once it falls back to a round bead.

The first-layer test measured from the nozzle, so a wall resting on
the belt never counted as first layer and printed at full speed with
the fan on, and the raised brim would have dropped out too. It now
measures from the belt under the edge of the bead. Travels use the
width of the path they lead to. Brim lines are as wide as the bands
are far apart, not as a bead, so they always count as resting on the
belt.

Speed, flow ratio and acceleration are chosen once per path, and a
wall loop runs from the belt up the part, so the whole loop took
whatever its seam point got. Belt paths are now cut where they cross
the edge of the first-layer band or a step of the slow_down_layers
ramp. Each piece is judged by the heights of all its points. Small-area
flow compensation keeps using the original line lengths.

Non-belt printers are unaffected.


Claude-Session: https://claude.ai/code/session_01Ux9BwdWCA7N8UG7ftaNkWg

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 14:37:17 +08:00
fa1k3andSoftFever a837652833 Apply the Z shrinkage compensation once to the belt height (#16490)
On a belt printer the slicing height comes from the box of the mesh under
trafo_centered(), which already carries the shrinkage compensation, and
SlicingParameters::create_from_config() scaled it by the Z compensation again.
With a Z shrinkage above 100 % the top of the part was not sliced.

The belt build height check now also compares the compensated height when the
object is too tall, so an object that only fits after the compensation is no
longer refused.

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-11-02 14:34:32 +08:00
HanifKoh 6c96e41162 Keep the Scarf Ramp at Its Exact Length Past a Vertex on a Straight Line (#17030)
A scarf ramp that would end less than half a step before the next loop
vertex was extended to that vertex, so that no flat stub follows the ramp.
Arachne places the wall's vertices a little differently on every layer, and
arc fitting moves them further, so the ramp grew by a different amount on
neighbouring layers: the scarf end, which the preview draws as the seam,
stepped sideways by up to half a step from one layer to the next.

Where the vertex lies within an eighth of a common line width of the
straight line from the exact ramp end to the vertex after it, measured in
3D so a Z contour is kept, the flat path now skips that vertex instead. The
ramp keeps its exact length and ends at the same place on every layer, and
the first flat segment is still at least as long as the one that followed
the vertex. At a corner, or when the vertex ends the path, the ramp is
extended as before.
2026-11-02 12:42:52 +08:00
Rodrigo Faselli 533d4c3e9e Print bridges at bridge speed when slowing down for curled perimeters (#17144)
With slowdown_for_curled_perimeters on, the fully unsupported entry of the overhang speed table was overhang_4_4_speed for every role. Since #14735 samples the inside of a line, the unsupported middle of an anchored bridge strand got that speed. Bridge infill now uses bridge_speed there, like the branch without curled slowdown. Other roles keep their old speeds.
2026-11-01 14:23:32 -06:00
Noisyfox b3f8d0af15 Fix Mesh Boolean crash on meshes with unreferenced vertices (#17080)
Mesh boolean crashed in the CGAL volume check when a mesh had vertices that no triangle used. The conversion to CGAL now removes those vertices and renumbers the rest. The conversion used by UV unwrapping still keeps the original vertex numbering.
2026-11-01 14:20:34 -06:00
SoftFever d1d8204dc1 Keep the time-format tests passing when daylight saving ends (#17116) 2026-11-01 17:54:09 +08:00
SoftFever 1093ff0714 Let Slice and Print retry after a post-processing script or plugin fails (#17095) 2026-11-01 03:14:58 +08:00
HanifKoh c77020e654 Keep a Loaded Creality CFS Spool the Printer Cannot Name (#17034)
A K2 SE lists a loaded spool whose RFID tag the firmware does not know
with only its colour: vendor, type and name blank, state 2. The printer
shows the spool, but parse_cfs_response skipped every material with a
blank vendor and type regardless of state, so the sync dialog never
offered that slot. No firmware has been seen marking an empty slot that
way; empty slots carry state 0 and no colour.

Skip a non-zero state entry only when its colour is blank too. The slot
then shows in the sync dialog as an unread tray, like a Bambu tray with
an unknown spool: mapping it yields Generic PLA in the default colour.
The preset matcher returns no preset for an empty type instead of
scanning every preset for nothing.

The sync code for Moonraker printers assumes every tray either carries
a filament id or is a placeholder for an empty slot; an existing tray
with neither shifts the entries of the trays after it in an overwrite
sync. So a tray that resolved to no preset is published as a placeholder
as well: the overwrite sync keeps the project filament in that position,
as it does for an empty slot, and the tray stays visible in its colour.

Read the box and material fields through the null-safe JSON helpers the
K1 parser already uses, so a null or mistyped field reads as blank
instead of throwing out of the sync.

Tests: parse the reporter's boxsInfo payload and check that the unnamed
spool is listed, a truly blank entry is still skipped, a null field
reads as blank, and an empty type matches no preset; an overwrite sync
with such a placeholder between loaded slots keeps every slot's colour.
2026-11-01 03:14:28 +08:00
TheLegendTubaGuyandSoftFever 041df4031e Keep Short Objects on the Plate When Arranging By Object (#17011)
* Keep Short Objects on the Plate When Arranging By Object

Arranging objects shorter than the nozzle height for printing by object
placed them off the plate, and the plate then reported them too close to
each other (#16991).

- The arrange bed grew by half the extruder clearance radius, while short
  objects are only inflated by half the gap between them, so the extra bed
  was free to use. The bed now grows by the objects' actual inflation,
  after the bed margin is given back to the largest object.
- Arrange kept short objects 2 mm apart, but the sequential clearance
  check needs a nozzle diameter between them.
- Giving back the bed margin measures objects without that inflation,
  which only keeps objects apart, plus EPSILON so rounding still lets an
  object that fills the bed be placed.
- Exclusion regions are moved only when the bed grows, so short objects
  keep their gap to calibration regions on every side.

* Avoid objects at the bed edge and fit turned objects when arranging by object

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-11-01 02:35:55 +08:00
SoftFever 913c622574 Remember the last printer and keep AMS-synced filaments across restarts (#17086) 2026-11-01 00:26:17 +08:00
SoftFever 27cafaa06c Read nozzle diameters correctly when the UI language uses a decimal comma (#17079) 2026-10-31 20:35:45 +08:00
SoftFever 8e37d7d4b2 Match closer colours and the same filament sub-type in Convenience mode 2026-10-31 14:25:00 +08:00
SoftFever aa66e41e64 Group a filament onto the nozzle that has it loaded in Filament-Saving mode 2026-10-31 14:25:00 +08:00
Kris Austin 7ac46c9a61 Fix lightning infill hang when an overhang sample lands past the infill (#17066)
The lightning distance field samples each layer's overhang on a grid
anchored at the bounding box of the infill outlines. The opening it
applies to the overhang first can push a sample a little past that box.
Such a sample falls into its neighbor's grid cell or one update() never
visits, so it is never erased, and generateNewTrees() adds the same
point to the tree forever until memory runs out.

Grow the box to cover every sample. It only changes when a sample lies
outside it, and models that slice today give the same result.

Fixes #17051
2026-10-30 22:00:00 -05:00
SwineFlew931 9b4f84a923 Keep Each Extruder's Values on User Printers With More Extruders Than Their Parent (#16536)
A user printer preset with more extruders than its system parent lost the extra extruders' values on load. The parent copy is now grown to the child's extruder count before the child's values are merged, in all three load paths.

Fixes #16535
2026-10-30 21:58:08 -05:00
Arthur Portoandraistlin7447 fcd96ad91c Give each object the layer height limits of its own extruder, and compare layers rather than limits for the prime tower (#17000)
* Test the layer height limits taken for an object, and that they don't keep objects from sharing a prime tower

* Take the layer height limits from an object's own extruder, and don't let them refuse a prime tower

* Test the prime tower check through Print::validate(), and shorten the equal_layering comment

The test runs Print::validate() on two cubes, on filaments 1 and 3 of a printer whose first extruder allows thicker layers than the others. Without this PR, and with only the index fix, it fails with the refusal from #16938. It uses filament 3 because filament 2 read extruder 1's limits before the index fix.

---------

Co-authored-by: raistlin7447 <kris.austin@gmail.com>
2026-10-30 21:56:12 -05:00
Ian Bassi 304924a69a Fix infill and surface filaments overriding each other in Filament for features (#17058) 2026-10-30 18:38:40 -03:00