.. role:: ts-api-decorator

#################
FaceSelectionItem
#################

.. js:module:: Selection
   :noindex:

.. container:: ts-api-section

   .. js:class:: FaceSelectionItem

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



.. container:: api-index-section

   .. rubric:: Methods

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

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





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

Methods
=======

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

equals
------

.. js:method:: FaceSelectionItem.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:: FaceSelectionItem.getFaceEntity()



   Gets the face entity for this selection.

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


   :rtype: FaceEntity

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

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

.. js:method:: FaceSelectionItem.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:: FaceSelectionItem.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:: FaceSelectionItem.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:: FaceSelectionItem.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:: FaceSelectionItem.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: Point3

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

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

.. js:method:: FaceSelectionItem.getSelectionType()



   :rtype: SelectionType

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

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

.. js:method:: FaceSelectionItem.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:: FaceSelectionItem.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:: FaceSelectionItem.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:: FaceSelectionItem.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:: FaceSelectionItem.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:: FaceSelectionItem.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:: FaceSelectionItem.overlayIndex()



   Gets the overlay index for this selection.

   :returns: the overlay index associated with this selection item


   :rtype: number

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

toJson
------

.. js:method:: FaceSelectionItem.toJson()



   Creates an object ready for JSON serialization.

   :returns: The prepared object.


   :rtype: object

