Demonstrates how to perform recognition of molding features on a 3D model and print information about found features and their parameters in a console.
In this example demonstrates how to perform recognition of molding features on a 3D model using molding feature recognition tool (Molding_FeatureRecognizer). For this purpose, used a console application that imports a model, traverses through unique ModelData_Part , creates and runs Molding_FeatureRecognizer, groups and prints information about found features and their parameters into console. Molding feature recognition will be performed for each unique ModelData_Part , but only for the scope of accepted geometries.
Application needs 1 input argument to run:
For more information about feature recognition visit Injection Molding page.
PartProcessor class is inherited from SolidProcessor and overrides ProcessSolid method that are used to run Molding_FeatureRecognizer on given shapes. Then PrintFeatures method is used to print information about found features and their parameters in a console.
Visit Model Explore Helper Implementation page for more information about base SolidProcessor class implementation.
To traverse only unique parts of the imported model, the ModelData_ModelElementUniqueVisitor class is used.
After performing feature recognition, the object of FeatureGroupManager class is used to group and sort found molding features. For this purpose, there is a traverse through all found features and add each of them to FeatureGroupManager with a specified name.
After adding all found features to FeatureGroupManager, a Print method of the manager is used to print information about found features and their parameters in a console. PrintFeatureParameters is created to explore and print feature parameters. It uses as an input parameter of Print method.
Visit Feature Group Helper Implementation page for more information about FeatureGroupManager class implementation.
Below is an example output for model from ./examples/models/Part3.stp.
| Model | Example output |
|---|---|
| Model: Part3.stp
Part #0 ["Part3"] - solid #0 has:
Rib(s): 5
1 Rib(s) with
length: 33.2764 mm
height: 15.5984 mm
thickness: 15 mm
draft angle: 0 deg
3 Rib(s) with
length: 40 mm
height: 29 mm
thickness: 3.91237 mm
draft angle: 0 deg
1 Rib(s) with
length: 127.988 mm
height: 18.7895 mm
thickness: 15 mm
draft angle: 0 deg
Screw Boss(es): 3
1 Screw Boss(es) with
outer radius: 18.85 mm
inner radius: 15 mm
draft angle: 0 deg
1 Screw Boss(es) with
outer radius: 22 mm
inner radius: 10 mm
draft angle: 0 deg
1 Screw Boss(es) with
outer radius: 22.3392 mm
inner radius: 20 mm
draft angle: 11.3099 deg
Total features: 8
|