Announcing the Release of SMTK 21.04

Big changes to SMTK’s Release Process

It’s been over a year since SMTK 3.3 was released. Since then many new features and improvements have been made to the toolkit. Last month, it was decided that SMTK will be transitioning to a monthly release schedule. In addition, SMTK will be adopting a new version numbering system (year.month.patch).  Last month we released SMTK 21.04. This blog highlights some of the new features and improvements included in this release. For a complete list of changes made in SMTK 21.04, please visit the release notes.

Stability Improvements

SMTK has long supported multithreaded operations that provide the ability to lock SMTK resources for reading/writing; however, the Resource Manager, whose job it is to manage resources loaded into the system, was not. This is addressed in 21.04, by making the Resource Manager thread-safe.

SMTK’s Observer system previously required code that used Observers to delete them when they were no longer needed. Failing to do so would result in unexpected behavior and/or crashing. In 21.04, Observers are automatically freed when no longer needed, resulting in less code and more stable behavior.

Information Modeling Enhancements

There have been many improvements made to SMTK’s Attribute Resource which is responsible for representing simulation information not represented by SMTK’s Mesh or Model Resources.  

Category Modeling

One of the main features in SMTK’s Attribute Resource is the ability to categorize information and provide the means of filtering based on categories. In this release, workflow designers can now assign categories to a discrete item’s enumerations that can add or remove choices based on the set of active categories defined by the type of analysis the user wished to define.

In 21.04 the workflow designer can now specify excluded sets of categories for attributes and attribute item definitions, providing even greater flexibility, including the ability to indicate that an item is relevant independent of any active categories.

Active categories are now managed by Attribute Resources instead of by SMTK’s GUI classes.  As a result of this change, active categories are now persistent and can be directly used in evaluating information validity.

Expression Support Enhancements

Prior to 21.04, an attribute item, that represented integers, doubles, or strings, could assign either a constant or an expression to each of the item’s values. Expressions were not evaluated and were left to the consumer to be processed. In this release, an expression can now be assigned to the entire item making it easier to represent vector and tensor-based expressions.  In addition, the ability to evaluate item values based on expressions is now supported.

Improved Customization Support

In 21.04, developers can now define their own types of Attribute Items and Definitions to better represent their information modeling needs. In addition, the ability to define custom rules for associating attributes to other SMTK Resources and Resource Components has been added.

Active Children for Reference Items

Previous to this release, Attribute Items, that represented discrete enumerated choices for integers, double, and strings, could request additional information based on which choice was made. This ability to have “active” children items has now been implemented for Reference Items. As a result, the item can request additional information based on the Resource or Resource Component being chosen for the Item’s value.

Improved Template Functionality

To facilitate the writing of Attribute Template Files, three new capabilities have been added. The first is the concept of Analysis Configurations which provides the ability to define a set of Analysis Configurations without first having to create one in code (or through the ModelBuilder application) and save it to disk in order to see how the corresponding Analysis Attribute is structured.

The second is the concept of Attribute Item Definition Blocks, which allow the reuse of Attribute Item Definitions. This eliminates copying of Item Definitions by hand, resulting in smaller template files that are easier to manage and change.

The last major improvement has been the introduction of Attribute Item View Styles. An Attribute Item View Style specifies the GUI to be used when displaying an Attribute Item. These View Styles can be defined globally and then overridden when necessary through a SMTK View.

User Interface Enhancements

In addition to the previously mentioned Attribute Item View Styles, there have been two major enhancements to SMTK’s GUI support. The first has been the introductions of Badges when displaying Resources and their Components using SMTK’s DescriptivePhase classes. A Badge is an icon that may be displayed next to a phrase and can have an action associated with it. For example, visibility, color, and object type are now controlled using the new Badge mechanism.

Figure 1 –  Badges are drawn to the left of descriptive phrase titles.

The second improvement is indicating to the user when missing or incorrect information is entered in the system. Previously the only way to see if there was an issue was to examine all of the tabs in the attribute panel and look for individual items showing the invalid color. This was not only tedious but also failed to indicate to the user any problem with the association information of an Attribute. In 21.04, error icons were added to tabs containing errors. In addition, an error icon has been added to indicate a problem with an Attribute’s association.

Figure 2 – Example of SMTK’s error indication mechanism.

New Resource Types

Graph Resource

This release of SMTK includes a flexible new approach to modeling; rather than a fixed set of model components which assume a CAD-style boundary representation, the smtk::graph::Resource allows an extensible set of components (nodes) connected by relationships (arcs) that are constrained by the types of nodes at their endpoints. This allows resources to include high-level concepts in addition to CAD models or completely separate model entities that suit a particular application.

Preliminary OpenCASCADE Support

We have used the new graph resource described above to provide the ability to display OpenCASCADE geometry as well as STEP files.  We plan on extending this support by exposing some of OpenCASCADE’s modeling operations.

Figure 3 – Example of a STEP model loading into CMB ModelBuilder using the new OpenCascade Support

Questions or comments are always welcome!