algorithmic modeling for Rhino
i thought the problem is that the code applied the function (smoothingvector) to all points and then adding them to new List (newcurvepoints) while forgetting to add the endpoints .. therefore the number of curve points is less expected. you can add the start and end points and the error is gone.
newcurvePoints.append(rs.CurveStartPoint(curve))
for i in range(1,len(curvePoints)-1):
vm = smoothingvector(curvePoints[i],curvePoints[i-1],curvePoints[i+1],s)
tempPoint = rs.PointAdd(curvePoints[i],vm)
newcurvePoints.append(tempPoint)newcurvePoints.append(rs.CurveEndPoint(curve)
Hi Peter,
Thank your for your help and its really great to find out the problem XD. I made many dumb mistakes with my code.Thank you very much.
you are welcome .. i am glad it helped
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by