Envision 3.0

November 14, 2024 - SHA: 35e51d55

CEETRON Envision 3.0 is a major release which means it contains breaking changes. The main focus this release has been to upgrade our toolkit to use TypeScript’s strict mode, which enforces more rigorous type-checking and ensures higher code reliability and safety.

Note

Breaking changes in this release only affects Envision Web. There are no breaking changes for Envision Desktop.

See Breaking Changes at the bottom for a full description of changes.


web CEETRON Envision for Web desktop CEETRON Envision for Desktop

Fixed Bugs

CAE-1415 VTU/VTM: Added support for “frequency” web desktop

Added support for PVD files containing the “frequency” attribute also. Earlier, only “timestep” was handled.

CAE-1425 QueryElementInfo: validate user’s index against the valid index range web

Fixed a crash with cee.ug.QueryElementInfo when using index identification

elementIdentType = RemoteQueryInputIdentType.INDEX

and querying an invalid element index.

CAE-1432 Fixed crash when opening file using the OpenFoam Data Provider web desktop

Fixed issue with crash due to non-threadsafe code in OpenFoam data provider plugin.

CAE-1415 VTU: Improved file identification web desktop

Expand file identification to validate VTU files with attributes in both single(’) and double(”) quotes.

New Features

CAE-1396 Viridis Color Scheme web desktop

This feature adds the popular Viridis color scheme to the list of available built-in color schemes within Envision.

../_images/cae1396.png

CAE-1416 Support interpolated node results for QueryNodeInfo web

cee.ug.QueryNodeInfo now retrieves the node averaged scalar results when these are available, unifying the logic with the node result from picking.

Added a new property scalarResultIsInterpolated to cee.ug.QueryNodeInfoData.

CAE-871 Relative displacement scaling web desktop

Added an option to scale displacement results with a factor relative to the size of the model. A relative scaling factor of 1 means that the length of the largest currently loaded displacement will be equal to the maximum bounding box extent of the model.

In Envision Desktop:

void        DisplacementSettings::setScaleFactor(double scaleFactor, ScaleMode mode):
ScaleMode   DisplacementSettings::scaleMode() const;

where mode is ABSOLUTE_SCALING or RELATIVE_SCALING.

In Envision Web (an accessor):

get scaleMode(): DisplacementScaleMode
set scaleMode(scaleMode: DisplacementScaleMode)

where mode is DisplacementScaleMode.ABSOLUTE_SCALING or DisplacementScaleMode.RELATIVE_SCALING.


Breaking Changes

CAE-1370 Operators are the new default for handling user input web

We are deprecating the older user input handling and fully embracing Operators for all user interaction with the viewer. We are still keeping backwards compatibility for the time being, but in practice, the use of Operators is now opt-out, that means they are turned on by default. In case you are not ready to make the transition yet, you can disable the use of operators. We strongly recommend the use of Operators as it is the cleaner, more sustainable and modular approach to user-input handling in the viewer. Read more about Operator integration here: https://docs.techsoft3d.com/ceetron/latest/envision-web/operators.html.

CAE-1397 Strict mode in TypeScript web

With this release, our toolkit has been upgraded to use TypeScript’s strict mode, which enforces more rigorous type-checking and ensures higher code reliability and safety. In turn, this will help with catching potential bugs early in development and prevent many common errors, like using variables before they are defined or failing to handle null and undefined cases. Adopting strict mode was for us essential to improve code robustness, encourage best practices, and provide you with a more reliable and efficient toolkit in the long run.

We have clarified many scenarios where nullish values occur and unified the use of null and undefined across the board. As a general rule of thumb, we have adopted the usage of null for objects and undefined for value types.

What does that mean for you? If your application is not using strict mode, you can safely ignore the “Typing changes clarifying current behavior” section, as those changes are adding nullish types purely for clarifying how the method/member worked before. On the other hand if you were using strict mode already, you might see some errors pop up with regards to null and undefined types. We have clarified the documentation in the effort to explain the reason why those falsy values occur in that place.

In all cases, be sure to check out the “Possibly breaking behavioral changes” sections to see the changes that do not necessarily have to show up in the output of the TypeScript transpiler.

Global (cee)

Possibly breaking behavioral changes

Typing changes clarifying current behavior:


Remote Model (cee.ug)

Possibly breaking behavioral changes

Server callback changes

We have clarified the typing when it comes to server callbacks. In practice, all the error arguments in the callback functions now add null to their types. Additionally, the type of the main data argument in callbacks is never defined as possibly falsy, but in case there is an error, the user of the function is responsible for handling it and not accessing the data. In such case, the data argument will be falsy, even though the type contract is not specifying falsy values. This is not a change in the current behavior and requires, besides updating the error typings, no further changes.

Example:

const query = new ug.ElementInfoQuery();
query.executeQuery(/* arguments */, (error: Error | null, data: QueryElementInfoData[]) => {
    if (error) {
        console.error(error);
        return;
    }
    // If there is an error and we would decide not to return after the error, data will be null here,
    // even though it is not typed as such.
    console.log(data);
});

List of callbacks where we added null to the type of the error argument:

Typing changes clarifying current behavior:


Constant Remote Model (cee.cug)

Possibly breaking behavioral changes:

Typing changes clarifying current behavior:


Unstruct Surface Grid (cee.usg)

Possibly breaking behavioral changes:

  • HitItem
    • now an interface

  • PartScalars
    • getValueRange now has the range min: Number.MAX_VALUE and max: -Number.MAX_VALUE when no meaningful values can be determined from the supplied value array.

  • PartVectors
    • getVectorLengthRange now has the range min: Number.MAX_VALUE and max: -Number.MAX_VALUE when no meaningful values can be determined from the supplied vectors array.

Typing changes clarifying current behavior:


Geometry (cee.geo)

Typing changes clarifying current behavior:


Markup Model (cee.mrk)

Possibly breaking behavioral changes:

Typing changes clarifying current behavior:


Utilities (cee.utils)

Possibly breaking behavioral changes:

Typing changes clarifying current behavior:


Patches

Envision 3.0.1

November 25, 2024 - SHA: f648df27

CAE-1438 Fix ViewerPickHandler errors in example apps web

Examples which are based on a front end framework were not working, due to the version 3.0 operator changes. This patch fixes the ViewerPickHandler imports and related errors everywhere.