.. role:: ts-api-decorator

#####
Model
#####

.. container:: ts-api-section

   .. js:class:: Model

      Object representing the model geometry and its associated data.
      All major functionality for querying the model hierarchy, retrieving geometry data and loading additional model data are part of this object.

      More information can be found [here](https://docs.techsoft3d.com/communicator/latest/prog_guide/viewing/data_model/model-tree.html).



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~Model.activateCadConfiguration`
   * :js:meth:`~Model.activateCadView`
   * :js:meth:`~Model.activateDefaultCadConfiguration`
   * :js:meth:`~Model.activateDefaultCadView`
   * :js:meth:`~Model.addPropertyToNode`
   * :js:meth:`~Model.cadConfigurationsEnabled`
   * :js:meth:`~Model.clear`
   * :js:meth:`~Model.clearNodeFaceVisibility`
   * :js:meth:`~Model.clearNodeLineVisibility`
   * :js:meth:`~Model.clearNodePointVisibility`
   * :js:meth:`~Model.computeMinimumBodyBodyDistance`
   * :js:meth:`~Model.computeMinimumFaceFaceDistance`
   * :js:meth:`~Model.computeMinimumFaceLineDistance`
   * :js:meth:`~Model.computeMinimumFaceRayDistance`
   * :js:meth:`~Model.createAndAddRepresentationItem`
   * :js:meth:`~Model.createCadView`
   * :js:meth:`~Model.createImage`
   * :js:meth:`~Model.createMesh`
   * :js:meth:`~Model.createMeshInstance`
   * :js:meth:`~Model.createNode`
   * :js:meth:`~Model.createPart`
   * :js:meth:`~Model.createPmiInstance`
   * :js:meth:`~Model.deleteImages`
   * :js:meth:`~Model.deleteMeshInstances`
   * :js:meth:`~Model.deleteMeshes`
   * :js:meth:`~Model.deleteNode`
   * :js:meth:`~Model.getAbsoluteRootNode`
   * :js:meth:`~Model.getActiveCadConfiguration`
   * :js:meth:`~Model.getAssociatedModelKey`
   * :js:meth:`~Model.getBimIdConnectedElements`
   * :js:meth:`~Model.getBimIdFromNode`
   * :js:meth:`~Model.getBimIdRelatedElements`
   * :js:meth:`~Model.getBimIdRelatingElements`
   * :js:meth:`~Model.getBimIdsFromGenericId`
   * :js:meth:`~Model.getBimInfoFromBimId`
   * :js:meth:`~Model.getBranchVisibility`
   * :js:meth:`~Model.getCadConfigurations`
   * :js:meth:`~Model.getCadViewConfiguration`
   * :js:meth:`~Model.getCadViewMap`
   * :js:meth:`~Model.getCadViewPmis`
   * :js:meth:`~Model.getDataFromIds`
   * :js:meth:`~Model.getDefaultCadConfiguration`
   * :js:meth:`~Model.getDefaultCadView`
   * :js:meth:`~Model.getEdgeAttributes`
   * :js:meth:`~Model.getEdgeCount`
   * :js:meth:`~Model.getEdgeProperty`
   * :js:meth:`~Model.getFaceAttributes`
   * :js:meth:`~Model.getFaceCount`
   * :js:meth:`~Model.getFaceProperty`
   * :js:meth:`~Model.getFilterName`
   * :js:meth:`~Model.getFilters`
   * :js:meth:`~Model.getFiltersWithNode`
   * :js:meth:`~Model.getGenericIdFromBimId`
   * :js:meth:`~Model.getGenericTypeIdMap`
   * :js:meth:`~Model.getGenericTypes`
   * :js:meth:`~Model.getLayerIdsFromName`
   * :js:meth:`~Model.getLayerName`
   * :js:meth:`~Model.getLayers`
   * :js:meth:`~Model.getLooseBounding`
   * :js:meth:`~Model.getLowestAvailableNodeId`
   * :js:meth:`~Model.getMeshIds`
   * :js:meth:`~Model.getMetallicRoughness`
   * :js:meth:`~Model.getModelBounding`
   * :js:meth:`~Model.getModelFileNameFromNode`
   * :js:meth:`~Model.getModelFileTypeFromNode`
   * :js:meth:`~Model.getNodeCappingMeshData`
   * :js:meth:`~Model.getNodeChildren`
   * :js:meth:`~Model.getNodeColorMap`
   * :js:meth:`~Model.getNodeEffectiveFaceColor`
   * :js:meth:`~Model.getNodeEffectiveLineColor`
   * :js:meth:`~Model.getNodeEffectivePointColor`
   * :js:meth:`~Model.getNodeExchangeId`
   * :js:meth:`~Model.getNodeFaceColor`
   * :js:meth:`~Model.getNodeFaceHighlighted`
   * :js:meth:`~Model.getNodeGenericId`
   * :js:meth:`~Model.getNodeGenericType`
   * :js:meth:`~Model.getNodeIdFromBimId`
   * :js:meth:`~Model.getNodeIdOffset`
   * :js:meth:`~Model.getNodeIdsByGenericIds`
   * :js:meth:`~Model.getNodeLayerId`
   * :js:meth:`~Model.getNodeLineColor`
   * :js:meth:`~Model.getNodeLineHighlighted`
   * :js:meth:`~Model.getNodeMatrix`
   * :js:meth:`~Model.getNodeMeshData`
   * :js:meth:`~Model.getNodeName`
   * :js:meth:`~Model.getNodeNetMatrix`
   * :js:meth:`~Model.getNodeParent`
   * :js:meth:`~Model.getNodePointColor`
   * :js:meth:`~Model.getNodePointHighlighted`
   * :js:meth:`~Model.getNodeProperties`
   * :js:meth:`~Model.getNodeRealBounding`
   * :js:meth:`~Model.getNodeType`
   * :js:meth:`~Model.getNodeUnitMultiplier`
   * :js:meth:`~Model.getNodeUserData`
   * :js:meth:`~Model.getNodeUserDataIndices`
   * :js:meth:`~Model.getNodeVisibility`
   * :js:meth:`~Model.getNodesBounding`
   * :js:meth:`~Model.getNodesByGenericType`
   * :js:meth:`~Model.getNodesCappingMeshData`
   * :js:meth:`~Model.getNodesCullingVectors`
   * :js:meth:`~Model.getNodesEffectiveFaceColor`
   * :js:meth:`~Model.getNodesEffectiveLineColor`
   * :js:meth:`~Model.getNodesEffectiveOpacity`
   * :js:meth:`~Model.getNodesEffectivePointColor`
   * :js:meth:`~Model.getNodesFaceColor`
   * :js:meth:`~Model.getNodesFromFiltersId`
   * :js:meth:`~Model.getNodesFromLayer`
   * :js:meth:`~Model.getNodesFromLayerName`
   * :js:meth:`~Model.getNodesFromLayers`
   * :js:meth:`~Model.getNodesHaveTransparency`
   * :js:meth:`~Model.getNodesHighlighted`
   * :js:meth:`~Model.getNodesInstancingSamePart`
   * :js:meth:`~Model.getNodesLineColor`
   * :js:meth:`~Model.getNodesOpacity`
   * :js:meth:`~Model.getNodesPointColor`
   * :js:meth:`~Model.getOutOfHierarchy`
   * :js:meth:`~Model.getPmiColor`
   * :js:meth:`~Model.getPmiColorOverride`
   * :js:meth:`~Model.getPmiSubtype`
   * :js:meth:`~Model.getPmiTopologyReferences`
   * :js:meth:`~Model.getPmiType`
   * :js:meth:`~Model.getPmis`
   * :js:meth:`~Model.getPointAttributes`
   * :js:meth:`~Model.getRelationshipTypesFromBimId`
   * :js:meth:`~Model.getUniqueLayerNames`
   * :js:meth:`~Model.getViewAxes`
   * :js:meth:`~Model.getVisibilityState`
   * :js:meth:`~Model.hasDepthRange`
   * :js:meth:`~Model.hasEffectiveGenericType`
   * :js:meth:`~Model.isAnnotationView`
   * :js:meth:`~Model.isCombineStateView`
   * :js:meth:`~Model.isDrawing`
   * :js:meth:`~Model.isFaceMeasurable`
   * :js:meth:`~Model.isLineMeasurable`
   * :js:meth:`~Model.isMeasurable`
   * :js:meth:`~Model.isNodeLoaded`
   * :js:meth:`~Model.isWithinExternalModel`
   * :js:meth:`~Model.loadMeasurementFromFile`
   * :js:meth:`~Model.loadMeasurementFromJson`
   * :js:meth:`~Model.loadMeasurementFromString`
   * :js:meth:`~Model.loadSubtreeFromModel`
   * :js:meth:`~Model.loadSubtreeFromScsBuffer`
   * :js:meth:`~Model.loadSubtreeFromScsFile`
   * :js:meth:`~Model.loadSubtreeFromScsXmlBuffer`
   * :js:meth:`~Model.loadSubtreeFromScsXmlFile`
   * :js:meth:`~Model.loadSubtreeFromXmlBuffer`
   * :js:meth:`~Model.loadSubtreeFromXmlFile`
   * :js:meth:`~Model.registerBimNodes`
   * :js:meth:`~Model.registerIfcNodes`
   * :js:meth:`~Model.replaceMesh`
   * :js:meth:`~Model.requestNodes`
   * :js:meth:`~Model.reset`
   * :js:meth:`~Model.resetModelHighlight`
   * :js:meth:`~Model.resetModelOpacity`
   * :js:meth:`~Model.resetNodeMatrixToInitial`
   * :js:meth:`~Model.resetNodesColor`
   * :js:meth:`~Model.resetNodesOpacity`
   * :js:meth:`~Model.resetNodesTransform`
   * :js:meth:`~Model.resetNodesVisibility`
   * :js:meth:`~Model.setBehaviorInitiallyHidden`
   * :js:meth:`~Model.setBodyNodesVisibility`
   * :js:meth:`~Model.setDepthRange`
   * :js:meth:`~Model.setEdgeProperty`
   * :js:meth:`~Model.setEnableAutomaticUnitScaling`
   * :js:meth:`~Model.setFaceProperty`
   * :js:meth:`~Model.setInstanceModifier`
   * :js:meth:`~Model.setMeshLevel`
   * :js:meth:`~Model.setMetallicRoughness`
   * :js:meth:`~Model.setNodeFaceColor`
   * :js:meth:`~Model.setNodeFaceHighlighted`
   * :js:meth:`~Model.setNodeFaceVisibility`
   * :js:meth:`~Model.setNodeLineColor`
   * :js:meth:`~Model.setNodeLineHighlighted`
   * :js:meth:`~Model.setNodeLineVisibility`
   * :js:meth:`~Model.setNodeMatrix`
   * :js:meth:`~Model.setNodePointColor`
   * :js:meth:`~Model.setNodePointHighlighted`
   * :js:meth:`~Model.setNodePointVisibility`
   * :js:meth:`~Model.setNodesAmbientColor`
   * :js:meth:`~Model.setNodesAmbientMix`
   * :js:meth:`~Model.setNodesColors`
   * :js:meth:`~Model.setNodesCullingVector`
   * :js:meth:`~Model.setNodesFaceColor`
   * :js:meth:`~Model.setNodesFaceEmissiveColor`
   * :js:meth:`~Model.setNodesFaceSpecularColor`
   * :js:meth:`~Model.setNodesFaceSpecularIntensity`
   * :js:meth:`~Model.setNodesHighlighted`
   * :js:meth:`~Model.setNodesLineColor`
   * :js:meth:`~Model.setNodesLinePattern`
   * :js:meth:`~Model.setNodesOpacities`
   * :js:meth:`~Model.setNodesOpacity`
   * :js:meth:`~Model.setNodesPointColor`
   * :js:meth:`~Model.setNodesTexture`
   * :js:meth:`~Model.setNodesVisibilities`
   * :js:meth:`~Model.setNodesVisibility`
   * :js:meth:`~Model.setPart`
   * :js:meth:`~Model.setPhysicalProperties`
   * :js:meth:`~Model.setPmiColor`
   * :js:meth:`~Model.setPmiColorOverride`
   * :js:meth:`~Model.setViewAxes`
   * :js:meth:`~Model.switchToModel`
   * :js:meth:`~Model.triangulatePolygon`
   * :js:meth:`~Model.unsetDepthRange`
   * :js:meth:`~Model.unsetMetallicRoughness`
   * :js:meth:`~Model.unsetNodeFaceColor`
   * :js:meth:`~Model.unsetNodeLineColor`
   * :js:meth:`~Model.unsetNodePointColor`
   * :js:meth:`~Model.unsetNodesCullingVectors`
   * :js:meth:`~Model.unsetNodesFaceColor`
   * :js:meth:`~Model.unsetNodesFaceEmissiveColor`
   * :js:meth:`~Model.unsetNodesFaceSpecularColor`
   * :js:meth:`~Model.unsetNodesFaceSpecularIntensity`
   * :js:meth:`~Model.unsetNodesLineColor`
   * :js:meth:`~Model.unsetNodesLinePattern`
   * :js:meth:`~Model.unsetNodesPointColor`
   * :js:meth:`~Model.unsetNodesTexture`
   * :js:meth:`~Model.viewAxesHaveBeenSet`





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

Methods
=======

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

activateCadConfiguration
------------------------

.. js:method:: Model.activateCadConfiguration( nodeId, view)

   :param nodeId: None
   :type nodeId: number
   :param view: View to set the CAD Configuration in. Visibility will be applied to all views. Uses default view if not specified.
   :type view: View


   Activates a CAD configuration

   :returns: None.


   :rtype: Promise <void>

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

activateCadView
---------------

.. js:method:: Model.activateCadView( nodeId, duration, massageCamera, view)

   :param nodeId: None
   :type nodeId: number
   :param duration: camera transition time in milliseconds.
   :type duration: number
   :param massageCamera: If true, undesirable authored cameras may be modified into a camera with more reasonable values
   :type massageCamera: boolean
   :param view: View to activate the CAD View in. Visibility will be applied to all views. Uses default view if not specified.
   :type view: View


   Activates a CAD View

   :returns: None.


   :rtype: Promise <void>

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

activateDefaultCadConfiguration
-------------------------------

.. js:method:: Model.activateDefaultCadConfiguration( fitNodes, view)

   :param fitNodes: Fit view to visible nodes if possible (default true)
   :type fitNodes: boolean
   :param view: View to set the CAD Configuration in. Visibility will be applied to all views. Uses default view if not specified.
   :type view: View


   Activates Default CAD configuration

   :returns: None.


   :rtype: Promise <void>

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

activateDefaultCadView
----------------------

.. js:method:: Model.activateDefaultCadView( duration, massageCamera, view)

   :param duration: Duration of the camera animation
   :type duration: number
   :param massageCamera: If true, undesirable authored cameras may be modified into a camera with more reasonable values
   :type massageCamera: boolean
   :param view: View to set the CAD View in. Visibility will be applied to all views. Uses default view if not specified.
   :type view: View


   Activate the default CAD view

   :returns: None.


   :rtype: Promise <void>

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

addPropertyToNode
-----------------

.. js:method:: Model.addPropertyToNode( nodeId, propertyName, propertyValue, propertyUnit)

   :param nodeId: None
   :type nodeId: number
   :param propertyName: None
   :type propertyName: string
   :param propertyValue: None
   :type propertyValue: string
   :param propertyUnit: None
   :type propertyUnit: [UnitElement]


   Purpose: Adds a property to the node

   :Param: nodeId node id to set the property on
   :Param: property name
   :Param: property value
   :returns: true if all went right, false otherwise


   :rtype: boolean

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

cadConfigurationsEnabled
------------------------

.. js:method:: Model.cadConfigurationsEnabled()



   Gets whether or not cad configurations are enabled

   :returns: Boolean indicating whether or not cad configurations are enabled


   :rtype: Promise <boolean>

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

clear
-----

.. js:method:: Model.clear()



   Remove all nodes, CAD views, configurations, and sheets from the model.

   If you intend to load additional models via the ``loadSubtree`` family
   of methods, you should wait on the resolution of this promise before doing so.


   :rtype: Promise <void>

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

clearNodeFaceVisibility
-----------------------

.. js:method:: Model.clearNodeFaceVisibility( partId)

   :param partId: the Id of the part to be reset
   :type partId: number


   Clears the visibility for a node's face elements, resetting them to default.


   :rtype: void

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

clearNodeLineVisibility
-----------------------

.. js:method:: Model.clearNodeLineVisibility( partId)

   :param partId: the Id of the part to clear visibilities from
   :type partId: number


   Clears the visibility for a node's line elements, resetting them to default.


   :rtype: void

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

clearNodePointVisibility
------------------------

.. js:method:: Model.clearNodePointVisibility( partId)

   :param partId: the Id of the part to clear visibilities from
   :type partId: number


   Clears the visibility for a node's point elements, resetting it to default.


   :rtype: void

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

computeMinimumBodyBodyDistance
------------------------------

.. js:method:: Model.computeMinimumBodyBodyDistance( partId1, partId2)

   :param partId1: id for the part which the first face belongs to
   :type partId1: number
   :param partId2: id for the part which the second face belongs to
   :type partId2: number


   Computes the distance between two bodies

   :returns: a promise that resolves with a Markup.Measure.FaceFaceDistanceItem when the operation completes


   :rtype: Promise <FaceFaceDistanceItem>

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

computeMinimumFaceFaceDistance
------------------------------

.. js:method:: Model.computeMinimumFaceFaceDistance( partId1, faceId1, partId2, faceId2)

   :param partId1: id for the part which the first face belongs to
   :type partId1: number
   :param faceId1: id for the face in the first part
   :type faceId1: number
   :param partId2: id for the part which the second face belongs to
   :type partId2: number
   :param faceId2: id for the face in the second part
   :type faceId2: number


   Computes the distance between two faces

   :returns: a promise that resolves with a Markup.Measure.FaceFaceDistanceItem when the operation completes


   :rtype: Promise <FaceFaceDistanceItem>

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

computeMinimumFaceLineDistance
------------------------------

.. js:method:: Model.computeMinimumFaceLineDistance( partId, faceId, ray)

   :param partId: None
   :type partId: number
   :param faceId: id of the face in the node
   :type faceId: number
   :param ray: the line (in the form of a ray) to test against
   :type ray: Ray


   Computers the minimum distance between a face and an infinite line.

   :returns: a promise that resolves with a Markup.Measure.FaceFaceDistanceItem when the operation completes


   :rtype: Promise <FaceFaceDistanceItem>

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

computeMinimumFaceRayDistance
-----------------------------

.. js:method:: Model.computeMinimumFaceRayDistance( partId, faceId, ray)

   :param partId: None
   :type partId: number
   :param faceId: id of the face in the node
   :type faceId: number
   :param ray: the ray to test against
   :type ray: Ray


   Computers the minimum distance between a face and a ray.

   :returns: a promise that resolves with a Markup.Measure.FaceFaceDistanceItem when the operation completes


   :rtype: Promise <FaceFaceDistanceItem>

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

createAndAddRepresentationItem
------------------------------

.. js:method:: Model.createAndAddRepresentationItem( partNodeId[, repItemId])

   :param partNodeId: ID of the part node
   :type partNodeId: undefined | null | number
   :param repItemId: :ts-api-decorator:`optional` (optional) Id you want the node to have, if not specified the nodeId will be set automatically. Be aware that if the specified node Id is already used by another node, then it will be ignored and a new one will be set automatically.
   :type repItemId: null | number


   Creates a representation item on a part

   :returns: node ID to access the created representation item, null is returned if something went wrong


   :rtype: null | number

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

createCadView
-------------

.. js:method:: Model.createCadView( nodeId, viewName, camera[, pmiIds[, nodesToShow[, nodesToHide[, nodeIdsAndLocalTransforms[, cuttingPlane[, meshInstanceData]]]]]])

   :param nodeId: None
   :type nodeId: number
   :param viewName: Name of the view
   :type viewName: string
   :param camera: Camera that will be set when the view gets activated
   :type camera: Camera
   :param pmiIds: :ts-api-decorator:`optional` (optional, pass null or empty array if none to send) Node IDs of the PMI to show for the view
   :type pmiIds: null | [number]
   :param nodesToShow: :ts-api-decorator:`optional` (optional, pass null or empty array if none to send) Node IDs of the elements to force visibility on
   :type nodesToShow: null | [number]
   :param nodesToHide: :ts-api-decorator:`optional` (optional, pass null or empty array if none to send) Node IDs of the elements to force visibility off
   :type nodesToHide: null | [number]
   :param nodeIdsAndLocalTransforms: :ts-api-decorator:`optional` (optional, pass null or empty array if none to send) array of node ID and matrix pair, defining specific local transform to apply
   :type nodeIdsAndLocalTransforms: null | [(number, Matrix)]
   :param cuttingPlane: :ts-api-decorator:`optional` (optional, pass null if none to send) Cutting plane to set when the view gets activated. Distance of the planes must be in the same unit as the model.
   :type cuttingPlane: null | Plane
   :param meshInstanceData: :ts-api-decorator:`optional` (optional, pass null if none to send) object that specifies the data for the mesh instance of the rectangular frame (mostly found on capture views)
   :type meshInstanceData: null | MeshInstanceData


   Creates a CAD view. This method will trigger a "cadViewCreated" callback if the creation is successful.

   :returns: id of the view, null is returned if the function fails


   :rtype: null | number

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

createImage
-----------

.. js:method:: Model.createImage( primaryImage[, thumbnailImage])

   :param primaryImage: The image data and associated options
   :type primaryImage: ImageOptions
   :param thumbnailImage: :ts-api-decorator:`optional` If specified, an uncompressed image that will be used as a placeholder for the primary image until it is fully loaded. Only useful when ``primaryImage`` is a compressed image.
   :type thumbnailImage: ImageOptions


   Creates an image that can be applied as a texture via [[setNodesTexture]].
   See [[deleteImages]].


   :rtype: Promise <ImageId>

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

createMesh
----------

.. js:method:: Model.createMesh( meshData[, config])

   :param meshData: [[MeshData]] object containing data to insert into the scene.
   :type meshData: MeshData
   :param config: :ts-api-decorator:`optional` None
   :type config: function




   :returns: Promise that resolves with a [[MeshId]] when the mesh has been created. The [[MeshId]] can be used to create instances of the mesh using [[createMeshInstance]].


   :rtype: Promise <MeshId>

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

createMeshInstance
------------------

.. js:method:: Model.createMeshInstance( data[, parentNodeId[, preventFromResetting[, isOutOfHierarchy]]])

   :param data: object that specifies the data for this mesh instance
   :type data: MeshInstanceData
   :param parentNodeId: :ts-api-decorator:`optional` the ID of the desired parent node
   :type parentNodeId: null | number
   :param preventFromResetting: :ts-api-decorator:`optional` if set to true, then the visibility and positioning won't be reset when resetxxx() functions gets called.
   :type preventFromResetting: null | boolean
   :param isOutOfHierarchy: :ts-api-decorator:`optional` True if the node created shouldn't appear in the model structure.
   :type isOutOfHierarchy: null | boolean


   Creates an instance of a mesh that has been created using [[createMesh]] or retrieved using [[getMeshIds]].

   :returns: Promise that resolves with a node ID that can be used to perform operations on this instance.


   :rtype: Promise <number>

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

createNode
----------

.. js:method:: Model.createNode( parentNodeId, nodeName[, nodeId[, localMatrix[, visibility[, measurementUnit]]]])

   :param parentNodeId: ID of the node to link the child node to. This ID should not have a type of Body or BodyInstance. If this parameter is ``undefined``, the child node will be linked to the root.
   :type parentNodeId: undefined | null | number
   :param nodeName: None
   :type nodeName: string
   :param nodeId: :ts-api-decorator:`optional` None
   :type nodeId: null | number
   :param localMatrix: :ts-api-decorator:`optional` (optional) Initial local matrix of the node (identity if none set)
   :type localMatrix: null | Matrix
   :param visibility: :ts-api-decorator:`optional` (optional) Initial visibility of the node (visible if nothing set)
   :type visibility: null | boolean
   :param measurementUnit: :ts-api-decorator:`optional` None
   :type measurementUnit: null | number


   Creates a node

   :returns: child node ID


   :rtype: number

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

createPart
----------

.. js:method:: Model.createPart([ nodeId])

   :param nodeId: :ts-api-decorator:`optional` None
   :type nodeId: null | number


   Creates an part node

   :returns: a node ID to access the created part node


   :rtype: number

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

createPmiInstance
-----------------

.. js:method:: Model.createPmiInstance( data, pmiType, pmiSubType, refOnTopoItems[, parentNodeId])

   :param data: object that specifies the data for the PMI graphic representation
   :type data: MeshInstanceData
   :param pmiType: see PmiType enum (Datum, Gdt, Dimension...)
   :type pmiType: PmiType
   :param pmiSubType: see PmiSubType enum (DatumTarget, GdtFcf, DimensionDistance...)
   :type pmiSubType: PmiSubType
   :param refOnTopoItems: see RefOnTopoItem. It defines the PMI links to a body element, like a face or an edge
   :type refOnTopoItems: [RefOnTopoItem]
   :param parentNodeId: :ts-api-decorator:`optional` the ID of the desired parent node
   :type parentNodeId: null | number


   Creates a PMI Instance from a mesh that has been created using the createMesh method.

   :returns: Promise that resolves with a node ID that can be used to perform operations on this instance. You can use deleteMeshInstances() to delete the PMI


   :rtype: Promise <number>

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

deleteImages
------------

.. js:method:: Model.deleteImages( imageIds)

   :param imageIds: The IDs of the images to be deleted
   :type imageIds: [ImageId]


   Deletes images created with [[createImage]].


   :rtype: Promise <void>

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

deleteMeshInstances
-------------------

.. js:method:: Model.deleteMeshInstances( nodeIds)

   :param nodeIds: array of IDs for mesh instances created at run time that should be destroyed
   :type nodeIds: [number]


   Deletes mesh instances that have been created at run time

   :returns: Promise that resolves when this operation has completed.


   :rtype: Promise <void>

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

deleteMeshes
------------

.. js:method:: Model.deleteMeshes( ids)

   :param ids: None
   :type ids: [MeshId]


   Deletes meshes that have been created at run time.

   In order for this method to succeed, all mesh instances created for the given IDs
   must have also been destroyed with [[deleteMeshInstances]].

   :returns: Promise that resolves when this operation has completed.


   :rtype: Promise <void>

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

deleteNode
----------

.. js:method:: Model.deleteNode( nodeId)

   :param nodeId: None
   :type nodeId: number


   Delete a node and all its children


   :rtype: Promise <void>

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

getAbsoluteRootNode
-------------------

.. js:method:: Model.getAbsoluteRootNode()



   Returns the absolute root node of the assembly tree.

   :returns: Id for the model tree root node or null if the model structure is not loaded.


   :rtype: number

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

getActiveCadConfiguration
-------------------------

.. js:method:: Model.getActiveCadConfiguration()



   Gets Active CAD configuration

   :returns: ID of activated CAD Configuration


   :rtype: null | number

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

getAssociatedModelKey
---------------------

.. js:method:: Model.getAssociatedModelKey( nodeId)

   :param nodeId: None
   :type nodeId: number


   :rtype: Promise <null | ModelKey>

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

getBimIdConnectedElements
-------------------------

.. js:method:: Model.getBimIdConnectedElements( node, bimId, type)

   :param node: any known node id of the working model.
   :type node: number
   :param bimId: bim id for which you want its relationships.
   :type bimId: string
   :param type: None
   :type type: RelationshipType


   Retrieve all relationships that a bim id have, sorted in 2 arrays (relateds and relatings)

   :returns: double array of bim id of relationship of the BimId sorted by its relateds and its relatings.


   :rtype: function

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

getBimIdFromNode
----------------

.. js:method:: Model.getBimIdFromNode( node)

   :param node: the id of the node for which you want its bim id.
   :type node: number


   Retrieves the bim id of the corresponding node id.

   :returns: the bim id corresponding to the node or null if none.


   :rtype: null | string

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

getBimIdRelatedElements
-----------------------

.. js:method:: Model.getBimIdRelatedElements( node, bimId, type)

   :param node: any known node id of the working model.
   :type node: number
   :param bimId: bim id for which you want its related relationships.
   :type bimId: string
   :param type: None
   :type type: RelationshipType


   Retrieve all related relationships that a bim id have.

   :returns: array of bim id which are the related relationship of the BimId.


   :rtype: [string]

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

getBimIdRelatingElements
------------------------

.. js:method:: Model.getBimIdRelatingElements( node, bimId, type)

   :param node: any known node id of the working model.
   :type node: number
   :param bimId: bim id for which you want its relating relationships.
   :type bimId: string
   :param type: None
   :type type: RelationshipType


   Retrieve all relating relationships that a bim id have.

   :returns: array of bim id which are the relating relationship of the BimId.


   :rtype: [string]

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

getBimIdsFromGenericId
----------------------

.. js:method:: Model.getBimIdsFromGenericId( ifcGuid)

   :param ifcGuid: the generic id for which you want its bim id.
   :type ifcGuid: string


   Retrieves the bim ids of the corresponding generic id.

   :returns: the bim id corresponding to the ifcGuid or null if none.


   :rtype: [string]

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

getBimInfoFromBimId
-------------------

.. js:method:: Model.getBimInfoFromBimId( node, bimId)

   :param node: any known node id of the working model.
   :type node: number
   :param bimId: bim id for which you want the bim element name.
   :type bimId: string


   Retrieve the name of the bim element

   :returns: the name and the info regarding the connection to a node of the bim element.


   :rtype: function

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

getBranchVisibility
-------------------

.. js:method:: Model.getBranchVisibility( nodeId)

   :param nodeId: ID of the node at the root of the branch.
   :type nodeId: number


   Branch visibility indicates the visibility state for all of a node's children.

   :returns: Shown/Hidden if all children have the same visibility state, Mixed otherwise.


   :rtype: BranchVisibility

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

getCadConfigurations
--------------------

.. js:method:: Model.getCadConfigurations()



   Gets CAD configurations

   :returns: an object mapping CAD configuration ID to config name


   :rtype: IdStringMap

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

getCadViewConfiguration
-----------------------

.. js:method:: Model.getCadViewConfiguration( cadViewNodeId)

   :param cadViewNodeId: None
   :type cadViewNodeId: number


   Get the configuration in which the view is defined

   :returns: ID of CAD Configuration of the view


   :rtype: null | number

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

getCadViewMap
-------------

.. js:method:: Model.getCadViewMap()



   Gets CAD View information for this model.

   :returns: a map mapping associating CAD View ID to name


   :rtype: Map <number, string>

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

getCadViewPmis
--------------

.. js:method:: Model.getCadViewPmis( nodeId)

   :param nodeId: None
   :type nodeId: number


   Get PMI IDs for a CAD View

   :returns: IDs of visible PMIs for the view


   :rtype: [number]

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

getDataFromIds
--------------

.. js:method:: Model.getDataFromIds( ids)

   :param ids: None
   :type ids: DataIds


   Returns a data object. During the authoring phase, a user can store general data within a model. (This is how
   properties are stored, for example.) This function allows you to retrieve the data from the client application.

   :see: ``Model::Insert``
   :returns: promise that resolves when this operation has completed returning an array of 8bits int arrays for each ModelKey-DataKey pairs


   :rtype: Promise <[Uint8Array]>

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

getDefaultCadConfiguration
--------------------------

.. js:method:: Model.getDefaultCadConfiguration()



   Gets CAD default configuration

   :returns: ID of default CAD Configuration


   :rtype: null | number

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

getDefaultCadView
-----------------

.. js:method:: Model.getDefaultCadView()



   Gets CAD default view

   :returns: ID of default CAD Configuration


   :rtype: null | number

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

getEdgeAttributes
-----------------

.. js:method:: Model.getEdgeAttributes( nodeId, edgeIndex)

   :param nodeId: Node to retrieve edge properties from
   :type nodeId: number
   :param edgeIndex: Index of edge for which to retrieve edge attributes
   :type edgeIndex: number


   Returns edge attributes for a node of the given node and edge.

   :returns: Promise for the requested edge attributes. Properties returned will be null if none associated with the edge.


   :rtype: Promise <null | SubentityAttributes>

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

getEdgeCount
------------

.. js:method:: Model.getEdgeCount( nodeId)

   :param nodeId: Node to retrieve edge count from
   :type nodeId: number


   Returns edge count for a node of the given node.

   :returns: Promise providing the number of edges


   :rtype: Promise <number>

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

getEdgeProperty
---------------

.. js:method:: Model.getEdgeProperty( nodeId, edgeId)

   :param nodeId: Node to retrieve edge properties from
   :type nodeId: number
   :param edgeId: None
   :type edgeId: number


   Returns edge properties for a node of the given node and edge.

   :returns: Promise for the requested edge properties. Properties returned will be null if none associated with the edge.


   :rtype: Promise <null | Edge>

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

getFaceAttributes
-----------------

.. js:method:: Model.getFaceAttributes( nodeId, faceIndex)

   :param nodeId: Node to retrieve edge properties from
   :type nodeId: number
   :param faceIndex: Index of face for which to retrieve face attributes
   :type faceIndex: number


   Returns face attributes for a node of the given node and face.

   :returns: Promise for the requested face attributes. Properties returned will be null if none associated with the edge.


   :rtype: Promise <null | SubentityAttributes>

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

getFaceCount
------------

.. js:method:: Model.getFaceCount( nodeId)

   :param nodeId: Node to retrieve face count from
   :type nodeId: number


   Returns face count for a node of the given node and face.

   :returns: Promise providing the number of faces


   :rtype: Promise <number>

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

getFaceProperty
---------------

.. js:method:: Model.getFaceProperty( nodeId, faceId)

   :param nodeId: Node to retrieve face properties from
   :type nodeId: number
   :param faceId: None
   :type faceId: number


   Returns Face properties for a node of the given node and face.

   :returns: Promise for the requested face properties. Properties returned will be null if none associated with the face.


   :rtype: Promise <null | Face>

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

getFilterName
-------------

.. js:method:: Model.getFilterName( filterId)

   :param filterId: None
   :type filterId: FilterId




   :returns: The name of a filter for the given filter ID index or null if filter was not found


   :rtype: null | string

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

getFilters
----------

.. js:method:: Model.getFilters()



   Returns names and ids of all filters available in the scene

   :returns: a map associating Filter IDs to filter names


   :rtype: Map <FilterId, string>

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

getFiltersWithNode
------------------

.. js:method:: Model.getFiltersWithNode( nodeIdSearched)

   :param nodeIdSearched: None
   :type nodeIdSearched: number




   :returns: Filters which retain or remove the given node.


   :rtype: [FilterId]

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

getGenericIdFromBimId
---------------------

.. js:method:: Model.getGenericIdFromBimId( node, bimId)

   :param node: any known node id of the working model.
   :type node: number
   :param bimId: bim id for which you want its generic id.
   :type bimId: string


   Retrieves the generic id of the corresponding bim id.

   :returns: the generic id corresponding to the BimId or null if none.


   :rtype: null | string

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

getGenericTypeIdMap
-------------------

.. js:method:: Model.getGenericTypeIdMap()



   Gets all generic types and NodeIds with that type.

   :returns: Map containing generic types and NodeIds


   :rtype: Map <string, Set <number>>

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

getGenericTypes
---------------

.. js:method:: Model.getGenericTypes()



   This function gets all generic types contained in the model.

   :returns: All generic types.


   :rtype: [string]

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

getLayerIdsFromName
-------------------

.. js:method:: Model.getLayerIdsFromName( name)

   :param name: None
   :type name: string




   :returns: Id of layers for the given filter name or null if no layers are found


   :rtype: null | [LayerId]

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

getLayerName
------------

.. js:method:: Model.getLayerName( layerId)

   :param layerId: None
   :type layerId: LayerId




   :returns: The name of a layer for the given filter ID or null if layer was not found


   :rtype: null | string

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

getLayers
---------

.. js:method:: Model.getLayers()



   Returns names and ids of all layers available in the scene

   :returns: a map associating Layer IDs to Layer names


   :rtype: Map <LayerId, string>

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

getLooseBounding
----------------

.. js:method:: Model.getLooseBounding()



   Gets the world space bounding box for the model. This does not take node visibility into account.

   :returns: Promise that resolves with a Box representing the world space bounding box of the model.


   :rtype: Promise <Box>

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

getLowestAvailableNodeId
------------------------

.. js:method:: Model.getLowestAvailableNodeId()



   Returns the lowest available node ID


   :rtype: number

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

getMeshIds
----------

.. js:method:: Model.getMeshIds( nodeIds)

   :param nodeIds: None
   :type nodeIds: [number]


   Retrieve the [[MeshId]] associated with the mesh data attached to the given nodes.


   :rtype: Promise <[MeshId]>

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

getMetallicRoughness
--------------------

.. js:method:: Model.getMetallicRoughness( nodeIds)

   :param nodeIds: List of nodes to get material properties for
   :type nodeIds: [number]


   Gets the metallic and roughness factors for the supplied nodes materials.
   Materials that are not currently set to use the Metallic Roughness shading model will have a null entry


   :rtype: Promise <[null | MetallicRoughnessValue]>

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

getModelBounding
----------------

.. js:method:: Model.getModelBounding( ignoreInvisible, includeExcluded, tightBounding)

   :param ignoreInvisible: None
   :type ignoreInvisible: boolean
   :param includeExcluded: None
   :type includeExcluded: boolean
   :param tightBounding: None
   :type tightBounding: boolean


   Gets the world space bounding box for the model.

   :returns: Promise that resolves with a Box representing the world space bounding box of the model.


   :rtype: Promise <Box>

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

getModelFileNameFromNode
------------------------

.. js:method:: Model.getModelFileNameFromNode( nodeId)

   :param nodeId: None
   :type nodeId: number




   :returns: the original file name of the model which contain the given node or null if the node is not found.


   :rtype: null | string

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

getModelFileTypeFromNode
------------------------

.. js:method:: Model.getModelFileTypeFromNode( nodeId)

   :param nodeId: None
   :type nodeId: number




   :returns: the original file type of the model which contain the given node or null if the node is not found.


   :rtype: null | FileType

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

getNodeCappingMeshData
----------------------

.. js:method:: Model.getNodeCappingMeshData( nodeId)

   :param nodeId: None
   :type nodeId: number


   Fetch the mesh data for any capping geometry on a particular node


   :rtype: Promise <null | MeshDataCopy>

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

getNodeChildren
---------------

.. js:method:: Model.getNodeChildren( nodeId[, includeOutOfHierarchy])

   :param nodeId: None
   :type nodeId: number
   :param includeOutOfHierarchy: :ts-api-decorator:`optional` true to include Out Of Hierarchy node, false or null to exclude them
   :type includeOutOfHierarchy: boolean


   Returns IDs for child nodes for the given Id.

   :returns: ID for the children of this node, or null if the ID is invalid


   :rtype: [number]

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

getNodeColorMap
---------------

.. js:method:: Model.getNodeColorMap( startNodeId, elementType)

   :param startNodeId: The start node to walk when building the color map.
   :type startNodeId: number
   :param elementType: Returned colors are of this element type.
   :type elementType: ElementType


   Gets a map associating NodeIds to colors that are set on those nodes.
   Only NodeIds of nodes that have a color set will be included.


   :rtype: Promise <Map <number, Color>>

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

getNodeEffectiveFaceColor
-------------------------

.. js:method:: Model.getNodeEffectiveFaceColor( partId, faceIndex[, view])

   :param partId: None
   :type partId: number
   :param faceIndex: the index of the face in the node
   :type faceIndex: number
   :param view: :ts-api-decorator:`optional` the View to use when calculating view effects
   :type view: View


   Gets the color set via [[setNodeFaceColor]] on a face element. If no color has been set,
   the node's face color will be returned. If the node's face color has not been set,
   the color specified when the model was authored will be returned.


   :rtype: Promise <null | Color>

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

getNodeEffectiveLineColor
-------------------------

.. js:method:: Model.getNodeEffectiveLineColor( partId, lineIndex[, view])

   :param partId: None
   :type partId: number
   :param lineIndex: the index of the line in the node
   :type lineIndex: number
   :param view: :ts-api-decorator:`optional` the View to use when calculating view effects
   :type view: View


   Gets the color set via [[setNodeLineColor]] on a line element. If no color has been set,
   the node's line color will be returned. If the node's line color has not been set,
   the color specified when the model was authored will be returned.


   :rtype: Promise <null | Color>

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

getNodeEffectivePointColor
--------------------------

.. js:method:: Model.getNodeEffectivePointColor( partId, pointIndex[, view])

   :param partId: None
   :type partId: number
   :param pointIndex: the index of the point in the node
   :type pointIndex: number
   :param view: :ts-api-decorator:`optional` the View to use for calculating view effects
   :type view: View


   Gets the color set via [[setNodePointColor]] on a point element. If no color has been set,
   the node's point color will be returned. If the node's point color has not been set,
   the color specified when the model was authored will be returned.


   :rtype: Promise <null | Color>

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

getNodeExchangeId
-----------------

.. js:method:: Model.getNodeExchangeId( nodeId)

   :param nodeId: The node ID to get the Exchange ID from.
   :type nodeId: number


   Returns the Exchange ID of a node in the assembly tree.

   :returns: The Exchange ID of the node with the given nodeId or null if no Exchange ID is found.


   :rtype: null | string

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

getNodeFaceColor
----------------

.. js:method:: Model.getNodeFaceColor( partId, faceIndex)

   :param partId: None
   :type partId: number
   :param faceIndex: the index of the face in the node
   :type faceIndex: number


   Gets the color set via [[setNodeFaceColor]] on a face element.
   If no color has been set, ``null`` will be returned.
   <br><br> See also: [[getNodeEffectiveFaceColor]]


   :rtype: Promise <null | Color>

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

getNodeFaceHighlighted
----------------------

.. js:method:: Model.getNodeFaceHighlighted( nodeId, faceIndex)

   :param nodeId: the ID of the node containing the face element
   :type nodeId: number
   :param faceIndex: the index of the face within the node
   :type faceIndex: number


   Returns whether the supplied face element has been highlighted with [[setNodeFaceHighlighted]].


   :rtype: Promise <boolean>

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

getNodeGenericId
----------------

.. js:method:: Model.getNodeGenericId( nodeId)

   :param nodeId: None
   :type nodeId: number




   :returns: the generic id of the given node or null if the node is not found.


   :rtype: null | string

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

getNodeGenericType
------------------

.. js:method:: Model.getNodeGenericType( nodeId)

   :param nodeId: None
   :type nodeId: number




   :returns: the generic type of the given node or null if the node is not found.


   :rtype: null | string

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

getNodeIdFromBimId
------------------

.. js:method:: Model.getNodeIdFromBimId( node, bimID)

   :param node: any known node id of the working model.
   :type node: number
   :param bimID: bim id for which you want its node id.
   :type bimID: string


   Retrieves the node id of the corresponding bim id.

   :returns: the node id corresponding to the BimId or null if none.


   :rtype: null | number

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

getNodeIdOffset
---------------

.. js:method:: Model.getNodeIdOffset( nodeId)

   :param nodeId: The node to obtain the node ID offset from.
   :type nodeId: number


   Retrieves the node ID offset for a given node.

   :returns: The node ID offset for the supplied node.


   :rtype: number

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

getNodeIdsByGenericIds
----------------------

.. js:method:: Model.getNodeIdsByGenericIds( genericIds)

   :param genericIds: Array of generic IDs to find nodes fore
   :type genericIds: [string]


   Returns a list of node IDs given a list of generic IDs. Note that the
   returned list of node IDs may be longer than the provided list of generic
   IDs since one ID can be used by more than one node.

   :returns: Array of node ids corresponding to the provided generic IDs


   :rtype: [number]

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

getNodeLayerId
--------------

.. js:method:: Model.getNodeLayerId( nodeId)

   :param nodeId: The node ID to get the Exchange ID from.
   :type nodeId: number


   Returns the layer ID of a node in the assembly tree.

   :returns: The layer ID of the node with the given nodeId or null if no layer is found.


   :rtype: null | LayerId

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

getNodeLineColor
----------------

.. js:method:: Model.getNodeLineColor( partId, lineIndex)

   :param partId: None
   :type partId: number
   :param lineIndex: the index of the line in the node
   :type lineIndex: number


   Gets the color set via [[setNodeLineColor]] on a line element.
   If no color has been set, ``null`` will be returned.


   :rtype: Promise <null | Color>

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

getNodeLineHighlighted
----------------------

.. js:method:: Model.getNodeLineHighlighted( nodeId, lineIndex)

   :param nodeId: the ID of the node containing the line element
   :type nodeId: number
   :param lineIndex: the index of the line within the node
   :type lineIndex: number


   Returns whether the supplied line element has been highlighted with [[setNodeLineHighlighted]].


   :rtype: Promise <boolean>

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

getNodeMatrix
-------------

.. js:method:: Model.getNodeMatrix( nodeId)

   :param nodeId: None
   :type nodeId: number


   Returns a copy of the Matrix for a node of the given ID

   :returns: Copy of the Matrix of the node


   :rtype: Matrix

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

getNodeMeshData
---------------

.. js:method:: Model.getNodeMeshData( nodeId)

   :param nodeId: the node's ID
   :type nodeId: number


   Fetch the mesh data for a particular node


   :rtype: Promise <MeshDataCopy>

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

getNodeName
-----------

.. js:method:: Model.getNodeName( nodeId)

   :param nodeId: The node ID to get the name of.
   :type nodeId: number


   Returns the name for a node in the assembly tree.

   :returns: The name of the node with the given nodeId or null if no name is found.


   :rtype: null | string

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

getNodeNetMatrix
----------------

.. js:method:: Model.getNodeNetMatrix( nodeId)

   :param nodeId: None
   :type nodeId: number


   Returns net matrix for a node of the given ID

   :returns: Net Matrix of the Node


   :rtype: Matrix

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

getNodeParent
-------------

.. js:method:: Model.getNodeParent( nodeId)

   :param nodeId: None
   :type nodeId: number


   Returns the parent Id for the given node id.

   :returns: ID of the parent node for the supplied ID. If the ID is invalid or the root ID, null is returned.


   :rtype: null | number

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

getNodePointColor
-----------------

.. js:method:: Model.getNodePointColor( partId, pointIndex)

   :param partId: None
   :type partId: number
   :param pointIndex: the index of the point in the node
   :type pointIndex: number


   Gets the color set via [[setNodePointColor]] on a point element.
   If no color has been set, ``null`` will be returned.
   <br><br> See also: [[getNodeEffectivePointColor]]


   :rtype: Promise <null | Color>

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

getNodePointHighlighted
-----------------------

.. js:method:: Model.getNodePointHighlighted( nodeId, pointIndex)

   :param nodeId: the ID of the node containing the point element
   :type nodeId: number
   :param pointIndex: the index of the point within the node
   :type pointIndex: number


   Returns whether the supplied point element has been highlighted with [[setNodePointHighlighted]].


   :rtype: Promise <boolean>

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

getNodeProperties
-----------------

.. js:method:: Model.getNodeProperties( nodeId, computeFromChildren)

   :param nodeId: None
   :type nodeId: number
   :param computeFromChildren: If true physical properties will be computed from child nodes.
   :type computeFromChildren: boolean


   Returns the properties for the given node ID.

   :returns: object properties for the supplied ID, or null if the ID was invalid


   :rtype: Promise <null | StringStringMap>

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

getNodeRealBounding
-------------------

.. js:method:: Model.getNodeRealBounding( nodeId[, view])

   :param nodeId: ID of the node for which you wish to get the bounding box.
   :type nodeId: number
   :param view: :ts-api-decorator:`optional` View to use for determining visibility.
   :type view: View


   Gets the world space bounding box for a node including any effects (explosion, camera suppression, etc).
   Note: This function can have performance implications when used on nodes with many children.

   :returns: Promise that resolves with the world space bounding box for the given ID.


   :rtype: Promise <Box>

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

getNodeType
-----------

.. js:method:: Model.getNodeType( nodeId)

   :param nodeId: None
   :type nodeId: number


   Returns the type of the node with the given ID.

   :returns: The type of the node.


   :rtype: NodeType

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

getNodeUnitMultiplier
---------------------

.. js:method:: Model.getNodeUnitMultiplier( nodeId)

   :param nodeId: None
   :type nodeId: number


   Returns the unit multiplier affecting the supplied node.
   This number is a multiplier of millimeters (for example inches will be ``25.4``).
   The default value is ``1.0``.

   :returns: The unit multiplier for the model (in mm)


   :rtype: number

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

getNodeUserData
---------------

.. js:method:: Model.getNodeUserData( nodeId, index)

   :param nodeId: The ID of the node to query.
   :type nodeId: number
   :param index: The index of the data.
   :type index: UserDataIndex


   Returns the user data for a given node and index.

   :returns: The user data.
   :throws: ``InvalidNodeIdError`` ``InvalidIndexError``


   :rtype: Uint8Array

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

getNodeUserDataIndices
----------------------

.. js:method:: Model.getNodeUserDataIndices( nodeId)

   :param nodeId: The ID of the node to query.
   :type nodeId: number


   Returns all the ``UserDataIndex`` items associated with the input node.

   :returns: A list of ``UserDataIndex``, possibly empty.
   :throws: ``InvalidNodeIdError``


   :rtype: [UserDataIndex]

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

getNodeVisibility
-----------------

.. js:method:: Model.getNodeVisibility( nodeId)

   :param nodeId: ID of the node to get visibility for.
   :type nodeId: number


   Returns the current visibility for a node.

   :returns: true if the current node's visibility state is on or false if it is not.


   :rtype: boolean

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

getNodesBounding
----------------

.. js:method:: Model.getNodesBounding( nodeIds[, config])

   :param nodeIds: IDs of the nodes for which you wish to get the bounding box.
   :type nodeIds: [number]
   :param config: :ts-api-decorator:`optional` Allows fine control of what body types to compute the bounding against. If not provided, all body types are considered.
   :type config: GetNodesBoundingConfig


   Gets the world space bounding box for a list of nodes.

   :returns: Promise that resolves with the world space bounding box for the given IDs.


   :rtype: Promise <Box>

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

getNodesByGenericType
---------------------

.. js:method:: Model.getNodesByGenericType( genericType)

   :param genericType: None
   :type genericType: string


   This function returns all NodeIds with an IFC type.

   :returns: All NodeIds with an IFC type


   :rtype: null | Set <number>

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

getNodesCappingMeshData
-----------------------

.. js:method:: Model.getNodesCappingMeshData( nodeIds)

   :param nodeIds: the node IDs to get capping data from.
   :type nodeIds: [number]


   Fetch the mesh data for any capping geometry on a list of nodes and their children


   :rtype: Promise <[MeshDataCopy]>

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

getNodesCullingVectors
----------------------

.. js:method:: Model.getNodesCullingVectors( nodeIds)

   :param nodeIds: The nodes to query culling vectors from.
   :type nodeIds: [number]


   Retrieves the vector and angle used to determine an object's visibility based on camera orientation.
   If unset, ``null`` will appear at the corresponding array index.

   :returns: A promise of culling vectors.


   :rtype: Promise <[null | CullingVector]>

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

getNodesEffectiveFaceColor
--------------------------

.. js:method:: Model.getNodesEffectiveFaceColor( nodeIds)

   :param nodeIds: IDs of the nodes to be queried
   :type nodeIds: [number]


   Gets the color set on the faces of a list of leaf nodes. If no color has been set,
   the color specified when the model was authored will be returned.


   :rtype: Promise <[Color]>

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

getNodesEffectiveLineColor
--------------------------

.. js:method:: Model.getNodesEffectiveLineColor( nodeIds)

   :param nodeIds: IDs of the nodes to be queried
   :type nodeIds: [number]


   Gets the color set on the lines of a list of leaf nodes. If no color has been set,
   the color specified when the model was authored will be returned.


   :rtype: Promise <[Color]>

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

getNodesEffectiveOpacity
------------------------

.. js:method:: Model.getNodesEffectiveOpacity( leafNodes, elementType)

   :param leafNodes: None
   :type leafNodes: [number]
   :param elementType: the type of element (faces, lines or points) to query
   :type elementType: ElementType


   Gets the opacity set on a list of leaf nodes multiplied by the opacity
   specified when the model was authored. If no opacity has been set,
   the opacity specified when the model was authored will be returned directly.


   :rtype: Promise <[number]>

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

getNodesEffectivePointColor
---------------------------

.. js:method:: Model.getNodesEffectivePointColor( nodeIds)

   :param nodeIds: IDs of the nodes to be queried
   :type nodeIds: [number]


   Gets the color set on the points of a list of leaf nodes. If no color has been set,
   the color specified when the model was authored will be returned.


   :rtype: Promise <[Color]>

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

getNodesFaceColor
-----------------

.. js:method:: Model.getNodesFaceColor( nodeIds)

   :param nodeIds: IDs of the nodes to be queried
   :type nodeIds: [number]


   Gets the color set via [[setNodesFaceColor]] on the faces of a list of leaf nodes.
   If no color has been explicitly set for a particular node, ``null`` will appear at the corresponding
   position in the returned array.
   <br><br> See also: [[getNodesEffectiveFaceColor]]


   :rtype: Promise <[null | Color]>

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

getNodesFromFiltersId
---------------------

.. js:method:: Model.getNodesFromFiltersId( filtersId)

   :param filtersId: array of filters indexes to take in account
   :type filtersId: [FilterId]




   :returns: nodesId of nodes retained by the given filter indices and the type of filter (inclusive or not). Returns null if no filter is found.


   :rtype: null | FilteredNodes

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

getNodesFromLayer
-----------------

.. js:method:: Model.getNodesFromLayer( layerId[, onlyTreeNodes])

   :param layerId: The layer ID to get nodes from.
   :type layerId: LayerId
   :param onlyTreeNodes: :ts-api-decorator:`optional` if true return only nodes present in model Tree
   :type onlyTreeNodes: boolean


   Returns IDs of nodes in the given layer.

   :returns: An array of nodes Id of nodes with the given layerId or null if no layers are found.


   :rtype: null | [number]

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

getNodesFromLayerName
---------------------

.. js:method:: Model.getNodesFromLayerName( layerName[, onlyTreeNodes])

   :param layerName: None
   :type layerName: string
   :param onlyTreeNodes: :ts-api-decorator:`optional` if true return only nodes present in model Tree
   :type onlyTreeNodes: boolean


   Returns IDs of nodes in the given layer.

   :returns: An array of nodes Id of nodes with the given layerName or null if no layers are found.


   :rtype: null | [number]

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

getNodesFromLayers
------------------

.. js:method:: Model.getNodesFromLayers( layersId[, onlyTreeNodes])

   :param layersId: Array of layers Id to get nodes from.
   :type layersId: [LayerId]
   :param onlyTreeNodes: :ts-api-decorator:`optional` if true return only nodes present in model Tree
   :type onlyTreeNodes: boolean


   Returns IDs of nodes in given layers.

   :returns: An array of nodes Id of nodes with one of the given layerId or null if no layers are found.


   :rtype: null | [number]

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

getNodesHaveTransparency
------------------------

.. js:method:: Model.getNodesHaveTransparency( nodeIds)

   :param nodeIds: IDs of nodes to query.
   :type nodeIds: [number]


   Returns whether nodes with the given NodeIds have an opacity value that is not fully opaque.

   :returns: array of boolean values corresponding to the id array passed into the function.  A value of true indicates that the node contains transparency and is not fully opaque.


   :rtype: Promise <[boolean]>

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

getNodesHighlighted
-------------------

.. js:method:: Model.getNodesHighlighted( partIds)

   :param partIds: None
   :type partIds: [number]


   Returns whether the supplied nodes have been highlighted with [[setNodesHighlighted]].


   :rtype: Promise <[boolean]>

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

getNodesInstancingSamePart
--------------------------

.. js:method:: Model.getNodesInstancingSamePart( nodeId)

   :param nodeId: None
   :type nodeId: number


   Returns IDs of nodes who instance the same part as the supplied node.
   This method should be called on nodes whose type is ``PartInstance``.

   :returns: Array containing ``PartInstance`` node IDs. These nodes all instance the same part as the supplied node.  If this method is called on a node which is not of type ``PartInstance`` then ``null`` will be returned.


   :rtype: Promise <null | [number]>

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

getNodesLineColor
-----------------

.. js:method:: Model.getNodesLineColor( nodeIds)

   :param nodeIds: IDs of the nodes to be queried
   :type nodeIds: [number]


   Gets the color set via [[setNodesLineColor]] on the lines of a list of leaf nodes.
   If no color has been set for a particular node, ``null`` will appear at the corresponding
   position in the returned array.


   :rtype: Promise <[null | Color]>

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

getNodesOpacity
---------------

.. js:method:: Model.getNodesOpacity( leafNodes)

   :param leafNodes: None
   :type leafNodes: [number]


   Gets the opacity set via [[setNodesOpacity]] on a list of leaf nodes.
   If no value has been set for a particular node, ``null`` will appear at the corresponding
   position in the returned array.


   :rtype: Promise <[null | number]>

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

getNodesPointColor
------------------

.. js:method:: Model.getNodesPointColor( nodeIds)

   :param nodeIds: IDs of the nodes to be queried
   :type nodeIds: [number]


   Gets the color set via [[setNodesPointColor]] on the points of a list of leaf nodes.
   If no color has been explicitly set for a particular node, ``null`` will appear at the corresponding
   position in the returned array.
   <br><br> See also: [[getNodesEffectivePointColor]]


   :rtype: Promise <[null | Color]>

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

getOutOfHierarchy
-----------------

.. js:method:: Model.getOutOfHierarchy( nodeId)

   :param nodeId: None
   :type nodeId: number


   Returns "Out Of Hierarchy" status for child node for the given Id.

   :returns: false if node is Out Of Hierarchy, true if it is


   :rtype: boolean

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

getPmiColor
-----------

.. js:method:: Model.getPmiColor()



   Returns the set PMI override color  (if none is set, defaults to black)

   :returns: color


   :rtype: Color

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

getPmiColorOverride
-------------------

.. js:method:: Model.getPmiColorOverride()





   :returns: a boolean value indicating the status of the PMI override color.


   :rtype: boolean

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

getPmiSubtype
-------------

.. js:method:: Model.getPmiSubtype( pmiId)

   :param pmiId: None
   :type pmiId: number


   Returns the subtype of a given PMI

   :returns: Subtype of the PMI (Dimension distance, Datum target, GD&T fcf...)


   :rtype: PmiSubType

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

getPmiTopologyReferences
------------------------

.. js:method:: Model.getPmiTopologyReferences( pmiNodeId)

   :param pmiNodeId: the ID of the PMI node.
   :type pmiNodeId: number


   Gets an array of PMI topology references linking a PMI node to a body element, like a face or an edge.


   :rtype: null | [RefOnTopoItem]

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

getPmiType
----------

.. js:method:: Model.getPmiType( pmiId)

   :param pmiId: None
   :type pmiId: number


   Returns the type of a given PMI

   :returns: Type of the PMI (Dimension, Datum, GD&T...)


   :rtype: PmiType

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

getPmis
-------

.. js:method:: Model.getPmis()



   Returns names and ids of all the PMIs available in the scene

   :returns: a map associating PMI IDs to PMI names


   :rtype: IdStringMap

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

getPointAttributes
------------------

.. js:method:: Model.getPointAttributes( nodeId, pointIndex)

   :param nodeId: Node to retrieve point properties from
   :type nodeId: number
   :param pointIndex: Index of point for which to retrieve point attributes
   :type pointIndex: number


   Returns point attributes for a node of the given node and point.

   :returns: Promise for the requested point attributes. Properties returned will be null if none associated with the point.


   :rtype: Promise <null | SubentityAttributes>

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

getRelationshipTypesFromBimId
-----------------------------

.. js:method:: Model.getRelationshipTypesFromBimId( node, bimId)

   :param node: any known node id of the working model.
   :type node: number
   :param bimId: bim id for which you want its types of relationships.
   :type bimId: string


   Retrieves all type of relationships that a bim id has.

   :returns: array of type of relationship corresponding to the BimId.


   :rtype: [RelationshipType]

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

getUniqueLayerNames
-------------------

.. js:method:: Model.getUniqueLayerNames()



   Return names of layers. Different layers can have the same name. Some layers can be unnamed.

   :returns: Names of layers


   :rtype: [string]

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

getViewAxes
-----------

.. js:method:: Model.getViewAxes()





   :returns: the up and front vectors for the model coordinate system.


   :rtype: ViewAxes

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

getVisibilityState
------------------

.. js:method:: Model.getVisibilityState( startNodeId)

   :param startNodeId: None
   :type startNodeId: number


   Returns a defaultVisibility boolean value and a visibilityException set of NodeIds.
   defaultVisibility will be true if there are more nodes visible than hidden, and false otherwise.
   If defaultVisibility is true, set of nodes that are hidden, if false, nodes that are visible.


   :rtype: Promise <VisibilityState>

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

hasDepthRange
-------------

.. js:method:: Model.hasDepthRange( nodeIds)

   :param nodeIds: None
   :type nodeIds: [number]


   :rtype: Promise <[boolean]>

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

hasEffectiveGenericType
-----------------------

.. js:method:: Model.hasEffectiveGenericType( nodeId, genericType)

   :param nodeId: None
   :type nodeId: number
   :param genericType: None
   :type genericType: string


   Checks if a [[NodeId]] is a generic type.


   :rtype: boolean

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

isAnnotationView
----------------

.. js:method:: Model.isAnnotationView( cadViewNodeId)

   :param cadViewNodeId: Node ID of the CAD view
   :type cadViewNodeId: number


   Tells if the view is an annotation view or not

   :returns: true if the view is an annotation view


   :rtype: boolean

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

isCombineStateView
------------------

.. js:method:: Model.isCombineStateView( cadViewNodeId)

   :param cadViewNodeId: Node ID of the CAD view
   :type cadViewNodeId: number


   Tells if the view is a combine state view or not

   :returns: true if the view is a combine state view


   :rtype: boolean

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

isDrawing
---------

.. js:method:: Model.isDrawing()



   Tells if the model is a CAD drawing or not

   :returns: true if the model is a CAD drawing


   :rtype: boolean

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

isFaceMeasurable
----------------

.. js:method:: Model.isFaceMeasurable( bodyId, faceIndex)

   :param bodyId: None
   :type bodyId: number
   :param faceIndex: None
   :type faceIndex: number


   :rtype: Promise <boolean>

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

isLineMeasurable
----------------

.. js:method:: Model.isLineMeasurable( bodyId, lineIndex)

   :param bodyId: ID of the body node containing the line
   :type bodyId: number
   :param lineIndex: Index of the line ot be checked
   :type lineIndex: number




   :returns: true if the line has associated measurement data


   :rtype: Promise <boolean>

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

isMeasurable
------------

.. js:method:: Model.isMeasurable()





   :returns: true if the model contains measurement data.


   :rtype: boolean

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

isNodeLoaded
------------

.. js:method:: Model.isNodeLoaded( nodeId)

   :param nodeId: The node to query.
   :type nodeId: number


   Queries if a node is fully loaded or not.

   :returns: True if the node is fully loaded; false otherwise.


   :rtype: boolean

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

isWithinExternalModel
---------------------

.. js:method:: Model.isWithinExternalModel( nodeId)

   :param nodeId: None
   :type nodeId: number


   Returns true if the node is within an external model.


   :rtype: boolean

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

loadMeasurementFromFile
-----------------------

.. js:method:: Model.loadMeasurementFromFile( filename)

   :param filename: Name of a file containing ZIP measurement data
   :type filename: string


   Loads measurement data from a ZIP file


   :rtype: Promise <void>

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

loadMeasurementFromJson
-----------------------

.. js:method:: Model.loadMeasurementFromJson( json)

   :param json: JSON object containing measurement data
   :type json: any


   Loads measurement data from a JSON object


   :rtype: Promise <void>

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

loadMeasurementFromString
-------------------------

.. js:method:: Model.loadMeasurementFromString( str)

   :param str: JSON string containing measurement data
   :type str: string


   Loads measurement data from a JSON string


   :rtype: Promise <void>

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

loadSubtreeFromModel
--------------------

.. js:method:: Model.loadSubtreeFromModel( nodeId, modelName, config)

   :param nodeId: ID of the node to link the subtree with. This ID should not have a type of Body or BodyInstance. If this parameter is null, the sub tree will be linked to the root. This method will trigger a subtreeLoaded event.
   :type nodeId: number
   :param modelName: The name of the model to load.
   :type modelName: string
   :param config: Configuration to control load behavior.
   :type config: LoadSubtreeConfig


   Loads the tree stored in a model file and query loading of required meshes

   :returns: A ``Promise`` of the newly loaded model's root nodes IDs.


   :rtype: Promise <[number]>

.. js:method:: Model.loadSubtreeFromModel( nodeId, modelName[, additionalMatrix])
   :noindex:

   :param nodeId: ID of the node to link the subtree with. This ID should not have a type of Body or BodyInstance. If this parameter is null, the sub tree will be linked to the root. This method will trigger a subtreeLoaded event.
   :type nodeId: number
   :param modelName: The name of the model to load.
   :type modelName: string
   :param additionalMatrix: :ts-api-decorator:`optional` Optional matrix to get multiplied into the net attachment matrix.
   :type additionalMatrix: null | Matrix


   Loads the tree stored in a model file and query loading of required meshes

   :returns: A ``Promise`` of the newly loaded model's root nodes IDs.


   :rtype: Promise <[number]>

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

loadSubtreeFromScsBuffer
------------------------

.. js:method:: Model.loadSubtreeFromScsBuffer( nodeId, buffer, config)

   :param nodeId: ID of the node to link the subtree with. This ID should not have a type of Body or BodyInstance. If this parameter is null, the sub tree will be linked to the root. This method will trigger a subtreeLoaded event.
   :type nodeId: number
   :param buffer: The SCS buffer to load.
   :type buffer: Uint8Array
   :param config: Configuration to control load behavior.
   :type config: LoadSubtreeConfig


   Loads the tree stored in a model file and query loading of required meshes

   :returns: A ``Promise`` of the newly loaded model's root nodes IDs.


   :rtype: Promise <[number]>

.. js:method:: Model.loadSubtreeFromScsBuffer( nodeId, buffer[, additionalMatrix])
   :noindex:

   :param nodeId: ID of the node to link the subtree with. This ID should not have a type of Body or BodyInstance. If this parameter is null, the sub tree will be linked to the root. This method will trigger a subtreeLoaded event.
   :type nodeId: number
   :param buffer: The SCS buffer to load.
   :type buffer: Uint8Array
   :param additionalMatrix: :ts-api-decorator:`optional` Optional matrix to get multiplied into the net attachment matrix.
   :type additionalMatrix: null | Matrix


   Loads the tree stored in a model file and query loading of required meshes

   :returns: A ``Promise`` of the newly loaded model's root nodes IDs.


   :rtype: Promise <[number]>

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

loadSubtreeFromScsFile
----------------------

.. js:method:: Model.loadSubtreeFromScsFile( nodeId, scsFilename, config)

   :param nodeId: ID of the node to link the subtree with. This ID should not have a type of Body or BodyInstance. If this parameter is null, the sub tree will be linked to the root. This method will trigger a subtreeLoaded event.
   :type nodeId: number
   :param scsFilename: The name of the SCS file to load.
   :type scsFilename: string
   :param config: Configuration to control load behavior.
   :type config: LoadSubtreeConfig


   Loads the tree stored in a model file and query loading of required meshes

   :returns: A ``Promise`` of the newly loaded model's root nodes IDs.


   :rtype: Promise <[number]>

.. js:method:: Model.loadSubtreeFromScsFile( nodeId, scsFilename[, additionalMatrix])
   :noindex:

   :param nodeId: ID of the node to link the subtree with. This ID should not have a type of Body or BodyInstance. If this parameter is null, the sub tree will be linked to the root. This method will trigger a subtreeLoaded event.
   :type nodeId: number
   :param scsFilename: The name of the SCS file to load.
   :type scsFilename: string
   :param additionalMatrix: :ts-api-decorator:`optional` Optional matrix to get multiplied into the net attachment matrix.
   :type additionalMatrix: null | Matrix


   Loads the tree stored in a model file and query loading of required meshes

   :returns: A ``Promise`` of the newly loaded model's root nodes IDs.


   :rtype: Promise <[number]>

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

loadSubtreeFromScsXmlBuffer
---------------------------

.. js:method:: Model.loadSubtreeFromScsXmlBuffer( nodeId, xmlData, modelNameToScs, config)

   :param nodeId: ID of the node to link the sub tree with. This ID should not have a type of Body or BodyInstance. If this parameter is null, the sub tree will be linked to the root. This method will trigger a subtreeLoaded event.
   :type nodeId: number
   :param xmlData: XML document or XML document string.
   :type xmlData: string | Document
   :param modelNameToScs: Optional callback to massage model names within the XML file to SCS file URLS or SCS file buffers. Return null to skip the model.
   :type modelNameToScs: null | ModelNameToScsFileFunc
   :param config: Configuration to control load behavior.
   :type config: LoadSubtreeConfig


   Loads the tree stored in the XML and query loading of required meshes
   Load order is determined by the projected size of bounding information present in the XML.
   If streamCutoffScale is set to a non zero value, a file whose projected size is lower than the cutoff will not be streamed until its projected size reaches the cutoff.

   :returns: A ``Promise`` of the newly loaded model's root nodes IDs that will resolve when all files have been loaded.


   :rtype: Promise <[number]>

.. js:method:: Model.loadSubtreeFromScsXmlBuffer( nodeId, xmlData[, modelNameToScs[, additionalMatrix[, allowMissingExternalModels]]])
   :noindex:

   :param nodeId: ID of the node to link the sub tree with. This ID should not have a type of Body or BodyInstance. If this parameter is null, the sub tree will be linked to the root. This method will trigger a subtreeLoaded event.
   :type nodeId: number
   :param xmlData: XML document or XML document string.
   :type xmlData: string | Document
   :param modelNameToScs: :ts-api-decorator:`optional` Optional callback to massage model names within the XML file to SCS file URLS or SCS file buffers. Return null to skip the model.
   :type modelNameToScs: null | ModelNameToScsFileFunc
   :param additionalMatrix: :ts-api-decorator:`optional` Optional matrix to get multiplied into the net attachment matrix.
   :type additionalMatrix: null | Matrix
   :param allowMissingExternalModels: :ts-api-decorator:`optional` Optional boolean to control whether or not missing models in the XML file are ignored or cause an error.
   :type allowMissingExternalModels: boolean


   Loads the tree stored in the XML and query loading of required meshes.
   Load order is determined by the projected size of bounding information present in the XML.
   If streamCutoffScale is set to a non zero value, a file whose projected size is lower than the cutoff will not be streamed until its projected size reaches the cutoff.

   :returns: A ``Promise`` of the newly loaded model's root nodes IDs that will resolve when all files have been loaded.


   :rtype: Promise <[number]>

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

loadSubtreeFromScsXmlFile
-------------------------

.. js:method:: Model.loadSubtreeFromScsXmlFile( nodeId, xmlFilename, modelNameToScs, config)

   :param nodeId: ID of the node to link the sub tree with. This ID should not have a type of Body or BodyInstance. If this parameter is null, the sub tree will be linked to the root. This method will trigger a subtreeLoaded event.
   :type nodeId: number
   :param xmlFilename: URL of XML file to load.
   :type xmlFilename: string
   :param modelNameToScs: Optional callback to massage model names within the XML file to SCS file URLS or SCS file buffers. Return null to skip the model.
   :type modelNameToScs: null | ModelNameToScsFileFunc
   :param config: Configuration to control load behavior.
   :type config: LoadSubtreeConfig


   Loads the tree stored in the XML and query loading of required meshes
   Load order is determined by the projected size of bounding information present in the XML.
   If streamCutoffScale is set to a non zero value, a file whose projected size is lower than the cutoff will not be streamed until its projected size reaches the cutoff.

   :returns: A ``Promise`` of the newly loaded model's root nodes IDs that will resolve when all files have been loaded.


   :rtype: Promise <[number]>

.. js:method:: Model.loadSubtreeFromScsXmlFile( nodeId, xmlFilename[, modelNameToScs[, additionalMatrix[, allowMissingExternalModels]]])
   :noindex:

   :param nodeId: ID of the node to link the sub tree with. This ID should not have a type of Body or BodyInstance. If this parameter is null, the sub tree will be linked to the root. This method will trigger a subtreeLoaded event.
   :type nodeId: number
   :param xmlFilename: URL of XML file to load.
   :type xmlFilename: string
   :param modelNameToScs: :ts-api-decorator:`optional` Optional callback to massage model names within the XML file to SCS file URLS or SCS file buffers. Return null to skip the model.
   :type modelNameToScs: null | ModelNameToScsFileFunc
   :param additionalMatrix: :ts-api-decorator:`optional` Optional matrix to get multiplied into the net attachment matrix.
   :type additionalMatrix: null | Matrix
   :param allowMissingExternalModels: :ts-api-decorator:`optional` Optional boolean to control whether or not missing models in the XML file are ignored or cause an error.
   :type allowMissingExternalModels: boolean


   Loads the tree stored in the XML and query loading of required meshes
   Load order is determined by the projected size of bounding information present in the XML.
   If streamCutoffScale is set to a non zero value, a file whose projected size is lower than the cutoff will not be streamed until its projected size reaches the cutoff.

   :returns: A ``Promise`` of the newly loaded model's root nodes IDs that will resolve when all files have been loaded.


   :rtype: Promise <[number]>

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

loadSubtreeFromXmlBuffer
------------------------

.. js:method:: Model.loadSubtreeFromXmlBuffer( nodeId, xmlData, massageModelName, config)

   :param nodeId: ID of the node to link the sub tree with. This ID should not have a type of Body or BodyInstance. If this parameter is null, the sub tree will be linked to the root. This method will trigger a subtreeLoaded event.
   :type nodeId: number
   :param xmlData: XML document or XML document string.
   :type xmlData: string | Document
   :param massageModelName: Optional callback to massage model names within the XML file. Return null to skip the model.
   :type massageModelName: null | MassageModelNameFunc
   :param config: Configuration to control load behavior.
   :type config: LoadSubtreeConfig


   Loads the tree stored in the XML and query loading of required meshes

   :returns: A ``Promise`` of the newly loaded model's root nodes IDs.


   :rtype: Promise <[number]>

.. js:method:: Model.loadSubtreeFromXmlBuffer( nodeId, xmlData[, massageModelName[, additionalMatrix[, allowMissingExternalModels]]])
   :noindex:

   :param nodeId: ID of the node to link the sub tree with. This ID should not have a type of Body or BodyInstance. If this parameter is null, the sub tree will be linked to the root. This method will trigger a subtreeLoaded event.
   :type nodeId: number
   :param xmlData: XML document or XML document string.
   :type xmlData: string | Document
   :param massageModelName: :ts-api-decorator:`optional` Optional callback to massage model names within the XML file. Return null to skip the model.
   :type massageModelName: null | MassageModelNameFunc
   :param additionalMatrix: :ts-api-decorator:`optional` Optional matrix to get multiplied into the net attachment matrix.
   :type additionalMatrix: null | Matrix
   :param allowMissingExternalModels: :ts-api-decorator:`optional` Optional boolean to control whether or not missing models in the XML file are ignored or cause an error.
   :type allowMissingExternalModels: boolean


   Loads the tree stored in the XML and query loading of required meshes

   :returns: A ``Promise`` of the newly loaded model's root nodes IDs.


   :rtype: Promise <[number]>

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

loadSubtreeFromXmlFile
----------------------

.. js:method:: Model.loadSubtreeFromXmlFile( nodeId, xmlFilename, massageModelName, config)

   :param nodeId: ID of the node to link the sub tree with. This ID should not have a type of Body or BodyInstance. If this parameter is null, the sub tree will be linked to the root. This method will trigger a subtreeLoaded event.
   :type nodeId: number
   :param xmlFilename: URL of XML file to load.
   :type xmlFilename: string
   :param massageModelName: Optional callback to massage model names within the XML file. Return null to skip the model.
   :type massageModelName: null | MassageModelNameFunc
   :param config: Configuration to control load behavior.
   :type config: LoadSubtreeConfig


   Loads the tree stored in the XML and query loading of required meshes

   :returns: A ``Promise`` of the newly loaded model's root nodes IDs.


   :rtype: Promise <[number]>

.. js:method:: Model.loadSubtreeFromXmlFile( nodeId, xmlFilename[, massageModelName[, additionalMatrix[, allowMissingExternalModels]]])
   :noindex:

   :param nodeId: ID of the node to link the sub tree with. This ID should not have a type of Body or BodyInstance. If this parameter is null, the sub tree will be linked to the root. This method will trigger a subtreeLoaded event.
   :type nodeId: number
   :param xmlFilename: URL of XML file to load.
   :type xmlFilename: string
   :param massageModelName: :ts-api-decorator:`optional` Optional callback to massage model names within the XML file. Return null to skip the model.
   :type massageModelName: null | MassageModelNameFunc
   :param additionalMatrix: :ts-api-decorator:`optional` Optional matrix to get multiplied into the net attachment matrix.
   :type additionalMatrix: null | Matrix
   :param allowMissingExternalModels: :ts-api-decorator:`optional` Optional boolean to control whether or not missing models in the XML file are ignored or cause an error.
   :type allowMissingExternalModels: boolean


   Loads the tree stored in the XML and query loading of required meshes

   :returns: A ``Promise`` of the newly loaded model's root nodes IDs.


   :rtype: Promise <[number]>

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

registerBimNodes
----------------

.. js:method:: Model.registerBimNodes( startNodeId, attributeToMask, legacy_useAttributeTitle)

   :param startNodeId: The root of the subtree to walk for registration.
   :type startNodeId: number
   :param attributeToMask: The callback used to obtain a node's [[BimMask]] from its attributes.
   :type attributeToMask: function
   :param legacy_useAttributeTitle: None
   :type legacy_useAttributeTitle: null | string | boolean


   This function recursively discovers BIM nodes in the supplied subtree and registers them.

   :returns: Promise that resolves when the operation has completed.


   :rtype: Promise <void>




   .. js:function:: attributeToMask( value)
      :noindex:

      :param value: None
      :type value: string


      :rtype: BimMask



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

registerIfcNodes
----------------

.. js:method:: Model.registerIfcNodes( startNodeId, legacy_useAttributeTitle)

   :param startNodeId: The root of the subtree to walk for registration.
   :type startNodeId: number
   :param legacy_useAttributeTitle: None
   :type legacy_useAttributeTitle: null | string | boolean


   This function recursively discovers IFC nodes in the supplied subtree and registers them.

   :returns: Promise that resolves when the operation has completed.


   :rtype: Promise <void>

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

replaceMesh
-----------

.. js:method:: Model.replaceMesh( id, data)

   :param id: None
   :type id: MeshId
   :param data: the new data
   :type data: MeshData


   Replace a mesh's data. This will affect all instances of that mesh.


   :rtype: Promise <void>

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

requestNodes
------------

.. js:method:: Model.requestNodes( nodeIds)

   :param nodeIds: array of unique IDs for the system to load
   :type nodeIds: [number]


   Specifies nodes for the system to load. This method is useful when the viewer was created with the <code>streamOnDemand</code> option set to true.


   :rtype: Promise <void>

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

reset
-----

.. js:method:: Model.reset()



   Resets the state of the model to its default

   :returns: Promise that resolves when the operation has completed.


   :rtype: Promise <void>

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

resetModelHighlight
-------------------

.. js:method:: Model.resetModelHighlight()



   Resets highlight for all nodes in the model.

   :returns: Promise that resolves when this operation has completed.


   :rtype: Promise <void>

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

resetModelOpacity
-----------------

.. js:method:: Model.resetModelOpacity()



   Resets opacity for all nodes in the model.

   :returns: Promise that resolves when this operation has completed.


   :rtype: void

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

resetNodeMatrixToInitial
------------------------

.. js:method:: Model.resetNodeMatrixToInitial( nodeId)

   :param nodeId: None
   :type nodeId: number


   Reset node matrix to the one set as the initial one


   :rtype: Promise <void>

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

resetNodesColor
---------------

.. js:method:: Model.resetNodesColor()



   Resets color for all nodes in the model.

   :returns: Promise that resolves when this operation has completed.


   :rtype: Promise <void>

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

resetNodesOpacity
-----------------

.. js:method:: Model.resetNodesOpacity( nodeIds)

   :param nodeIds: IDs of nodes whose opacity will be reset to their default values
   :type nodeIds: [number]


   Resets opacity for a given list of nodes.


   :rtype: void

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

resetNodesTransform
-------------------

.. js:method:: Model.resetNodesTransform()



   Resets transform for all nodes in the model.

   :returns: Promise that resolves when the operation has completed.


   :rtype: Promise <void>

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

resetNodesVisibility
--------------------

.. js:method:: Model.resetNodesVisibility()



   Resets visibility for all nodes in the model.

   :returns: Promise that resolves when the operation has completed.


   :rtype: Promise <void>

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

setBehaviorInitiallyHidden
--------------------------

.. js:method:: Model.setBehaviorInitiallyHidden( enabled)

   :param enabled: value indicating if initially hidden objects stay hidden
   :type enabled: boolean


   By default, objects that are initially hidden stays hidden unless specifically set to be shown. This function allows this behavior to be disabled.


   :rtype: void

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

setBodyNodesVisibility
----------------------

.. js:method:: Model.setBodyNodesVisibility( startNodeId, visibility)

   :param startNodeId: The start node to walk when updating body nodes visibility.
   :type startNodeId: number
   :param visibility: If true, nodes will be shown. If false, they will be hidden.
   :type visibility: boolean


   Sets the visibility of all body nodes starting from a given node.

   :returns: Promise that resolves when the operation has completed.


   :rtype: Promise <void>

.. js:method:: Model.setBodyNodesVisibility( startNodeId, visibilityFormatter)
   :noindex:

   :param startNodeId: The start node to walk when updating body nodes visibility.
   :type startNodeId: number
   :param visibilityFormatter: A function that returns the visibility for a given node id
   :type visibilityFormatter: function


   Sets the visibility of all body nodes starting from a given node.

   :returns: Promise that resolves when the operation has completed.


   :rtype: Promise <void>




   .. js:function:: visibilityFormatter( node)
      :noindex:

      :param node: None
      :type node: number


      :rtype: undefined | boolean



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

setDepthRange
-------------

.. js:method:: Model.setDepthRange( nodeIds, min, max)

   :param nodeIds: the node IDs to operate on
   :type nodeIds: [number]
   :param min: the depth value at the near plane
   :type min: number
   :param max: the depth value at the far plane
   :type max: number


   Remaps the depth values used for z-ordering of pixels to the given
   range, which must be a subset of ``[0,1]``. The depth value at the
   near plane (normally ``0``) is mapped to ``min`` and the value at
   the far plane (normally ``1``) is mapped to ``max``.

   The smaller the range, the more z-fighting you will see among
   objects set to that range.


   :rtype: Promise <void>

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

setEdgeProperty
---------------

.. js:method:: Model.setEdgeProperty( nodeId, edgeId, prop)

   :param nodeId: None
   :type nodeId: number
   :param edgeId: None
   :type edgeId: number
   :param prop: property (CircleElement, LineElement...)
   :type prop: Base


   Set edge property for a node of the given node and edge.


   :rtype: void

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

setEnableAutomaticUnitScaling
-----------------------------

.. js:method:: Model.setEnableAutomaticUnitScaling( enabled)

   :param enabled: value indicating if automatic unit scaling will be active
   :type enabled: boolean


   If enabled then models loaded into an existing scene with a different unit value will be scaled to the unit value of the current scene.


   :rtype: void

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

setFaceProperty
---------------

.. js:method:: Model.setFaceProperty( nodeId, faceId, prop)

   :param nodeId: None
   :type nodeId: number
   :param faceId: None
   :type faceId: number
   :param prop: property (CylinderElement, PlaneElement...)
   :type prop: Base


   Set face property for a node of the given node and face.


   :rtype: void

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

setInstanceModifier
-------------------

.. js:method:: Model.setInstanceModifier( instanceModifier, nodeIds, value)

   :param instanceModifier: InstanceModifier
   :type instanceModifier: InstanceModifier
   :param nodeIds: Array of node ids
   :type nodeIds: [number]
   :param value: boolean
   :type value: boolean


   Allows changing the behavior in the viewer


   :rtype: Promise <void>

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

setMeshLevel
------------

.. js:method:: Model.setMeshLevel( nodeIds, meshLevel)

   :param nodeIds: IDs of nodes in the assembly on which mesh level will be set
   :type nodeIds: [number]
   :param meshLevel: 0 standard, 1 low, 2 extra low
   :type meshLevel: number


   Sets the desired mesh level

   :returns: Promise that resolves when the operation has completed.


   :rtype: Promise <void>

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

setMetallicRoughness
--------------------

.. js:method:: Model.setMetallicRoughness( nodeIds, metallicFactor, roughnessFactor)

   :param nodeIds: List of nodes to set material properties for
   :type nodeIds: [number]
   :param metallicFactor: The metalness of the material
   :type metallicFactor: number
   :param roughnessFactor: The roughness of the material
   :type roughnessFactor: number


   Sets the metallic and roughness factors for the supplied nodes materials.
   Materials that are not currently set to use the Metallic Roughness shading model will be upgraded to use this mode.


   :rtype: void

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

setNodeFaceColor
----------------

.. js:method:: Model.setNodeFaceColor( partId, faceId, color)

   :param partId: None
   :type partId: number
   :param faceId: the Id of the face in the node that will have its color set
   :type faceId: number
   :param color: the color to set
   :type color: Color


   Sets the color for a face element. This color will take precedence over any currently set color on the node


   :rtype: Promise <void>

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

setNodeFaceHighlighted
----------------------

.. js:method:: Model.setNodeFaceHighlighted( nodeId, faceId, highlighted)

   :param nodeId: the id for the node containing the face element.
   :type nodeId: number
   :param faceId: the face Id that is the target of this operation.
   :type faceId: number
   :param highlighted: value indicating whether the supplied face element should be highlighted.
   :type highlighted: boolean


   Sets whether the face element for a given node should appear highlighted.
   When a face element is highlighted, the highlight color will override
   any color previously set on the element.


   :rtype: Promise <void>

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

setNodeFaceVisibility
---------------------

.. js:method:: Model.setNodeFaceVisibility( partId, faceId, visibility)

   :param partId: the Id of the part containing the face
   :type partId: number
   :param faceId: the Id of the face in the node that will have its visibility set
   :type faceId: number
   :param visibility: visibility state to be set
   :type visibility: boolean


   Sets the visibility for a face element. This visibility setting will take precedence over other element visibility settings


   :rtype: void

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

setNodeLineColor
----------------

.. js:method:: Model.setNodeLineColor( partId, lineId, color)

   :param partId: None
   :type partId: number
   :param lineId: the Id of the line in the node that will have its color set.
   :type lineId: number
   :param color: the color to set.
   :type color: Color


   Sets the color for a line element.


   :rtype: Promise <void>

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

setNodeLineHighlighted
----------------------

.. js:method:: Model.setNodeLineHighlighted( partId, lineId, highlighted)

   :param partId: None
   :type partId: number
   :param lineId: the line Id that is the target of this operation.
   :type lineId: number
   :param highlighted: value indicating whether the supplied line element should be highlighted.
   :type highlighted: boolean


   Sets whether the line element for a given node should appear highlighted. When a line element is highlighted, the highlight color will override any color previously set on the element.


   :rtype: Promise <void>

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

setNodeLineVisibility
---------------------

.. js:method:: Model.setNodeLineVisibility( partId, lineId, visibility)

   :param partId: the Id of the part containing the line
   :type partId: number
   :param lineId: the Id of the line in the node that will have its visibility set
   :type lineId: number
   :param visibility: visibility state to be set
   :type visibility: boolean


   Sets the visibility for a line element. This visibility setting will take precedence over other element visibility settings


   :rtype: void

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

setNodeMatrix
-------------

.. js:method:: Model.setNodeMatrix( nodeId, matrix, setAsInitial)

   :param nodeId: None
   :type nodeId: number
   :param matrix: None
   :type matrix: Matrix
   :param setAsInitial: tells if you want to change the node initial matrix or not
   :type setAsInitial: boolean


   Sets Matrix for a node of the given ID


   :rtype: Promise <void>

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

setNodePointColor
-----------------

.. js:method:: Model.setNodePointColor( partId, pointId, color)

   :param partId: the Id of the node containing the point.
   :type partId: number
   :param pointId: the Id of the point in the node that will have its color set.
   :type pointId: number
   :param color: the color to set.
   :type color: Color


   Sets the color for a point element.


   :rtype: void

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

setNodePointHighlighted
-----------------------

.. js:method:: Model.setNodePointHighlighted( partId, pointId, highlighted)

   :param partId: None
   :type partId: number
   :param pointId: the point Id that is the target of this operation.
   :type pointId: number
   :param highlighted: value indicating whether the supplied point element should be highlighted.
   :type highlighted: boolean


   Sets whether the point element for a given node should appear highlighted. When a point element is highlighted, the highlight color will override any color previously set on the element.


   :rtype: Promise <void>

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

setNodePointVisibility
----------------------

.. js:method:: Model.setNodePointVisibility( partId, pointId, visibility)

   :param partId: the Id of the part containing the point
   :type partId: number
   :param pointId: the Id of the point in the node that will have its visibility set
   :type pointId: number
   :param visibility: visibility state to be set
   :type visibility: boolean


   Sets the visibility for a point element. This visibility setting will take precedence over other element visibility settings


   :rtype: void

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

setNodesAmbientColor
--------------------

.. js:method:: Model.setNodesAmbientColor( nodeIds, color)

   :param nodeIds: IDs of nodes whose color to set
   :type nodeIds: [number]
   :param color: the color to set
   :type color: Color


   Sets the ambient color on the faces for a given list of nodes.


   :rtype: void

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

setNodesAmbientMix
------------------

.. js:method:: Model.setNodesAmbientMix( nodeIds, value)

   :param nodeIds: IDs of nodes whose color to set
   :type nodeIds: [number]
   :param value: the decimal value to set, between 0 and 1
   :type value: number


   Sets the ambient mix on the faces for a given list of nodes.
   The mix is between the material ambient light and the global ambient light,
   with 1.0 representing full material ambient mix and 0.0 representing full global
   ambient light.


   :rtype: void

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

setNodesColors
--------------

.. js:method:: Model.setNodesColors( colorMap, alsoApplyToWireframe, alsoApplyToPoints)

   :param colorMap: None
   :type colorMap: Map <number, Color> | IdColorMap
   :param alsoApplyToWireframe: change or not lines color
   :type alsoApplyToWireframe: boolean
   :param alsoApplyToPoints: change or not points color
   :type alsoApplyToPoints: boolean


   Sets colors for a given set of nodes.

   :returns: Promise that resolves when this operation has completed.


   :rtype: Promise <void>

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

setNodesCullingVector
---------------------

.. js:method:: Model.setNodesCullingVector( nodeIds, space, vector, toleranceDegrees)

   :param nodeIds: None
   :type nodeIds: [number]
   :param space: The space in which the culling vector is defined.
   :type space: CullingVectorSpace
   :param vector: A vector that will be compared with the view vector.
   :type vector: Point3
   :param toleranceDegrees: The maximum angle between the culling vector and the view vector within which the object will be visible.
   :type toleranceDegrees: number


   Sets a vector and angle used to determine an object's visibility based on camera orientation.


   :rtype: Promise <void>

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

setNodesFaceColor
-----------------

.. js:method:: Model.setNodesFaceColor( nodeIds, color)

   :param nodeIds: IDs of nodes whose color to set
   :type nodeIds: [number]
   :param color: the color to set
   :type color: Color


   Sets the color on the faces for a given list of nodes.

   :returns: Promise that resolves when this operation has completed.


   :rtype: Promise <void>

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

setNodesFaceEmissiveColor
-------------------------

.. js:method:: Model.setNodesFaceEmissiveColor( nodeIds, color)

   :param nodeIds: IDs of nodes whose color to set
   :type nodeIds: [number]
   :param color: the color to set
   :type color: Color


   Sets the emissive color on the faces for a given list of nodes.


   :rtype: void

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

setNodesFaceSpecularColor
-------------------------

.. js:method:: Model.setNodesFaceSpecularColor( nodeIds, color)

   :param nodeIds: IDs of nodes whose color to set
   :type nodeIds: [number]
   :param color: the color to set
   :type color: Color


   Sets the specular color on the faces for a given list of nodes.


   :rtype: void

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

setNodesFaceSpecularIntensity
-----------------------------

.. js:method:: Model.setNodesFaceSpecularIntensity( nodeIds, value)

   :param nodeIds: IDs of nodes whose color to set
   :type nodeIds: [number]
   :param value: the value to set
   :type value: number


   Sets the specular intensity on the faces for a given list of nodes.


   :rtype: void

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

setNodesHighlighted
-------------------

.. js:method:: Model.setNodesHighlighted( partIds, highlighted)

   :param partIds: None
   :type partIds: [number]
   :param highlighted: value indicating whether the supplied nodes should be highlighted.
   :type highlighted: boolean


   Sets whether the supplied nodes should appear highlighted. When a node is highlighted,
   the highlight color will override any color previously set on the model.

   *Tip:* An easy way to unhighlight the entire model is to call [[setNodesHighlighted]]
   on the root node of the model:

   .. code-block::


      hwv.model.setNodesHighlighted([hwv.model.getAbsoluteRootNode()], false);


   (In this case, ``hwv`` is your instance of [[WebViewer]].)

   :returns: Promise that resolves when this operation has completed.


   :rtype: Promise <void>

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

setNodesLineColor
-----------------

.. js:method:: Model.setNodesLineColor( nodeIds, color)

   :param nodeIds: IDs of nodes whose color to set
   :type nodeIds: [number]
   :param color: the color to set
   :type color: Color


   Sets the color on the lines/edges for a given list of nodes.

   :returns: Promise that resolves when this operation has completed.


   :rtype: Promise <void>

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

setNodesLinePattern
-------------------

.. js:method:: Model.setNodesLinePattern( nodeIds, pattern, patternLength, patternLengthUnit)

   :param nodeIds: The IDs of the nodes.
   :type nodeIds: [number]
   :param pattern: The line pattern. See [[LinePattern]] for details.
   :type pattern: LinePattern
   :param patternLength: The length of a single repetition of the line pattern.
   :type patternLength: number
   :param patternLengthUnit: The unit in which the length of the pattern is measured. See [[LinePatternLengthUnit]] for details.
   :type patternLengthUnit: LinePatternLengthUnit


   Applies the given line pattern to the specified nodes. See also [[unsetNodesLinePattern]].


   :rtype: void

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

setNodesOpacities
-----------------

.. js:method:: Model.setNodesOpacities( params)

   :param params: object mapping node IDs to opacity to set for that NodeId. The opacity value should be between the range of 0.0 and 1.0. 0.0 indicates fully transparent, while 1.0 is fully opaque.
   :type params: Map <number, number> | IdNumberMap


   Sets opacity for a given set of nodes.


   :rtype: void

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

setNodesOpacity
---------------

.. js:method:: Model.setNodesOpacity( nodeIds, opacity)

   :param nodeIds: IDs of nodes whose opacity will be set
   :type nodeIds: [number]
   :param opacity: opacity value to apply to each node. The value should be between the range of 0.0 and 1.0. 0.0 indicates fully transparent, while 1.0 is fully opaque.
   :type opacity: number


   Sets opacity for a given list of nodes.


   :rtype: void

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

setNodesPointColor
------------------

.. js:method:: Model.setNodesPointColor( nodeIds, color)

   :param nodeIds: IDs of nodes whose color to set
   :type nodeIds: [number]
   :param color: None
   :type color: Color


   Sets the color on the points for a given list of nodes.

   :returns: Promise that resolves when this operation has completed.


   :rtype: void

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

setNodesTexture
---------------

.. js:method:: Model.setNodesTexture( nodeIds, options)

   :param nodeIds: The nodes on which to apply the texture
   :type nodeIds: [number]
   :param options: Options specifying how the texture is applied
   :type options: TextureOptions


   Apply an image to a node as a texture map. See [[createImage]] and [[unsetNodesTexture]].


   :rtype: Promise <void>

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

setNodesVisibilities
--------------------

.. js:method:: Model.setNodesVisibilities( mapping, initiallyHiddenStayHidden)

   :param mapping: The mapping of node IDs to boolean value indicating the visibility setting for that node.
   :type mapping: Map <number, boolean> | IdBooleanMap
   :param initiallyHiddenStayHidden: Controls whether or not initially hidden geometries stay hidden. Default behavior is driven by [[setBehaviorInitiallyHidden]].
   :type initiallyHiddenStayHidden: null | boolean


   Sets the visibility for a given set of nodes.

   :returns: Promise that resolves when the operation has completed.


   :rtype: Promise <void>

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

setNodesVisibility
------------------

.. js:method:: Model.setNodesVisibility( nodeIds, visibility, initiallyHiddenStayHidden)

   :param nodeIds: The node IDs whose visibilities will be set.
   :type nodeIds: [number]
   :param visibility: If true, nodes will be shown. If false, they will be hidden.
   :type visibility: boolean
   :param initiallyHiddenStayHidden: Controls whether or not initially hidden geometries stay hidden. Default behavior is driven by [[setBehaviorInitiallyHidden]].
   :type initiallyHiddenStayHidden: null | boolean


   Sets visibility for a given list of nodes.

   :returns: Promise that resolves when the operation has completed.


   :rtype: Promise <void>

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

setPart
-------

.. js:method:: Model.setPart( assemblyNodeId, partNodeId)

   :param assemblyNodeId: None
   :type assemblyNodeId: undefined | null | number
   :param partNodeId: None
   :type partNodeId: undefined | null | number


   Set a part on an assembly node

   :returns: true if all went right, false otherwise


   :rtype: boolean

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

setPhysicalProperties
---------------------

.. js:method:: Model.setPhysicalProperties( nodeId, gravityCenter, surfaceArea, volume)

   :param nodeId: None
   :type nodeId: number
   :param gravityCenter: None
   :type gravityCenter: Point3
   :param surfaceArea: None
   :type surfaceArea: number
   :param volume: None
   :type volume: number


   Purpose: Sets physical properties

   :Param: nodeId node id to set the property on, the node id has to be a body node
   :Param: gravityCenter gravity center in local coordinates
   :Param: surfaceArea surface area, in squared current unit
   :Param: volume volume, in cubed current unit
   :returns: true if all went right, false otherwise


   :rtype: boolean

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

setPmiColor
-----------

.. js:method:: Model.setPmiColor( color)

   :param color: the override color
   :type color: Color


   Saves a PMI override color


   :rtype: void

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

setPmiColorOverride
-------------------

.. js:method:: Model.setPmiColorOverride( enableOverride[, rootId])

   :param enableOverride: None
   :type enableOverride: boolean
   :param rootId: :ts-api-decorator:`optional` None
   :type rootId: number


   Takes a boolean value and either enables the set PMI override color or resets all PMI colors to their default

   :returns: Promise that resolves when this operation has completed.


   :rtype: Promise <void>

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

setViewAxes
-----------

.. js:method:: Model.setViewAxes( frontVector, upVector)

   :param frontVector: None
   :type frontVector: Point3
   :param upVector: None
   :type upVector: Point3


   Sets the up and front vectors for the model coordinate system.
   Both the upVector and frontVector must be unique, cardinal axes.


   :rtype: void

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

switchToModel
-------------

.. js:method:: Model.switchToModel( newModelFilename)

   :param newModelFilename: Name of the model file to load after the existing scene gets deleted
   :type newModelFilename: string


   Delete all the current scene and load the specified model instead. Also triggers a "modelSwitched" when finished.

   :returns: A ``Promise`` of the newly loaded model's root nodes IDs.


   :rtype: Promise <[number]>

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

triangulatePolygon
------------------

.. js:method:: Model.triangulatePolygon( polygonPoints, normal)

   :param polygonPoints: An array of point data for the polygon. Points are stored [XYZXYZXYZ...] format.
   :type polygonPoints: Float32Array | [number]
   :param normal: The normal of the polygon to triangulate.
   :type normal: Point3


   Triangulates the supplied polygon.

   :returns: An array containing the point data for the generated triangles. Points are stored [XYZXYZXYZ...] format.          This returned list is always divisible by 9 (3 points per triangle; 3 floats per point).


   :rtype: Float32Array

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

unsetDepthRange
---------------

.. js:method:: Model.unsetDepthRange( nodeIds)

   :param nodeIds: the node IDs to operate on
   :type nodeIds: [number]


   Unsets the depth range set by [[setDepthRange]].


   :rtype: void

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

unsetMetallicRoughness
----------------------

.. js:method:: Model.unsetMetallicRoughness( nodeIds)

   :param nodeIds: List of nodes to unset material properties for
   :type nodeIds: [number]


   Unsets the metallic and roughness values set with [[setMetallicRoughness]]
   These materials will no longer use the Metallic Roughness shading model.


   :rtype: void

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

unsetNodeFaceColor
------------------

.. js:method:: Model.unsetNodeFaceColor( partId, faceId)

   :param partId: None
   :type partId: number
   :param faceId: the Id of the face in the node that will have its color unset
   :type faceId: number


   Unsets the color for a face element. This will return the face's color to its default state.


   :rtype: Promise <void>

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

unsetNodeLineColor
------------------

.. js:method:: Model.unsetNodeLineColor( partId, lineId)

   :param partId: None
   :type partId: number
   :param lineId: the Id of the line in the node that will have its color unset
   :type lineId: number


   Unsets the color for a line element. This will return the line's color to its default state.


   :rtype: Promise <void>

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

unsetNodePointColor
-------------------

.. js:method:: Model.unsetNodePointColor( partId, pointId)

   :param partId: the Id of the node containing the point
   :type partId: number
   :param pointId: the Id of the point in the node that will have its color unset
   :type pointId: number


   Unsets the color for a point element. This will return the point's color to its default state.


   :rtype: void

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

unsetNodesCullingVectors
------------------------

.. js:method:: Model.unsetNodesCullingVectors( nodeIds)

   :param nodeIds: The nodes to unset culling vectors on.
   :type nodeIds: [number]


   Unsets the vector and angle used to determine an object's visibility based on camera orientation.


   :rtype: Promise <void>

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

unsetNodesFaceColor
-------------------

.. js:method:: Model.unsetNodesFaceColor( nodeIds)

   :param nodeIds: IDs of nodes to modify
   :type nodeIds: [number]


   Unsets the color on the faces for a given list of nodes.

   :returns: Promise that resolves when this operation has completed.


   :rtype: Promise <void>

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

unsetNodesFaceEmissiveColor
---------------------------

.. js:method:: Model.unsetNodesFaceEmissiveColor( nodeIds)

   :param nodeIds: IDs of nodes whose color to reset
   :type nodeIds: [number]


   Resets the emissive color on the faces for a given list of nodes.


   :rtype: void

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

unsetNodesFaceSpecularColor
---------------------------

.. js:method:: Model.unsetNodesFaceSpecularColor( nodeIds)

   :param nodeIds: IDs of nodes whose color to reset
   :type nodeIds: [number]


   Resets the specular color on the faces for a given list of nodes.


   :rtype: void

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

unsetNodesFaceSpecularIntensity
-------------------------------

.. js:method:: Model.unsetNodesFaceSpecularIntensity( nodeIds)

   :param nodeIds: IDs of nodes whose color to set
   :type nodeIds: [number]


   Resets the specular intensity on the faces for a given list of nodes.


   :rtype: void

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

unsetNodesLineColor
-------------------

.. js:method:: Model.unsetNodesLineColor( nodeIds)

   :param nodeIds: IDs of nodes to modify
   :type nodeIds: [number]


   Unsets the color on the lines for a given list of nodes.

   :returns: Promise that resolves when this operation has completed.


   :rtype: Promise <void>

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

unsetNodesLinePattern
---------------------

.. js:method:: Model.unsetNodesLinePattern( nodeIds)

   :param nodeIds: The IDs of the nodes.
   :type nodeIds: [number]


   Removes the line pattern applied by [[setNodesLinePattern]].


   :rtype: void

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

unsetNodesPointColor
--------------------

.. js:method:: Model.unsetNodesPointColor( nodeIds)

   :param nodeIds: IDs of nodes to modify
   :type nodeIds: [number]


   Unsets the color on the points for a given list of nodes.


   :rtype: void

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

unsetNodesTexture
-----------------

.. js:method:: Model.unsetNodesTexture( nodeIds)

   :param nodeIds: The nodes from which to remove the texture or textures
   :type nodeIds: [number]


   Remove one or more textures applied via [[setNodesTexture]].


   :rtype: void

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

viewAxesHaveBeenSet
-------------------

.. js:method:: Model.viewAxesHaveBeenSet()



   Gets whether there has been a successful call to setViewAxes.


   :rtype: boolean

