PointCloudHidePoints

Returns or modifies the hidden points of a point cloud object.

Note, hiding point cloud points is a runtime setting only - hidden points are not saved in the 3dm file.

Syntax

Rhino.PointCloudHidePoints (strObject [, arrHidden])

Rhino.PointCloudHidePoints (strObject [, Null])

Parameters

strObject

Required.  String.  The object's identifier.

arrHidden

Optional.  Array.  An array of Boolean values indicating the hidden state (True = hidden, False = Visible). Note, for every point, there must be a corresponding Boolean value.

Null

Optional.  Null.  Specifying Null will remove, or purge, any existing hidden point information from the point cloud.

Returns

Array

If arrHidden is not specified,  the current hidden state if successful.

Array

If arrHidden is specified, the previous hidden state if successful.

Null

If strObject does not have hidden points, if not successful, or on error.

Example

Sub Test

  Const rhPointCloud = 2  

  Dim strObject, arrHidden(), i

  strObject = Rhino.GetObject("Select point cloud", rhPointCloud)

  If VarType(strObject) = vbString Then

    ReDim arrHidden( Rhino.PointCloudCount(strObject)-1 )

    For i = 0 To UBound(arrHidden)

      If i Mod 2 = 0 Then

        arrHidden(i) = True

      Else

        arrHidden(i) = False

      End If

    Next

    Rhino.PointCloudHidePoints strObject, arrHidden

  End If

End Sub

Also See

PointCloudHasHiddenPoints

PointCloudHasPointColors

PointCloudPointColors