Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

Iteration points

$
0
0

hello every body, i’ve got a closed polyline, and i would like to know how many 90° angles there is.

so i wrote:

    points=rs.CurvePoints(cont)
    for i in range(0,len(points)-1):
        angle=rs.Angle2( points[i] , points[i+1] , points[i+1] , points[i+2])

if i have 4 points, i can have easely angle between

  • line point 0 to point 1 and line point 1 to point 2
  • line point 1 to point 2 and line point 2 to point 3
  • line point 2 to point 3 and line point 3 to point 4,

but how can i script the line point 3 to point 4 and line point 4 to point 0?

8 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles