.. role:: ts-api-decorator

#################
NodeSelectionItem
#################

.. js:module:: Selection
   :noindex:

.. container:: ts-api-section

   .. js:class:: NodeSelectionItem

      A [[SelectionItem]] that is guaranteed to have a valid [[NodeId]].



.. container:: api-index-section

   .. rubric:: Methods

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

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





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

Methods
=======

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

equals
------

.. js:method:: NodeSelectionItem.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:: NodeSelectionItem.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:: NodeSelectionItem.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:: NodeSelectionItem.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:: NodeSelectionItem.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:: NodeSelectionItem.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:: NodeSelectionItem.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:: NodeSelectionItem.getSelectionType()



   :rtype: SelectionType

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

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

.. js:method:: NodeSelectionItem.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:: NodeSelectionItem.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:: NodeSelectionItem.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:: NodeSelectionItem.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:: NodeSelectionItem.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:: NodeSelectionItem.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:: NodeSelectionItem.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:: NodeSelectionItem.toJson()



   Creates an object ready for JSON serialization.

   :returns: The prepared object.


   :rtype: object

