I have a small question, but I can’t get the solution.
I want to only delete the points on the blue curve with python code.
I have already got these points with x/y/z coordinate.
with rs.DeleteObjects() to delete the objects need the GUID of the point.
But how can I get the GUID of an existing Point?
Here is my code and the GH,Rhino document.
delete points.gh (2.7 KB)
delete points.3dm (31.1 KB)
import rhinoscriptsyntax as rs
from scriptcontext import doc
filter = Rhino.DocObjects.ObjectType.Curve
rc, objref = Rhino.Input.RhinoGet.GetOneObject(“Select curve to delete points”, False, filter)
c = objref.Curve()
allObjects = rs.AllObjects()
for i in allObjects:
p = rs.IsPoint(i)
if p == True:
param = rs.CurveClosestPoint(c, i)
point = rs.EvaluateCurve(c, param)
could someone give some advice?