.. role:: ts-api-decorator

#############
SelectionItem
#############

.. js:module:: Selection
   :noindex:

.. container:: ts-api-section

   .. js:class:: SelectionItem



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~Selection.SelectionItem.equals`
   * :js:meth:`~Selection.SelectionItem.getFaceEntity`
   * :js:meth:`~Selection.SelectionItem.getInclusionKey`
   * :js:meth:`~Selection.SelectionItem.getLineEntity`
   * :js:meth:`~Selection.SelectionItem.getNodeId`
   * :js:meth:`~Selection.SelectionItem.getPointEntity`
   * :js:meth:`~Selection.SelectionItem.getPosition`
   * :js:meth:`~Selection.SelectionItem.getSelectionType`
   * :js:meth:`~Selection.SelectionItem.isEntitySelection`
   * :js:meth:`~Selection.SelectionItem.isFaceSelection`
   * :js:meth:`~Selection.SelectionItem.isLineSelection`
   * :js:meth:`~Selection.SelectionItem.isNodeEntitySelection`
   * :js:meth:`~Selection.SelectionItem.isNodeSelection`
   * :js:meth:`~Selection.SelectionItem.isPointSelection`
   * :js:meth:`~Selection.SelectionItem.overlayIndex`
   * :js:meth:`~Selection.SelectionItem.toJson`
   * :js:meth:`~Selection.SelectionItem.create`





------------

Methods
=======

.. rst-class:: ts-api-section

equals
------

.. js:method:: SelectionItem.equals( selectionItem)

   :param selectionItem: The selection item to test against.
   :type selectionItem: SelectionItem


   Determines if two selection items are equal.

   :returns: whether or not the two items are equal.


   :rtype: boolean

.. rst-class:: ts-api-section

getFaceEntity
-------------

.. js:method:: SelectionItem.getFaceEntity()



   Gets the face entity for this selection.

   :returns: the face entity if one was selected, otherwise null


   :rtype: null | FaceEntity

.. rst-class:: ts-api-section

getInclusionKey
---------------

.. js:method:: SelectionItem.getInclusionKey()



   Gets the include id for this selection.

   :returns: the inclusion key associated with this selection item


   :rtype: null | InclusionKey

.. rst-class:: ts-api-section

getLineEntity
-------------

.. js:method:: SelectionItem.getLineEntity()



   Gets the line entity for this selection.

   :returns: the line entity if one was selected, otherwise null


   :rtype: null | LineEntity

.. rst-class:: ts-api-section

getNodeId
---------

.. js:method:: SelectionItem.getNodeId()



   Gets the part id for this selection.

   :returns: the part id associated with this selection item


   :rtype: number

.. rst-class:: ts-api-section

getPointEntity
--------------

.. js:method:: SelectionItem.getPointEntity()



   Gets the point entity for this selection.

   :returns: the point entity if one was selected, otherwise null


   :rtype: null | PointEntity

.. rst-class:: ts-api-section

getPosition
-----------

.. js:method:: SelectionItem.getPosition()



   Convenience method for getting the world space position of the selection point.
   [[SelectionItem]]s with a type of [[SelectionType.Part]] will not have a position and null will be returned.

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


   :rtype: null | Point3

.. rst-class:: ts-api-section

getSelectionType
----------------

.. js:method:: SelectionItem.getSelectionType()



   :rtype: SelectionType

.. rst-class:: ts-api-section

isEntitySelection
-----------------

.. js:method:: SelectionItem.isEntitySelection()





   :returns: true if the object has the fields required for an [[EntitySelectionItem]]. This function can be used as a TypeScript [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards).


   :rtype: this

.. rst-class:: ts-api-section

isFaceSelection
---------------

.. js:method:: SelectionItem.isFaceSelection()





   :returns: true if the object has the fields required for a [[FaceSelectionItem]]. This function can be used as a TypeScript [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards).


   :rtype: this

.. rst-class:: ts-api-section

isLineSelection
---------------

.. js:method:: SelectionItem.isLineSelection()





   :returns: true if the object has the fields required for a [[LineSelectionItem]]. This function can be used as a TypeScript [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards).


   :rtype: this

.. rst-class:: ts-api-section

isNodeEntitySelection
---------------------

.. js:method:: SelectionItem.isNodeEntitySelection()





   :returns: true if the object has the fields required for a [[NodeEntitySelectionItem]]. This function can be used as a TypeScript [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards).


   :rtype: this

.. rst-class:: ts-api-section

isNodeSelection
---------------

.. js:method:: SelectionItem.isNodeSelection()





   :returns: true if the object has the fields required for a [[NodeSelectionItem]]. This function can be used as a TypeScript [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards).


   :rtype: this

.. rst-class:: ts-api-section

isPointSelection
----------------

.. js:method:: SelectionItem.isPointSelection()





   :returns: true if the object has the fields required for a [[PointSelectionItem]]. This function can be used as a TypeScript [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards).


   :rtype: this

.. rst-class:: ts-api-section

overlayIndex
------------

.. js:method:: SelectionItem.overlayIndex()



   Gets the overlay index for this selection.

   :returns: the overlay index associated with this selection item


   :rtype: null | number

.. rst-class:: ts-api-section

toJson
------

.. js:method:: SelectionItem.toJson()



   Creates an object ready for JSON serialization.

   :returns: The prepared object.


   :rtype: object

.. rst-class:: ts-api-section

:ts-api-decorator:`static` create
---------------------------------

.. js:method:: SelectionItem.create( nodeId, inclusionKey, faceEntity[, lineEntity[, pointEntity]])

   :param nodeId: None
   :type nodeId: number
   :param inclusionKey: None
   :type inclusionKey: undefined | null | InclusionKey
   :param faceEntity: None
   :type faceEntity: FaceEntity
   :param lineEntity: :ts-api-decorator:`optional` None
   :type lineEntity: null | LineEntity
   :param pointEntity: :ts-api-decorator:`optional` None
   :type pointEntity: null | PointEntity


   Create a new [[FaceSelectionItem]].


   :rtype: FaceSelectionItem

.. js:method:: SelectionItem.create( nodeId, inclusionKey, faceEntity, lineEntity[, pointEntity])
   :noindex:

   :param nodeId: None
   :type nodeId: number
   :param inclusionKey: None
   :type inclusionKey: undefined | null | InclusionKey
   :param faceEntity: None
   :type faceEntity: undefined | null | FaceEntity
   :param lineEntity: None
   :type lineEntity: LineEntity
   :param pointEntity: :ts-api-decorator:`optional` None
   :type pointEntity: null | PointEntity


   Create a new [[LineSelectionItem]].


   :rtype: LineSelectionItem

.. js:method:: SelectionItem.create( nodeId, inclusionKey, faceEntity, lineEntity, pointEntity)
   :noindex:

   :param nodeId: None
   :type nodeId: number
   :param inclusionKey: None
   :type inclusionKey: undefined | null | InclusionKey
   :param faceEntity: None
   :type faceEntity: undefined | null | FaceEntity
   :param lineEntity: None
   :type lineEntity: undefined | null | LineEntity
   :param pointEntity: None
   :type pointEntity: PointEntity


   Create a new [[PointSelectionItem]].


   :rtype: PointSelectionItem

.. js:method:: SelectionItem.create( nodeId, inclusionKey, faceEntity[, lineEntity[, pointEntity]])
   :noindex:

   :param nodeId: None
   :type nodeId: undefined | null | number
   :param inclusionKey: None
   :type inclusionKey: undefined | null | InclusionKey
   :param faceEntity: None
   :type faceEntity: FaceEntity
   :param lineEntity: :ts-api-decorator:`optional` None
   :type lineEntity: null | LineEntity
   :param pointEntity: :ts-api-decorator:`optional` None
   :type pointEntity: null | PointEntity


   Create a new [[EntitySelectionItem]].


   :rtype: EntitySelectionItem

.. js:method:: SelectionItem.create( nodeId, inclusionKey, faceEntity, lineEntity[, pointEntity])
   :noindex:

   :param nodeId: None
   :type nodeId: undefined | null | number
   :param inclusionKey: None
   :type inclusionKey: undefined | null | InclusionKey
   :param faceEntity: None
   :type faceEntity: undefined | null | FaceEntity
   :param lineEntity: None
   :type lineEntity: LineEntity
   :param pointEntity: :ts-api-decorator:`optional` None
   :type pointEntity: null | PointEntity


   Create a new [[EntitySelectionItem]].


   :rtype: EntitySelectionItem

.. js:method:: SelectionItem.create( nodeId, inclusionKey, faceEntity, lineEntity, pointEntity)
   :noindex:

   :param nodeId: None
   :type nodeId: undefined | null | number
   :param inclusionKey: None
   :type inclusionKey: undefined | null | InclusionKey
   :param faceEntity: None
   :type faceEntity: undefined | null | FaceEntity
   :param lineEntity: None
   :type lineEntity: undefined | null | LineEntity
   :param pointEntity: None
   :type pointEntity: PointEntity


   Create a new [[EntitySelectionItem]].


   :rtype: EntitySelectionItem

.. js:method:: SelectionItem.create( nodeId[, inclusionKey[, faceEntity[, lineEntity[, pointEntity]]]])
   :noindex:

   :param nodeId: None
   :type nodeId: number
   :param inclusionKey: :ts-api-decorator:`optional` None
   :type inclusionKey: null | InclusionKey
   :param faceEntity: :ts-api-decorator:`optional` None
   :type faceEntity: null | FaceEntity
   :param lineEntity: :ts-api-decorator:`optional` None
   :type lineEntity: null | LineEntity
   :param pointEntity: :ts-api-decorator:`optional` None
   :type pointEntity: null | PointEntity


   Create a new [[NodeSelectionItem]].


   :rtype: NodeSelectionItem

.. js:method:: SelectionItem.create([ nodeId[, inclusionKey[, faceEntity[, lineEntity[, pointEntity]]]]])
   :noindex:

   :param nodeId: :ts-api-decorator:`optional` None
   :type nodeId: null | number
   :param inclusionKey: :ts-api-decorator:`optional` None
   :type inclusionKey: null | InclusionKey
   :param faceEntity: :ts-api-decorator:`optional` None
   :type faceEntity: null | FaceEntity
   :param lineEntity: :ts-api-decorator:`optional` None
   :type lineEntity: null | LineEntity
   :param pointEntity: :ts-api-decorator:`optional` None
   :type pointEntity: null | PointEntity


   Create a new [[SelectionItem]].


   :rtype: SelectionItem

