Forgot password?

Create an account!

Forum

« back

RhinoScript – cullduplicatepoints: points not an array

Messages

Please log in to write a message.

  • 2. Hanno (Dec 14, 2008 12.21):

    Hi dingle,

    the difference is that your array consists if point IDs but you need point coordinates. So if you say

    arrPts = Array(rhino.pointCoordinates(strP1),rhino.pointCoordinates(strP2))

    it should work.

  • 1. dingle (Dec 13, 2008 18.33):

    hey all, another simple one. trying to delete the duplicate points that sometimes result from this snippet of code. (sometimes there are 2 duplicate points, sometimes there are none - depends on the direction of the curves analyzed. anyway, doesn't matter.) so lacking a SelDup method and wanting to avoid a SelDup command call, i'm trying to use CullDuplicatePoints.
    it seems like i'm doing everything right, but is it possible that the array i'm trying to cull doesn't jive with the CullDuplicatePoints? i get the "Type mismatch in parameter. Array required" error. But for some reason if i use DeleteObjects(arrPts) to test the array, then it works fine. How could an array of points actually not be points?

                    For Each strEdge In arrEdges
                           
                            strP1 = Rhino.AddPoint(Rhino.CurveStartPoint(strEdge))
                            strP2 = Rhino.AddPoint(Rhino.CurveEndPoint(strEdge))
                            arrPts = Array(strP1,strP2)
                           
                            If IsArray(arrPts) Then
                                   
                                    Call Rhino.CullDuplicatePoints(arrPts)
           
                            End If
           
                    Next

    thanks for looking!

Recommend

Why are these buttons gray?