# CAD-Based Feature Recognition for Process Monitoring Planning in Assembly
## 4 Results  
The software and hardware used for the implementation are listed in Table 1 in Appendix A. Since OpenCascade provides a Python library (PyOCC) for feature extraction from STEP files, the core element of the approach (feature extraction and recognition) was implemented in Python. The database for the monitoring templates was implemented in an SQL database that interacts with the Python implementation. Each monitoring requirement template for each process type was set up as a database table, as shown in Table 2. To be able to interact with the solution, the visualization was realized in PyQT (see Figure 4). The assembly of an exemplary surround view camera serves as a use case for the implementation. The product consists of two housing parts (lower and upper housing), an electrical circuit board, and four screws (see Figure 5). Two joining processes are required for the electrical circuit board and the two housing parts, four screwing processes to attach the board to the lower housing part, and one welding process to fuse the upper and lower housing parts. Each of these processes requires a different set of process parameters (e.g., joining force, welding temperature).  
The graphical user interface (GUI) enables the import of individual files (e.g., process plans, CAD models) and establishes a connection to the template database via a user login (see operation panel 1 in Figure 4). Operation panel 2 then allows the feature recognition and parameterization to be performed. The individual results are then saved in the feature window (recognized features), database window (monitoring templates), and parameter window (process parameters). A logging output displays the current steps and serves as a log file. At the end, the user can manipulate the monitoring requirements in the parameter area:  
* Add monitoring requirements;
* Delete monitoring requirements;  
Figure 4: Graphical user interface for the detection and visualization of assembly features relevant to monitoring.  
* Modify monitoring requirements.  
The results are stored in a text-based and human-readable JSON file for further processing (e.g., resource allocation for monitoring planning). As can be seen in Figure 5, the process features from the process plans (JSON file) and the geometric features from the CAD model (STEP file) result in a variety of different monitoring requirements. The assembly sequence shown in Figure 5 is imported via the GUI as a JSON file. The information stored in the JSON file consists of the different assembly sequences, process types (e.g., screwing, joining, welding), and additional process parameters relevant for monitoring (e.g., joining force of 4 Nm). For validation, a surround-view camera and its integration into the software tool was tested (Figure 5). This camera system is used for autonomous driving. Therefore, the assembly processes must achieve a high quality.  
The identified features from the process plan and the CAD file are automatically recognized and fill the monitoring templates. Company-internal knowledge can be identified and stored in the templates before the automated approach automatically identifies the requirements using the expert knowledge already available. The template database can be manipulated by the user before applying the monitoring requirement identification.  
The monitoring requirements are then stored in a text-based format (JSON file) to be used for further steps of monitoring planning (e.g., sensory resource allocation). Excerpts from the feature detection method and code can be found in Appendixes B-E.  
Figure 5: Use case – identification of monitoring features of an assembled surround view camera.