Communicator.Selection.SelectionItem

 SelectionItem

Methods

equals

  • Determines if two selection items are equal.

    Parameters

    • selectionItem: SelectionItem

      The selection item to test against.

    Returns boolean

    whether or not the two items are equal.

forJson    [deprecated]

  • forJson(): Object
  • deprecated

    Use toJson instead.

    Returns Object

getFaceEntity

  • Gets the face entity for this selection.

    Returns FaceEntity | null

    the face entity if one was selected, otherwise null

getIncludeId    [deprecated]

  • getIncludeId(): InclusionKey | null

getInclusionKey

  • getInclusionKey(): InclusionKey | null
  • Gets the include id for this selection.

    Returns InclusionKey | null

    the inclusion key associated with this selection item

getLineEntity

  • Gets the line entity for this selection.

    Returns LineEntity | null

    the line entity if one was selected, otherwise null

getNodeId

  • Gets the part id for this selection.

    Returns NodeId | null

    the part id associated with this selection item

getPointEntity

  • Gets the point entity for this selection.

    Returns PointEntity | null

    the point entity if one was selected, otherwise null

getPosition

  • getPosition(): Point3 | null
  • Convenience method for getting the world space position of the selection point. SelectionItems with a type of SelectionType.Part will not have a position and null will be returned.

    Returns Point3 | null

    World space position of the selection point if it can be determined.

getSelectionType

isEntitySelection

  • isEntitySelection(): this

isFaceSelection

  • isFaceSelection(): this
  • Returns this

    true if the object has the fields required for a FaceSelectionItem. This function can be used as a TypeScript type guard.

isLineSelection

  • isLineSelection(): this
  • Returns this

    true if the object has the fields required for a LineSelectionItem. This function can be used as a TypeScript type guard.

isNodeEntitySelection

  • isNodeEntitySelection(): this

isNodeSelection

  • isNodeSelection(): this
  • Returns this

    true if the object has the fields required for a NodeSelectionItem. This function can be used as a TypeScript type guard.

isPointSelection

  • isPointSelection(): this

overlayIndex

  • Gets the overlay index for this selection.

    Returns OverlayIndex | null

    the overlay index associated with this selection item

toJson

  • toJson(): Object
  • Creates an object ready for JSON serialization.

    Returns Object

    The prepared object.

Static create