# Envision 1.3

April 5, 2023 - SHA: 5849c2e4

Envision for Web Envision for Desktop

## New Features

### CAE-795 Project vectors on model surfaces, like it is done for cutting planes

`PER_NODE` and `PER_ELEMENT_NODE` vector results can now be projected onto the model surface. This is done by using the surface normal in the node and projecting the vector in the plane that is defined with the node and the normal. This works in a similar way as `cee.ug.CuttingPlane.projectVectorsOnPlane`.

Added `cee.ug.VectorSettings.projectOnSurface` and `cee::ug::VectorSettings::setProjectOnSurface()`.

### CAE-1002 Welding node support for VTK files to allow proper multi-part datasets

Added support for node welding in the VTK readers (Vtu, pvtu, pvd). When opening a .pvd file with multiple partitions, the partitions will be combined to one part and the nodes on the interfaces between the parts will be welded. This makes the visualization work as expected (feature lines, transparency, normals, etc).

This feature also works for .pvd files with multiple time steps.

Envision Desktop: Added `readerSettings().vtk().setWeldNodesForJointParts(true)`

Envision Web:

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

### CAE-1097 CaeImport: Add reader for COMSOL section-wise files

Added support for COMSOL section-wise CAE files. Default extension is .txt.

### CAE-1098 CaeImport: Add reader for STAR-CCM result files

Added support for STAR-CCM to ImportCAE.

Note: STAR-CCM is only available on Envision Desktop on Windows and you must provide the required DLLs and make them accessible to the application. The two DLLs required are `ccmio.dll` and `adf.dll`. Please contact Siemens to reach an agreement to redistribute the files.

### CAE-1102 Update C# examples in dist with newer .NET

The C# project files for the example apps got some love and have been upgraded to a bit more modern version of .NET.

### CAE-1103 New examples for the Data Provider Framework

We have added 3 new examples to the Data Provider Framework to showcase how it can be utilized and highlight the flexibility of the framework:

- DynamicDataPlugin: A data provider with changing data using the pollForChanges(). Supports adding and removing states, results and geometry and also starting from an empty model.
- SharedServicePlugin A Plugin that supports getting data from a service that is shared between all instances of the plugin. Can open models with different configurations, then do one call to modify/morph all models. Shows how you can inject a singleton using the plugin factory.
- MockupPlugin: Providing a `MPParametricProvider` that has a model generator and can produce meshes of any size to e.g. test performance.

### CAE-1104 Allow customization for OffscreenCanvasLabelDrawer.drawOntoCanvas method

Added support for injecting a custom label drawer which gives total flexibility on how to render the labels in the markup model. Added `PartLabels.setCustomDrawOntoCanvasCallback()`. Use this callback to override how labels are drawn. This gives you total freedom to draw any type of label. In the callback you need to resize the canvas to a size that suits your needs, and draw any text or other content onto the canvas. The label text is passed as input, but this text can be a custom markup language to control the layout of the label.

See the documentation of `CustomDrawOntoCanvasCallback` for more info and an example on how to use this.

### CAE-1105 Add more triangle and edge data to QueryFeatureExtractionSurface

Enriched the data returned from the `cee.ug.QueryFeatureExtractionSurface`.

Added the following to `queryFeatureExtractionSurface`:

Per triangle (`triangleDataArr`) and per edge (`edgeDataArr`):

- `sourceElementIndex`
- `scalarResult`
- `vectorResult`
- `perVertexScalarResults`
- `perVertexVectorResults`

Also added `elementMeshVertices`

The following are removed:

- `faceTriangleVerticesScalarResults`: Use `triangleDataArr[x].perVertexScalarResults`
- `edgeLineVerticesScalarResults`: Use `edgeDataArr[x].perVertexScalarResults`

### CAE-1108 Support initial empty model and adding/modifying geometries in Data Providers

Data providers now supports starting out (or ending up with) an empty model.

- Added support for providing models with no geometry (only one state)
- Added `CDPChangeNotifications::notifyTriggerNewGetMetaData()` to notify the host that the meta data (e.g. for a geometry) have changed and a `new getMetaData()` is required.
- Extending `DynamicDataPlugin` to demonstrate starting without a geometry.
- Fixed various issues relating to updating/modifying/deleting geometries, results and states when using `pollForChanges` or `handleClientRequest`.

