:tocdepth: 2

############
Envision 1.2
############

January 27, 2023 - SHA: 18704d8b

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


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

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

CAE-782 Camera changed callback |web|
=====================================

Added ``cee.Camera.setViewChangeHandler()`` that sets a handler to be invoked each time the camera view changes.


CAE-802 Enable/disable mirroring per part |web| |desktop|
=========================================================

Added an option in ``UnstructGrid`` ``PartSettings`` to control if a part should be mirrored or not. 

Added ``cee::ug::PartSettingsDisableMirroring()`` method (desktop) and ``cee.ug.PartSettings.disableMirroring`` 
property (Web).


CAE-810 Specify a background color for color legends |desktop|
==============================================================

Desktop: Added support for a background for color legends. This helps making text more readable in some situations. 
The background color and opacity, as well as border color can be specified.

Added ``setDrawLegendBackground()``, ``setLegendBackgroundColor()``,  ``setLegendBackgroundOpacity()`` and 
``setLegendBackgroundBorderColor()`` to ``cee::ug::ScalarSettings``

.. image:: ../images/release-notes/cae810.png


CAE-882 Vectors fields visualization: optionally display a vector a a point when length is 0 |desktop|
======================================================================================================

Desktop: Added an option to draw vectors with zero length (null vectors) as a point or a sphere.


CAE-918 Add visible property to cug.ParticleTraceGroup |web|
============================================================

The visibility of particle trace groups can now be controlled in the ``ConstantRemoteModel``. 

Added ``cee.cug.ParticleTraceGroup.visible`` property.


CAE-919 Add method for getting BoundingBox for single part in ConstantRemoteModel |web|
=======================================================================================

You can now get the bounding box of a part in the ``ConstantRemoteModel``. 

Added ``cee.cug.ConstantRemoteModel.getBoundingBoxForPart()``


CAE-926 Add support for computing fit view eye position from a bounding box |web|
=================================================================================

Added a new method to ``Camera`` to compute the fitView eye position based on a given bounding box.

Added ``cee.Camera.computeFitViewEyePosition()``


CAE-931 Web: Query to get feature extraction data |web|
=======================================================

Added a new query to get the display model of a feature extraction item (cutting plane, isosurface or isovolume). 
Triangle and lines with the corresponding per vertex scalar result is provided as a result of the query. This is useful 
for client-side post processing of the feature extraction, as well as to visualize it in various ways.

Added ``cee.ug.QueryFeatureExtraction``


CAE-949 Improve "Assertion failed" reporting mechanism |web|
============================================================

Added support for specifying an assertion failed handler that is invoked if a code assert fails on the client.

Added ``cee.setAssertFailedHandler()``.


CAE-953 Add support for custom view layouts |web|
=================================================

Added support for specifying a custom layout of views within a viewer. This enables using many views in one viewer, and 
thus working around the limit of only 16 WebGL canvases on one page. 

Added ``cee.View.setViewport()``

Here is an example with 28 views with different models on one page (within one viewer):

.. image:: ../images/release-notes/cae953-1.png

.. image:: ../images/release-notes/cae953-2.png


CAE-971 VTK: Reader option to provide all vector results as displacements |web| |desktop|
=========================================================================================

Added an option for the VTK (vtu/pvtu) reader to treat all results as displacements, and thus making them available as 
displacements, vectors and individual scalar results.

|desktop| Added ``cee::imp::cae::ReaderSettingsVtk& ReaderSettings::vtk()`` with ``setReadVectorsAsDisplacements()``.

|web| Added VTK setting ``ALL_VECTORS_AS_DISPLACEMENT`` to be used in the ``cee.ug.RemoteModel.setReaderOptions()`` method.

Example:

.. code-block:: ts

    this.m_model.setReaderOptions("VTK", { 
        "ALL_VECTORS_AS_DISPLACEMENT": true, 
    }); 


CAE-988 Add support for supplying license code as environment variable to CugComposer |web|
===========================================================================================

Added use of the environment variable ``CEW_TECH_SOFT_LICENSE_CODE`` in the CugComposer and the UgServer. There are now 
4 ways to provide a license to the CugComposer:

1.   ``- license`` command line option
2.   ``CEW_TECH_SOFT_LICENSE_CODE`` environment variable
3.   ``-licenseFile`` command line option
4.   ``CEW_TECH_SOFT_LICENSE_FILE`` environment variable


CAE-1008 Added option to disable spatial partitioning when optimizing parts in UnstructGridModel |desktop|
==========================================================================================================

Added an option to specify only to merge equal parts based on appearance and not do spatial partitioning into equal 
sized chunks. 

