.. role:: ts-api-decorator

#########
Isovolume
#########

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

.. container:: ts-api-section

   .. js:class:: Isovolume

      Specification of an isovolume (both parameters and attributes) in a ``RemoteModel``.

      Use this object to control the settings and attributes of an isovolume. An isovolume is defined as 
      the combined volume of an element model where a scalar field is between a given minimum and 
      maximum value. The surface of the isovolume is the hull of this volume. Any element on the 
      border of the model (a surface with no neighbor) is also included in the volume if the scalar value on 
      that surface is within the given range.

      You can map any scalar result onto the isovolume with ``mapScalarResultId`` and 
      any vector result with ``mapVectorResultId``. The settings for the mapped results can 
      be changed with the ``ScalarSettings`` and ``VectorSettings`` objects.

      To create an isovolume, use ``RemoteModel.addIsovolume``.

      **Example:** Show an isovolume


      .. code-block:: javascript

         var modelDir = myModel.modelDirectory;

         // Add isovolume if we have a scalar result
         if (modelDir.scalarResultArray.length > 0) {
             var iso = myModel.addIsovolume();
             iso.isoScalarResultId = modelDir.scalarResultArray[0].id;

             iso.minimumIsoValue = 2;
             iso.maximumIsoValue = 5;

             if (modelDir.scalarResultArray.length > 1) {
                 iso.mapScalarResultId = modelDir.scalarResultArray[1].id;
             } else {
                 iso.mapScalarResultId = modelDir.scalarResultArray[0].id;
             }
         }

         // Set model to outline to show the cutting planes
         myModel.setDrawStyleAllParts(cee.ug.DrawStyle.OUTLINE);


      This code sample produces the following image in the 3D Viewer:

      .. image:: /images/Isovolume.png





.. container:: api-index-section

   .. rubric:: Accessors

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

   * :js:attr:`~cee.ug.Isovolume.computeFromVisibleParts`
   * :js:attr:`~cee.ug.Isovolume.highlight`
   * :js:attr:`~cee.ug.Isovolume.id`
   * :js:attr:`~cee.ug.Isovolume.isoScalarResultId`
   * :js:attr:`~cee.ug.Isovolume.isPrecomputed`
   * :js:attr:`~cee.ug.Isovolume.mapScalarResultId`
   * :js:attr:`~cee.ug.Isovolume.mapVectorResultId`
   * :js:attr:`~cee.ug.Isovolume.maximumIsoValue`
   * :js:attr:`~cee.ug.Isovolume.minimumIsoValue`
   * :js:attr:`~cee.ug.Isovolume.opacity`
   * :js:attr:`~cee.ug.Isovolume.visible`
   * :js:attr:`~cee.ug.Isovolume.volumeColor`



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~cee.ug.Isovolume.getAsProperties`
   * :js:meth:`~cee.ug.Isovolume.setFromProperties`





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

Accessors
=========

.. container:: ts-api-section

   .. js:function:: Isovolume.computeFromVisibleParts()



      If set to true, the isovolume will be computed from only the visible parts. Any part that
      is not visible will not contribute to the isovolume.


      :rtype: boolean

   .. js:function:: Isovolume.computeFromVisibleParts( visiblePartsOnly)

      :param visiblePartsOnly: None
      :type visiblePartsOnly: boolean


      :rtype: void



.. container:: ts-api-section

   .. js:function:: Isovolume.highlight()



      Whether the isovolume should be highlighted.


      :rtype: boolean

   .. js:function:: Isovolume.highlight( highlight)

      :param highlight: None
      :type highlight: boolean


      :rtype: void



.. container:: ts-api-section

   .. js:function:: Isovolume.id()



      The id of the isovolume. This is assigned by the system when you call ``RemoteModel.addIsovolume``
      and is used to identify the isovolume.


      :rtype: number



.. container:: ts-api-section

   .. js:function:: Isovolume.isoScalarResultId()



      The scalar result to compute the isovolume from. This property is mandatory and must refer to one of 
      the scalar results in ``ModelDirectory.scalarResultArray``.


      :rtype: number

   .. js:function:: Isovolume.isoScalarResultId( isoScalarResultId)

      :param isoScalarResultId: None
      :type isoScalarResultId: number


      :rtype: void



.. container:: ts-api-section

   .. js:function:: Isovolume.isPrecomputed()



      Is true if the isovolume is precomputed and cannot be changed


      :rtype: boolean



.. container:: ts-api-section

   .. js:function:: Isovolume.mapScalarResultId()



      The id of the scalar result to show on the isovolume.

      This id must refer to one of the scalar results in ``ModelDirectory.scalarResultArray``.
      You can change the settings for the scalar with the ``ScalarSettings`` object.

      Set to -1 to show no scalars on the isovolume.


      :rtype: number

   .. js:function:: Isovolume.mapScalarResultId( mapScalarResultId)

      :param mapScalarResultId: None
      :type mapScalarResultId: number


      :rtype: void



.. container:: ts-api-section

   .. js:function:: Isovolume.mapVectorResultId()



      The id of the vector result to show on the isovolume. One vector will be shown in each node of the surface.

      This id must refer to one of the vector results in ``ModelDirectory.vectorResultArray``.
      The settings for the vector arrows can be changed with the ``VectorSettings`` object.

      Set to -1 to show no vectors on the isovolume.


      :rtype: number

   .. js:function:: Isovolume.mapVectorResultId( mapVectorResultId)

      :param mapVectorResultId: None
      :type mapVectorResultId: number


      :rtype: void



.. container:: ts-api-section

   .. js:function:: Isovolume.maximumIsoValue()



      The maximum scalar value within the isovolume.


      :rtype: number

   .. js:function:: Isovolume.maximumIsoValue( maximumIsoValue)

      :param maximumIsoValue: None
      :type maximumIsoValue: number


      :rtype: void



.. container:: ts-api-section

   .. js:function:: Isovolume.minimumIsoValue()



      The minimum scalar value within isovolume.


      :rtype: number

   .. js:function:: Isovolume.minimumIsoValue( minimumIsoValue)

      :param minimumIsoValue: None
      :type minimumIsoValue: number


      :rtype: void



.. container:: ts-api-section

   .. js:function:: Isovolume.opacity()



      Opacity of the isovolume. 0.0 means fully transparent (invisible), 1.0 means fully opaque.


      :rtype: number

   .. js:function:: Isovolume.opacity( opacity)

      :param opacity: None
      :type opacity: number


      :rtype: void



.. container:: ts-api-section

   .. js:function:: Isovolume.visible()



      Visibility of the isovolume. Use this to show or hide an isovolume in the 3D Viewer.


      :rtype: boolean

   .. js:function:: Isovolume.visible( visible)

      :param visible: None
      :type visible: boolean


      :rtype: void



.. container:: ts-api-section

   .. js:function:: Isovolume.volumeColor()



      The color of the isovolume if not showing a result (mapScalarResultId = -1)


      :rtype: Color3Like

   .. js:function:: Isovolume.volumeColor( clr)

      :param clr: None
      :type clr: Color3Like


      :rtype: void



Methods
=======

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

getAsProperties
---------------

.. js:method:: Isovolume.getAsProperties()



   Gets the settings for this isovolume as a Plain Old JavaScript Object (POJO).


   :rtype: IsovolumeProperties

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

setFromProperties
-----------------

.. js:method:: Isovolume.setFromProperties( props)

   :param props: None
   :type props: Partial <IsovolumeProperties>


   Applies the settings in the given properties object to this isovolume.


   :rtype: void

