.. role:: ts-api-decorator

############
Communicator
############

:doc:`deprecated`


.. toctree::
   :titlesonly:
   :hidden:

   /api_ref/viewing/namespaces/Animation
   /api_ref/viewing/enum/AntiAliasingMode
   /api_ref/viewing/classes/AssemblyDataParseError
   /api_ref/viewing/interfaces/Attribute
   /api_ref/viewing/enum/AttributeType
   /api_ref/viewing/enum/Axis
   /api_ref/viewing/classes/AxisTriad
   /api_ref/viewing/enum/BasicUnit
   /api_ref/viewing/namespaces/Bcf
   /api_ref/viewing/namespaces/Bim
   /api_ref/viewing/interfaces/BloomLayerInfo
   /api_ref/viewing/enum/BlurIntervalUnit
   /api_ref/viewing/enum/BoundingPreviewMode
   /api_ref/viewing/classes/Box
   /api_ref/viewing/enum/BranchVisibility
   /api_ref/viewing/enum/BuiltinOverlayIndex
   /api_ref/viewing/enum/Button
   /api_ref/viewing/enum/Buttons
   /api_ref/viewing/interfaces/CallbackMap
   /api_ref/viewing/classes/Camera
   /api_ref/viewing/classes/Color
   /api_ref/viewing/classes/CommunicatorError
   /api_ref/viewing/interfaces/ComparisonConfig
   /api_ref/viewing/interfaces/CullingVector
   /api_ref/viewing/enum/CullingVectorSpace
   /api_ref/viewing/classes/CuttingManager
   /api_ref/viewing/classes/CuttingPlane
   /api_ref/viewing/interfaces/CuttingPlaneData
   /api_ref/viewing/classes/CuttingSection
   /api_ref/viewing/enum/DepthRange
   /api_ref/viewing/enum/DrawMode
   /api_ref/viewing/enum/DrawStrategy
   /api_ref/viewing/enum/ElementType
   /api_ref/viewing/namespaces/Event
   /api_ref/viewing/enum/EventType
   /api_ref/viewing/classes/ExplodeManager
   /api_ref/viewing/classes/FaceFaceDistanceItem
   /api_ref/viewing/interfaces/FaceFaceDistanceObject
   /api_ref/viewing/classes/FaceMeshData
   /api_ref/viewing/enum/FaceWinding
   /api_ref/viewing/enum/FileType
   /api_ref/viewing/classes/FilteredNodes
   /api_ref/viewing/enum/FilterId
   /api_ref/viewing/namespaces/Floorplan
   /api_ref/viewing/enum/FloorplanOrientation
   /api_ref/viewing/interfaces/GetNodesBoundingConfig
   /api_ref/viewing/interfaces/GroundPlane
   /api_ref/viewing/enum/HandleEventType
   /api_ref/viewing/enum/HandleType
   /api_ref/viewing/interfaces/IBox
   /api_ref/viewing/interfaces/IColor
   /api_ref/viewing/interfaces/IdBooleanMap
   /api_ref/viewing/interfaces/IdColorMap
   /api_ref/viewing/interfaces/IdNumberMap
   /api_ref/viewing/interfaces/IdStringMap
   /api_ref/viewing/interfaces/ImageBasedLightingOrientation
   /api_ref/viewing/enum/ImageFormat
   /api_ref/viewing/interfaces/ImageOptions
   /api_ref/viewing/classes/IncrementalPickConfig
   /api_ref/viewing/enum/InfoType
   /api_ref/viewing/enum/InstanceModifier
   /api_ref/viewing/classes/InternalLogicError
   /api_ref/viewing/classes/InvalidIndexError
   /api_ref/viewing/classes/InvalidNodeIdError
   /api_ref/viewing/classes/InvalidNodeTypeError
   /api_ref/viewing/interfaces/IPoint2
   /api_ref/viewing/interfaces/IPoint3
   /api_ref/viewing/interfaces/IPoint4
   /api_ref/viewing/interfaces/IRay
   /api_ref/viewing/enum/KeyCode
   /api_ref/viewing/enum/KeyInputType
   /api_ref/viewing/enum/KeyModifiers
   /api_ref/viewing/enum/LayerId
   /api_ref/viewing/classes/Light
   /api_ref/viewing/classes/LineManager
   /api_ref/viewing/enum/LinePatternLengthUnit
   /api_ref/viewing/classes/LoadCancelledError
   /api_ref/viewing/classes/LoadError
   /api_ref/viewing/classes/LoadSubtreeConfig
   /api_ref/viewing/namespaces/Markup
   /api_ref/viewing/interfaces/MarkupData
   /api_ref/viewing/classes/MarkupManager
   /api_ref/viewing/classes/MarkupTypeManager
   /api_ref/viewing/classes/Matrix
   /api_ref/viewing/classes/MeasureManager
   /api_ref/viewing/classes/MeshData
   /api_ref/viewing/interfaces/MeshDataCopy
   /api_ref/viewing/interfaces/MeshDataCopyElement
   /api_ref/viewing/interfaces/MeshDataCopyElementGroup
   /api_ref/viewing/interfaces/MeshDataCopyIterator
   /api_ref/viewing/interfaces/MeshDataCopyVertex
   /api_ref/viewing/enum/MeshInstanceCreationFlags
   /api_ref/viewing/classes/MeshInstanceData
   /api_ref/viewing/interfaces/MetallicRoughnessValue
   /api_ref/viewing/classes/MissingModelError
   /api_ref/viewing/classes/Model
   /api_ref/viewing/enum/MouseInputType
   /api_ref/viewing/classes/NavCube
   /api_ref/viewing/enum/NodeSource
   /api_ref/viewing/enum/NodeType
   /api_ref/viewing/interfaces/ObjectConstructor
   /api_ref/viewing/enum/OperatorId
   /api_ref/viewing/classes/OperatorManager
   /api_ref/viewing/namespaces/Operators
   /api_ref/viewing/enum/OrbitFallbackMode
   /api_ref/viewing/namespaces/Overlay
   /api_ref/viewing/enum/OverlayAnchor
   /api_ref/viewing/enum/OverlayUnit
   /api_ref/viewing/classes/ParseError
   /api_ref/viewing/classes/PickConfig
   /api_ref/viewing/classes/PickOutsideCanvasError
   /api_ref/viewing/classes/Plane
   /api_ref/viewing/enum/PmiSubType
   /api_ref/viewing/enum/PmiTopoRef
   /api_ref/viewing/enum/PmiType
   /api_ref/viewing/classes/Point2
   /api_ref/viewing/classes/Point3
   /api_ref/viewing/classes/Point4
   /api_ref/viewing/classes/PointMeshData
   /api_ref/viewing/enum/PointShape
   /api_ref/viewing/enum/PointSizeUnit
   /api_ref/viewing/classes/PolylineMeshData
   /api_ref/viewing/enum/Projection
   /api_ref/viewing/classes/Ray
   /api_ref/viewing/classes/RefOnTopoItem
   /api_ref/viewing/interfaces/RelationshipInfo
   /api_ref/viewing/enum/RelationshipType
   /api_ref/viewing/enum/RendererType
   /api_ref/viewing/namespaces/Sc
   /api_ref/viewing/enum/ScreenConfiguration
   /api_ref/viewing/namespaces/Selection
   /api_ref/viewing/enum/SelectionHighlightMode
   /api_ref/viewing/classes/SelectionInvalidatedError
   /api_ref/viewing/enum/SelectionMask
   /api_ref/viewing/enum/SelectionMode
   /api_ref/viewing/enum/SelectionType
   /api_ref/viewing/classes/SheetManager
   /api_ref/viewing/enum/SimpleReflectionAttenuationUnit
   /api_ref/viewing/classes/SnapshotConfig
   /api_ref/viewing/enum/SnapshotLayer
   /api_ref/viewing/enum/StreamingMode
   /api_ref/viewing/interfaces/StringStringMap
   /api_ref/viewing/classes/SubentityAttributes
   /api_ref/viewing/classes/SvgConfig
   /api_ref/viewing/enum/TextureModifier
   /api_ref/viewing/interfaces/TextureOptions
   /api_ref/viewing/enum/TextureParameterization
   /api_ref/viewing/enum/TextureTiling
   /api_ref/viewing/enum/TouchInputType
   /api_ref/viewing/enum/TransparencyMode
   /api_ref/viewing/enum/TreeWalkMode
   /api_ref/viewing/interfaces/UnitElement
   /api_ref/viewing/namespaces/Util
   /api_ref/viewing/classes/VerticalGradient
   /api_ref/viewing/classes/View
   /api_ref/viewing/classes/ViewAxes
   /api_ref/viewing/interfaces/ViewConfig
   /api_ref/viewing/enum/ViewOrientation
   /api_ref/viewing/classes/VisibilityState
   /api_ref/viewing/enum/WalkDirection
   /api_ref/viewing/enum/WalkMode
   /api_ref/viewing/classes/WebViewer
   /api_ref/viewing/interfaces/WebViewerConfig
   /api_ref/viewing/classes/XmlParseError
   /api_ref/viewing/enum/XRayGroup

