libpng reports a corrupt image by longjmp()ing to the jump buffer the
decoder sets. Both decoders set theirs in a frame holding a PNGDescr and
a vector, and with exceptions enabled MSVC unwinds the stack as part of
longjmp - so returning from that frame afterwards crashed. A truncated
texture segfaulted the Windows test run and was fine everywhere else.
The calls that can fail now sit in two helpers that own nothing but
pointers, and the C++ objects stay in the callers' frames.
texture_displacement_patch_frame picks the world axis least aligned with
the patch's average normal. With no patch there is no normal either, and
the axis came out of the +Z fallback for it - so it was +X, while its
test asked for the upright frame the fallback is meant to give. An empty
patch now answers +Z outright.
The Windows build stopped on test_kdtree.cpp: it calls std::iota without
including <numeric>, which libstdc++ happens to pull in anyway. Added
there, and the same for <limits> and <algorithm>/<cmath> where the
recent changes rely on them being included by something else.
bridge_over_infill's helper for splitting polygons by proximity named
its locals near and far. The Windows headers define both as macros that
expand to nothing, so "Polygons near;" declared nothing and the uses of
it did not compile. Renamed; no behaviour change.
* fix: resolve filament vendor/type across split base presets
WebGuide's filament list dropped presets whose vendor and type came from different ancestors, and looped forever on inherits cycles. Walk the full inherits chain with a path-scoped guard, fill only missing values, and skip presets that still lack vendor or type. Add tests for split-base resolution and validate the real profile tree.
* Merge branch 'main' into feat/filament_dialog_fix
* Fixes unit test
* Merge branch 'main' into feat/filament_dialog_fix
* Merge branch 'main' into feat/filament_dialog_fix
* revert tests/fff_print/test_gcodewriter.cpp changes
* Add Sovol Zero nozzle profiles and filament updates
Preserve inherited tuning with Zero-only overrides so shared
Sovol defaults and other printers remain unchanged. Retain migration
aliases while using canonical names in compatibility references.
Co-authored-by: Codex <noreply@openai.com>
* Fix Sovol Zero bed model reference and ignored settings
Point the Zero model at the shipped bed mesh. Remove unsupported filament
and process keys that the loader silently discards, preserving effective
tuning and the existing preset names and IDs. Bump the Sovol bundle version.
Co-authored-by: Codex <noreply@openai.com>
* Fix Sovol Zero filament identity and vector formatting
Add hardened-steel nozzle variants with disjoint filament compatibility, retain generic product IDs and preserve renamed preset aliases. Convert 43 scalar vector fields to arrays without changing tuning values and bump the Sovol bundle version.
Co-authored-by: Codex <codex@openai.com>
* Keep only shipped names in the Sovol Zero profile renames
The Zero machines, processes, machine model and SPEEDBENCHY filament carried renamed_from entries for names that only ever existed inside this branch (Sovol ZERO ..., " - Brass", " - Hardened Steel"). Drop those, and keep only the redirects that matter to existing users: the historical Sovol Zero material names and the three deleted hardened-steel presets. The Sovol Zero machine model also sheds the setting_id, instantiation and from keys the model loader ignores.
---------
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
Unwrapped, it ran past the edge of the panel and pulled the layout with
it. Counts under a million now read in thousands, so a 119 k budget is
no longer shown as 0.1 M.
They described the implementation, and a few no longer matched the code.
Each now says what the control does and in what units; five controls that
had no tooltip have one. The catalogs need regenerating.
Nothing removed the even mesh over a texture's flat parts unless the
budget was lowered until simplification had to run. Collapses stay under
a thirty-second of the resolution: on the test map 387584 -> 369876
triangles, with the print unchanged (0.02% of the extrusion).
An earlier attempt was reverted for a 21% heavier result. That was the
colour despeckle switching itself off, not the collapsing: it keyed off
the face parent map, which any collapse empties.
Relief preserved from an earlier bake is counted on top of the budget
instead of eating into it: baking a second area went from ~214 k
triangles to the ~1000 k it was given.
When the resolution needs more triangles than the budget allows, it is
said before the bake under Resolution and again afterwards.
Polymaker, Overture and eSUN presets move from brand subfolders to
BBL/filament/, matching BambuStudio's layout; their names and ids are
unchanged. Default filament lists keep pointing at presets that exist,
0.2 mm nozzles keep a default PLA, and user presets based on removed or
renamed presets still load. Generic SBS is no longer in the Bambu bundle;
new selections on those printers fall back to OrcaFilamentLibrary's
Generic SBS @System. The profile tool now recognises BambuStudio's new
filament id/name maps and support_recommended_params.json as data files.
The Polymaker, BETA, COEX, Overture, addnorth, Numakers, FusRock and
AliZ presets that BambuStudio does not ship now live under
OrcaFilamentLibrary/filament/<Brand>/BBL. The BBL bundle now holds
only the filament presets BambuStudio ships, plus a few Bambu and
generic ones.
New "<product> @BBL base" presets carry the values these presets used
to get from BBL's own bases, so their settings on Bambu Lab printers
are unchanged.
The nightly found its build with a filtered run listing (branch=main,
status=success) and trusted the first result. GitHub serves filtered
listings from a run search index that has intermittently returned
weeks-old results, so some nights tested a build from weeks earlier and
reported its differences as regressions. The same filter also matched
fork PR builds whose branch is named main.
The build is now picked from the unfiltered listing, which stays
current, and filtered here: a successful build_all run of this
repository on the requested branch. Fork PR builds are excluded by
repository. A feature branch is normally built only for its PR, so this
repository's own PR builds stay eligible, but a PR build compiles the PR
merged into its base rather than the head commit the later jobs check
out, so a push or dispatch build of the branch is preferred when the same
page of the listing has one. A scheduled run fails instead of testing a
build more than 48 hours old, and every run names the build it tested
in the job summary.
Manual runs scan further back, so a branch that last built weeks ago
can still be tested, and a new build_run_id input pins one build_all
run, read directly rather than through a search.
# Description
This PR introduces lifecycle events to the plugin API.
For all plugin capabilities, you can define a `on_lifecycle_event`
function in the plugin that takes in a event enum and a small payload
for some generic information on the lifecycle event.
The idea is to keep the payload generic and small, and if you want to
get more information, you should invoke other more targeted APIs to get
more information.
For example, lets say you are keeping track of the the `ObjectAdded*`
event hook for model transformation, addition or deletion. The payload
would tell you the name of the model, and you should use a targeted API
such as `orca.host.plater().model()` to get more information on the
model. This is the overall design principle of the API.
Currently the lifecycle events are the following:
```cpp
enum class LifecycleEvent {
// Project (3mf)
NewProject,
ProjectOpened,
ProjectBeforeSave,
ProjectAfterSave,
ProjectClosed,
ProjectDirtyChanged,
// Slicing pipeline
SliceStarted,
SliceGeometryFinished,
GCodeExportStarted,
GCodeExportFinished,
SlicingJobComplete,
// Plate/model editing
ObjectAdded,
ObjectDeleted,
ObjectTransformed,
ObjectChanged,
ObjectRenamed,
PlateCreated,
PlateDeleted,
PlateSelected,
PlateRenamed,
// Preset
PresetSelected,
PresetSaved,
// Printer/device
PrintStateChanged,
DeviceOnlineChanged,
DeviceDiscovered,
DeviceSelected,
DeviceConnected,
DeviceDisconnected,
UploadStarted,
UploadFinished,
// Print/send jobs
PrintJobStarted,
PrintJobFinished,
SendJobStarted,
SendJobFinished,
};
```
This is an initial draft and lifecycle events can be included later on.
[orca_telegram_notifier_plugin_any.py](https://github.com/user-attachments/files/31220973/orca_telegram_notifier_plugin_any.py)
If you're familiar with telegram bots, after you install the telegram
bot, in the config of this plugin, you can enter the Bot ID and the Chat
ID with said bot.
# Screenshots/Recordings/Graphs
<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->
## Tests
<!--
> Please describe the tests that you have conducted to verify the
changes made in this PR.
-->
For this plugin, I am testing it with a telegram bot that sends me a
message on lifecycle event.
<!--
> 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)
The CLI turned "align to Y axis" on for every i3 printer with no way to opt
out. With rotations forbidden the pre-rotation is the result, so every object
ends up turned 90 degrees from how it was loaded. The GUI defaults the
checkbox the same way for i3 printers, but lets the user untick it.
Add --align-to-y-axis. When it is not given the printer-structure rule still
applies, so existing calls are unchanged; the CLI's own options are filled
with defaults after parsing, so the keys the user typed are remembered to
tell the two apart.
* Answer the Preview's Per-Frame Time Query From a Cached Sum
The G-code preview's cost is linear in the number of toolpath vertices, and on a
tall multi-filament print the wipe tower dominates that count: it emits a roughly
constant 160-180 moves on every layer whatever the object is, measured at 57-61%
of all moves on a three-filament print.
Four places scanned or allocated across the whole vertex array. None of them
needed to.
get_estimated_time_at re-accumulated the estimated time from vertex 0 on every
call, and its caller is the tool marker tooltip, which ImGui re-renders every
frame while the properties panel is unfolded. It now starts from a running sum
kept at each layer's first vertex, built at load in vertex order, and adds only
that layer's vertices: the same additions in the same order, so the float result
is unchanged, at a cost of one float per layer and time mode rather than per
vertex. At the 351k vertices of a 636-layer test print the call scanned the whole
print (238us); it now scans one layer.
update_view_full_range walked from vertex 0 to find where the layer range starts,
on every slider tick. It now starts at the first vertex of that layer. The index
is derived from the vertices rather than from Layers::Item::range, because
Layers::update folds a vertex whose layer_id arrives out of order into whichever
bucket is open, which makes that range the wrong answer in general; the index
costs four bytes per layer, not per vertex.
update_colors_texture allocated one float per vertex of the whole print on every
slider tick. It now reuses a buffer.
render_legend fetched the layer Zs and the per-layer times from inside loops over
the custom G-code items, and built whole vectors only to test them for emptiness.
The times are hoisted, the Zs are built lazily so a print with no colour change
does not pay for them at all, and the emptiness tests use the existing counters.
No rendering behaviour changes.
* Draw the Preview's Toolpath Segments From an Index Buffer
The preview's frame cost is dominated by one call: a single instanced draw of
every visible toolpath segment. On a tall multi-filament print the wipe tower
supplies most of those segments, which is why the preview of a large tower is
slow and why shrinking the layer range speeds it up again.
That draw is not fill bound. Shrinking the model to about a fortieth of its
screen area moved the frame from 419 ms to 401 ms, so the cost is per segment,
not per pixel, and it is paid in the vertex shader: five texelFetch calls plus
several cross/normalize per invocation.
Each segment is a box of eight corners, but it was submitted with
glDrawArraysInstanced over a 24 entry array, so every corner was transformed
once per triangle that touches it and the shader ran 24 times per segment. The
same 24 entries are now an element buffer over the eight distinct corners, which
lets the post-transform cache reuse them and drops the shader to 8 runs per
segment. The triangles, their winding and the vertex_id each corner receives are
unchanged.
Measured over 100 frames on the 636-layer, 351k-vertex three-filament fixture,
the segment draw goes from 381 ms to 322 ms per frame. That is a software
rasterizer, where triangle setup dominates and understates the win; the drop in
shader invocations is the transferable part.
Verified by loading the same project in this build and in a build of the parent
commit and comparing the canvas across three states - the default view, a
rotated camera, and a reduced layer range: pixel identical in all three. The
rotated case matters because the shader picks its corner offsets from the camera
direction. The only pixels that differ anywhere on screen are in the G-code text
panel, which prints a per-process object id that varies between any two runs.
* Add Prusa CORE One MMU3 profiles
Dedicated MMU3 CoreOne profiles (like those used on prusaslicer 3).
Tested with latest coreone and mmu3 firmware, and works as well as prusaslicer.
Correct model default materials to reference compatible MMU3 filaments.
Co-authored-by: Codex <noreply@openai.com>
* Consolidate the CORE One MMU3 generic filaments
The bundle shipped two families covering the same four MMU3 variants for
each generic material: a standalone `Generic X @MMU3` and a
`Prusa Generic X @CORE One MMU3`. The `Prusa Generic` spelling was renamed
away from the rest of the tree, so re-name the CORE One-tuned family to
`Generic X @Prusa CORE One MMU3` (they inherit the CORE One tune and now the
shared generic product id) and drop the standalone files, which only carried
raw material-base values. Repoint the model default_materials and re-register
the index.
* Fix the CORE One MMU3 0.4 default process
default_print_profile named `0.20mm Speed @COREONE0.4 + MMU3`, but the
preset is `0.20mm SPEED @COREONE0.4 + MMU3`. Preset lookup is case-sensitive,
so the intended default never resolved and compatibility selection silently
picked another tier.
* Normalise the CORE One MMU3 process names
Match the bundle's all-caps quality ladder: `Fast Detail` -> `FAST DETAIL`,
`Speed` -> `SPEED`, `Structural` -> `STRUCTURAL`, `Balanced` -> `BALANCED`.
Filenames now equal their preset name, as every pre-existing Prusa process
file does, and the index is rebuilt for the renamed entries.
---------
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
Collecting every candidate within the radius into a vector cost more
than the search itself. Same order, so the seams are unchanged;
align_seam_points ~19.6 s at 0.1 mm / 2000k, was ~21.
detect_surfaces_type, process_external_surfaces and the vertical shells
each waited on their own heaviest layer in turn. The LOTR map plate
slices in ~10.5 min at 0.1 mm / 2000k, was ~11.5; ~87 s at normal
settings, was ~97.