From ba733dfe5eca387442ae9d97561325fac9435f0a Mon Sep 17 00:00:00 2001 From: Kjetil Andre Johannessen Date: Wed, 2 Jan 2019 10:09:50 +0100 Subject: [PATCH] Bugfix: order/degree miss --- src/lrsplinesurface_interface.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lrsplinesurface_interface.cpp b/src/lrsplinesurface_interface.cpp index 68b36f3..b73f56d 100644 --- a/src/lrsplinesurface_interface.cpp +++ b/src/lrsplinesurface_interface.cpp @@ -547,15 +547,15 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { HashSet_iterator it; int i=0; for(it=lr->basisBegin(); it!=lr->basisEnd(); ++it, ++i) { - int p1 = (**it).getOrder(0); - int p2 = (**it).getOrder(1); - mxArray *array_knots_u = mxCreateDoubleMatrix(1, p1+1, mxREAL); - mxArray *array_knots_v = mxCreateDoubleMatrix(1, p2+1, mxREAL); + int p1 = (**it).getOrder(0) - 1; + int p2 = (**it).getOrder(1) - 1; + mxArray *array_knots_u = mxCreateDoubleMatrix(1, p1+2, mxREAL); + mxArray *array_knots_v = mxCreateDoubleMatrix(1, p2+2, mxREAL); double *knots_u = mxGetPr(array_knots_u); double *knots_v = mxGetPr(array_knots_v); - for(int j=0; j1) for(int j=0; j::iterator it; int i=0; for(it=lr->elementBegin(); itelementEnd(); ++it, ++i) { - p[i ] = (**it).order(0); - p[i+n] = (**it).order(1); + p[i ] = (**it).order(0) - 1; + p[i+n] = (**it).order(1) - 1; } } return;