Commit graph

8 commits

Author SHA1 Message Date
Erwan MATHIEU
33671083cd Make sure undo stroke properly clears all the set pixels
Some checks failed
conan-package / conan-package (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
CURA-12752
Otherwise, when merging the polygons and undo-ing the whole stroke, there may be some remaining pixels outside the mesh triangles that would not be cleared, because the rasterizing is not 100% identical
2025-10-15 16:43:44 +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
d5fc04684a
Apply suggestions from code review (imports).
done as part of CURA-12752

Co-authored-by: HellAholic <alireza.doustdar@gmail.com>
2025-10-15 08:55:10 +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
Erwan MATHIEU
495a367539 Optimize painting operations
CURA-12743
2025-10-02 12:05:39 +02:00
Erwan MATHIEU
2eaa4fb820 Make sure paint commands only change their feature
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
unit-test / Run unit tests (push) Waiting to run
CURA-12731
2025-09-22 14:34:39 +02:00