:tocdepth: 2

############
Envision 2.0
############

February 28, 2024 - SHA: 35e51d55

CEETRON Envision 2.0 is a major release which means it contains breaking changes. The main focus this release have
been: 

-   Updating to newer compilers
-   Upgrading dependencies to increase performance and reduce vulnerabilities
-   Removing deprecated code
-   Strengthen core implementation to make the components more robust
-   Ensuring that the public interfaces remain clean and consistent
-   Improved automated testing 
    
All this to ensure that we are better equipped to continue to provide the best CAE Visualization toolkit in the marked!


**Updated Supported Platforms**

CEETRON Envision now supports the following platforms:

====================    ==========================      ===========================
Supported platforms     Operating system                Compiler
====================    ==========================      ===========================
Windows                 Windows 10                      MSVC 2019 (142 toolset)
Linux                   Ubuntu 20.04 (glibc 2.31)       gcc 9.4
====================    ==========================      ===========================


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


|web| CEETRON Envision for Web        |desktop| CEETRON Envision for Desktop


*************
New Features
*************

CAE-1257 C++17 Standard |web| |desktop|
=======================================

CEETRON Envision is now built using the C++ 17 standard.


CAE-1245 Node.js version upgrade |web|
======================================

We now support Node.js runtime version 18. |br|
https://nodejs.org/


CAE-1231 Add scalar result filtering to Web |web|
=================================================

Scalar results can now be filtered on Web with ``cee.ug.ScalarSettings.setFilteringRange()``. Results outside of this 
range will not be drawn. Feature already exists on Desktop.


CAE-1291 Update to version 1.9.1 of CEETRON Access |web| |desktop|
==================================================================

Our file interfaces now uses version 1.9.1 of CEETRON Access (CeetronSAM_1.9.1_945b810c)


CAE-1294 Updated to TBB 2021.11 |web| |desktop|
===============================================

Updated to version 2021.11 of oneAPI Threading Building Blocks (oneTBB). |br|
https://github.com/oneapi-src/oneTBB


CAE-1245 Improved in-editor navigation of api documentation |web|
=================================================================

Inline comments now use JSdoc @link references to other symbols in the declaration file, enabling quick navigation in 
modern editors.

.. image:: ../images/release-notes/cae1245.gif
    :width: 700


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


****************
Breaking Changes
****************

CAE-1254 Handling of default camera config for UG and CUG |web|
===============================================================

**New functionality:**

-   Added new abstract method ``Model.getDefaultCameraConfig()`` that lets a model report a default camera configuration. 
    Currently implemented by the ``RemoteModel`` and ``ConstantRemoteModel`` models.
-   Added new methods ``Camera.applyCameraConfig()`` and ``Camera.resetCamera()``.

**Changes:**

-   The signature of the ``ug.OpenModelCallback`` function, utilized in ``ug.RemoteModel.openModel()`` has changed. A 
    new parameter, info of type ``ug.OpenModelInfo``, has been added to be able to communicate camera configurations 
    from the server through the ``serverCameraConfig`` property.
-   The logic for setting up a default camera in a ``View`` when the camera has not already been modified has changed. 
    This logic will now try and use the default camera config of the contained models if any exist. Note that this will 
    only happen if the camera has not yet been modified. The new function ``Camera.resetCamera()`` can be used to reset 
    a view to its initial state.
-   Instances of ``ug.RemoteModel`` will no longer reset/update the camera of the views it which they are contained. 
    For views where the camera has not been modified, the view will try and derive a default camera setup by calling 
    the ``ug.RemoteModel.getDefaultCameraConfig()`` function on the contained models.
    For most use-cases we recommend that you explicitly configure the view's camera before streaming of the model 
    starts instead. This would normally be done in the ``ug.OpenModelCallback`` function, either by utilizing 
    ``ug.RemoteModel.getDefaultCameraConfig()`` or any camera config received through 
    ``ug.OpenModelInfo.serverCameraConfig``.
