Commit graph

7833 commits

Author SHA1 Message Date
HellAholic
67bae5fda3
Merge branch 'main' into CURA-12701_user_estimation_factor 2025-12-09 14:06:06 +01:00
Erwan MATHIEU
1f4ba75e64 Fix unit tests
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
unit-test / Run unit tests (push) Waiting to run
conan-package / conan-package (push) Has been cancelled
2025-12-02 10:01:08 +01:00
HellAholic
85e20def91
Merge branch 'main' into CURA-12016_improve-loading-time-with-many-printers 2025-11-25 13:10:36 +01:00
HellAholic
e782b8d1d9
Merge branch 'main' into CURA-12811_settings-with-errors-can-be-ignored-when-slicing
Some checks failed
conan-package-resources / conan-package (push) Has been cancelled
conan-package / conan-package (push) Has been cancelled
printer-linter-format / Printer linter auto format (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
conan-package-resources / signal-curator (push) Has been cancelled
2025-10-29 21:09:44 +01:00
Erwan MATHIEU
21622a4bc8
Update deprecation version
Some checks failed
conan-package / conan-package (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
CURA-12811
2025-10-28 11:20:14 +01:00
Remco Burema
c86934bd6d Defensive programming: In case returns aren't boolean.
Some checks failed
conan-package / conan-package (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
Apparently this can occur -- has at least once according to Sentry issue CURA-'9K9', which this attempts to fix.
2025-10-28 09:32:42 +01:00
Erwan MATHIEU
c35b16f9f2 Trigger property error checking when appropriate
CURA-12811
2025-10-24 14:10:23 +02:00
Erwan MATHIEU
f19cc66ddb Fix actions relying on never-updating property
CURA-12811
2025-10-22 15:50:40 +02:00
HellAholic
e10093167c
try-except instead of if
Adding the defaultExtruderPosition could be wrongly adding an unused extruder. In this case I do prefer a try/except to indicate that this is kind of an edge-case, and it also avoids some string/int conversions.

Co-authored-by: Erwan MATHIEU <erwan.mathieu@ultimaker.com>
2025-10-21 09:16:11 +02:00
HellAholic
549b040632 Safeguard against decrease in number of extruders
When the painted model goes from a machine with higher number of extruders to a lower number of extruders with painted data, adding the same safeguard as the limit to extruder settings to prevent crash
2025-10-21 09:04:46 +02:00
Erwan MATHIEU
3e6bba84ae Fix painted extruders update when imported 3MF model
Some checks failed
conan-package / conan-package (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
CURA-12742
Also fixes CURA-12799
2025-10-20 16:23:58 +02:00
HellAholic
d1aee97ea2
Merge branch '5.11' into CURA-12742_add-message-when-painted-with-disabled-extruder
Some checks failed
conan-package-resources / conan-package (push) Has been cancelled
conan-package / conan-package (push) Has been cancelled
printer-linter-format / Printer linter auto format (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
conan-package-resources / signal-curator (push) Has been cancelled
2025-10-17 13:57:44 +02:00
Erwan MATHIEU
df31cc8e31 Use separate node attribute to indicate assigned to disabled extruder
CURA-12742
2025-10-16 09:50:09 +02:00
Erwan MATHIEU
06a7592483 Do not update stacks at every stroke, but under the anti-bounce timer
CURA-12752
2025-10-15 16:01:03 +02:00
Remco Burema
f9c77f8730 For multi-material painting; stack needs to be updated.
Some checks are pending
conan-package / conan-package (push) Waiting to run
unit-test / Run unit tests (push) Waiting to run
... because the extruders used for the current object can change (clear all bits of extruder #2 paint on a single object, which results in the object printed with extruder #1 only, which could result in the prime-tower needing to be gone -- or the other way around).

The _previous_ way of doing that was just spamming the stack changes, but that gave other problems.

part of CURA-12752
2025-10-15 11:15:08 +02:00
Remco Burema
0396a782b7
Change from code-review.
Easier to read.

done as part or CURA-12752

Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>
2025-10-14 11:35:28 +02:00
Erwan MATHIEU
375f030c09 Update extruders count only when inactive
CURA-12752
The previous method was not efficient enough in case of large models, where a single painting stroke can easily cover almost the whole texture (in bounding box). Reverted to the version where the whole texture is counted, but cached in the SliceableObjectDecorator and updated on timer so that it is not done during painting.
2025-10-13 14:22:39 +02:00
Remco Burema
c412def982 Extruder counts in image was too slow, cache and do per bounding-rect.
Some checks failed
conan-package-resources / conan-package (push) Has been cancelled
conan-package / conan-package (push) Has been cancelled
printer-linter-format / Printer linter auto format (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
conan-package-resources / signal-curator (push) Has been cancelled
Rewrite the whole 'count pixels to get extruders for paint on materials' so that it's cached outside of the extruder manager instead, so that counting pixels in a 4096x4096 image isn't called xx of times per second.

part of CURA-12752
2025-10-08 09:58:05 +02:00
Remco Burema
107c3503d7 Merge remote-tracking branch 'origin/5.11' into CURA-12752_multimat_paint_prime_tower 2025-10-07 11:34:01 +02:00
Erwan MATHIEU
066bb39683
Merge branch '5.11' into CURA-12740_multi-material-with-ex2
Some checks failed
conan-package-resources / conan-package (push) Has been cancelled
conan-package / conan-package (push) Has been cancelled
printer-linter-format / Printer linter auto format (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
conan-package-resources / signal-curator (push) Has been cancelled
2025-10-03 13:20:09 +02:00
Erwan MATHIEU
1ee01ae315 Bump SDK version for 5.11 2025-10-03 12:50:40 +02:00
Erwan MATHIEU
508886cac7 Merge remote-tracking branch 'origin/5.11' into CURA-12740_multi-material-with-ex2 2025-10-03 12:22:03 +02:00
HellAholic
3abac31778 Revert the addition of keys to the ignore_keys and add them to the backups
Some checks failed
conan-package-resources / conan-package (push) Has been cancelled
conan-package / conan-package (push) Has been cancelled
printer-linter-format / Printer linter auto format (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
conan-package-resources / signal-curator (push) Has been cancelled
The whitelist of the preferences only allows: "general/visible_settings", "cura/active_mode", "cura/categories_expanded", "metadata/setting_version" to be stored.

In backups, we're obfuscating Secret Preferences and these should be considered as items for that.
2025-10-02 15:21:01 +02:00
Erwan MATHIEU
ec38c8d4c6 Optimize function by not coping the image
Some checks failed
conan-package / conan-package (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
CURA-12752
2025-10-02 14:15:45 +02:00
Remco Burema
9d52e5a2a6 Fix ordering of texture-mappings.
... unless little vs. big endian-ness was the problem.

shoved into CURA-12752 since I was in the code anyway.
2025-10-01 23:14:11 +02:00
Remco Burema
e3204707db Move 'get painted on extruders' method, use for build-volume.
(Not sure I'm happy with this, but) now we can use this _both_ in the slicing itself _and_ the bounds. The big downsides are a) I had to connect the scene changed signal to the on-stack-changed method, that seems ugly and potentially slow b) I'm not sure this method belongs in the ExtruderManager -- otoh, where else is it going to live (unless we want to make a new type of plugin-object?).

CURA-12752
2025-10-01 22:39:22 +02:00
Erwan MATHIEU
9fa9a7395b Handle material painting i.r.t to affected object extruder
CURA-12740
2025-09-29 10:06:39 +02:00
Erwan MATHIEU
b5f510face Fix painting when switching between printers with different number of extruders
CURA-12730
We now always allocate a data range for all possible extruders (16) instead of only the ones the actual printer can support.
2025-09-24 16:25:23 +02:00
Erwan MATHIEU
736e5b4328 Add mapping for new nylon material
Some checks are pending
conan-package-resources / conan-package (push) Waiting to run
conan-package-resources / signal-curator (push) Blocked by required conditions
conan-package / conan-package (push) Waiting to run
printer-linter-format / Printer linter auto format (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
unit-test / Run unit tests (push) Waiting to run
2025-09-19 12:09:09 +02:00
Remco Burema
115d2d5b77 Fix 2 calls w.r.t. new authorization workflow _outside_ of the API.
New rules means we have to put printjobs and such behind a little authentication, as these contain personally identifiable info. These two effected calls where found _outside_ of the API class where I thought to be able to fix it 100%. See also the TODO's in the neighbourhood -- but I'm not sure I can just do what those say (move the relevant methods to the API), as those methods to be moved are _inside_ the larger Cura SDK (and they're public) and the place where I'm meant to move them to (the ClusterAPIClient) is _not_ (as they're in a plugin).

part of CURA-12624
2025-09-10 10:23:14 +02:00
HellAholic
af746f00d0 Refactor the code and add defensive measures 2025-09-06 12:09:11 +02:00
HellAholic
d110bc5577 Add the user adjusted with a signal to the UI 2025-09-06 11:52:52 +02:00
HellAholic
de4886a0e0 Apply the user time estimation factor to the print time 2025-09-06 11:09:03 +02:00
HellAholic
627e7f3c99
Merge pull request #20840 from Ultimaker/CURA-12660_painting-UI-improvements
Cura 12660 painting UI improvements
2025-08-21 09:58:53 +02:00
HellAholic
4059744ce7
Merge pull request #20823 from Ultimaker/CURA-12615_early_error_check
Trigger machine error checking during startup. Otherwise slicing will keep failing until selected printer is changed.
2025-08-11 12:55:05 +02:00
Erwan MATHIEU
e69a436942 Fix sometimes wrongly displayed view
Some checks are pending
conan-package / conan-package (push) Waiting to run
unit-test / Run unit tests (push) Waiting to run
CURA-12660
This required a refactoring of the management of the active view. The previous behavior was that anyone could set the active view, depending on certain conditions. But now we also have a view that is set by a tool, so sometimes the actually set view would be incorrect. Now each Stage requests an active view, and each tool CAN also request an active view. Then the Controller decides which view should actually be active depending on the active stage and tool.
2025-08-06 16:15:05 +02:00
Erwan MATHIEU
63843b59c4 Merge remote-tracking branch 'origin/main' into CURA-12660_painting-UI-improvements
Some checks failed
conan-package-resources / conan-package (push) Has been cancelled
conan-package / conan-package (push) Has been cancelled
printer-linter-format / Printer linter auto format (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
conan-package-resources / signal-curator (push) Has been cancelled
2025-08-04 11:55:26 +02:00
Erwan MATHIEU
bef7bac6a1
Merge branch 'main' into CURA-12528_unwrap_uvs 2025-08-04 11:29:45 +02:00
Erwan MATHIEU
a7366c86f9
Merge branch 'main' into CURA-12660_painting-UI-improvements 2025-08-04 11:29:06 +02:00
Erwan MATHIEU
ea488f0202 Fix wrongly displayed error message
CURA-12660
2025-08-01 14:23:02 +02:00
Erwan MATHIEU
ab58dec5d1 Fix unability to paint with visible message box
CURA-12660
When a message box is displayed, some offscreen rendering passes (face selection) render an unpredictable result and we are unable to start painting.
This went through a refactoring of the rendering passes. Since doing the offscreen rendering outside the Qt rendering loop caused some troubles, we now use the rendering passes only inside the Qt rendering loop, so that they work properly. Tools also have the ability to indicate which extra passes they require, so that we don't run all the passes when they are not required.
Since this issue also concerns the support blockers placement and rotation by face selection, they have been updated so that they now also always work.
The face selection mechanism using the Selection class was partially working and used only by the rotation, so now it has been deprecated in favor of the new mechanism.
2025-08-01 13:10:03 +02:00
Remco Burema
a2ed64d41e Set proper import.
Some checks failed
conan-package / conan-package (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
done as part of CURA-12016
2025-07-30 18:02:42 +02:00
Erwan MATHIEU
da0509cda3 Fix painting through an invisible object
CURA-12660
2025-07-30 15:58:26 +02:00
Timur Seitosmanov
5040e7f230 Trigger machine error checking during startup. Otherwise slicing will keep failing until selected printer is changed. 2025-07-30 15:21:17 +02:00
Remco Burema
8af8283d2c Use newly exposed 'reloadNodes' so we can use Uraniums version of that.
This caused issues where the code deleted in this ticket was almost the same as in Uranium, except it was slightly buggy (but it also did slightly more, hence the new 'on_done' parametrer).

part of CURA-12630
2025-07-30 14:02:56 +02:00
Erwan MATHIEU
1c8455cc6e Add explanation for method
Some checks are pending
conan-package / conan-package (push) Waiting to run
unit-test / Run unit tests (push) Waiting to run
CURA-12016
2025-07-29 10:58:09 +02:00
Erwan MATHIEU
bf8fcd4ecb Find global stacks explicitly
CURA-12016
Add a method to load instances of GlobalStack instead of loading all the ContainerStack and then filtering them. This makes the code more explicit and saves some time.
2025-07-29 10:53:05 +02:00
Erwan MATHIEU
3fa0dad1bf
Merge branch 'main' into CURA-12528_unwrap_uvs
Some checks failed
conan-package-resources / conan-package (push) Has been cancelled
conan-package / conan-package (push) Has been cancelled
printer-linter-format / Printer linter auto format (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
conan-package-resources / signal-curator (push) Has been cancelled
2025-07-21 11:37:58 +02:00
HellAholic
249d5f5245
Merge pull request #20640 from Ultimaker/CURA-12543_painting_ux
Some checks failed
conan-package / conan-package (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
[CURA-12543] Painting UI
2025-07-17 12:07:12 +02:00
Erwan MATHIEU
55ee4ec6e1 Calculate and apply UV coordinates
Some checks failed
conan-package-resources / conan-package (push) Has been cancelled
conan-package / conan-package (push) Has been cancelled
printer-linter-format / Printer linter auto format (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
conan-package-resources / signal-curator (push) Has been cancelled
CURA-12528
2025-07-08 15:47:46 +02:00