Coding - Modernize handle APIs and deprecate out-parameter overloads (#1185)

Introduce return-by-value APIs for handle-returning methods across touched toolkits, with nodiscard where appropriate, and keep legacy out-parameter signatures as deprecated wrappers for source compatibility.

- Add new return-by-value overloads for previously output-parameter methods in key classes across ApplicationFramework, DataExchange, ModelingAlgorithms, ModelingData, and Visualization
- Mark legacy output-parameter methods as deprecated and route them through the new overloads
- Update call sites to use the new APIs and simplify temporary-variable patterns
- Extend method documentation in OCCT Doxygen style with param/return sections and deprecation guidance
- Apply const-correctness updates for read-only handle arguments in STEP reader related interfaces
- Preserve compatibility for deprecated public wrappers by keeping exported out-of-line definitions where needed
- Perform minor cleanup of comments and parameter naming consistency

No functional behavior change is intended; this is an API modernization and migration-facilitation update.
This commit is contained in:
Pasukhin Dmitry
2026-04-04 12:09:46 +01:00
committed by GitHub
parent 83929118e7
commit 0f57a42d89
86 changed files with 1094 additions and 368 deletions
@@ -132,8 +132,8 @@ void BRepProj_Projection::BuildSection(const TopoDS_Shape& theShape, const TopoD
return;
// connect edges to wires using ShapeAnalysis functionality
ShapeAnalysis_FreeBounds::ConnectEdgesToWires(anEdges, Precision::Confusion(), true, mySection);
myIsDone = (!mySection.IsNull() && mySection->Length() > 0);
mySection = ShapeAnalysis_FreeBounds::ConnectEdgesToWires(anEdges, Precision::Confusion(), true);
myIsDone = (!mySection.IsNull() && mySection->Length() > 0);
// collect all resulting wires to compound
if (myIsDone)