.. container:: api-index-section

   .. rubric:: References

   .. rst-class:: api-index-list-item api-kind-reference

   * :ref:`BimMask`
   * :ref:`Milliseconds`
   * :ref:`OverlayId`
   * :ref:`OverlayIndex`
   * :ref:`ScModelName`
   * :ref:`ScsBuffer`
   * :ref:`ViewKey`



.. container:: api-index-section

   .. rubric:: Namespaces

   .. rst-class:: api-index-list-item api-kind-namespace

   * :doc:`/api_ref/viewing/namespaces/Animation`
   * :doc:`/api_ref/viewing/namespaces/Bcf`
   * :doc:`/api_ref/viewing/namespaces/Bim`
   * :doc:`/api_ref/viewing/namespaces/Event`
   * :doc:`/api_ref/viewing/namespaces/Floorplan`
   * :doc:`/api_ref/viewing/namespaces/Markup`
   * :doc:`/api_ref/viewing/namespaces/Operators`
   * :doc:`/api_ref/viewing/namespaces/Overlay`
   * :doc:`/api_ref/viewing/namespaces/Sc`
   * :doc:`/api_ref/viewing/namespaces/Selection`
   * :doc:`/api_ref/viewing/namespaces/Util`



.. container:: api-index-section

   .. rubric:: Enumerations

   .. rst-class:: api-index-list-item api-kind-enum

   * :ref:`AntiAliasingMode`
   * :ref:`AttributeType`
   * :ref:`Axis`
   * :ref:`BasicUnit`
   * :ref:`BlurIntervalUnit`
   * :ref:`BoundingPreviewMode`
   * :ref:`BranchVisibility`
   * :ref:`BuiltinOverlayIndex`
   * :ref:`Button`
   * :ref:`Buttons`
   * :ref:`CullingVectorSpace`
   * :ref:`DepthRange`
   * :ref:`DrawMode`
   * :ref:`DrawStrategy`
   * :ref:`ElementType`
   * :ref:`EventType`
   * :ref:`FaceWinding`
   * :ref:`FileType`
   * :ref:`FilterId`
   * :ref:`FloorplanOrientation`
   * :ref:`HandleEventType`
   * :ref:`HandleType`
   * :ref:`ImageFormat`
   * :ref:`InfoType`
   * :ref:`InstanceModifier`
   * :ref:`KeyCode`
   * :ref:`KeyInputType`
   * :ref:`KeyModifiers`
   * :ref:`LayerId`
   * :ref:`LinePatternLengthUnit`
   * :ref:`MeshInstanceCreationFlags`
   * :ref:`MouseInputType`
   * :ref:`NodeSource`
   * :ref:`NodeType`
   * :ref:`OperatorId`
   * :ref:`OrbitFallbackMode`
   * :ref:`OverlayAnchor`
   * :ref:`OverlayUnit`
   * :ref:`PmiSubType`
   * :ref:`PmiTopoRef`
   * :ref:`PmiType`
   * :ref:`PointShape`
   * :ref:`PointSizeUnit`
   * :ref:`Projection`
   * :ref:`RelationshipType`
   * :ref:`RendererType`
   * :ref:`ScreenConfiguration`
   * :ref:`SelectionHighlightMode`
   * :ref:`SelectionMask`
   * :ref:`SelectionMode`
   * :ref:`SelectionType`
   * :ref:`SimpleReflectionAttenuationUnit`
   * :ref:`SnapshotLayer`
   * :ref:`StreamingMode`
   * :ref:`TextureModifier`
   * :ref:`TextureParameterization`
   * :ref:`TextureTiling`
   * :ref:`TouchInputType`
   * :ref:`TransparencyMode`
   * :ref:`TreeWalkMode`
   * :ref:`ViewOrientation`
   * :ref:`WalkDirection`
   * :ref:`WalkMode`
   * :ref:`XRayGroup`



.. container:: api-index-section

   .. rubric:: Classes

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

   * :js:class:`~AssemblyDataParseError`
   * :js:class:`~AxisTriad`
   * :js:class:`~Box`
   * :js:class:`~Camera`
   * :js:class:`~Color`
   * :js:class:`~CommunicatorError`
   * :js:class:`~CuttingManager`
   * :js:class:`~CuttingPlane`
   * :js:class:`~CuttingSection`
   * :js:class:`~ExplodeManager`
   * :js:class:`~FaceFaceDistanceItem`
   * :js:class:`~FaceMeshData`
   * :js:class:`~FilteredNodes`
   * :js:class:`~IncrementalPickConfig`
   * :js:class:`~InternalLogicError`
   * :js:class:`~InvalidIndexError`
   * :js:class:`~InvalidNodeIdError`
   * :js:class:`~InvalidNodeTypeError`
   * :js:class:`~Light`
   * :js:class:`~LineManager`
   * :js:class:`~LoadCancelledError`
   * :js:class:`~LoadError`
   * :js:class:`~LoadSubtreeConfig`
   * :js:class:`~MarkupManager`
   * :js:class:`~MarkupTypeManager`
   * :js:class:`~Matrix`
   * :js:class:`~MeasureManager`
   * :js:class:`~MeshData`
   * :js:class:`~MeshInstanceData`
   * :js:class:`~MissingModelError`
   * :js:class:`~Model`
   * :js:class:`~NavCube`
   * :js:class:`~OperatorManager`
   * :js:class:`~ParseError`
   * :js:class:`~PickConfig`
   * :js:class:`~PickOutsideCanvasError`
   * :js:class:`~Plane`
   * :js:class:`~Point2`
   * :js:class:`~Point3`
   * :js:class:`~Point4`
   * :js:class:`~PointMeshData`
   * :js:class:`~PolylineMeshData`
   * :js:class:`~Ray`
   * :js:class:`~RefOnTopoItem`
   * :js:class:`~SelectionInvalidatedError`
   * :js:class:`~SheetManager`
   * :js:class:`~SnapshotConfig`
   * :js:class:`~SubentityAttributes`
   * :js:class:`~SvgConfig`
   * :js:class:`~VerticalGradient`
   * :js:class:`~View`
   * :js:class:`~ViewAxes`
   * :js:class:`~VisibilityState`
   * :js:class:`~WebViewer`
   * :js:class:`~XmlParseError`



