# Development of a Coordinate Measuring Machine--Based Inspection Planning System for Industry 4.0
## 3 Inspection Features and Engineering Ontology
### Ontology Knowledge Base  
Assuming that GFs can be represented as EO classes and parameters of the IFs as properties of the classes, this chapter provides an ontological description of IFs and ontology knowledge base. EO components are defined as:  
* Classes: represent GFs such as: point C_1, line C_2, circle C_3, ellipse C_4, plane C_5, sphere C_6, cylinder C_7, cone C_8 and torus C_9.
* Subclasses: GFs that participate in creating other primitives are EO subclasses: C_11, C_12, C_13,..., C_19; C_52, C_53, C_54, C_57, C_58, C_59). e.g., C_52 represents the plane that participates in creating a line.
* Individuals: represent GFs defined by mentioned parameters. The example of individuals for class point is labeled as C_12_I1 and represents the point obtained as an intersection of straight lines.
* Properties: individual parameters represent EO properties as four types of properties: coordinates of points, normal vectors, diameter, and angle.  
Implementation of the developed ontological description was carried out in software Protege--OWL editor. OWL ontology includes description of classes, properties and individuals. Software Protege is a free, open source ontology editor based on Java. Protege implements a set of knowledge-modeling structures and actions that support the creation, visualization, and manipulation of ontologies in various representations of data formats [24].  
According to [23; 25; 26], the implementation of IFs in Protege consists of modeling: (i) classes, (ii) class hierarchy, (iii) individuals, and (iv) classes and individuals' properties. Figure 2 shows part of the PW ontological structure decomposition (hierarchy of classes, hierarchy of object properties and hierarchy of data properties) into geometric features. Initially, the workpiece was decomposed into standard types of tolerances as defined by ISO 1101.  
In this case, those are the tolerances of: length (TL), form (TF), orientation (TO) and location (TLC). These types of tolerances are downwards decomposed into specific types of tolerances defined by a standard as well. Adhering to this procedure is necessary because of linking specific tolerance types with tolerances that occur in practice. The next iteration is related to decomposition into upper-level types of tolerances--the types encountered in the technical drawing of the part.  
According to the previously described model of the knowledge base, the tolerances of demo PW are reduced to GFs. In that case, all metrological features taking part in the creation of the part tolerance were included: TL, TF, TO and TLC (Figure 3). The TL according to ISO 1101 consists of four basic types of length tolerance (TL-1-61, TL-1-62, TL-1-62 and TL-1-62 and TL-1-7) and five diameter tolerances (TL-2-11, TL-2-12 TL-2-13 TL-2-14 and TL-2-15). The tolerance of form is TF-2-1, whereas the tolerances of orientation are denoted by TO-2-11, TO-2-12, TO-2-13, TO-2-14, TO-2-11 and TO-2-12. The tolerance of location is indicated by TLC1-4.  
Figure 2: Ontology implementation in Protege—OWL editor.  
The ontological base integrates tolerances and geometry in compliance with ISO 1101, and concretely for a specific PW it determines uniquely the values of IFs parameters.