The FunctionToBspline class can be used to approximate an arbitrary 3D function with a B-Spline.
More...
#include <CFunctionToBspline.h>
|
| CFunctionToBsplineImpl * | pimpl |
The FunctionToBspline class can be used to approximate an arbitrary 3D function with a B-Spline.
The function to approximate is given by 3 separate functions, one for the x values, one for y-values and one for the z-values.
◆ CFunctionToBspline()
| tigl::CFunctionToBspline::CFunctionToBspline |
( |
MathFunc3d & | f, |
|
|
double | umin, |
|
|
double | umax, |
|
|
int | degree, |
|
|
double | tolerance = 1e-5, |
|
|
int | maxDepth = 22 ) |
CFunctionToBspline - Constructor.
- Parameters
-
| f | Function returning the values of the curve |
| umin | Start parameter of the function to approximate |
| umax | End parameter of the function to approximate |
| degree | Degree of the resulting B-Spline |
| tolerance | Maximum approximation error |
| maxDepth | Maximum depth of curve splitting -> Influences resulting segment number. Functions with a locally unbounded derivative/curvature (e.g. a sqrt(x)-like term at an endpoint) converge slowly under the adaptive bisection used here, so this needs to be reasonably large (empirically verified: 22 reliably converges such cases to a tolerance of 1e-5, vs. 10 silently giving up early) - raising it is a no-op in cost/size for functions that already converge well before that depth. |
◆ ~CFunctionToBspline()
| tigl::CFunctionToBspline::~CFunctionToBspline |
( |
| ) |
|
◆ ApproxError()
| double tigl::CFunctionToBspline::ApproxError |
( |
| ) |
|
returns the error made by spline approximation
◆ Handle()
| tigl::CFunctionToBspline::Handle |
( |
Geom_BSplineCurve | | ) |
|
Computes the B-Spline approximation.
◆ pimpl
| CFunctionToBsplineImpl* tigl::CFunctionToBspline::pimpl |
|
private |
The documentation for this class was generated from the following file: