Solution to functions that tries modifying immutable arguments passed by reference
- 主要语言
- C++
- 星标
- 197
- 派生
- 47
- 平均合并
- 2 天 2 小时
- 30 天内合并 PR
- 6
描述
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](https://dev.opencascade.org/doc/occt-7.2.0/refman/html/class_b_rep___tool.html#aeaa70c29f0a30d827fd8a36116d74b91). 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](https://pybind11.readthedocs.io/en/stable/faq.html#limitations-involving-reference-arguments)
[pyOCCT developer notes – Reference arguments](https://pyocct.readthedocs.io/en/latest/dev.html#reference-arguments)
Would appreciate any guidance or workarounds!
Thanks in advance.
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 BRep_Tool::CurveOnSurface 开始,查阅链接的 pybind11 FAQ 和关于引用参数的 pyOCCT 开发者说明。确定在 binding 层面公开已修改的曲线首尾参数所需的范围,然后验证调用方可以获取这些值。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- cpp, python
- 领域
- api
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100