.. container:: api-index-section

   .. rubric:: Interfaces

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

   * :js:class:`~Attribute`
   * :js:class:`~BloomLayerInfo`
   * :js:class:`~CallbackMap`
   * :js:class:`~ComparisonConfig`
   * :js:class:`~CullingVector`
   * :js:class:`~CuttingPlaneData`
   * :js:class:`~FaceFaceDistanceObject`
   * :js:class:`~GetNodesBoundingConfig`
   * :js:class:`~GroundPlane`
   * :js:class:`~IBox`
   * :js:class:`~IColor`
   * :js:class:`~IPoint2`
   * :js:class:`~IPoint3`
   * :js:class:`~IPoint4`
   * :js:class:`~IRay`
   * :js:class:`~IdBooleanMap`
   * :js:class:`~IdColorMap`
   * :js:class:`~IdNumberMap`
   * :js:class:`~IdStringMap`
   * :js:class:`~ImageBasedLightingOrientation`
   * :js:class:`~ImageOptions`
   * :js:class:`~MarkupData`
   * :js:class:`~MeshDataCopy`
   * :js:class:`~MeshDataCopyElement`
   * :js:class:`~MeshDataCopyElementGroup`
   * :js:class:`~MeshDataCopyIterator`
   * :js:class:`~MeshDataCopyVertex`
   * :js:class:`~MetallicRoughnessValue`
   * :js:class:`~ObjectConstructor`
   * :js:class:`~RelationshipInfo`
   * :js:class:`~StringStringMap`
   * :js:class:`~TextureOptions`
   * :js:class:`~UnitElement`
   * :js:class:`~ViewConfig`
   * :js:class:`~WebViewerConfig`



.. container:: api-index-section

   .. rubric:: Type Aliases

   .. rst-class:: api-index-list-item api-kind-typealias

   * :ref:`BimId`
   * :ref:`BodyId`
   * :ref:`BuiltInOperatorId`
   * :ref:`CadViewId`
   * :ref:`Degrees`
   * :ref:`ExchangeId`
   * :ref:`ExternalModelName`
   * :ref:`FilterName`
   * :ref:`GenericId`
   * :ref:`GenericType`
   * :ref:`HtmlId`
   * :ref:`ImageId`
   * :ref:`LayerName`
   * :ref:`LightKey`
   * :ref:`LinePattern`
   * :ref:`MassageModelNameFunc`
   * :ref:`Matrix12`
   * :ref:`Matrix16`
   * :ref:`Matrix9`
   * :ref:`MeshId`
   * :ref:`ModelNameToScsFileFunc`
   * :ref:`NodeId`
   * :ref:`NodeIdOffset`
   * :ref:`PartId`
   * :ref:`Pixels`
   * :ref:`PmiId`
   * :ref:`Radians`
   * :ref:`Rgbas`
   * :ref:`ScsUri`
   * :ref:`SheetId`
   * :ref:`UserDataIndex`
   * :ref:`Uuid`
   * :ref:`Uvs`
   * :ref:`Vector3`
   * :ref:`Vector3s`
   * :ref:`Vector4`
   * :ref:`Vector4s`
   * :ref:`XRayTransparencyMode`
   * :ref:`XmlFilename`



.. container:: api-index-section

   .. rubric:: Variables

   .. rst-class:: api-index-list-item api-kind-variable

   * :js:data:`~DefaultTransitionDuration`
   * :js:data:`~EmptyModelName`
   * :js:data:`~InvalidNodeId`
   * :js:data:`~Ohm`
   * :js:data:`~Subscript1`
   * :js:data:`~Subscript2`
   * :js:data:`~Subscript3`
   * :js:data:`~SubscriptNeg`



.. container:: api-index-section

   .. rubric:: Functions

   .. rst-class:: api-index-list-item api-kind-function

   * :js:func:`~closestPointFromPointToSegment`
   * :js:func:`~closestPointScalarFromPointToSegment`
   * :js:func:`~computeAngleBetweenVector`
   * :js:func:`~computeOffaxisRotation`
   * :js:func:`~computePointToLineDistance`
   * :js:func:`~createUuid`
   * :js:func:`~degreesToRadians`
   * :js:func:`~distanceLineLine`
   * :js:func:`~formatWithUnit`
   * :js:func:`~generateArcPoints`
   * :js:func:`~generatePointsOnCircle`
   * :js:func:`~getLongUnitString`
   * :js:func:`~intersect3d2Planes`
   * :js:func:`~intersectionPlaneLine`
   * :js:func:`~intersectionPlaneLine2`
   * :js:func:`~isIColor`
   * :js:func:`~isIPoint2`
   * :js:func:`~isIPoint3`
   * :js:func:`~isIPoint4`
   * :js:func:`~isPointInRect2d`
   * :js:func:`~isPointOnLineSegment`
   * :js:func:`~isPointOnLineSegment2d`
   * :js:func:`~lineLineIntersect`
   * :js:func:`~oneVectorCross`
   * :js:func:`~radiansToDegrees`





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

References
----------

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

.. _BimMask:

BimMask
~~~~~~~

Re-exports :ref:`Sc.BimMask`

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

.. _Milliseconds:

Milliseconds
~~~~~~~~~~~~

Re-exports :ref:`Sc.Milliseconds`

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

.. _OverlayId:

OverlayId
~~~~~~~~~

Re-exports :js:class:`~Sc.OverlayId`

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

.. _OverlayIndex:

OverlayIndex
~~~~~~~~~~~~

Re-exports :ref:`Sc.OverlayIndex`

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

.. _ScModelName:

ScModelName
~~~~~~~~~~~

Re-exports :ref:`Sc.ScModelName`

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

.. _ScsBuffer:

ScsBuffer
~~~~~~~~~

Re-exports :ref:`Sc.ScsBuffer`

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

.. _ViewKey:

ViewKey
~~~~~~~

Re-exports :ref:`Sc.ViewKey`

Type Aliases
------------

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

.. _BimId:

BimId
~~~~~

Type for the relationships ID

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

.. _BodyId:

BodyId
~~~~~~

Type used to denote assembly tree body IDs. All BodyIds are NodeIds.

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

.. _BuiltInOperatorId:

BuiltInOperatorId
~~~~~~~~~~~~~~~~~

Enumerates IDs for built-in operators

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

.. _CadViewId:

CadViewId
~~~~~~~~~

Type used to denote assembly tree CAD view IDs. All CadViewIds are NodeIds.

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

.. _Degrees:

Degrees
~~~~~~~

Type used to denote the degrees of angles.

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

.. _ExchangeId:

ExchangeId
~~~~~~~~~~

Type used to denote Exchange IDs. Use [[Util.exchangeIdEqual]] function to compare.

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

.. _ExternalModelName:

ExternalModelName
~~~~~~~~~~~~~~~~~

Type used to denote an XML ExternalModel name.

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

.. _FilterName:

FilterName
~~~~~~~~~~

Type used to denote Filter names.

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

.. _GenericId:

GenericId
~~~~~~~~~

Type used to denote generic id

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

.. _GenericType:

GenericType
~~~~~~~~~~~

Type used to denote generic types

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

.. _HtmlId:

HtmlId
~~~~~~

Type used to denote HTML IDs.

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

.. _ImageId:

ImageId
~~~~~~~

A pair of numbers identifying an image.

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

.. _LayerName:

LayerName
~~~~~~~~~

Type used to denote Layer names.

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

.. _LightKey:

LightKey
~~~~~~~~

Type used to denote light keys

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

.. _LinePattern:

LinePattern
~~~~~~~~~~~

Specifies the appearance of a single repetion of a line pattern.
The format is an arbitrary-length array of ``1``s and ``0``s, where
pixels covered by a ``1`` in the pattern are visible and pixels
covered by a ``0`` are invisible.

Examples:
- ``[1,0]``: a dashed line with equal-length dashes and gaps
- ``[1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,0,0,0]``: a dash followed by a gap of
  equal length with a dot in the center

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

.. _MassageModelNameFunc:

MassageModelNameFunc
~~~~~~~~~~~~~~~~~~~~

Callback to massage ExternalModel names within an XML load file to SC model names.
Return null to skip the model.
Returned value can be synchronous (non-Promise) or asynchronous (Promise).

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

.. _Matrix12:

Matrix12
~~~~~~~~

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

.. _Matrix16:

Matrix16
~~~~~~~~

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

.. _Matrix9:

Matrix9
~~~~~~~

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

.. _MeshId:

MeshId
~~~~~~

A pair of numbers identifying a mesh.

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

.. _ModelNameToScsFileFunc:

ModelNameToScsFileFunc
~~~~~~~~~~~~~~~~~~~~~~

Callback to map ExternalModel names within an XML load file to SCS file URis or SCS file buffers.
Return null to skip the model.
Returned value can be synchronous (non-Promise) or asynchronous (Promise).

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

.. _NodeId:

NodeId
~~~~~~

