Coreform Cubit 2025.3 User Documentation

Training CAD Operations with Machine Learning

Regression Models
Predicting CAD Operation Outcomes
Assigning new CAD Operation Training Data
Training CAD Operations
Listing Regression Models
Resetting Regression Models
User Training Data

 

Syntax:

 predict copy_surface {volume <ids> surface <ids>} [features [importance]]

 predict midsurface {volume <ids> surface <ids>} [features [importance]]

 learn copy_surface {volume <ids> surface <ids>} label <value> [export_acis]

 learn midsurface {volume <ids> surface <ids>} label <ids> [export_acis]

 learn train [<string>]

 learn reset ["<string>"]

 learn user path ["<string>"]

Regression Models

Some of the ML models used in Cubit are used for recommending CAD operations that can be used to resolve a particular geometry or topology issue, known as regression models. They differ from classification ML models described, in that they predict a specific numerical outcome for a given operation. Coreform Cubit currently supports two types of regression models based on the expected output or ground truth label: Mesh Quality and Suitability.

Mesh Quality

These models predict a mesh quality outcome, including scaled Jacobian, scaled In-radius and scaled deviation. The intent of the mesh quality models is to recommend a solution from a range of different CAD operations based on the predicted best mesh quality outcome. Each of the mesh quality regression models have a corresponding Cubit command that they are used for. The currently supported mesh quality ML models include the following:
  1. vertex_no_op
  2. curve_no_op
  3. surface_no_op
  4. remove_surface
  5. tweak_replace_surface
  6. composite_surfaces
  7. collapse_curve
  8. remove_topology_curve
  9. virtual_collapse_curve
  10. remove_topology_surface
  11. blunt_tangency
  12. remove_cone
  13. collapse_angle
  14. remove_blend
  15. remove_cavity

Mesh quality models are mostly used for driving defeaturing of CAD models. They are currently used in Coreform Cubit's Geometry Power Tool diagnostics to predict where potential mesh quality issues will appear on the FE mesh before meshing and to provide a recommendation for CAD operations that can be used to resolve the issue based on a predicted mesh quality outcome.

Suitability

The suitability models will predict a heuristic value from 0 to 1 based on how well the outcome is expected to be successful within the context of a given assembly. Suitability models include the following:
  1. copy_surface
  2. midsurface
The suitability models are currently limited to making recommendations for the corresponding reduce thin volume commands. They are also used as the primary user knowledge base for Cubit's reinforcement learning procedure for reducing thin volumes. The following sections outline how the regression models can be managed using Cubit's command line tools. At present, only the suitability models are supported for predicting and training user training data.

Predicting CAD Operation Outcomes

A suitability score will be displayed at the command line with the following commands:

Learn copy_surface volume <id> surface <ids>

Learn midsurface volume <id> surface <ids>

For these commands, the copy_surface and midsurface ML regression models will be used to predict a suitability score. These reflect the suitability of using the respective reduce volume thin commands in the current context. The volume ids and surface ids used in the Learn commands should be the same as those used in the equivalent reduce thin commands.

Adding New CAD Operation Training Data

Adding additional user training data is the same as prediction (above) except that a label value is provided, where a value of zero represents low or infeasible condition and 1.0 is high or most preferred solution. In this case, features and labels are appended to the existing user training data so that subsequent ML predictions will use this data to determine suitability outcomes.

Learn copy_surface volume <id> surface <ids> label <value>

Learn midsurface volume <id> surface <ids> label <value>

Training CAD Operations

A training operation is automatically triggered anytime new training data is added. Training can also be invoked from a command by using the following command.

Learn Train ["<string>"]

The <string> value should be either one of copy_surface or midsurface. Mesh Quality models are currently not supported. If the <string> is absent, then all available regression models will be trained.

Listing Regression Models

To list all available regression models use the following command:

Learn List ["<string>"]

If the <string> is absent, then all available regression models will be listed.

Resetting Regression Models

To remove all use training data for a given regression model, the following command can be used:

Learn Reset ["<string>"]

If the <string> is absent, then all available regression models will be reset.

User Training Data

Learn User Path ["<path_string>"]

When a new training datum is written, it will write to a default application directory that is specific to a platform. For example, for Mac and Linux OS the directory will be located at:
  /Users/<user_name>/Library/Application Support/Coreform Cubit/ml

To display both the current user training data directory and the fixed training data directory, use the Learn List command. While the fixed training data directory cannot be changed, it may be worthwhile to change the user training directory. To change the user training directory, use the command Learn user path "<path_string>" where <path_string>> is the full path to a writable directory on disk in quotes. Changing the user training directory may be useful to temporarily use training data from another source or to ignore all user training data without removing it.

Using the command, Learn User Path without a path specification will set the user training data directory back to its default for the platform. Changing the user path using the Learn command will also change the path for the Classify command.