Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
evaluateSpline: Parameter at index 0 is outside the knot vector
Jonathan_Hutchinson
Member Posts: 141 PRO
I used a Split feature on a curve (helix) entity, and wanted to then subdivide this split version of the entity into line segments. However, I got the below error. Is this because the curve needs to in an ideal world be reparameterised between 0 and 1? Has the split operation done some funky business where it's almost treating it like a trimmed surface, and now no longer exists in the domain of the curve? I couldn't initially see anything in the FS documentation to fix this.
@evaluateSpline: Parameter at index 0 is outside the knot vector.
@evaluateSpline: Parameter at index 0 is outside the knot vector.
Tagged:
0
Answers
The hack I did was then using a path instead (FS: evPathTangentLines to evaluate point at parameters) which was a bit more clunky I suppose, but seemed to be the workaround to reset to 0-1 again. Is there an option somewhere else to reparameterise or, as you mention, rescale the parameter before subsequent operations without Paths?
export function normalizeKnotArray(knots is array)returns array { var ret = knots; var minKnot = ret[0]; var ct =size(knots); if(minKnot !=0) { //resets knots to start at 0 for(var j=0;j<ct;j+=1) { ret[j] = ret[j] - minKnot; } } var newMax = ret[ct-1]; if(newMax!=1) { //normalizing the max knot to be 1 and all others scaled in between. var mult = (1/newMax); for(var j=0;j<ct;j+=1) { ret[j] = ret[j] * mult; } } return ret; }