Skip to content

Conversation

@wawanbreton
Copy link
Contributor

@wawanbreton wawanbreton commented Nov 25, 2025

This PR contains a few independent changes:

  • Refactoring of the SVG class in order to have less various writeSomething methods, but instead a consistent API for any geometric type and user-provided attributes to display surface, outlines and or/vertices at will.
  • Better calculation of the bridging angle by scanning angles between 0° and 180°, and for each one "simulating" how the briding would perform.
  • Use fixed angle when bridging over infill, according to the actual infill type and angle
  • Add option to print bridging lines interlaced, i.e. print them in 2 monotonic passes so that adjacent lines won't be printed just after each other

CURA-12833
Requires Ultimaker/Cura#21163

@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2025

Test Results

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

Results for commit e1fb57a. ± Comparison against base commit 60f5df1.

♻️ This comment has been updated with latest results.

CURA-12361
We now negatively account for the line parts that are fully supported, because in some cases the angle would generate a few lonely lines on supported areas.
CURA-12833
This makes sure the bridging lines will anchor as deep as possible inside the mesh, instead of sometimes generating a tiny concentric area on the borders.
case BridgeStatus::Supported:
bridge_status = leaving_skin ? BridgeStatus::Outside : BridgeStatus::Anchored;
// Negatively account for fully supported lines to avoid lonely line parts over the supported areas
add_segment_score_weight = -0.1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -0.1 value seems a bit arbitrary (I even thought it might be a typo for -1.0 at first; until I took a closer look at what it replaced and why you might want to use a double at all...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is very much arbitrary indeed... The previous version was mostly working, with an equivalent score of 0, compared to scores 1.0 and -1.0 for other lines. But on one edge case I had to add a negative value for this type of line. I tried with -1.0, which worked but felt a bit wrong. -0.1 also worked and feels less harmful. If there are other annoying edge cases, we can stil adjust it further, but so far all the tested cases work as expected.

Copy link
Member

@rburema rburema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Reviewed new changes only.) LGTM!

@HellAholic HellAholic merged commit 4dafaef into main Dec 17, 2025
18 of 23 checks passed
@HellAholic HellAholic deleted the CURA-12833_improve-bridge-lines-direction branch December 17, 2025 13:30
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.

5 participants