Solution to functions that tries modifying immutable arguments passed by reference
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start with BRep_Tool::CurveOnSurface and review the linked pybind11 FAQ and pyOCCT developer notes on reference arguments. Determine the binding-level scope needed to expose the modified first and last curve parameters, then verify that callers can retrieve those values.
Written by the indexing model from the issue text.
Description
Hello,
Have you found any solution for handling functions that return values via output parameters passed by reference, especially when those parameters are of immutable types?
This becomes a problem with important functions like BRep_Tool::CurveOnSurface. In such cases, the function modifies the arguments passed by reference (e.g., to return the first and last parameters of the Geom2d_Curve), but when these are immutable types in the binding language, we can’t retrieve the modified values.
This effectively blocks access to important return data.
Some relevant references:
pybind11 FAQ – Limitations involving reference arguments
pyOCCT developer notes – Reference arguments
Would appreciate any guidance or workarounds!
Thanks in advance.
- Dominant language
- C++
- Stars
- 203
- Forks
- 50
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CadQuery/OCP
-
Generation steps fails when OPENGL_INCLUDE_DIRS is a listPossibly taken @adam-urbanczyk claimed this 61 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
-
Python 3.14t buildOpen
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
OCCT8
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
MerginMaps/mobile#4741 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Icinga/icinga2#11077 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
agent:WSL bug linux LOW ui
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Copter: PosHold brake-entry threshold became 16 deg instead of 0.16 deg after the radians conversionPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 78/100
ArduPilot/ardupilot#34617 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day