Type used to denote assembly tree node IDs.

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

.. _NodeIdOffset:

NodeIdOffset
~~~~~~~~~~~~

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

.. _PartId:

PartId
~~~~~~

Type used to denote assembly tree part IDs. All PartIds are NodeIds.

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

.. _Pixels:

Pixels
~~~~~~

A number typed in pixel units.

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

.. _PmiId:

PmiId
~~~~~

Type used to denote assembly tree PMI IDs. All PmiIds are NodeIds.

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

.. _Radians:

Radians
~~~~~~~

Type used to denote the radians of angles.

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

.. _Rgbas:

Rgbas
~~~~~

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

.. _ScsUri:

ScsUri
~~~~~~

Type used to denote an SCS model's URI.

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

.. _SheetId:

SheetId
~~~~~~~

Type used to denote assembly tree sheet IDs. All SheetIds are NodeIds.

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

.. _UserDataIndex:

UserDataIndex
~~~~~~~~~~~~~

This is the User Data Index for a node.

Values of this type are unsigned 64 bit numbers.

A value is of type ``number`` when it can be represented precisely as such.

Otherwise a value is of type ``string``, where the string is the hex encoding of the index.
The hex representation is in uppercase and does not have a leading ``0x``.

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

.. _Uuid:

Uuid
~~~~

Type used to denote GUIDs.

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

.. _Uvs:

Uvs
~~~

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

.. _Vector3:

Vector3
~~~~~~~

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

.. _Vector3s:

Vector3s
~~~~~~~~

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

.. _Vector4:

Vector4
~~~~~~~

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

.. _Vector4s:

Vector4s
~~~~~~~~

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

.. _XRayTransparencyMode:

XRayTransparencyMode
~~~~~~~~~~~~~~~~~~~~

Enumerates ways of displaying transparent (unselected) geometry in the x-ray draw mode.

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

.. _XmlFilename:

XmlFilename
~~~~~~~~~~~

Type used to denote an XML filename.

Variables
---------

.. container:: ts-api-section

   .. js:data:: DefaultTransitionDuration

      :type: 400

      The default duration in milliseconds of camera transitions.



.. container:: ts-api-section

   .. js:data:: EmptyModelName

      :type: _empty





.. container:: ts-api-section

   .. js:data:: InvalidNodeId

      :type: NodeId





.. container:: ts-api-section

   .. js:data:: Ohm

      :type: Ω





.. container:: ts-api-section

   .. js:data:: Subscript1

      :type: ¹





.. container:: ts-api-section

   .. js:data:: Subscript2

      :type: ²





.. container:: ts-api-section

   .. js:data:: Subscript3

      :type: ³





.. container:: ts-api-section

   .. js:data:: SubscriptNeg

      :type: ⁻





Functions
---------

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

closestPointFromPointToSegment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. js:function:: closestPointFromPointToSegment( p0, p1, point)

   :param p0: First point of the line segment
   :type p0: Point3
   :param p1: Second point of the line segment
   :type p1: Point3
   :param point: Point at which to find closest line segment point.
   :type point: Point3


   Finds the closest point on line segment p0-p1 to the given point. The closest point will always lie
   on or between the line segment endpoints.


   :rtype: Point3

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

closestPointScalarFromPointToSegment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. js:function:: closestPointScalarFromPointToSegment( p0, p1, point)

   :param p0: First point of the line segment
   :type p0: Point3
   :param p1: Second point of the line segment
   :type p1: Point3
   :param point: Point at which to find closest line segment scalar
   :type point: Point3


   Finds the scalar for the closest point on line segment p0-p1 to the given point. The returned scalar
   will always be in the range [0, 1], where 0 indicates p0 is closest, and 1 indicates p1 is closest.


   :rtype: number

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

computeAngleBetweenVector
~~~~~~~~~~~~~~~~~~~~~~~~~

.. js:function:: computeAngleBetweenVector( vector1, vector2)

   :param vector1: The first vector.
   :type vector1: Point3
   :param vector2: The second vector.
   :type vector2: Point3


   Computes the smallest angle between two vectors in degrees.

   :returns: The angle between vectors in degrees.


   :rtype: number

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

computeOffaxisRotation
~~~~~~~~~~~~~~~~~~~~~~

.. js:function:: computeOffaxisRotation( axisVector, degrees[, out_rotationMatrix])

   :param axisVector: The vector to rotate around.
   :type axisVector: Point3
   :param degrees: The amount to rotate.
   :type degrees: number
   :param out_rotationMatrix: :ts-api-decorator:`optional` The out parameter for the rotation matrix.
   :type out_rotationMatrix: Matrix


   Computes the rotation matrix defined by rotating around a vector.

   :returns: The out parameter rotation matrix.


   :rtype: Matrix

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

computePointToLineDistance
~~~~~~~~~~~~~~~~~~~~~~~~~~

