.. role:: ts-api-decorator

######################
QueryMapResultOnPoints
######################

.. js:module:: cee.ug
   :noindex:

.. container:: ts-api-section

   .. js:class:: QueryMapResultOnPoints

      Query the scalar or vector result in a given set of points.

      Use this query to compute the value of a given result in a set of points (coordinates) within the model.
      The result will be loaded if needed, so you can specify any result available for the model.

      This class can be used to map results on the surface of a 3D solid. 
      See the example in Examples/DemoAppUg on how to do that. 
      Various 3D solid generators can be used to generate vertices and indices for this purpose, such as: 
      ``utils.CylinderGenerator``, ``utils.BoxGenerator`` 
      or ``utils.SphereGenerator``.



.. container:: api-index-section

   .. rubric:: Constructors

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

   * :js:meth:`~cee.ug.QueryMapResultOnPoints.constructor`



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~cee.ug.QueryMapResultOnPoints.executeQuery`
   * :js:meth:`~cee.ug.QueryMapResultOnPoints.setTolerance`





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

Constructors
============

.. container:: ts-api-section

   .. js:function:: QueryMapResultOnPoints.constructor( model)

      :param model: None
      :type model: RemoteModel


      :rtype: QueryMapResultOnPoints



Methods
=======

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

executeQuery
------------

.. js:method:: QueryMapResultOnPoints.executeQuery( frameIndex, resultId, resultType, pointArr, callback)

   :param frameIndex: The zero based index of the frame to query the path from
   :type frameIndex: number
   :param resultId: Id of the scalar result to map on the points
   :type resultId: number
   :param resultType: Scalar and vector results are supported
   :type resultType: ResultType
   :param pointArr: 3D coordinates of the points interleaved (x0, y0, z0, x1, y1, z1, ...)
   :type pointArr: [number]
   :param callback: None
   :type callback: QueryMapScalarOnPointsCallback


   Compute the value of the specified result in the given points (coordinates).


   :rtype: void

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

setTolerance
------------

.. js:method:: QueryMapResultOnPoints.setTolerance( tolerance)

   :param tolerance: None
   :type tolerance: number


   A non-negative tolerance value used when comparing point location with the model's elements. 
   Due to the way each point is checked to be inside the model or not, it is recommended to use a small tolerance value. 
   This is used to fine-tune the query to work well for querying points on (or very near) the surface of the model.

   :default:  .. code-block:: ts     1e-6. 


   :rtype: void

