Method for automatically generating size marks of shaft parts by applying Ontology
Through Ontology technology, the dimension marking body and reasoning rules of shaft parts are constructed, and the dimension marking information is automatically generated using the Drools reasoning machine, which solves the problems of cumbersome and irregular dimension marking in the design of shaft parts, and realizes the automation and accuracy of part drawing dimension marking Sex improvement.
Patent Information
- Application Number
- CN202411355132.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-31
AI Technical Summary
During the design process of shaft parts, there are problems such as multi-view dimension marking and irregular dimension expression, which leads to a large amount of manual intervention by designers, which affects the accuracy and consistency of the marking.
Ontology technology is used to build the dimension marking body of shaft parts and corresponding inference rules, and automatically infer the dimension marking information to realize automatic generation of dimension markings. The specific steps include building an ontological knowledge base, inference rule base, instantiated knowledge base and retrieval and verification of inference results.
Through Ontology technology, the automatic generation of dimension marking of shaft parts is achieved, which improves the accuracy and consistency of marking, reduces manual intervention, enhances the scalability and portability of the knowledge base, and is suitable for parts with complex structures.
Smart Images

Figure CN119227269A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer-aided design (CAD), and in particular relates to a method for automatically generating dimension annotations of shaft parts by using Ontology. Background Art
[0002] Dimensioning plays an important role in the actual part design process and is the main basis for the production and processing of parts. The dimensioning of part drawings accounts for about 30% of the entire design workload. Therefore, in order to realize the automatic generation of part drawing dimensioning and reduce the uncertainty caused by manual participation, many scholars have conducted research from different angles and achieved relevant results. In the process of carrying out drawing dimensioning work, many details need to be paid attention to, such as national standards, the selection of benchmarks, and the processing methods of parts, which have become the key points affecting the dimensioning work. Only by mastering these rules and principles can the overall quality of drawing work be effectively improved. Although some current 3D CAD software can automatically generate 2D projection views in any direction after part modeling and has an automatic dimensioning function, it cannot guarantee the accuracy of part drawing dimensioning well, and designers still need to make manual adjustments later. The currently known annotation methods all have certain limitations. When facing mechanical parts with complex structures, such as shaft parts, designers still need to make adjustments, and the results after adjustment often depend on the operator's work experience and habits, and cannot guarantee the accuracy of part drawing dimensioning well. Among the many dimensioning methods currently proposed, more manual intervention is often required, which leads to deviations in the annotation content due to personal annotation habits when designers make geometric annotations on product drawings. Even for the same part, different designers may choose different annotation schemes. The standardization and quality of part drawing annotations depend entirely on the experience and technical capabilities of engineers.
[0003] In view of the problems of cumbersome multi-view dimensioning and non-standard dimension expression in the design process of shaft parts, the ontology theory is introduced into the dimensioning of shaft parts to ensure the integrity of the dimensioning of parts drawings. Ontology has unique advantages in concept hierarchy, semantic expression, knowledge reasoning and sharing, and is easy to expand and delete. By using the representation ability of ontology language, the concepts and terms of domain knowledge are described, and the relationship between them is given, and the reasoning of domain knowledge is realized by the reasoning engine. The second-generation network ontology language OWL2 (Ontology Web Language2) can well meet the requirements of ontology in semantic representation and knowledge reasoning, and is supported by efficient reasoning algorithms to ensure the feasibility of reasoning.
[0004] ALC's second-generation Web ontology query language OWL2QL (Ontology Web Language 2 QueryLanguage) is used to construct the ontology of shaft parts dimensioning, and the Semantic Web Rule Language (SWRL) is used to construct the corresponding inference rules. Finally, the Drools inference engine is used to infer the dimensioning information of shaft parts based on the constructed inference rules. Summary of the invention
[0005] The technical problem to be solved by the present invention is that the dimensioning of drawings of shaft parts in the design process has problems such as cumbersome multi-view dimensioning and non-standard dimension expression, and a method for automatically generating dimensioning of shaft parts using Ontology is proposed. The method can construct a dimensioning ontology of shaft parts and corresponding reasoning rules, thereby using the Drools reasoning engine to automatically reason about the dimensioning information of shaft parts, so as to realize the automatic generation of dimensioning information of shaft parts, and provide an effective method for the automatic generation of dimensioning of shaft parts in computer-aided design (CAD). To solve the above problems, the present invention is implemented by the following technical scheme: a method for automatically generating dimensioning of shaft parts using Ontology, comprising the following steps.
[0006] Step A: Construct a shaft parts dimensioning ontology knowledge base (Knowledge Box, KB) based on the shaft parts dimensioning knowledge framework. The attribute relationship between classes in the ontology knowledge base provides a consistent description of the domain knowledge generated by shaft parts dimensioning. Step B: Based on the ontology knowledge base constructed in step A, a reasoning rule library for automatic generation of shaft part dimensioning based on ontology description logic is constructed; Step C: For the instance of shaft part dimensioning, instantiate the corresponding concepts and attributes in the ontology knowledge base constructed in step A, and establish the class, individual and attribute relationship between individuals in the instance of shaft part dimensioning to obtain the instantiated ontology knowledge base; Step D: Based on the inference rule base constructed in step B, the instantiated ontology knowledge base obtained in step C is inferred using the Drools inference engine, and the inference results are added to the instantiated ontology knowledge base; Step E: construct a meta-ontology model for automatically generating dimension annotations for shaft parts, calculate the dimension annotation information of shaft parts, and add the reasoning results to the instantiated ontology knowledge base; Step F: Construct a dimensioning information retrieval statement based on the required information, and use the dimensioning information retrieval statement to retrieve the reasoning results in the instantiated ontology knowledge base obtained in step D, and finally output and verify the instantiated ontology knowledge base.
[0007] In step A, the classes in the ontology knowledge base include shaft segments (Shaft), surfaces (Surface), feature elements (Feature), etc. These classes have their corresponding subclasses. At the same time, step A specifically includes the following process.
[0008] Step A1: Based on the theoretical knowledge of dimensioning of shaft parts, the hierarchical relationship of the classes and the hierarchical relationship of the attributes of the classes based on Ontology are constructed, where the attributes of the classes include object-type attributes and data-type attributes. Step A2: Use OWL2 language to construct the assertion axiom set ABOX and the terminology axiom set TBOX of shaft part dimensioning, so as to form an ontology knowledge base system for automatic generation of shaft part dimensioning.
[0009] Step D further includes the following process: when dimensioning is generated for an engineering instance, the engineering case and the reasoning result can be added to the instantiated ontology knowledge base, so that the knowledge base can be updated self-wisely.
[0010] Compared with the prior art, the present invention has the following characteristics: 1. The shaft parts dimensioning ontology knowledge base and reasoning rule base can be shared and reused, making the knowledge base itself extensible and ensuring the portability and scalability of the knowledge base.
[0011] 2. By utilizing the descriptive power of the ontology language, the structural information and constraint relationships of shaft parts are represented, and part models are established and dimensioning information is generated from a computer-understandable perspective. Therefore, this method is still applicable when facing complex shaft parts.
[0012] 3. An ontology knowledge base description framework and an ontology-based reasoning rule library were constructed, providing a feasible method for the automatic generation of dimensioning of shaft parts. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 Automatically generate a flow chart for dimensioning shaft parts.
[0014] Figure 2 A knowledge representation model for dimensioning shaft parts.
[0015] Figure 3 A hierarchical relationship diagram between classes for dimensioning shaft parts.
[0016] Figure 4 A hierarchical relationship diagram of the meta-entity attributes for dimensioning shaft parts.
[0017] Figure 5 This is the parts drawing of the reducer gear output shaft.
[0018] Figure 6 This is the exploded view of the reducer gear output shaft. DETAILED DESCRIPTION
[0019] The following is a brief description using the output shaft of the reducer gear as an example. Figure 5 As shown. Since shaft parts are non-standard parts, the present invention does not consider the tolerance and matching requirements of their surfaces and other parts. The steps for generating the dimensioning of the output shaft of the reducer gear are as follows: Step A: Construct the dimension annotation automatic generation ontology, first define the relationship between classes. Based on the acquired domain knowledge, define the unary relationship in the representation model as a class, specifically: Part contains the structural information of the part, and its subclasses are Shaft and Surface; Feature contains the structural feature elements of shaft parts, including Principal, Ancillary and Dependency, where the principal feature is the feature element that determines the main structural shape of the part, the dependent feature element is included in the shaft segment, and the auxiliary feature element is included in the surface, such as the attached feature. Figure 3 As shown. Secondly, define the attributes. The main attributes defined in the present invention are object-type attributes, that is, attributes that connect two entities. There are eight sub-attributes of Space properties (spatial relationship attributes), including has-CON (constraint), has-DIS (separation), has-INT (skew), has-PAR (parallel), has-NON (non-planar), has-PER (perpendicular), has-INC (inclusion), has-COI (coincidence), and Dimensions properties (dimensional tolerance attributes) include a total of thirty different dimension and tolerance sub-attributes, as shown in the attached figure. Figure 4 shown.
[0020] Step B: The dimensioning of parts is essentially to mark the characteristic elements contained in the parts accordingly, and each characteristic element has its corresponding dimensioning type. The automatic generation process of dimensioning is realized through the following SWRL rules:
[0021] Step C: For the instance of generating the dimension annotation of the output shaft of the reducer gear, instantiate the corresponding concepts and attributes in the ontology knowledge base constructed in step A, and establish the class, individual and attribute relationship between individuals in the instance of the dimension annotation of shaft parts to obtain the instantiated ontology knowledge base. The details are as follows: Step C1: Build a part model in the CAD system according to the part structure features, and decompose it into 6 shaft segments from left to right, as shown in the attached figure. Figure 6 As shown. Construct a set of assertion formulas that represent the constraint relationship between the axis segments: Ap={extremity(p1),middle(p2),middle(p3),middle(p4),middle(p5),extremity(p6),has_CON(p1,p2),has_CON(p2,p3),has_CON(p3,p4),has_CON(p4,p5),has_CON(p5,p6)}.
[0022] Step C2: According to the exploded view of the part, obtain the surface information of each shaft segment and construct a set of assertion formulas representing the subordinate relationship between each surface and the shaft segment. Aps ={has_INC(p1,s1),has_INC(p1,s2),has_INC(p1,s3),has_INC(p1,s4),has_INC(p2,s5),has_INC(p2,s6),has_INC(p2 ,s7),has_INC(p2,s8),has_INC(p3,s9),has_INC(p3,s10),has_INC(p3,s11),has_INC(p3,s12),has_INC(p3,s13),has_ INC(p3,s14),has_INC(p4,s15),has_INC(p4,s16),has_INC(p4,s17),has_INC(p4,s18),has_INC(p5,s19),has_INC(p5 ,s20),has_INC(p5,s21),has_INC(p5,s22),has_INC(p6,s23),has_INC(p6,s24),has_INC(p6,s25),has_INC(p6,s26)}.
[0023] Step C3: Select a surface as the reference surface and establish the spatial relationship between the surface and the other surfaces. Here, take s1 as an example and construct the assertion formula set Ass={has_PER(s1,s2),has_PAR(s1,s3),has_PER(s1,s4),has_PAR(s1,s5),has_PER(s1,s6),has_PAR(s1,s7),has_PER(s1,s8),has_PAR(s1,s9),has_PAR(s1,s10),has_PER(s1,s11),has_PAR(s1,s12),has_PAR(s1,s13),has_PER(s1,s14),has_PAR(s1,s15),has_PER(s1,s16),has_PAR(s1,s17),has_PER(s1,s18),has_PAR(s1,s19),has_PER(s1,s20),has_PER(s1,s21),has_PAR(s1,s22),has_PAR(s1,s23),has_PER(s1,s24),has_PER(s1,s25),has_PER(s1,s26),has_PAR(s1,s27),has_PER(s1,s28),has_PAR(s1,s29),has_PER(s1,s30),has_PER(s1,s31),has_PER(s1,s32),has_PAR(s1,s33),has_PER(s1,s34),has_PAR(s1,s35),has_PER(s1,s36),has_PAR(s1,s37),has_PER(s1,s38),has_PER(s1,s39),has_PER(s1 AR(s1,s15),has_PER(s1,s16),has_PAR(s1,s17),has_PER(s1,s18),has_PAR(s1,s19),has_PER(s1,s20),has_PAR(s1,s21),has_PER(s1,s22),has_PAR(s1, s23),has_PER(s1,s24),has_PAR(s1,s25),has_PER(s1,s26),has_COI(s3,s5),has_COI(s7,s9),has_COI(s12,s15),has_COI(s17,s19),has_COI(s21,s23)} Step C4: Confirm the characteristic elements contained in each axis segment and surface, and construct the assertion formula set Afs={has_INC(p6,keyway),has_INC(s1,rounding),has_INC(s2,OP),has_INC(s3,retract_groove),has_INC(s4,OP),has_INC(s5,OP),has_INC(s6,OP),has_INC(s7,OP),has_INC(s8,OP),has_INC(s9,cogs),has_INC(s10,cogs),has_INC(s11,cogs),has_INC(s12,cogs),has_INC(s13,cogs),has_INC(s14,cogs),has_INC(s15,cogs),has_INC(s16,cogs),has_INC(s17,cogs),has_INC(s18,cogs),has_INC(s19,cogs),has_INC(s20,cogs),has_INC(s21,cogs),has_INC(s22,cogs),has_INC(s23,cogs),has_INC(s24,cogs),has_INC(s25,cogs),has_INC(s26,cogs),has_INC(s27,cogs),has_INC(s28,cogs),has_INC(s29,cogs),has_INC(s30,cogs),has_INC(s31,cogs),has_INC(s32,cogs),has_INC(s33,cogs),has_INC(s34,cogs),has_INC(s35,cogs),has_INC(s36,cogs),has_INC(s37,cogs),has_INC(s38,cogs),has_INC(s39,cogs),has_INC(s40, NC(s12,cogs),has_INC(s13,cogs),has_INC(s14,cogs),has_INC(s15,OP),has_INC(s16,OP),has_INC(s17,OP),has_INC(s18,OP),has_INC(s19,OP) ,has_INC(s20,OP),has_INC(s21,chamfering),has_INC(s22,OP),has_INC(s23,OP),has_INC(s24,OP),has_INC(s25,rounding),has_INC(s26,OP)}.
[0024] Step C5: Based on the constructed shaft dimensioning ontology knowledge base and SWRL reasoning rule base, the dimensioning information of the parts is obtained by reasoning through the Drools reasoning engine.
[0025] Step D: Based on the inference rule base constructed in step B, the instantiated ontology knowledge base obtained in step C is inferred using the Drools inference engine, and the inference results are added to the instantiated ontology knowledge base; Step E: construct a meta-ontology model for automatically generating dimension annotations for shaft parts, calculate the dimension annotation information of shaft parts, and add the reasoning results to the instantiated ontology knowledge base; Step F: Construct a dimensioning information retrieval statement based on the required information, and use the dimensioning information retrieval statement to retrieve the reasoning results in the instantiated ontology knowledge base obtained in step D, and finally output and verify the instantiated ontology knowledge base.
[0026] The present invention uses Ontology Web Language (OWL) and Semantic Web Rule Language (SWRL) to define the ontology and reasoning rules for the automatic generation of shaft part dimensioning. The structural feature information of shaft parts and their end faces is described by position, spatial relationship, inclusion, mapping, etc. The rule semantic reasoning mechanism is used to reason the ontology knowledge base for the automatic generation of shaft part dimensioning, and the design intent is matched to improve the sharing and reuse of the automatic generation model of shaft part dimensioning.
[0027] The above content is a further detailed description of the present invention in combination with specific engineering examples. It cannot be determined that the specific implementation methods of the present invention are limited to these. For process designers in the technical field to which the present invention belongs, without departing from the concept of the present invention, they can also make several simple deductions or substitutions, which should be regarded as belonging to the protection scope of the present invention.
Claims
1. A method for automatically generating dimension annotations for shaft parts using Ontology, with specific features The steps include: Step A: Construct a shaft parts dimensioning ontology knowledge base (Knowledge Box, KB) based on the shaft parts dimensioning knowledge framework. The attribute relationship between classes in the ontology knowledge base provides a consistent description of the domain knowledge generated by shaft parts dimensioning. Step B: Based on the ontology knowledge base constructed in step A, a reasoning rule base based on ontology and rule language is constructed according to the relevant descriptions of the dimensioning specifications in the design process of shaft parts in GB / T 4458-2003 and GB / T1182-2008; Step C: For the instance of shaft part dimensioning, instantiate the corresponding concepts and attributes in the ontology knowledge base constructed in step A, and establish the class, individual and attribute relationship between individuals in the instance of shaft part dimensioning to obtain the instantiated ontology knowledge base; Step D: Based on the inference rule base constructed in step B, the instantiated ontology knowledge base obtained in step C is inferred using the Drools inference engine, and the inference results are added to the instantiated ontology knowledge base; Step E: construct a meta-ontology model for automatically generating dimension annotations for shaft parts, calculate the dimension annotation information of shaft parts, and add the reasoning results to the instantiated ontology knowledge base; Step F: Construct a dimensioning information retrieval statement based on the required information, and use the dimensioning information retrieval statement to retrieve the reasoning results in the instantiated ontology knowledge base obtained in step D, and finally output and verify the instantiated ontology knowledge base.
2. According to the method of automatic generation of shaft part dimensioning using Ontology in claim 1, it is characterized in that: In step A, the classes in the ontology knowledge base include shaft segments (Shaft), surfaces (Surface), feature elements (Feature), etc.; these classes have their corresponding subclasses respectively.
3. The method for automatically generating shaft part dimensioning using Ontology according to claim 1 is characterized in that: Step A specifically includes: Step A1: Based on the theoretical knowledge of dimensioning of shaft parts, the hierarchical relationship of the classes and the hierarchical relationship of the attributes of the classes based on Ontology are constructed, where the attributes of the classes include object-type attributes and data-type attributes. Step A2: Use OWL2 language to construct the assertion axiom set ABOX and the terminology axiom set TBOX of shaft part dimensioning, so as to form an ontology knowledge base system for automatic generation of shaft part dimensioning.
4. The method for automatically generating shaft part dimensioning using Ontology according to claim 1 is characterized in that: Step C further includes the following process: using the reasoning ability of the instantiated ontology knowledge base itself to infer implicit relationships and verifying the consistency of the instantiated ontology knowledge base.
5. The method for automatically generating shaft part dimensioning using Ontology according to claim 1 is characterized in that: When dimensioning is generated for an engineering instance, the engineering case and reasoning results can be added to the instantiated ontology knowledge base, which can realize the self-update of the knowledge base.
Citation Information
Cited By
Drawing generation method and device, electronic equipment and readable storage medium
CN120068251A
Method and system for automatically generating labels based on CAD entity types
CN120259605A
