Skip to content

CURA-9839 add bridging and overhang line type color scheme - #17

Merged
HellAholic merged 6 commits into
mainfrom
CURA-9839-add-bridging-and-overhang-line-type-color-scheme
Sep 3, 2026
Merged

CURA-9839 add bridging and overhang line type color scheme#17
HellAholic merged 6 commits into
mainfrom
CURA-9839-add-bridging-and-overhang-line-type-color-scheme

Conversation

@wawanbreton

@wawanbreton Erwan MATHIEU (wawanbreton) commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

This PR adds the support of repeated protobuf properties, so that we can retrieve them from Python as a regular list.

It also polishes the C++ code to modernize it and remove some warnings.

Contributes to Ultimaker/Cura#21766
CURA-9839

Copilot AI and others added 5 commits August 21, 2026 06:32
Co-authored-by: wawanbreton <601114+wawanbreton@users.noreply.github.com>
Co-authored-by: wawanbreton <601114+wawanbreton@users.noreply.github.com>
CURA-9839
CURA-9839

@rburema Remco Burema (rburema) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good work! I think the bulk of the work has gone into these changes... At least we now have the ability to deal with repeated messages of any type we could already deal with! 😄

Other comments here are more questions rather than anything else.

Comment thread src/PythonMessage.cpp
Py_DECREF(list);
return nullptr;
}
PyList_SET_ITEM(list, i, item); // steals reference

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I take it you mean it sets item to nullptr (and/or doesn't set it but then the data refers to has become invalid, because it's been moved)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Well, the item pointer itself will remain as it is, but as I understand it, the pointed-to object is actually a Python reference, and by calling PyList_SET_ITEM, you invalidate this reference, a bit like doing a move indeed. The pointer is still here but you should not use it anymore. Would you like to suggest a better comment ? This one was AI-generated, so I'm totally fine with changing it.

Comment thread src/PythonMessage.cpp Outdated
Py_DECREF(iter);
if (PyErr_Occurred())
{
return;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should be sent some string to the error-system here? (Like with PyErr_SetString(...) above.) Or do we only do that when we set the error (and the underlying system might not know about it yet).

@wawanbreton Erwan MATHIEU (wawanbreton) Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Honestly, I don't know. I don't really expect this part of code to fail anyway, so this is mostly sanity checking.
But wait, this test is really useless anyway. If there is an error, we do return, and if not, we also return 😄 I'll remove it...

@HellAholic
HellAholic merged commit 72d052a into main Sep 3, 2026
6 checks passed
@HellAholic
HellAholic deleted the CURA-9839-add-bridging-and-overhang-line-type-color-scheme branch September 3, 2026 09:24
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.

4 participants