Deconstructed Curve Segment is half clamped
Created by: rendetto
A while ago I created a test case of a Closed Periodic Spline, wrapping the control points according to the theory: https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/B-spline/bspline-curve-closed.html
So I wrapped certain number control points and then used the Curve Segment node to get a spline only at its domain - resulting in a closed continuous curve. It all went well and predictable for the FreeCAD implementation (which is the most convenient for that case so I will stick to it at first because the other two implementations have problems).
This is how the whole spline looks using a periodic knot vector, before getting the control points wrapped:
...then with control points wrapped:
...and now cut only the segment between the domain limits - resulting in a smoothly closed spline:
When I deconstruct the closed spline - the result is a B-Spline that uses clamped knot vector (a Bezier Curve):
Awesome isn't it :)
Now the problem...
At this commit https://github.com/nortikin/sverchok/commit/e4a9d3ba59de3757308cca3f9ec8e831923b5d7b the Curve Segment node started throwing an error so nothing worked for a while.
Then at this one https://github.com/nortikin/sverchok/commit/55978693fc4793e9c64eade01227e72117eaee9c the Curve Segment started working again, but what I got as a result after deconstructing is only half clamped spline which is not the behavior I expected:
I'm uploading my test file for examination: Closed_Periodic_Spline_5thDegree.zip
It's clearly a bug and it's present when the "T Max" value of the Curve Segment is exactly 1.0 in my case (or at the upper domain limit in an arbitrary case)
As a temporary workaround we can use "T Max" = 0.9999999 and get near perfect results but even very close to 1.0 it's not exact and the gap between curve start and end depends on the model scale.