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

Help: Remove item from list

$
0
0

@Holo wrote:

Hi, I need to remove an item from a list of points, but I get the error that 'Array[Point3d]' object doesn't support item deletion.

So what should I do?

(I am going to trace some points in a pointcloud)

import rhinoscriptsyntax as rs

cloud=rs.GetObject("get pointcloud",filter=2)
point=rs.GetPoint("Get point")

ptList=rs.PointCloudPoints(cloud)

index = rs.PointArrayClosestPoint(ptList, point)
rs.AddLine(point,ptList[index])

print str(index) + " : " + str(ptList[index])

ptList.pop(index)

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles