Class PointCloud

Hierarchy (view full)

Constructors

Properties

containsColors: boolean

Gets a value indicating whether or not the points in this point cloud have colors assigned to them.

containsHiddenFlags: boolean

Gets a value indicating whether or not the points in this point cloud have hidden flags assigned to them.

containsNormals: boolean

Gets a value indicating whether or not the points in this point cloud have normals assigned to them.

containsValues: boolean
count: number

Gets the number of points in this point cloud.

hasBrepForm: boolean

Returns true if the Brep.TryConvertBrep function will be successful for this object

hiddenPointCount: number

Gets the number of points that have their Hidden flag set.

isDeformable: boolean

true if object can be accurately modified with "squishy" transformations like projections, shears, and non-uniform scaling.

isValid: boolean

Tests an object to see if it is valid.

isValidWithLog: [boolean, string]

...

objectType: ObjectType

Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.

userStringCount: number

Gets the amount of user strings.

Methods

  • Parameters

    • point: number[]

      Point to append.

    Returns void

    Description

    Append a new point to the end of the list.

  • ...

    Parameters

    • point: number[]
    • color: object

    Returns void

  • ...

    Parameters

    • point: number[]
    • normal: number[]

    Returns void

  • ...

    Parameters

    • point: number[]
    • normal: number[]
    • color: object

    Returns void

  • ...

    Parameters

    • point: number[]
    • normal: number[]
    • color: object
    • value: number

    Returns void

  • ...

    Parameters

    • point: number[]
    • value: number

    Returns void

  • Parameters

    • points: number[][]

      Points to append.

    Returns void

    Description

    Appends a collection of points to this point cloud.

  • ...

    Parameters

    • points: number[][]
    • colors: object[]

    Returns void

  • ...

    Parameters

    • points: number[][]
    • normals: number[][]

    Returns void

  • ...

    Parameters

    • points: number[][]
    • normals: number[][]
    • colors: object[]

    Returns void

  • ...

    Parameters

    • points: number[][]
    • normals: number[][]
    • colors: object[]
    • values: number[]

    Returns void

  • ...

    Parameters

    • points: number[][]
    • values: number[]

    Returns void

  • Returns void

    Description

    Destroys the color information in this point cloud.

  • Returns void

    Description

    Destroys the hidden flag information in this point cloud.

  • Returns void

    Description

    Destroys the normal vector information in this point cloud.

  • Parameters

    • testPoint: number[]

      .

    Returns number

    Index of point in the point cloud on success. -1 on failure.

    Description

    Returns index of the closest point in the point cloud to a given test point.

  • Parameters

    • accurate: boolean

      If true, a physically accurate bounding box will be computed. If not, a bounding box estimate will be computed. For some geometry types there is no difference between the estimate and the accurate bounding box. Estimated bounding boxes can be computed much (much) faster than accurate (or "tight") bounding boxes. Estimated bounding boxes are always similar to or larger than accurate bounding boxes.

    Returns BoundingBox

    The bounding box of the geometry in world coordinates or BoundingBox.Empty if not bounding box could be found.

    Description

    Bounding box solver. Gets the world axis aligned bounding box for the geometry.

  • Returns object[]

    An array containing all the colors in this point cloud.

    Description

    Copy all the point colors in this point cloud to an array.

  • Returns number[][]

    An array containing all the normals in this point cloud.

    Description

    Copy all the normal vectors in this point cloud to an array.

  • Returns number[][]

    An array containing all the points in this point cloud.

    Description

    Copy all the point coordinates in this point cloud to an array.

  • Parameters

    • key: string

      id used to retrieve the string.

    Returns string

    string associated with the key if successful. null if no key was found.

    Description

    Gets user string from this geometry.

  • Parameters

    • index: number

      Insertion index.

    • point: number[]

      Point to append.

    Returns void

    Description

    Inserts a new point into the point list.

  • ...

    Parameters

    • index: number
    • point: number[]
    • color: object

    Returns void

  • ...

    Parameters

    • index: number
    • point: number[]
    • normal: number[]

    Returns void

  • ...

    Parameters

    • index: number
    • point: number[]
    • normal: number[]

    Returns void

  • ...

    Parameters

    • index: number
    • point: number[]
    • color: object
    • value: number

    Returns void

  • ...

    Parameters

    • index: number
    • point: number[]
    • value: number

    Returns void

  • Parameters

    • index: number

      Index at which to insert the new collection.

    • points: number[][]

      Points to insert.

    Returns void

    Description

    Append a collection of points to this point cloud.

  • Returns boolean

    false if object cannot be converted to a deformable object. true if object was already deformable or was converted into a deformable object.

    Description

    If possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling.

  • Parameters

    • other: PointCloud

      PointCloud to merge with this one.

    Returns void

    Description

    Merges, or appends, a specified point cloud into this one.

  • Parameters

    • index: number

      The index.

    Returns number[]

    Description

    Returns the location of the point at a specific index.

  • Parameters

    • index: number

      Index of point to remove.

    Returns void

    Description

    Remove the point at the given index.

  • Parameters

    • angleRadians: number

      Angle of rotation in radians.

    • rotationAxis: number[]

      Direction of the axis of rotation.

    • rotationCenter: number[]

      Point on the axis of rotation.

    Returns boolean

    true if geometry successfully rotated.

    Description

    Rotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).

  • Parameters

    • scaleFactor: number

      The uniform scaling factor.

    Returns boolean

    true if geometry successfully scaled.

    Description

    Scales the object by the specified factor. The scale is centered at the origin.

  • Parameters

    • key: string

      id used to retrieve this string.

    • value: string

      string associated with key.

    Returns boolean

    true if successful, false if not.

    Description

    Attach a user string (key,value combination) to this geometry.

  • Returns object

    A Three.js bufferGeometry.

    Description

    Converts a Rhino point cloud to a Three.js bufferGeometry

  • Parameters

    • xform: Transform

      Transformation to apply to geometry.

    Returns boolean

    true if geometry successfully transformed.

    Description

    Transforms the geometry. If the input Transform has a SimilarityType of OrientationReversing, you may want to consider flipping the transformed geometry after calling this function when it makes sense. For example, you may want to call Flip() on a Brep after transforming it.

  • Parameters

    • translationVector: number[]

      A moving vector.

    Returns boolean

    true if geometry successfully translated.

    Description

    Translates the object along the specified vector.

  • Parameters

    • json: object

      A json formatted object in the following format (values are orientative):

      {
      version: 10000,
      archive3dm: 60,
      opennurbs: -1877964208,
      data: 'encoded 3dm object data'
      }

    Returns CommonObject

    Description

    Decodes a Rhino Object

Generated using TypeDoc