Hide menu
No Matches
CNC Machining Feature Recognition

The recognition can be run on a CAD file to find machining features, e.g. pockets, holes, etc. As a result of the recognition, list of found features of the part will be returned.

CNC Machining API is currently in preview. To use it in C++ one must define the preprocessor macro __CADEX_PREVIEW_MACHINING to 1. As the API changes to accommodate the needs of users compatibility will be preserved as much as possible but is ultimately not guaranteed.


It is possible to recognize pockets, holes of various types (through, blind, flat-bottom, partial), countersinks and milling/turning faces. A detailed description of the features is given here.

Below is a simple example of recognition.

CNC Machining model Features

Scope of accepted geometries

The recognition can be run on B-Rep representations, namely it works with ModelData_Solid.

API overview

Machining_FeatureRecognizer is the class that performs machining feature recognition. The tool has parameters that allow to modify rules for recognition.

There are 2 possible ways to use machining tools:

  • Using Machining_FeatureRecognizer on its own and processing the detected features. CNC Machining Feature Recognizer Example demonstrates this approach.
  • Using Machining_Analyzer. This approach supports running several recognition tools at once (currently, only Machining_FeatureRecognizer available) and collect all computed data in special Machining_Data class. Below is an example of how machining tools can be used with this approach:
    ModelData_Solid aSolid = ...;
    Machining_Analyzer anAnalyzer;
    anAnalyzer.AddTool (Machining_FeatureRecognizer());
    Machining_Data aData = anAnalyzer.Perform (aSolid);
    MTKBase_FeatureList aFeatures = aData.FeatureList();
    /* Process features */

The resulting Machining_Data can be passed as an input parameter for tools. It can be used to run machining tools separately with Machining_Data.