Arranging rebuilds the plates in arrange order, which re-sorts the model
objects. The object list then synced its selection from GLVolumes that
still carried the old object indices, and with a part or modifier
selected it read past the end of another object's volumes. Reload the
scene before syncing the object list, and skip indices that are out of
range.
Ported from Snapmaker/OrcaSlicer@fd6e55e734
Co-authored-by: XieJiajun <68017138+PILIPALA030@users.noreply.github.com>
The worker only posts the event that runs the UI tasks when the queue
goes from empty to one task. A task queued while the window was being
recreated (a language change, for example) found no callback, so it was
never announced, and later tasks did not post either because the queue
was no longer empty. Backups then stalled until the app was closed.
Post the event when a new callback arrives and tasks are waiting.
Ported from Snapmaker/OrcaSlicer@99e66ae171
Co-authored-by: chenpenggui <155463329+gushanji@users.noreply.github.com>
The backup worker copied the callback before the file I/O of a task and
called that copy afterwards. When the main window shut down in between,
it cleared the callback, and the worker still posted an event to the
destroyed window. Read the callback again after taking the lock back.
Ported from Snapmaker/OrcaSlicer@99e66ae171
Co-authored-by: chenpenggui <155463329+gushanji@users.noreply.github.com>
Regions that differ in the bridge speed or flow get walls of their own,
so their overhang walls print at their own speed. The speeds of partly
overhanging walls, and the settings that turn them on, had the same
problem: a modifier changing them shared its walls with the part around
it and printed at that part's speeds. Compare them too.
Tree supports place the bed border at the first instance of the object,
so a change to the others, such as adding a copy, regenerated them for
nothing. Supports that avoid bed exclusion volumes still follow every
instance.
The expansion grew in 0.5 mm steps off the layer below, so a wall
thinner than a step, such as a single 0.4 mm wall, was still crossed:
subtracting it left a strip on its far side that the next steps kept
growing. Drop each piece a step reaches only across the layer below,
which touches nothing it grew from. This takes a loop of its own, so
the tree support helper is private again. A negative expansion shrinks
with shrink() now, as expand() expects a positive delta.
Slim, Strong and Hybrid tree supports size their raft by the first
layer expansion, and the GUI greys out the raft expansion for them. The
fixed 3 mm grip from BambuStudio broke that: the field no longer did
what its text says, 0 no longer gave a flush raft, and a one layer raft,
which is an interface layer only, ignored the setting. Grow every raft
layer by the setting again, and drop only the second expansion of the
first layer that made it twice as wide.
With a single raft layer, the Slim, Strong and Hybrid tree supports
added a first raft layer and then the interface layer, 0.3 mm thick by
default. The interface layer reached into the first support layer under
the object, so support there was printed twice. Build the single layer
at the first layer height only. Normal and organic supports, and rafts
of more than one layer, are unchanged.
Ported from bambulab/BambuStudio@635b51c6c2,
without its first layer speed change: Orca prints the whole first
object layer over a raft at the first layer speeds on purpose.
Co-authored-by: wenbing.shao <wenbing.shao@bambulab.com>
Parts and modifiers with matching wall settings share their walls,
which are generated with the settings of the first one. The check did
not compare the bridge speed and bridge volumetric flow, though
overhang walls print at the bridge speed, so a part with its own bridge
speed printed its overhang walls at the speed of another part. Only
objects whose parts differ in these settings change.
Ported from bambulab/BambuStudio@2d6f964e24
Co-authored-by: Colajichi <shubo.nie@bambulab.com>
Normal supports grew each overhang by the support expansion in one
offset. Where a wall was thinner than the expansion, the grown area
crossed it, and that part of the overhang was carried down as support
outside the object. Grow it in steps of 0.5 mm instead, keeping it off
the layer below after each step, as tree supports already do. Only
prints with a support expansion above 0 change.
Ported from bambulab/BambuStudio@61899ad6bb
Co-authored-by: jiaxi.chen <jiaxi.chen@bambulab.com>
A region whose fuzzy skin point distance or thickness is too small has
its fuzzy skin turned off. It was set to None, but None only means no
fuzzy skin outside painted areas: painting still turns it on, while
Disabled, the default, leaves painted areas without it. So a painted
object whose region had fuzzy skin disabled got fuzzy skin anyway, and
with a point distance of 0, which older projects can hold, slicing it
never finished. Turn it off with Disabled instead.
Ported from bambulab/BambuStudio@ca564f822c
Co-authored-by: Max Paperno <max@wdg.us>
The fill area kept clear of the walls, which gap fill and concentric
infill stay inside, is only appended to while the walls are generated.
Objects with several regions cleared it first, but the path for a
single region did not. Every time only the walls were generated again,
after a change to the wall loops for example, the old area stayed, and
gap fill reached into the overlap with the walls. The G-code then
depended on the order of the changes rather than the settings.
Ported from bambulab/BambuStudio@6df6afa784
Co-authored-by: songwei.li <songwei.li@bambulab.com>
With tree support on the build plate only, a branch that cannot reach
the bed is pruned when it is dropped from its layer. Nodes are never
dropped from the first layer, so a branch that reached it inside the
model, on a slab one layer thick or on the floor of a pocket, stayed
and was printed onto the model. Prune those too.
Ported from bambulab/BambuStudio@851e982b49
Co-authored-by: jiaxi.chen <jiaxi.chen@bambulab.com>
The non-organic tree support raft was grown by the first layer
expansion on every raft layer, and its first layer by that expansion a
second time. The default 2 mm put the first layer 4 mm out, and a
20 mm setting 40 mm. The second expansion came with BambuStudio's fix
for this setting, which assumes the fixed 3 mm grip that Orca had
replaced with the setting. Restore that grip, so the setting widens the
first layer only, as it does for the other supports.
Ported from Snapmaker/OrcaSlicer@0e572ec63a
Co-authored-by: zackaree-shen <zackary_shen@qq.com>
Moving an object only invalidated its skirt, brim and G-code. Tree
supports are clipped to the bed shape at the position of the instance,
and every support avoids the bed exclusion volumes at that position,
so after a move they kept the old position until a setting changed.
Regenerate supports in those cases; normal supports on a bed without
exclusion volumes are still kept.
Ported from Snapmaker/OrcaSlicer@4e0aa3acc1
Co-authored-by: zackaree-shen <zackary_shen@qq.com>
Elephant foot compensation measured contour widths on the polygon
simplified with SCALED_EPSILON, and kept only the first piece the
simplification returned. Where the simplification split a polygon, for
example at walls thinner than that tolerance, the other pieces were
dropped from the first layer; where it returned nothing, front() was
undefined. Compensate each piece instead. A polygon that simplifies to
a single piece is compensated exactly as before.
Ported from Snapmaker/OrcaSlicer@3412141cc7
Co-authored-by: lhx <luohaoxuan@snapmaker.com>
An internal bridge is expanded to anchor it, and the expansion could
reach into a neighbouring region. That area was then cut out of every
region and kept only in the bridge's own region, so on painted or
multi-filament objects part of another region printed in the bridge's
filament. On layers whose regions use more than one solid infill
filament, clip each bridge to the fill area of its own filament.
Layers with one filament are unchanged.
Ported from Snapmaker/OrcaSlicer@b070bcfaff
Co-authored-by: lhx <luohaoxuan@snapmaker.com>
* Add `bend_to_arc` to Lay Aligned Text Along a Circle
* Lay Text Along a Circle When the Style Has an Arc Radius
* Save the Text Arc Radius in Projects and Styles
* Add an Arc Radius Input to the Text Gizmo
* Include What the Emboss Tests Use
* Keep Text Straight When Its Letters Do Not Fit Inside the Circle
* Draw the Arc Radius Input in the Advanced Column and Process Every Edit
The input used the helper of the Height and Depth rows, which draws in
the main column, so in the Advanced section it sat on top of its own
label. It is now drawn in the Advanced column like the sliders around
it, and the Height and Depth helpers are back to what they were.
The saved style's radius is shown at the same scale as the value, so on
a scaled object the label is not marked as changed and Revert goes back
to the style's radius.
Every edit now starts a job. Skipping the job when the volume already
had the typed radius lost the value while a job for an earlier keystroke
was still running: typing 25 over 25 passes through 2, and the 2 landed.
* Keep the Arc Radius Exact on Revert and Skip Edits That Change Nothing
Revert handed the style's radius back through the shown unit, which in
inches or on a scaled object can miss it by a rounding: the style stayed
marked as changed and picking another style asked about discarding it.
The radius now stays in mm and is converted only for the field.
An edit that changes neither the last request nor the volume starts no
job, so holding + at the limit no longer adds undo steps. An edit that
returns to the volume's radius while an earlier keystroke's job is still
running starts one, as before.
"*1e39" typed into a field showing zero gave a radius that is not a
number. It now counts as no radius.
* Name the Arc Radius Before the Edit for What It Is
It is the radius before this frame's edit, not always what the last job
was started with.
* Give the Smallest Radius a Text Fits On
* Bend Text With a Curve Slider and a Linked Radius
* Apply a Typed Radius Equal to the One Shown
* Space Letters Along Their Tops When the Text Bends Inward
* Let Short Text Close Into a Ring With the Curve Slider
* Hide the Curve Tooltip While the Slider Is Dragged
Maintainers can tick "msstore_only" when running "Publish to draft release" to
send a build's x64 and arm64 MSIX packages to the Microsoft Store as one
submission, instead of uploading them in Partner Center by hand. With the
option off, the GitHub draft release is published as before.
The generic U1 0.2 mm filaments used library values for max volumetric speed in the Standard column and for multitool ramming flow and volume. That meant up to 25 mm³/s through a 0.2 mm nozzle. Set all three to Snapmaker Orca v2.4.1's 0.2 mm values in both variants, and bump Snapmaker.json to 02.04.00.23.
The prime tower estimate added a cylinder of filament, the filament change length
times its cross-section, to the purge of every two-nozzle printer. Only the Type 1
tower purges that length, and it sizes itself from its own plan, so the term only
ever reached Type 2 towers, which never purge it. On the FELIX Food Double, whose
syringes are 31 mm wide, the tower placeholder was about 167 mm across with its
brim, for a tower that prints at about 16 mm.
The term also hid that a Type 2 change purges at least the filament's minimal
purge, which can be more than the prime volume. Each change is now counted at the
larger of the two, as the Type 2 planner does, so the estimate does not fall
below the printed tower.
A corrupt or encrypted zip member, or a bad file name, is now an
artifact error, so a broken artifact gets the "made no comparison" note
instead of stopping the comment, and the report step writes a report
whatever fails. The fence also drops format, C1 and line separator
characters. The comment is posted before the old one is deleted,
comments without a user are skipped, a body GitHub returns with other
line ends counts as unchanged, and a download redirect must be https.
The commenter's concurrency group is on the job, so the skipped wakes of
other labels cannot take the place of a pending real one.
New tests cover the bounded read of a member, a run on another branch,
other bot comments, comments past the first page, the newest run of a
commit, and the token never reaching the storage host.
The label bot accepts check-gcode and says when the comment will come:
when the build finishes if its app token starts workflows, otherwise
when the running build finishes or after the next push that builds.
CONTRIBUTING.md says what the label does and which pull requests can
get a report.
check_gcode_comment.yml runs when a pull request's Build all run or a
check-gcode label run completes, finds the open pull requests from that
branch, and posts the report of the newest finished build on each one
that has the label. check_gcode_label.yml only wakes it when the label
is added after the build finished; it needs no token and runs nothing.
Neither uses pull_request_target, which GitHub blocks by default in
public repositories.
Runs are kept only when their head repository and branch are the pull
request's, and the artifact must name the pull request, so another fork
at the same commit cannot have its report posted. A run waiting for
approval counts as not finished. The comment is kept when unchanged,
edited in place when only the commit or the baseline moved, and
replaced otherwise. The report appears only inside a fence nothing in
it can close, errors print their type and HTTP status only, and the
step cannot leave a red check.
On a pull request, the Slice check now finds the newest build of the
base branch at or before the pull request's base commit that saved
fingerprints, compares them with its own, and writes report.txt into
the gcode-fingerprints artifact and the report into the job summary.
Every build also writes made_with.txt, the fingerprint script's hash and
the runner, so a report warns when the two sides were made differently.
scripts/ci_check_gcode.py reads the baseline's artifact in memory: the
download and each file in it are capped, and a file compressed with
anything but stored or deflate is refused, since a capped read does not
bound bzip2 or LZMA. An error writes its type only, never the text of
the files, and the step cannot fail the job.
The Slice check slices every shipped printer preset on each pull request
build and each push. It now keeps the G-code, fingerprints it with
scripts/gcode_fingerprint.py and uploads the fingerprint file, so the
G-code of two builds can be compared. The clock and the random() seed of
custom G-code are fixed with ORCA_SOURCE_DATE_EPOCH, or every slice that
prints the time would differ from one run to the next.
The two new steps cannot fail the job. Nothing reads the artifact yet.
compare now prints its report as UTF-8 with LF line ends on every
platform, as fingerprint already did. Redirected output on Windows uses
the ANSI code page, so the report was not UTF-8 there, and a slice name
outside that code page made compare fail as if its input were bad.
Standard output is switched only when something is written to it, so an
output file and an error message still work without one.
Two tests could not do their job. One created a file name with a
carriage return, which Windows refuses; it now fakes the folder listing.
The standard output test passed on Linux even without the code it
covers; it now prints a name outside ASCII to a Latin-1 standard output.
The docstrings no longer say the config block differs between two runs
of the same sources: it changes when an option is added.
None of this has run on Windows: CI runs these tests on Linux only.
OrcaSlicer_profile_validator -s -o saves one G-code file per shipped
printer preset. gcode_fingerprint.py hashes each file without the lines
that differ between two runs of the same sources (the timestamp, the
config block and the object ids taken from a process-wide counter), and
reports which slices changed between two sweeps.
A slice whose output cannot repeat yet (fuzzy skin, random infill
rotation) is listed as not compared. A slice present in one sweep only
is listed and does not count as changed.
Custom G-code that prints the time or calls random() gives different
output on every export, so two slices of the same input cannot be
compared. With ORCA_SOURCE_DATE_EPOCH set to a number of seconds since
the Unix epoch, the time variables hold that time in UTC and random()
starts from the same seed. Without it nothing changes.
The standard SOURCE_DATE_EPOCH is not used: packaging shells export it
for every program they start, and it would freeze {timestamp} in the
output file names of anyone launching the slicer from one.
OSXDisableAllSmartSubstitutions() clears quote and dash substitution
only, so a system text replacement such as <= to ≤ could rewrite a
multiline settings field once it was shown, leaving start G-code that
no longer slices.
Add textctrl_disable_text_replacement() beside the other macOS helpers
in GUI_UtilsMac.mm and call it from TextCtrl::BUILD right after
OSXDisableAllSmartSubstitutions().
Fixes#17914
In the H3C's status messages, the device.extruder.info entries had no
"filam_bak" key, both while idle and while printing. ParseV2_0 read
njon["filam_bak"] on a const json. With the key missing, that is
undefined behaviour: a debug build asserts, and a release build either
crashed with EXC_BAD_ACCESS or kept running with no extruder data.
Read filam_bak only when the key is there. DeviceManager.cpp already
checks for the key on single-extruder printers, and Bambu Studio added
the same check in bambulab/BambuStudio@d1f121d.
* Add co-extruded colors to the color picker
The color picker could make solid colors and gradients, but co-extruded
filaments (colors side by side along the strand, like dual color silk)
could only be kept, not created or edited.
Solid mode now works like Gradient where multi-color is allowed: its
colors show as blocks with the same - and + buttons. Two or more blocks
are a co-extruded color, one block is a plain solid. The Solid/Gradient
switch is unchanged. Co-extruded colors are saved as the existing
multicolor type (filament_colour_type 1, AMS ctype 1), which the
swatches already draw as segments.
Made with help from Claude
* Start a new solid from the selected gradient color
Made with help from Claude
* Carry colors over when switching between Solid and Gradient
Made with help from Claude
* Convert colors only on the first Solid/Gradient switch
Switching between Solid and Gradient used to copy colors across on every
switch, so edits made in one mode overwrote the other. Now the first
switch to a mode converts the other mode's colors, and after that each
mode keeps its own.
Gradient support now also allows co-extruded colors, so the separate
allow_coextruded option is removed.
Made with help from Claude
* Skip invalid favorites when loading instead of dropping all of them
Made with help from Claude
* Fix ColorPickerOptions initializer after removing allow_coextruded
Made with help from Claude
* Restore the original picker options at the project color call sites
With allow_coextruded gone, {true, true} already allows gradients and
co-extruded colors, so these two call sites no longer need to change.
Made with help from Claude
* Update the color picker design doc for the Solid/Gradient behavior
Made with help from Claude
* Merge gradient and co-extruded picker types into ColorMulti
Replace ColorGradient and ColorCoextruded with one ColorMulti
{colors, gradient} in ColorSelection = variant<ColorRGBA, ColorMulti>,
as suggested in review. This also collapses the duplicated gradient and
co-extruded branches in normalize, JSON load/save and the AMS conversion.
Made with help from Claude
---------
Co-authored-by: yw4z <ywsyildiz@gmail.com>
Add OrcaMqttConnection, the MQTT 3.1.1 client the OrcaSonar printer
connections use, over a Boost.Beast WebSocket (ws:// and wss://). The
MQTT protocol is async_mqtt's I/O-independent connection; async_mqtt is
added as a header-only dependency. Tests run the class against an
in-process mock broker.
connected_bodies() now intersects two islands on adjacent layers only inside the overlap of their boxes, and checks the pairs of layers in parallel. A large island, such as a sheet with thousands of holes, was intersected whole with every small island inside its box, so slicing such assemblies has taken 30 minutes or more since #16291. The bodies found are unchanged.
Fixes#17966
A project saves the edited process's compatible printers as print_compatible_printers only when the list isn't empty. When the key was missing, loading the project applied an empty list over the local process preset, so its compatible printers reset to All.
Now the load leaves compatible_printers alone when the project stores no list, and the local process keeps its own list. A project that stores a list still applies it. If the kept list leaves out the project's printer, the load clears it as before, so the process stays compatible.
With Lift Z enforcement set to Top Only, a retraction lifts when the last fill was top solid infill or ironing. `m_last_notgapfill_extrusion_role` had no initial value, and the first travel of a print comes before any fill, so it read whatever was left in memory, often the previous slice's last role. Slicing the same project twice could lift the first travel one time and not the next. It now starts as `erNone`.
The new fff_print test fills new memory with the top solid infill role on glibc, so it fails without the fix on every Linux run.