.. js:function:: computePointToLineDistance( point, lineBegin, lineEnd, out_closestPointOnLine)

   :param point: None
   :type point: Point3
   :param lineBegin: The start point of the line segment to compute against.
   :type lineBegin: Point3
   :param lineEnd: The end point of the line segment to compute against.
   :type lineEnd: Point3
   :param out_closestPointOnLine: The out parameter for a closest point on the line segment to the point.
   :type out_closestPointOnLine: Point3


   Computes the shortest distance between a point and a line segment.

   :returns: The distance from the point and the closest point on the line.


   :rtype: number

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

createUuid
~~~~~~~~~~

.. js:function:: createUuid()



   :rtype: Uuid

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

degreesToRadians
~~~~~~~~~~~~~~~~

.. js:function:: degreesToRadians( degrees)

   :param degrees: The degrees to convert.
   :type degrees: number


   Converts degrees to radians.

   :returns: The converted radians.


   :rtype: number

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

distanceLineLine
~~~~~~~~~~~~~~~~

.. js:function:: distanceLineLine( line1Begin, line1End, line2Begin, line2End, out_closestPointLine1, out_closestPointLine2)

   :param line1Begin: The start of the first line segment.
   :type line1Begin: Point3
   :param line1End: The end of the first line segment.
   :type line1End: Point3
   :param line2Begin: The start of the second line segment.
   :type line2Begin: Point3
   :param line2End: The end of the second line segment.
   :type line2End: Point3
   :param out_closestPointLine1: Out parameter for the closest point of line1 to line2.
   :type out_closestPointLine1: Point3
   :param out_closestPointLine2: Out parameter for the closest point of line2 to line1.
   :type out_closestPointLine2: Point3


   Returns the distance between two line segments.

   :returns: The distance between the two input line segments.


   :rtype: number

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

formatWithUnit
~~~~~~~~~~~~~~

.. js:function:: formatWithUnit( value, unit)

   :param value: The value to format (without units).
   :type value: number
   :param unit: The unit scale to be applied to ``value``.
   :type unit: number


   Returns the formatted string of a value and its units.
   Unit scaling is based on ``unit === 1`` being for millimeters.


   :rtype: string

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

generateArcPoints
~~~~~~~~~~~~~~~~~

.. js:function:: generateArcPoints( axis, angle, center, startOffset, segmentCount)

   :param axis: The normal of the plane containing the arc (in other words, the axis of rotation).
   :type axis: Point3
   :param angle: The angle swept by the arc (may be negative).
   :type angle: number
   :param center: The center point of the arc.
   :type center: Point3
   :param startOffset: The starting point of the arc, expressed as an offset relative to the center.
   :type startOffset: Point3
   :param segmentCount: The number of line segments to be generated.
   :type segmentCount: number


   Returns an array of evenly-distributed points that lie on an arc.

   :returns: An array containing ``segmentCount + 1`` points.


   :rtype: [Point3]

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

generatePointsOnCircle
~~~~~~~~~~~~~~~~~~~~~~

.. js:function:: generatePointsOnCircle( out_points, center, radius, numPoints, axisVector)

   :param out_points: The out parameter for the generated points.
   :type out_points: [Point3]
   :param center: The center of the circle.
   :type center: Point3
   :param radius: The radius of the circle.
   :type radius: number
   :param numPoints: The number of points to use for the tesesselated circle.
   :type numPoints: number
   :param axisVector: The axis to orient the circle against.
   :type axisVector: Point3


   Generates tessellated points suitable for mesh creation for a given circle.


   :rtype: void

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

getLongUnitString
~~~~~~~~~~~~~~~~~

.. js:function:: getLongUnitString( unit)

   :param unit: None
   :type unit: [UnitElement]


   :rtype: string

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

intersect3d2Planes
~~~~~~~~~~~~~~~~~~

.. js:function:: intersect3d2Planes( plane1, pointOnPlane1, plane2, pointOnPlane2, out_lineBegin, out_lineEnd)

   :param plane1: The first plane.
   :type plane1: Plane
   :param pointOnPlane1: A point on the first plane.
   :type pointOnPlane1: Point3
   :param plane2: The second plane.
   :type plane2: Plane
   :param pointOnPlane2: A point on the second plane.
   :type pointOnPlane2: Point3
   :param out_lineBegin: Out parameter for resulting intersection line (if any).
   :type out_lineBegin: Point3
   :param out_lineEnd: Out parameter for resulting intersection line (if any).
   :type out_lineEnd: Point3


   Computes the intersection of two planes.

   :returns: ``0`` if the planes are disjoint. ``1`` if the planes coincide. ``2`` if the planes intersect in a line.


   :rtype: 0 | 1 | 2

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

intersectionPlaneLine
~~~~~~~~~~~~~~~~~~~~~