### CAE-1110 QueryMinMax - get min/max items for a given frame only

Added `QueryResultMinMax.computeMinMaxItemsFromFrameIndex` to specify to only get minimum/maximum items from a given frame (and not all loaded states). Default is -1, which is the old behavior of returning min/max items from all currently referenced states.

### CAE-1112 Add support for Symmetric Tensor Results in OpenFOAM Data provider

The OpenFOAM data provider now support symmetric tensor results.

### CAE-1115 Add CUG Server documentation

Added information on how to use the server for the `ConstantRemoteModel` to the documentation.

### CAE-1116 Add a root folder with zip file name as the root of the Envision Web archive

The Envision Web .zip file now has a root folder with the same name as the archive, making it easier to extract and keeping it consistent with the rest of the Tech Soft 3D toolkits.

## Fixed Bugs

### CAE-992 Cannot read DataResultVisibility manually from the data source

The `cee::ug::DataResultVisibility` is not updated after loading visibility results. Also added `DataStateSpec::setLoadVisibilityResult()` so visibility results now can be loaded with `DataSourceInterface::loadState()`.

### CAE-1058 Envision Web UgServer C++ redist needs updating

Removed the C++ redist in the `server/UgServer/bin/win` folder in the distribution and updated the documentation with the link to the latest C++ redist and info on when to use it.

### CAE-1062 Removed cutting plane can still be interacted with

The problem occurs when users hang on to the settings objects that are retrieved from `RemoteModel` even after the underlying entities have been deleted. Since the settings objects have parent references to the `RemoteModel` internals, these objects keep influencing the `RemoteModel` state even after they have been deleted. The customer observes just strange behavior, but this obviously has the potential to cause crashes as well.

The fix involves internal unwiring of the user facing settings objects in `RemoteModel` when the underlying entities are deleted.

An added benefit of this fix will probably be that the job of garbage collector will be a little bit easier.

### CAE-1101 Data providers: Using notifyResultAdded() might in some cases crash the server/host app

Fixed an issue where in some cases using the `ChangeNotifications::notifyResultAdded()` method might crash the server.

### CAE-1107 Assert when having a model with a single point

The web client caused a client side assert if the model only contained a single point and thus the extend of the bounding box was zero.

### CAE-1111 Setting displacement scale factor to 0 or very small number breaks deformation

Improved handling of scaling of small displacements in Envision Web. Will now use the corresponding vector result if found to do proper scaling when the displacements are very small or when using a very small scale factor.

Adding check for setting zero displacement scale factor. `cee.ug.DisplacementSettings.scaleFactor = 0` will now throw on the client, as this is illegal.

### CAE-1118 CugComposer: Export of query information for models with expanded beams did not work as expected

Fixed an issue where the export from `CugComposer` did not have the valid query information for parts with expanded beams (e.g. responding to picking).

## Patches

### Envision 1.3.1

April 19, 2023 - SHA: 565812a6

#### CAE-1129 CugComposer: Crash when exporting models with animations and expanded beams

Extracted features, such as cutting planes, were no longer highlighting correctly when enabling the highlight behavior.

#### CAE-1130 Missing Data Provider Framework examples in Envision Desktop distribution

The new Data provider examples are now properly included in the Envision Desktop (Windows and Linux) distributions.

#### Envision 1.3.2

April 27, 2023 - SHA: 3977c504

#### CAE-1133 CugComposer requires a desktop license to produce snapshot images

The OSMesa component (used by CugComposer and Envision for Python to produce snapshot images) did require a Envision Desktop license. This has been changed so now any Envision license will work, both Web and Desktop.

#### CAE-1148 Handling of undefined vector results as regular grid vectors on cutting planes was in some corner cases wrong

In some very infrequent corner cases parts with undefined vector vector results might in some positions show vectors where they are not defined.

#### CAE-1149 Creating a result calculator would cause an exception due to changes in CAE-1108

Initializing result calculators with the `RemoteModel.createResultCalculator()` method would case an exception when updating the `RemoteModel`.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Web in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Web?
What are the latest release notes for HOOPS Envision for Web?
How do I start evaluating HOOPS Envision for Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...