Improve length calculation of a spline
Functionality to add/problem to solve
Improve the length calculation of a spline. Currently it's using a simple 5-point Gauss-Legendre quadrature without tolerance control.
This is a follow-up of #1983 (closed)
Target audience
Extruding mesh with a spline.
Proposal
Change the current code to Gauss–Kronrod quadrature with tolerance control. The algorithm is available in boost library. However to make it independent, it's better to implement the code within CatmullRomSpline.C.
I can try to implement a very basic code then you change details to meet your c++ requirements. Also I would like to implement the length for B-spline as it will be similar. For Bezier I don't have any good idea.
What does success look like, and how can we measure that?
With tolerance control the curve length can be accurately estimated, so the extruded mesh will be smoother.
Links / references
https://en.wikipedia.org/wiki/Gauss–Kronrod_quadrature_formula
https://www.boost.org/doc/libs/1_67_0/libs/math/doc/html/math_toolkit/gauss_kronrod.html
Funding
(Does the functionality already exist/is sponsorship available?)