The recognition can be run on a CAD file to find molding features, e.g. ribs, bosses, etc. As a result of the recognition, list of found features of the part will be returned.
As the API changes to accommodate the needs of users compatibility will be preserved as much as possible but is ultimately not guaranteed.
Capabilities
It is possible to recognize ribs, bosses, screw bosses. A detailed description of the features is given here.
Below is a simple example of recognition.
Scope of accepted geometries
The recognition can be run on B-Rep representations, namely it works with ModelData::Solid .
API overview
Molding_FeatureRecognizer is the class that performs molding feature recognition. The tool has parameters that allow to modify rules for recognition:
Molding_FeatureRecognizerParameters aRecognizerParameters;
aRecognizerParameters.SetMaxRibThickness (30.0);
aRecognizerParameters.SetMaxRibDraftAngle (0.2);
aRecognizerParameters.SetMaxRibTaperAngle (0.1);
Molding_FeatureRecognizer aRecognizer (aRecognizerParameters);
MTKBase_FeatureList aFeatureList = aRecognizer.Perform (theSolid);
There are 2 possible ways to use molding tools:
- Using Molding_FeatureRecognizer on its own and processing the detected features. Molding Feature Recognizer Example demonstrates this approach.
- Using Molding_Analyzer. This approach supports running several recognition tools at once (currently, only Molding_FeatureRecognizer is available) and collect all computed data in special Molding_Data class. Below is an example of how molding tools can be used with this approach:
ModelData::Solid aSolid = ...;
Molding_Analyzer anAnalyzer;
anAnalyzer.AddTool (Molding_FeatureRecognizer());
Molding_Data aData = anAnalyzer.Perform (aSolid);
MTKBase_FeatureList aFeatures = aData.FeatureList();
The resulting Molding_Data can be passed as an input parameter for tools. Molding_Data can be used to run molding tools separately.