## 5 Implementation and Examples
### Example Verification
#### 5.2.2 Automatically Generate Tolerance Items for Parts of the Assembly  
1. Building the axiom set of the OWL assertions ABox. The OWL assertion axiom set ABox was established, which represents the assembly constraint relationships between the geometric product components based on these AFSs of each component and these constraint relationships between features. Taking Part\({}_{3}\) in Figure 10 as an example, the constraint relationship assertion AP between the parts was obtained, and AP can be expressed as per Equation (5). \[\text{A}_{\text{P}}=\{\text{Part}_{2},\text{Part}_{3},\text{Part}_{4},\text{ hasMAT(Part}_{2},\text{Part}_{3},\text{), hasMAT(Part}_{3},\text{Part}_{4})\}\] (5) \[\text{A}_{\text{F}}\] can be expressed as Equation (6). \[\text{A}_{\text{F}}=\{\text{Cylindrical (P}_{2}\text{SF}_{4}),\text{ Planar (P}_{2}\text{SF}_{3}),\text{ Planar (P}_{3}\text{SF}_{4}),\text{ Cylindrical (P}_{3}\text{SF}_{3}),\] (6) \[\text{Cylindrical (P}_{3}\text{SF}_{2}),\text{ Cylindrical (P}_{3}\text{SF}_{1}),\text{ Cylindrical (P}_{4}\text{SF}_{2})\}\] (7)  
For the assertion of constraints between feature surfaces in part assembly AFR, AFR can be expressed as per Equation (7). \[\text{AFR}=\{\text{ADF}_{2,4,2},\text{ADF}_{2,4,3},\text{ADF}_{2,3,4},\text{ ADF}_{3,1-,\text{ hasCOI (P}_{2}\text{SF}_{3},\text{P}_{3}\text{SF}_{4}),\] (8) \[\text{hasCOI (P}_{2}\text{SF}_{4},\text{P}_{3}\text{SF}_{2}),\text{ hasCOI (P}_{2}\text{SF}_{4},\text{P}_{3}\text{SF}_{3}),\text{ hasPER (P}_{2}\text{SF}_{3},\text{P}_{3}\text{SF}_{2}),\] (9) \[\text{hasPER (P}_{2}\text{SF}_{3},\text{P}_{3}\text{SF}_{3}),\text{ HasCOI (P}_{3}\text{SF}_{1},\text{P}_{4}\text{SF}_{2}),\text{ hasCOI (P}_{3}\text{SF}_{1},\text{P}_{3}\text{SF}_{2}),\] (10) \[\text{hasCOI (P}_{3}\text{SF}_{1},\text{P}_{3}\text{SF}_{3}),\text{ hasCOI (P}_{3}\text{SF}_{2},\text{P}_{3}\text{SF}_{2}),\text{ hasPER (P}_{3}\text{SF}_{1},\text{P}_{3}\text{SF}_{4}),\] (11) \[\text{hasPER (P}_{3}\text{SF}_{2},\text{P}_{3}\text{SF}_{4}),\text{ hasPER (P}_{3}\text{SF}_{1},\text{P}_{3}\text{SF}_{4})\}\] (12)
2. A knowledge ontology library for the automatic generation of tolerance types was built. Following 4.5.3 and 4.5.4, the input of TBox, a set of terms for the tolerance specification design concepts, was realised using the protege5.5 ontology editor application, as shown in Figure 11. Taking part Part\({}_{3}\) as an example, the A\({}_{\text{P}}\) A\({}_{\text{F}}\) and A\({}_{\text{F}}\) assertion sets were input into the ontology editing tool software Protege 5.5 to realise the establishment of the OWL assertion axiom set ABox, and the tolerance type auto-generation knowledge base was finally obtained. The object property assertion of the assembly feature face P\({}_{3}\)SF\({}_{1}\) of part P3 is shown in Figure 12.  
Figure 10: The assembly constraint relationships between geometric product components.  
3. Inference generation for tolerance types. The SWRL inference rules [35] were input to automatically recommend tolerance items for each part of the assembly. Taking part Part\({}_{3}\) as an example, the inference result of feature surface P\({}_{3}\)SF\({}_{1}\) was obtained, as shown in Figure 13. The tolerance types for other assembly feature surfaces are shown in Table 4.  
Figure 11: Terminology assertion TBox.  
Figure 12: Object properties of P\({}_{3}\)SF\({}_{1}\).