.. js:function:: intersectionPlaneLine( lineBegin, lineEnd, planePoint1, planePoint2, planePoint3, out_intersectionPoint)

   :param lineBegin: The start point of the line segment to intersect.
   :type lineBegin: Point3
   :param lineEnd: The end point of the line segment to intersect.
   :type lineEnd: Point3
   :param planePoint1: A point on the plane to intersect.
   :type planePoint1: Point3
   :param planePoint2: A point on the plane to intersect.
   :type planePoint2: Point3
   :param planePoint3: A point on the plane to intersect.
   :type planePoint3: Point3
   :param out_intersectionPoint: The out parameter for the point of intersection if one exists.
   :type out_intersectionPoint: Point3


   Computes the intersection of a line segment and a plane.

   :returns: True if the line segment and plane intersect. False otherwise.  See also: [[intersectionPlaneLine2]].


   :rtype: boolean

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

intersectionPlaneLine2
~~~~~~~~~~~~~~~~~~~~~~

.. js:function:: intersectionPlaneLine2( lineBegin, lineEnd, plane, out_intersectionPoint)

   :param lineBegin: The start point of the line segment to intersect.
   :type lineBegin: Point3
   :param lineEnd: The end point of the line segment to intersect.
   :type lineEnd: Point3
   :param plane: The plane to intersect.
   :type plane: Plane
   :param out_intersectionPoint: The out parameter for the point of intersection if one exists.
   :type out_intersectionPoint: Point3


   Computes the intersection of a line segment and a plane.

   :returns: True if the line segment and plane intersect. False otherwise.


   :rtype: boolean

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

isIColor
~~~~~~~~

.. js:function:: isIColor( o)

   :param o: None
   :type o: unknown


   :rtype: o

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

isIPoint2
~~~~~~~~~

.. js:function:: isIPoint2( o)

   :param o: None
   :type o: any


   :rtype: o

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

isIPoint3
~~~~~~~~~

.. js:function:: isIPoint3( o)

   :param o: None
   :type o: unknown


   :rtype: o

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

isIPoint4
~~~~~~~~~

.. js:function:: isIPoint4( o)

   :param o: None
   :type o: unknown


   :rtype: o

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

isPointInRect2d
~~~~~~~~~~~~~~~

.. js:function:: isPointInRect2d( point, rectPos, rectSize, tolerance)

   :param point: The point to test
   :type point: Point2
   :param rectPos: The lower-left corner of the rectangle
   :type rectPos: Point2
   :param rectSize: The width and height of the rectangle
   :type rectSize: Point2
   :param tolerance: The maximum distance along the x- or y-axis that ``point`` is allowed to be outside the rectangle
   :type tolerance: number


   Returns whether the 2-dimensional point ``point`` lies within the given rectangle.


   :rtype: boolean

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

isPointOnLineSegment
~~~~~~~~~~~~~~~~~~~~

.. js:function:: isPointOnLineSegment( p0, p1, point, epsilon)

   :param p0: First point of the line segment
   :type p0: Point3
   :param p1: Second point of the line segment
   :type p1: Point3
   :param point: Point that possibly lies on the line segment.
   :type point: Point3
   :param epsilon: Epsilon value used with point-on-line distance calculation.
   :type epsilon: number


   Determine if the point is both on the line formed by p0-p1, and within the p0-p1 line-segment endpoints


   :rtype: boolean

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

isPointOnLineSegment2d
~~~~~~~~~~~~~~~~~~~~~~

.. js:function:: isPointOnLineSegment2d( point, p1, p2, tolerance)

   :param point: The point to test
   :type point: Point2
   :param p1: The first endpoint of the line segment
   :type p1: Point2
   :param p2: The second endpoint of the line segment
   :type p2: Point2
   :param tolerance: If the perpendicular distance of ``point`` from the line segment is less than or equal to ``tolerance``, the function will return ``true``.
   :type tolerance: number


   Returns whether the 2-dimensional point ``point`` lies on the line segment ``p1p2``.


   :rtype: boolean

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

lineLineIntersect
~~~~~~~~~~~~~~~~~

.. js:function:: lineLineIntersect( p1, p2, p3, p4)

   :param p1: None
   :type p1: Point3
   :param p2: None
   :type p2: Point3
   :param p3: None
   :type p3: Point3
   :param p4: None
   :type p4: Point3


   Returns the closest point on line ``p1p2`` to line ``p3p4``.


   :rtype: Point3 | null

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

oneVectorCross
~~~~~~~~~~~~~~

.. js:function:: oneVectorCross( vector[, out_crossVector])

   :param vector: The input vector to cross.
   :type vector: Point3
   :param out_crossVector: :ts-api-decorator:`optional` The out parameter for the cross product.
   :type out_crossVector: Point3


   Returns the cross product of a vector against its least significant axis.


   :rtype: Point3

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

radiansToDegrees
~~~~~~~~~~~~~~~~

.. js:function:: radiansToDegrees( radians)

   :param radians: None
   :type radians: number


   Converts radians to degrees.

   :returns: The converted degrees.


   :rtype: number

