algorithmic modeling for Rhino
I am trying to create a bunch of polylines and some of them are not valid so I want to test for validity and don't include invalid polylines into my output list.
I thought it would work something like this (but the logic here is differen and I could not understand it from documentation):
def AddPoly(points):
polylines = []
for i in points:
for j in points:
for k in points:
for l in points:
for m in points:
p = [i,j,k,l,m]
polyline = Rhino.Geometry.PolylineCurve(p)
test = Rhino.Geometry.Polyline.IsValid(polyline)
if test:
polylines.append(polyline)
return polylines
Tags:
Replies are closed for this discussion.
Thanks A LOT! I'm new to this, so this stuff is not obvious to me. Really appreciate your response!
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