-   The signature of the ``ug.RemoteModel.applyVTFxCase()`` has changed. The ``applyCameraSettings`` parameter has been 
    removed. It is no longer possible to have the model automatically apply the camera settings to the associated 
    views. This must now be done in the callback function.


CAE-1249 Refactor and consolidate bounding boxes |web|
======================================================

The overall change going forward is that when ``Model.getBoundingBox()`` is called without any parameters it will 
return the current bounding box of the model. This bounding box includes only the parts/objects that are currently 
visible in the model.

To get the full (ignoring part visibility) bounding box of the model, ``Model.getBoundingBox()`` can be called with the
optional ``ModelBoundingBoxOptions.includeHiddenParts`` parameter set to true. Note that at the moment ``RemoteModel`` 
and ``ConstantRemoteModel`` does not support ``ModelBoundingBoxOptions``.

The same logic applies to ``View.getBoundingBox()`` which also accepts an optional ``ModelBoundingBoxOptions`` 
parameter. Consequently, ``View.getBoundingBoxVisibleParts()`` has been removed.

**Breaking changes**

-   ``View.getBoundingBox()`` now returns the bounding box of visible parts/objects by default. If you want to get the 
    "full" bounding box that includes hidden items, you can achieve this by setting the optional 
    ``ModelBoundingBoxOptions.includeHiddenParts`` flag to true. Note that this is not fully supported by all models.
-   Removed the ``View.getBoundingBoxVisibleParts()`` method. Getting the bounding box for the visible parts is now the 
    default behavior of ``View.getBoundingBox()``


