Since the OCCT 8.0.1 update, some STEP files imported with cone faces missing. OCCT told the two seam pcurves of a cone apart with a 1e-7 threshold, which fails when the neighboring pcurves end slightly past the seam. The OCCT patch now picks the closer pcurve. The #16290 fix is kept.
Also stops admesh from merging unrelated edges of open meshes from STEP and SVG import on ARM64. A mesh built in memory reaches the nearby check with a tolerance of 0, and dividing by it was undefined. The check now returns early, which is what x86-64 already did.
A SPARKX i7 with a CFS Lite reports "cfsConnect": 0 and then answers the slot query. The query stopped at that status, so filament sync found no slots. It now keeps reading for a short no-CFS deadline and treats the printer as having no CFS only when no slots arrive.
* Trim Trailing Zeros at the Decimal Separator wxWidgets Wrote
double_to_string formats with wxNumberFormatter, which writes the UI locale's decimal separator, but trimmed after the C locale's separator. When the two differ, as reported on macOS in Czech and Russian, nothing was trimmed and fields showed 0.2000. Trim at wxNumberFormatter::GetDecimalSeparator() instead.
* Parse Point Fields Whichever Decimal Separator They Show
Point fields write X and Y with the UI locale's decimal separator but read them back with ToDouble, which uses the C locale's. When the two differ, any value with decimals fails with Invalid numeric and resets. Read them with string_to_double_any_separator, which converts the other separator to the C locale's before ToDouble, so every input ToDouble accepted before still parses.
* feat: initial migration to let UV install plugins for .whls
* fix: clang-tidy
* Simplify plugin wheel loading through uv
* fix: use legacy loader for plugins loaded with legacy method
* fix: use same unzip name as old one
* fix: keep legacy plugins on the same path
* fix: unit tests
* fix: allow epoch versions in wheel filenames
* fix: clang-tidy
* fix: pass Unicode paths to uv on Windows
* fix: cleanup
* fix: support Windows long paths when installing wheel plugins
* fix: recognize uppercase .whl extensions in plugin discovery and dependencies
* fix: keep plain import paths for short namespace and compiled packages
* refactor: fold duplicate wheel import and cache migration branches
* fix: treat an absent package directory as a single-module import
* fix: windows long path deletion (#17703)
* fix: handle long Windows plugin cleanup paths
* fix: warn when plugin deletion removes no files
* fix: audit process execution by name, ignore args
* test: fix stale test expectations
* fix: resolve Windows subprocess audit targets from command line
* fix: preserve quoted Windows paths in process audit grants
* fix: grant shell permissions for os.system commands
* fix: require grants for all possible os.system shells
* fix: clarify process permission scope in prompts
* refactor: simplify audit target handling
* fix: handle ambiguous Windows process commands
* test: fix for ambigous calls on windows
Mouse ear placement no longer depends on where the outline starts. The old code simplified the outline with Douglas-Peucker, which is anchored on its first vertex, so rotating a part changed which rounded corners got an ear.
make_brim_ear_points() now measures the turn at each vertex over a window of arc length on both sides, and doubles the window while the outline keeps turning. Corners with large fillets now get an ear at the default settings. A candidate whose window already reached a placed ear is dropped, so a sharp corner next to a curve gets one ear. The Brim Ears tool's Auto-generate uses the same function.
Behavior change: a smooth closed outline such as a disc gets no ears at the default 125 degree max angle. Raising the max angle to 135 or more still gives it ears.
Fixes#17119
The Type 1 prime tower purges the prime volume of each filament, and no tab showed it, so on Bambu Lab printers the process Prime volume looked like the setting but changed nothing. The filament's Multimaterial page now has a Prime volume group with Filament change, and Hotend change on a printer whose extruder holds more than one nozzle, such as the H2C. On a Type 1 tower the process Prime volume is greyed out. Slicing is unchanged.
Fixes#16350
Save and load the plate's skirt start angle in the project file. Before this, a skirt start point set in Plate Settings was lost on save. Adds a round-trip check to the plate test in test_3mf.cpp.
* Skip Arachne Toolpaths When the Voronoi Diagram Cannot Be Repaired
When the Voronoi repair fails, the skeletal graph built from the
diagram has edges without twins, and the later stages dereference
them. Leave the graph empty and log an error instead, so that outline
gets no toolpaths rather than crashing the slice.
* Cast the Far Sliver Coordinates to `coord_t` in the Unrepairable Voronoi Test
On macOS int64_t is long long, so a literal of type long matched no Point constructor exactly and the call was ambiguous.
* Treat a filament_map Nozzle Outside the Printer as Nozzle 1
A filament_map entry of 0, a negative number or a number above the
nozzle count made Extruder::extruder_id() wrap or run past the end, and
print_machine_envelope then took the std::max over the per-extruder
machine limits out of bounds on a flavour that emits them.
Print::apply now treats an entry outside [1, nozzle count] as nozzle 1,
before the variant expansion and the config snapshot, and logs it once.
After the clamp the slicing engine only sees in-range values. It works
on this print's copy of the config; readers of the plate or project
config are not changed, and in-range maps are left alone.
* Skip a physical_extruder_map Entry Outside the Per-Nozzle Table on Export
The first-filament table built for the start G-code is sized by the
nozzle count, and the export wrote it at the index named by
physical_extruder_map. An entry outside that range corrupted the heap,
and a negative one aborted or hung the export.
The value is a firmware tool number that is also emitted elsewhere, so
it is left as it is; only the write into the table is bounded.
* Treat a filament_map Nozzle Outside the Printer as Nozzle 1 in the CLI
With --filament-map-mode Manual on a multi-nozzle profile, the CLI
indexed the per-nozzle unprintable-filament sets, and shifted the
per-filament printable status, with the raw filament_map value. A value
of 0, a negative number or one above the nozzle count read out of bounds
and crashed before the print was configured.
The checks now use a local copy of the map in which an entry outside
[1, nozzle count] is nozzle 1, the same policy Print::apply applies.
In-range maps are unchanged.
simplify() may move a vertex to the intersection of its neighbouring
lines, guarded by a check that the point stays near them. The check
squared the distance in int64, which overflows when nearly parallel
lines meet more than about 3 m away, so the far point was accepted.
The broken outline gave a Voronoi diagram the repair could not fix,
and SkeletalTrapezoidation then dereferenced an edge without a twin.
Compute the squared distances in double.
* Arrange items almost as wide as the bed again
An arrange spacing lets a rectangular bed grow by the part of the spacing
past every item's brim or tree support, the way printing by object
already grows it. The spacing is kept in full and a part that fits the
bed is not refused for it. The bed does not grow when an item that can
be placed would keep less inflation than the growth, beyond the EPSILON
slack, so a part that fills the bed may sit up to EPSILON past its edge,
within BuildVolume::BedEpsilon. A round bed never grows for a spacing,
since moving its points along each axis would grow it unevenly.
The cap on an item's inflation measures the item as the nester packs it,
inflated with square joins and turned, so it holds for an item turned to
the Y axis or by hand, and it leaves room for the skirt. An item too big
for the bed keeps its full inflation, so it is still refused on a grown
bed, and it no longer sets the bed margin given back to the other items.
Printing by object, this keeps the 5 mm margin for the placed objects
when another one is refused.
The arrange bed keeps EPSILON on each side of the largest item for every
print sequence, since the nester cannot place an item beside one that
fills the bed exactly.
The skirt room reads a percent first layer line width against the
nozzle diameter instead of as millimeters, and accepts a width stored as
a plain number.
update_arrange_items() runs the arrange setup in the order it depends on
for the arrange job and the CLI.
* Arrange items the nester has to turn
With rotations allowed the nester turns an item that does not fit as it
lies, even onto the bed's diagonal, so no item counts as too big. An item
that has to turn is measured at an angle where it fits along the bed's
axes, if there is one, so it keeps its spacing.
* feat: keep plugins activated/deactivated based on pre-update state
* fix: preserve plugin capability choices across updates
Cloud plugin replacement resets the install-state sidecar, which silently
re-enabled capabilities the user had disabled. Snapshot the installed sidecar
before replacing the package, then write the pre-update capability choices and
activation intent back after the install. Permissions stay cleared so the new
package must request them again, and the reload now waits until that state is
persisted.
Add regression tests for updating both an active and a deactivated cloud
plugin.
* fix: roll back a failed plugin update and keep the old package usable
Download the replacement before unloading or deleting the installed package, so
a download failure leaves the old package and its sidecar untouched. Refuse to
replace a package whose sidecar exists but cannot be read, rather than resetting
the user's capability choices and grants.
Extract the install-from-package step so the updater can reuse it. When the
install fails, restore the previous sidecar (activation intent, capability
choices and grants) that the unload step overwrote, and reload the old package
if it was active. Keep a stale package from another cloud directory until the
new one is committed.
In install_plugin, use one rollback helper for every failure path and give
backups a "__" prefix so an abandoned backup is never discovered as a plugin.
Add regression tests for failed download and failed install.
* fix: prevent a plugin load and an update from racing
Claim a plugin key for the duration of update_cloud_plugin under m_mutex, and
make load_plugin refuse a key that an update owns. An update that starts while
a load is still running now fails with a clear error instead of unloading the
package underneath the loader; the claim is released before the replacement is
reloaded and on every failure path.
Keep the dialog's Update button disabled while the selected plugin is loading,
so the UI cannot start an update the manager would refuse. Add a JavaScript
test for the button state and a C++ test for the load refusal and claim
release.
* fix: clang-tidy
* fix: plugin update safety and simplify state handling
* fix: plugin update rollback and error reporting
* refactor: simplify plugin update state handling and tests
* fix: avoid marking plugins as errored on update conflicts
* Keep Heavy Boost and Plugin Headers Out of Widely Included Headers
Several headers that most of the code includes pulled in large libraries they barely use, so hundreds of files compiled them for nothing:
- Point.hpp, Line.hpp, Polygon.hpp and ExPolygon.hpp included all of Boost.Polygon to declare traits. Point and Line now include only the concept headers they need, and the polygon traits move to BoostPolygonTraits.hpp, included by BridgeDetector.cpp, the one file that runs Boost.Polygon algorithms on polygons.
- ProjectTask.hpp included Boost.Thread and the filesystem streams but only uses boost::filesystem::path.
- Utils.hpp included Boost.DateTime for one inline function, which moves to utils.cpp.
- Semver.hpp used boost::format for two version strings; std::to_string prints the same.
- MainFrame.hpp held PluginPages by value, which brought in the web view and plugin headers; it now holds it by unique_ptr.
- Model.hpp included STEP.hpp, and with it OpenCASCADE, for a forward-declarable type and two typedefs.
Files that relied on these headers arriving indirectly now include what they use.
* Include What the Polygon Traits and the End-Time Helper Use
* Drop Two Unneeded Includes and Include the Filesystem Directory Header
tests/CATCH2.md says to run the suites with `--order rand --warn
NoAssertions`. On main that fails in fff_print (8 test cases), libslic3r
(15), sla_print (1) and slic3rutils (4), even when each case runs alone.
ctest never passed the flag, so nothing stopped new ones. Most of these
tests have SECTIONs that only set up state, with the assertions after
them, or generated cases that return early for combinations that don't
apply. Catch2 counts assertions per section, so each of those reads as
an empty test.
Where only a value or a short setup changes, use GENERATE or a table and
generate only the combinations that apply. Elsewhere, end each section
with a call to a local check. ctest now passes `--warn NoAssertions`, so
CI fails a case or section that asserts nothing, and tests/AGENTS.md
says so. ctest also passes the CATCH_EXTRA_ARGS cache variable, which
nothing read before, split like a command line, so setting it now takes
effect.
Three tests only wrote a debug mesh or diagram and asserted nothing.
They now check that the Voronoi diagram of the six points is complete,
that hollowing with hfRemoveInsideTriangles removes at least half of the
roughly 400 mm² of the two spheres that lies deeper than the wall, and
that the half cone is closed. The legacy 3MF scenario checked for a
volume map on every plate of a file that has none, so it now also saves
and loads a project with a plate, and its name says so.
* Use WebKit's shared-memory transport on Wayland outside the Flatpak
In a Wayland session, the hardware DMABUF path of Ubuntu's WebKitGTK 2.52
on Intel GPUs froze the Preview, Device and Project tabs and left the 3D
view drawn over other pages. On the default path of a build with EGL,
outside the Flatpak, set WEBKIT_DMABUF_RENDERER_FORCE_SHM=1, as Orca
already does for NVIDIA and virtual machines, so compositing stays on.
WebKitGTK 2.42 and 2.43 have the DMABUF renderer but ignore that switch,
so they get WEBKIT_DISABLE_COMPOSITING_MODE=1 instead. The Flatpak's
runtime WebKitGTK works, so it keeps the hardware path.
A Wayland session is detected by wayland_socket_available(), which looks
for the socket the way wl_display_connect(NULL) does. The no-EGL fallback
and the GUI start-up check use it too, so all three agree with GTK.
is_running_in_flatpak() checks only /.flatpak-info, because a host process
started from a Flatpak can inherit FLATPAK_ID; the data-dir migration and
the Troubleshoot dialog now use it. Both helpers live in libslic3r/Utils
and have unit tests.
Fixes#17381
* Note that Debian's WebKitGTK 2.54 on AMD freezes too
An overhang cluster stored one overhang per layer, so a second overhang
joining the cluster on a layer it already had was dropped and got no tree
support. Store every overhang of the layer, as BambuStudio does since
adb3fbcfc.
A process whose print_extruder_variant has no entry for the printer's extruder type and nozzle volume (a Bowden
printer with a "Direct Drive Standard" process, or a bare "Bowden" variant) made Tab::switch_excluder return
before it mapped the page's variant fields. Editing a per-variant option on the Objects tab then read the end of
that empty map in TabPrintModel::on_value_change and crashed with std::bad_alloc.
switch_excluder now falls back to the extruder's first variant through find_variant_index, as slicing does,
and logs it; get_index_for_extruder keeps returning -1 for its other callers. on_value_change checks the map
lookup and otherwise takes the index from the field id.
The short-tower final unload is only needed on single-extruder MMU printers, which have to pull the
last filament out. Without SEMM the final purge only rams, with no retraction or parking, so a
toolchanger whose filament has multitool ramming on printed those lines in mid-air above the tower.
Generate it for SEMM only.
Since #16867 pads filament_colour to the filament count, every CLI run that loads filament presets without a colour recomputes the flush matrix. Standalone filament presets may omit the per-filament keys that block reads. A missing filament_diameter crashed the CLI, and a short filament_is_support failed the size check.
Grow both to the filament count before the recompute. A missing diameter follows the first filament, as get_at() reads it. A missing support flag is off.
get_min_flush_volumes() also read past the end of filament_long_retractions_when_cut and filament_retraction_distances_when_cut when a filament omitted them. Pad both with the first filament's value, so the flush matrix matches the print.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
OpenVDB, Blosc and OpenEXR are no longer built or searched for by default. Only SLA hollowing uses them, and SLA printing can't be reached in OrcaSlicer. Configure both the deps and the app with `-DSLIC3R_OPENVDB=ON` to build them again.
Without OpenVDB, `sla::generate_interior()` logs a warning and returns an empty interior, and the hollowed-cube SLA test is skipped. The Flatpak manifest no longer downloads the three source archives.
* Fix missing seam markers in the preview on overhanging outer walls
An outer wall that starts on an overhang is labelled "Overhang wall" in
G-code, like the overhanging part of an inner wall, so the preview's seam
detector never opened a candidate for it.
The G-code generator now writes one comment, OUTER_OVERHANG_WALL, before
such a wall. The detector reads it and treats that wall as an outer wall
for seam detection only, so extrusion roles, legend and colours stay the
same. Markers also appear in G-code opened from a file.
* Share the outer wall check and drop the sloped seam test variant
A loop that starts on an overhang never gets a scarf seam, so the tagged
stream with a sloped start could not be generated. The outer wall check
used by the G-code generator and SeamPlacer moves to is_outer_wall(), and
the generator runs it last, after the cheap conditions.
The test compared every one of its 216 combinations against a fresh slice of the final settings, but those settings take only 72 distinct values. Keep each fresh slice and reuse it, which cuts the test's slices from 648 to 504 with the same checks.
* Variable layer height on several objects, and with the prime tower on objects of different heights
The variable layer height tool now opens with several objects selected.
Adaptive, Smooth, Reset and manual edits apply to all of them: they share one
profile, the finest layer height any of them asks for at each Z, unless
"Each object separately" is ticked. Every selected object is painted with
its layer heights. With a profile each, up to three objects get a bar of
their own, drawn to one scale, and the bar under the mouse is the one edited.
The prime tower check compares the layers objects are sliced at over the
height they share, rather than the raw profiles, which never matched once the
profile of a lower object ended at its own top. Precise Z height, which fits
the last layers of each object to its own height, is left out of such a
print, with a warning.
* Check the prime tower layers on the sliced objects, and note the new strings for translators
* Include what the new tests use
* Compare the layers as sliced, before the prime tower is generated from them
* Check that precise Z height stays on without a prime tower
* Keep each object's layer height texture on the GPU, and mark only lower tops
The variable layer height tool sent a 1024x1024 texture to the GPU for every
selected object on every frame, and set_config(), run after every edit,
dropped the other objects' textures so that each was generated again.
Each other object now has a texture of its own on the GPU. It is generated
and sent only when its profile, its height or the slicing parameters it shows
change, which set_config() now only asks to check. The object shown sends its
texture only when it is generated, and while the objects share one profile,
those on its layers are drawn with its texture and need none of their own.
The textures of objects no longer selected are freed.
The bars and the layer height curves are built again only when what they
show changes, and each bar is scaled with its own object's layer heights.
A lower object's top is marked only when it is lower than the object shown,
objects ending at the same height share one label, and a label stays on the
canvas and below the one above it.
The comment on precise_z_height_overridden() now says what the override
trades: the tower can join the off-grid layers to the tower layer below, but
a joined layer holds two purges, which makes the tower deeper.
* Fix the precise Z warning, shared profiles across first layers and the bar clicked
- The precise Z override, and its warning, now need an object with precise
Z height on. Every plate with a prime tower and variable layer height on
objects of different heights warned about a setting that is off by
default.
- The objects the override slices again get their slicing parameters back
at once, since validate() reads them before slicing.
- When the objects share one profile, an object that starts its layers
elsewhere than the object shown, with a raft of its own say, keeps its
own. The shared profile starts with the first layer of the object shown,
and PrintObject::update_layer_height_profile() dropped it on such an
object, which then printed at the preset layer height.
- Clicking a bar edits its object, even when no frame was drawn since the
mouse got there.
- Select all is ignored while a profile is painted, and select all plates
while the tool is open.
- The bars' models are made again, not copied, when their number changes:
a copy shares the GPU buffers that the original deletes.
- Objects with no height above the bed are left out of the tool, and a
profile fitted within EPSILON above one of its entries no longer runs
past it.
* Keep the object top labels below the toolbar row
When the toolbar row ends next to the bar, the label of an object that
ends near the top of the tallest one covered the toolbar's last buttons.
Such a label now starts below the row, with its arrow pointing up to the
line on the bar.
* Fill the layer height texture up to the top of the object
The last layer can end under the top of the object, by up to half a
layer, and no layer wrote the cells there. The top face is drawn with
them, so it showed what the buffer held before: black on the texture of
an object made for the first time, or the colours of another object.
The last layer now fills them, with the shade of its top.
* Draw horizontal faces without the layer stripes
A horizontal face lies at one height, so the stripes cannot show on it,
only the shade they have there. That shade changed whenever a layer
under it moved, and the tops flickered at every stroke. Such a face now
gets the plain colour of its layer height, from the 2nd level of the
texture.
That level is now read at its own level of detail instead of with a
bias. On a horizontal face the texture coordinates do not change, so the
GPU picks the 1st level however large the bias, and read it at the
coordinates of the 2nd: the tops showed black, or the colour of another
height. The 110 shader does so where GL_ARB_shader_texture_lod is
available, and keeps the stripes elsewhere.
* Include ObjectID.hpp where ObjectWithTimestamp is used
clang-tidy (misc-include-cleaner) asks for the header to be included directly.
* Find the horizontal faces with the inverse transpose of the world matrix
The variable layer height shader took the normals to world space with the world matrix itself, which is only right under a uniform scale. With a non-uniform scale it drew sloped faces as flat, and once the object was also rotated it missed real flat ones. The normals now go through the inverse transpose of the world matrix, which render_object_volumes() already built for the view normal matrix.
* Note why the precise Z override keys on has_wipe_tower()
Since #16999 the tower is printed only when slicing finds it is needed, so
the override also applies on plates where no tower is printed in the end.
The CLI now sets one nozzle_volume_type per nozzle, as the GUI does. A command-line value wins, then the project's own types, then the printer's defaults. A short list repeats its first entry and a long one is cut to the nozzle count. The sized list is written to the project config and over the command-line value, so the export has one type per nozzle, and reopening it in the CLI keeps the flush matrix the user set. The flush volume setup reads the sized types instead of indexing a short command-line list past its end.
Adds the cli_nozzle_volume_type test.
When the per-extruder printable areas only touched or did not overlap, get_shared_poly read the first polygon of an empty intersection. That crashed the CLI on the bed shape, and the GUI in scale to fit, fill bed and prime tower placement.
The shared area is now empty in that case. An area with fewer than three points leaves its extruder the whole bed. Placement (get_bed_shape with use_share, PartPlate::get_build_volume(true)) falls back to the whole bed. The prime tower's default position and drag fall back to the plate's shape. Validation now says the extruder printable areas share no common area, instead of reporting the tower as partially outside the printable area.
Profiles whose areas overlap, and profiles without areas, get the same shapes as before.
* Cut: keep per-part filament colors after dovetail cut
The dovetail path merged every model part of each half into one volume
built from a raw mesh, dropping per-part extruder and material overrides,
so the cut result fell back to the object-level extruder (T1).
Merge by effective slicing identity (extruder, material, per-part config)
instead, one merged volume per group, copying the representative's config
and material. Connectors and modifiers are never merged or deleted, and
single-group results keep today's single volume named after the object.
Fixes#17187
* Fix missing includes
* Cut: number extra parts and fix null material lookups
Name the extra merged parts Object_2, Object_3, ... as splitting a mesh
into parts does, instead of Object_T<extruder>, which misleads when the
parts differ by material or by a per-part setting, and whose fallback
suffix was not re-checked for uniqueness.
Move the merged mesh into the new volume instead of copying it.
add_cut_volume() dereferenced the source volume's material, but the cut
model has no material table, so cutting a part that has a material id
crashed before the merge could carry that id. Fall back to the material
id alone, and let PrintObject skip a material's region settings when the
material is missing rather than dereferencing null.
* Cut: don't replace the source material while copying it
add_cut_volume() carried the source volume's material with set_material(),
and Model::add_material(id, other) deletes the existing material before
copying from other. The source volume and the target object share the cut
model, so the second copy of the same volume (the "_A" and "_B" halves of
a groove cut) resolved that same material and replaced it with a copy of
itself after deleting it, reading freed memory. A part with a material id
segfaulted the cut before the merge could carry that id.
Copy the material's settings only when the target model has no material
of that id yet; otherwise just set the id and keep the existing one.
* Cut: carry a part's material id and merge by effective settings
The cut model holds no material settings, so add_cut_volume() only needs
the id: copying the material there could only replace the source object's
own entry, which Model::add_material() deletes before copying from it.
Drop the unused duplicate of add_cut_volume() in Model.cpp as well.
Group parts by the settings they slice with rather than by the keys they
set explicitly: a part that restates a value the object already sets now
stays with a part that leaves it implicit, instead of coming back as
Object_2.
* Model: keep a part's material when converting units
ModelObject::convert_units() rebuilt a clone detached from its model and
then called set_material() on it: the source volume's material was read
without a check, and set_material() reached add_material() through the
clone's null model. Any part with a material id crashed the conversion.
Copy the id, pointing the clone at the source model for the call so the
entry is recorded and its settings resolve after the conversion.
set_material() has no callers left, so remove it.
* Model tests: free the converted objects through a model
ModelObject's destructor is private, so the tests cannot delete the
objects convert_units() hands back. Give them to a Model, which owns
model objects and frees them.
Keep the final wipe-tower unload for ramming printers when the tower stops short of the object's top
The Type2 final purge was skipped whenever the tower stopped below the object's top layer,
so a ramming printer's last filament was never unloaded. Generate it again when the last
filament rams (single_extruder_multi_material or filament_multitool_ramming), placing it at
the object's top layer so the nozzle doesn't descend into the part, and keep skipping it
otherwise.
Co-authored-by: Fernando Marino <f.marino@rheagroup.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>