algorithmic modeling for Rhino
I'm scripting in python and I'm trying to extract the vertices of the polysurface. Does anyone know command to extract the vertices of a polysurface or a single surfaces? or a way around it?
I know this can be done with the explode component in grasshopper but I need to do it inside the python component.
thanks,
M
Tags:
I figured it out.
surfaces = rs.ExplodePolysurfaces(primitive)
crv = []
pts = []
for i in range(0,len(surfaces)):
crv_extract = rs.DuplicateEdgeCurves(surfaces[i])
crv.extend(crv_extract)
for i in range(0,len(crv)):
domain = rs.CurveDomain(crv[i])
pt_start = rs.EvaluateCurve(crv[i],domain[0])
pt_end = rs.EvaluateCurve(crv[i],domain[1])
pts.append(pt_start)
pts.append(pt_end)
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