+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|**API removed/renamed/changes features**                                                                                                         |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|             |Class/function                                |Replacement                                                                         |
+=============+==============================================+====================================================================================+
|CAE-1260 |br||``cee.ug.RemoteModel.appendModel()``          |If multiple models are desired, create and open another ``RemoteModel``             |
||web|        |                                              |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-934 |br| |``cee::vis::Overlay`` |br|                    |Use ``cee::vis::disableModelItems(bool)`` instead                                   |
||desktop|    |``::setDisableModelItems(bool)``              |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-934 |br| |``cee::vis::Overlay`` |br|                    |Use ``cee::vis::Overlay::isModelItemsDisabled()`` instead                           |
||desktop|    |``::disableModelItems()``                     |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-924 |br| |``cee::ug::PartSettings`` |br|                |Use ``cee::ug::PartSettings::isElementSetFilteringDisabled()`` instead. |br|        |
||desktop|    |``::elementSetFilteringEnabled()``            ||br|                                                                                |
|             |                                              |                                                                                    |
|             |                                              |**NOTE!** The logic is now inverted!                                                |
|             |                                              |                                                                                    |
|             |                                              |.. code-block::                                                                     |
|             |                                              |                                                                                    |
|             |                                              |   bool isDisabled = !ps->elementSetFilteringEnabled();    \\ OLD                   |
|             |                                              |   bool isDisabled = ps->isElementSetFilteringDisabled();  \\ NEW                   |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-924 |br| |``cee::ug::PartSettings`` |br|                |Use ``cee::ug::PartSettings::disableElementSetFiltering()`` instead.  |br|          |
||desktop|    |``::setElementSetFilteringEnabled(bool)``     ||br|                                                                                |
|             |                                              |                                                                                    |
|             |                                              |**NOTE!** The logic is now inverted!                                                |
|             |                                              |                                                                                    |
|             |                                              |.. code-block::                                                                     |
|             |                                              |                                                                                    |
|             |                                              |   bool disable = true;                                                             |
|             |                                              |   ps->setElementSetFilteringEnabled(!disable);  \\ OLD                             |
|             |                                              |   ps->disableElementSetFiltering(disable);      \\ NEW                             |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1274 |br||``cee::vis::Font::createTrueTypeFont()``      |Helper function is removed. Use the ``cee::vis::TrueTypeFont`` class                |
||desktop|    |                                              |instead.                                                                            |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-891 |br| |``cee.geo.PartSettings.EyeLift`` |br|         |Use the base ``cee.EyeLift`` enum instead.                                          |
||web|        |``cee.ug.PartSettings.EyeLift``  |br|         |                                                                                    |
|             |``cee.mrk.EyeLift``                           |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1273 |br||``cee::ug::DataSourceDirectory``   |br|       |Instead, use ``cee::ug::DataSourceDirectory::setResultInfo()`` with the correct     |
||desktop|    |``::setScalarResultInfo()``        |br|       |result type enum. (``cee::ug::SCALAR``, ``cee::ug::VECTOR``,                        |
|             |``::setVectorResultInfo()``        |br|       |``cee::ug::DISPLACEMENT`` or ``cee::ug::SYMMETRIC_TENSOR``.)                        |
|             |``::setDisplacementResultInfo()``  |br|       |                                                                                    |
|             |``::setSymmetricTensorResultInfo()``          |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1273 |br||``cee::ug::DataSourceDirectory``   |br|       |Instead, use ``cee::ug::DataSourceDirectory::removeAllResultInfos()`` with the      |
||desktop|    |``::removeAllScalarResultInfos()``   |br|     |correct result type enum. (``cee::ug::SCALAR``, ``cee::ug::VECTOR``,                |
|             |``::removeAllVectorResultInfos()``   |br|     |``cee::ug::DISPLACEMENT`` or ``cee::ug::SYMMETRIC_TENSOR``.)                        |
|             |``::removeAllDisplacementResultInfos()`` |br| |                                                                                    |
|             |``::removeAllSymmetricTensorResultInfos()``   |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1260 |br||``cee.mrk.LabelAppearance.anchorPointColor``  |Use ``mrk.LabelAttachmentAppearance.anchorPointColor`` instead.                     |
||web|        |                                              |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1260 |br||``cee.mrk.LabelAppearance.anchorPointSize``   |Use ``mrk.LabelAttachmentAppearance.anchorPointSize`` instead.                      |
||web|        |                                              |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1260 |br||``cee.mrk.PartImageLabel`` |br|               |Use ``mrk.LabelAttachmentAppearance.lineLength`` instead.                           |
||web|        |``.attachmentLineLength``                     |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1260 |br||``cee.mrk.PartImageLabel`` |br|               |Use ``mrk.LabelAttachmentAppearance.anchorPointSize`` instead.                      |
||web|        |``.attachmentPointVisible``                   |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1260 |br||``cee.mrk.PartLabels.attachmentLineLength``   |Use ``mrk.LabelAttachmentAppearance.lineLength`` instead.                           |
||web|        |                                              |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1260 |br||``cee.ug.QueryNodeInfo.executeQuery``         |Use ``ug.QueryNodeInfo.executeQueryByIds`` instead.                                 |
||web|        |                                              |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1260 |br||``cee.ug.VectorSettings.vectorType``          |Instead, use methods ``setVectorTypeArrow``, ``setVectorTypeSymmetricArrow``,       |
||web|        |                                              |``setVectorTypeDynamicSymmetricArrow`` or ``setVectorTypeReverseSymmetricArrow``.   |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1260 |br||``cee.Viewer.rayFromMouseCoordinate``         |Use ``cee.Viewer.rayFromCssCoordinate`` instead, using                              | 
||web|        |                                              |``MouseEvent.offsetX/offsetY``.                                                     |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1260 |br||``cee.View.backgroundColor``                  |Use ``cee.View.background.setSingleColor`` or ``cee.View.background.topColor``      |
||web|        |                                              |instead.                                                                            |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1300 |br||``cee::ug::DataSource``                       |Use ``cee::ug::DataSource::defaultDisplacementResultId()`` instead.                 |
||desktop|    |``::defaultDispacementResultId()``            |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1258 |br||``cee::rep::Snapshot`` |br|                   |Refactored ``cee::rep::Snapshot`` and ``cee::rep::FieldValuesGenerator``            |
||desktop|    |``::fieldValues()`` |br|                      |(into ``FieldValueSet``). |br|                                                      |
|             |``::setFieldValues()``                        ||br|                                                                                |
|             |                                              |                                                                                    |
|             |                                              |-   In ``cee::rep::Snapshot``, replaced member functions ``fieldValues()`` and      |
|             |                                              |    ``setFieldValues()`` with ``fieldValueSet()`` and ``setFieldValueSet()``.       |
|             |                                              |-   The new ``cee::rep::FieldValueSet`` class replaces the existing static helper   |
|             |                                              |    class ``cee::rep::FieldValuesGenerator``. Instances of ``FieldValueSet`` can    |
|             |                                              |    be constructed and initialized from a ``cee::ug::UnstructGridModel`` model, and |
|             |                                              |    the resulting instance can be passed directly to a ``Snapshot`` instance using  |
|             |                                              |    the ``setFieldValueSet()`` member function.                                     |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1258 |br||``cee::ImageResources::allImageResources()``  |Use ``cee::ImageResources::allResourceNames()`` and                                 |
||desktop|    |                                              |``cee::ImageResources::imageResource()`` instead.                                   |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1258 |br||``cee::ug::Situation`` |br|                   |Use new ``cee::ug::Situation::allUserDataKeys()`` in conjunction with               |
||desktop|    |``::setAllUserData()`` |br|                   |``cee::ug::Situation::userData()`` instead.                                         |
|             |``::allUserData()``                           |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1258 |br||``cee::ug::Situation`` |br|                   |Use new non-array versions ``cee::ug::Situation::elementSet()`` and                 |
||desktop|    |``::elementSets()``  |br|                     |``cee::ug::Situation::elementSetInfo()`` instead.                                   |
|             |``::elementSetInfos()``                       |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1258 |br||``cee::ug::Situation`` |br|                   |In ``cee::ug::Situation``, refactored ``addElementSet()`` to take both an element   |
||desktop|    |``::addElementSet()``  |br|                   |set and element set info. Removed the ``addElementSetInfo()`` member function.      |
|             |``::addElementSetInfo()``                     |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1258 |br||``cee::geo::GeometryModel`` |br|              |Refactored ``cee::geo::GeometryModel::regionIntersect()`` and                       |
||desktop|    |``::regionIntersect()`` |br|                  |``cee::geo::GeometryModel::polygonIntersect()`` to use new                          |
|             |``::polygonIntersect()``                      |``cee::geo::PartCollection`` class for returning results.                           |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1298 |br||``cee.ug.RemoteModelTrianglePicker`` |br|     |Remove unnecessary and confusing "RemoteModel" prefix to some of the worker/utility |
||web|        |``cee.ug.RemoteModelPickHelper`` |br|         |classes in UG/RemoteModel. |br|                                                     |
|             |``cee.ug.RemoteModelHighlightHelper``         ||br|                                                                                |
|             |                                              |                                                                                    |
|             |                                              |-  Renamed utility class ``ug.RemoteModelTrianglePicker`` to ``ug.TrianglePicker``  |
|             |                                              |-  Renamed utility class ``ug.RemoteModelPickHelper`` to ``ug.PickHelper``          |
|             |                                              |-  Renamed utility class ``ug.RemoteModelHighlightHelper`` to ``ug.HighlightHelper``|
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+
|CAE-1314 |br||``cee::ug::UnstructGrid::DataSourceCae`` |br| |Renamed to ``DataSourceCae::accessVersion()``                                       |
||desktop|    |``::vdmVersion()``                            |                                                                                    |
+-------------+----------------------------------------------+------------------------------------------------------------------------------------+