Added new parameter to ``cee.ug.ModelSettings.setOptimizePartRendering(bool optimize, bool spatiallyPartitionParts = false)``

Default is now to only merge parts with equal appearance. 


CAE-1035 Added support for CrinkleCut cutting planes of 2d elements |web| |desktop|
===================================================================================

Crinkle-cut cutting planes now also work as expected for 2d elements, showing the entire 2d element if intersected by 
the cutting plane.

.. image:: ../images/release-notes/cae1035.png


CAE-1046 CugServer: Support absolute paths for CONFIGURE_EXPRESS_APP_JS_FILE |web|
==================================================================================

The app config file for the CugServer can now be specified with an absolute path.


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

***********
Fixed Bugs
***********

CAE-920 UgModule is missing some exports |web|
==============================================

``DisplacementSettingsProperties``, ``ScalarSettingsProperties``, ``VectorSettingsProperties`` were missing from the 
``UgModule`` TypeScript d.ts file.


CAE-921 UgServer is sometimes confused about the current state id after applying a VTFx case |web|
==================================================================================================

When applying cases from VTFx files, in some cases the current state was not properly synced between client and server, 
needing an extra update to get in sync. 


CAE-925 PVD/VTM/VTU: Displacement vector fields are not interpreted as displacements result unless their name starts with "displacement" |web| |desktop|
========================================================================================================================================================

The VTK reader now will use any result with the word “displacement” as part of the result name as a displacement result.
See CAE-971 for an option to treat all vector results in VTK files as displacements.


CAE-947 UgServer: Memory is not freed by the c++ heap manager on Linux |web|
============================================================================

Added option to trim heap memory usage on Linux/gcc using ``malloc_trim()``. The feature can be enabled by setting the 
environment variable ``CEW_UG_ENABLE_MEMORY_TRIM``

This functionality was added after getting reports of growing memory usage (and eventually crash) when running Linux 
version of ugServer in a Docker container. When enabled, the feature performs regular calls to ``malloc_trim()`` to 
manually do "garbage collection" on the c/c++ heap manager. Note that doing this could probably has a negative impact 
on performance.


CAE-962 Updating a cug model + removing another causes assert error |web|
=========================================================================

Fix assert error that occurs on update a CUG model then remove another.


CAE-964 Assert error on update cug part then call getBoundingBoxForPart() |web|
===============================================================================

Fix assert error that occurs on update CUG model then call ``getBoundingBoxForPart()``


CAE-984 CugComposer crashes on VTFx files with IndexedFaceSets |web|
====================================================================

The CugComposer did not handle (legacy) VTFx files with Indexed Face Sets


CAE-1019 Reference counting did not work properly from Python |desktop|
=======================================================================

Reference counting is now handled properly in the Python bindings for Envision for Python in the same way as for C#.


CAE-1039 ExportVTFx uses wrong vendor code, can't open in Viewer |desktop|
==========================================================================

The VTFx files exported from Envision for Desktop is now properly signed and can be viewed in the CEETRON 3D Viewer.


CAE-1049 CugComposer cannot pass unicode characters in arguments paths |web|
============================================================================

The CugComposer now handles unicode filenames, both for input VTFx files and output folder/files.


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

*******
Patches
*******

Envision 1.2.1
==============

February 16, 2023 - SHA: d026d7a8


CAE-1065 Can get null reference on mouse wheel while RemoteModel is loading |web|
---------------------------------------------------------------------------------

Using the mouse wheel early when the model is loading and having ``mouseWheelZoomAndWalkBehavior`` set to other than 
``TO_CENTER`` might cause a throw and thus error logs in the console.


CAE-1067 ImportCAE OpenFOAM reader crashes on models with polyhedron elements |web| |desktop|
---------------------------------------------------------------------------------------------

The built-in OpenFOAM reader in ImportCAE might cause a crash when opening models with polyhedron elements. This fixes 
a regression introduced in Envision 1.1


CAE-1071 VTFx component: Exported file can't be opened in the viewer (wrong vendor id)  |desktop|
-------------------------------------------------------------------------------------------------

Files exported with the VTFx components (standalone export) was not signed properly and thus not able to open in the 
free desktop 3D viewer.


CAE-1072 Simple null vectors would sometimes not be positioned correctly on some hardware platforms  |desktop|
--------------------------------------------------------------------------------------------------------------

In some rare cases on some hardware platforms the null vectors could be drawn in the wrong position.


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


Envision 1.2.2
==============

March 20, 2023 - SHA: 147c9502


New version of Ceetron Access |web| |desktop|
---------------------------------------------

Updated Ceetron Access (file readers) to patch version 1.0.7

