]> OCCT Git - occt.git/commit
Foundation Classes - remove PLib_Base and migrate to concrete polynomial types (...
authorPasukhin Dmitry <dpasukhi@opencascade.com>
Sun, 2 Nov 2025 15:53:23 +0000 (15:53 +0000)
committerGitHub <noreply@github.com>
Sun, 2 Nov 2025 15:53:23 +0000 (15:53 +0000)
commit6c32db17c17726d1d9f839f538de116e73beed69
tree23e68c99256ac6d0160f1c442ad7ec2170063ebb
parent9d27a67a46d4049021e5d7d2351b4c94e0212f6e
Foundation Classes - remove PLib_Base and migrate to concrete polynomial types (#795)

- Delete PLib_Base.hxx / PLib_Base.cxx and remove from PLib/FILES.cmake.
- Convert PLib_JacobiPolynomial and PLib_HermitJacobi from polymorphic Handle-based types to direct value types:
  - Remove inheritance from PLib_Base and RTTI macros.
  - Replace DEFINE_STANDARD_HANDLE / Handle usage with plain objects/members.
  - Make internal PLib_JacobiPolynomial member const where appropriate.
- Make basis evaluation methods const (D0/D1/D2/D3 and internal D0123) and mark trivial accessors noexcept:
  - WorkDegree() and NivConstr() now noexcept.
  - Update signatures (const correctness) across implementation and headers.
- Update all call sites to new API and value semantics:
  - Tests: PLib_HermitJacobi_Test.cxx, PLib_JacobiPolynomial_Test.cxx updated to construct objects by value and call methods without '->'.
  - Modeling/approximation & FEM code: AdvApprox_ApproxAFunction, AdvApprox_SimpleApprox, AppDef_LinearCriteria, AppDef_Variational, FEmTool_Curve, FEmTool_ElementsOfRefMatrix, FEmTool_LinearFlexion/Jerk/Tension and related headers updated to accept/use PLib_HermitJacobi by reference/value and call new methods.
  - Replace Handle(...) constructions with stack/local objects and adapt calls (ToCoefficients, ReduceDegree, MaxError, AverageError, Points, Weights, etc.).
- Miscellaneous API adjustments to match new declarations (removed Standard_OVERRIDE annotations where not applicable).
- Keep behavior unchanged; this is an API/implementation refactor to remove legacy polymorphic base and improve const-correctness and performance.
22 files changed:
src/FoundationClasses/TKMath/GTests/PLib_HermitJacobi_Test.cxx
src/FoundationClasses/TKMath/GTests/PLib_JacobiPolynomial_Test.cxx
src/FoundationClasses/TKMath/PLib/FILES.cmake
src/FoundationClasses/TKMath/PLib/PLib_Base.cxx [deleted file]
src/FoundationClasses/TKMath/PLib/PLib_Base.hxx [deleted file]
src/FoundationClasses/TKMath/PLib/PLib_HermitJacobi.cxx
src/FoundationClasses/TKMath/PLib/PLib_HermitJacobi.hxx
src/FoundationClasses/TKMath/PLib/PLib_JacobiPolynomial.cxx
src/FoundationClasses/TKMath/PLib/PLib_JacobiPolynomial.hxx
src/ModelingData/TKG3d/AdvApprox/AdvApprox_ApproxAFunction.cxx
src/ModelingData/TKG3d/AdvApprox/AdvApprox_SimpleApprox.cxx
src/ModelingData/TKG3d/AdvApprox/AdvApprox_SimpleApprox.hxx
src/ModelingData/TKGeomBase/AppDef/AppDef_LinearCriteria.cxx
src/ModelingData/TKGeomBase/AppDef/AppDef_Variational.cxx
src/ModelingData/TKGeomBase/AppDef/AppDef_Variational.hxx
src/ModelingData/TKGeomBase/FEmTool/FEmTool_Curve.cxx
src/ModelingData/TKGeomBase/FEmTool/FEmTool_Curve.hxx
src/ModelingData/TKGeomBase/FEmTool/FEmTool_ElementsOfRefMatrix.cxx
src/ModelingData/TKGeomBase/FEmTool/FEmTool_ElementsOfRefMatrix.hxx
src/ModelingData/TKGeomBase/FEmTool/FEmTool_LinearFlexion.cxx
src/ModelingData/TKGeomBase/FEmTool/FEmTool_LinearJerk.cxx
src/ModelingData/TKGeomBase/FEmTool/FEmTool_LinearTension.cxx