turbo_moc.geometry.spline_tool module#
turbo_moc.geometry.spline_tool – B-spline fitting/evaluation used by turbo_moc.geometry.blade to reduce a dense blade-profile polyline to a small set of control points (for CAD/optimization use) and reconstruct a smooth curve from them.
Originally ported from opt_framework/test_2/01_geometry_parametrization/utils/ spline_gen.py (BSplineTool). Basis assembly/evaluation use SciPy’s compiled routines; parameterization, normal-equation fitting, and endpoint conventions are retained.
- class turbo_moc.geometry.spline_tool.BSplineTool(degree=3)[source]#
Bases:
objectMethods
backward(data_points, num_cp)Generates control points from data points using Least Squares.
backward_fixed(data_points, num_cp)forward(control_points, knots[, num_points])Generates the curve from control points (Forward Method).
reparameterize_equidistant(data_points[, ...])Re-samples data points so they are physically equidistant along the arc length.
- backward(data_points, num_cp)[source]#
Generates control points from data points using Least Squares. Uses a Uniform Knot Sequence for equispaced control variables.