Hello
I tried to convert @dale script to python, i am not sure if i 100% success because i don’t know how to run the original script.
To check if it work i check with Rhino6 and notice different results, sometimes with curves or when i use a very large scale ,and i try to solve that.
The first problem was with closed curve, Rhino6 curvature command find3 point where the script find 4 points if range(1000), but this make a problem with some opened curves and add extra point and i solve it by range(1,1000) , in this case i use this condition:
if curve.IsClosed == False:
numbers = range(1,count)
else:
numbers = range(count)
for i in numbers:
....................
and i increase points count by multiply with 100 for more precision result
count = nurb.Points.Count * 100
For the second problem with scale , with very large scale (1000000 for example) the script don’t find all points, i solve it by scale the input curve (something like unitize the vector) to find the points and the parameters than scale the curve to it’s original state and find the points with parameters list;
this work with all scales
Thanks Dale
because i want compile it to ghpy component and as i posted before there is a problem in the code with large scale and with closed curves.
This is a comparison between the c# code and the python code ( modified based on the c#)
scale: 30000