NURBS-Python
NURBS-Python copied to clipboard
Order 1 fitting approximation wit 2 points failed with Error
Describe the bug I try to approximate a 3D line using geomdl routines from fitting. I thought that the following code should be OK : from geomdl import fitting as fit approx_line = fit.approximate_curve([[0,0,0],[1,1,1],[2,2,2]], degree=1, ctrlpts_size=2)
but I got the following error : File "C:\Users\F278562\Desktop\morphotex\venv\lib\site-packages\geomdl\fitting.py", line 160, in approximate_curve matrix_ntn = linalg.matrix_multiply(matrix_nt, matrix_n) File "C:\Users\F278562\Desktop\morphotex\venv\lib\site-packages\geomdl\linalg.py", line 457, in matrix_multiply p1 = len(mat1[0]) IndexError: list index out of range
Can you help me getting an approximation for an order 1 spline of 2 points ?
Expected Behavior I thought that I would have obtained a order 1 spline that were a least square approximation of the point list
Configuration:
- OS: Windows 10
- Python distribution: Anaconda 3.6
- Python version: 3.6
- geomdl install source: Anaconda
- geomdl version/branch: 5.3.1