Skip to content

CURA-12580 paint on support#2317

Open
wawanbreton wants to merge 27 commits intomainfrom
CURA-12580_paint-on-support
Open

CURA-12580 paint on support#2317
wawanbreton wants to merge 27 commits intomainfrom
CURA-12580_paint-on-support

Conversation

@wawanbreton
Copy link
Copy Markdown
Contributor

@wawanbreton wawanbreton commented Apr 2, 2026

This PR adds the generation of modifier meshes based on painting data for support placement. The mesh generation is mostly based on the one made for the multi-material, in a simplified way:

  • Since we don't need to propagate the voxels inside the model, we just create an initial voxels grid based on the texture data, then grow it by 1 unit to make sure we generate large enough meshes that will cover the borders of the model.
  • The voxels having a value of 0 (automatic support) don't generate a modifier mesh, so they are completely ignored.

The meshes are then generated, depending on whether they force or disable support:

  • Painting that disable support generate an anti_overhang_mesh.
  • Painting that force support generate a force_support_overhang_mesh, which is a new type of modifier mesh, that can not be generated by the front-end.

In order to handle the new force_support_overhang_mesh, we also generalized the use of the isPrinted() and isModelMeshmethods that actually differentiate between modifier meshes and regular model meshes. This way we can add new modifier mesh types very easily.

The force_support_overhang_mesh is then handled by support generation, when calculating the overhang areas and force those te be included by unioning them to the result.

CURA-12580
Requires Ultimaker/Cura#21520

⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️
The PR now points to CURA-12636 because I needed some debug code from this branch. However the associated Cura PR points to main, so make sure CURA-12636 is already merged to 5.13 then 5.13 merged to main when merging this one.
⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️

CURA-12580
Support painting doesn't propagate voxels and has a lower resolution, so the calculation time should be way less compared to material painting generation.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

Test Results

31 tests  ±0   30 ✅ ±0   4s ⏱️ -1s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    1 ❌ ±0 

For more details on these failures, see this check.

Results for commit 6b524b3. ± Comparison against base commit cd70a6e.

♻️ This comment has been updated with latest results.

Comment thread src/MeshMaterialSplitter.cpp Outdated
wawanbreton and others added 8 commits April 10, 2026 16:25
CURA-12580
This allows saving multiple data sets in the same OBJ
…de-tree-support' into CURA-12580_paint-on-support
CURA-12580
Because the voxels grid bounding box was the same as the mesh, we didn't have space around the generated voxels, which is necessary when generating the 2D contours. Without that, the segments at the very edge are missing, and we cannot make an actual polygon out of it.
@wawanbreton wawanbreton changed the base branch from main to CURA-12636_non-tree-support-inside-tree-support April 15, 2026 09:47
@wawanbreton wawanbreton force-pushed the CURA-12636_non-tree-support-inside-tree-support branch from 458b382 to 6c6dc96 Compare April 15, 2026 11:36
@HellAholic HellAholic changed the base branch from CURA-12636_non-tree-support-inside-tree-support to main April 16, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants