Method for realizing automatic assembly of three-dimensional model based on secondary development of Creo software
Through the secondary development of Creo software, automatic assembly of three-dimensional models is achieved, which solves the problems of cumbersome and low consistency of electrical components assembly processes in the existing technology, and efficient and accurate automatic assembly is achieved, and design quality is improved.
Patent Information
- Application Number
- CN202411984317.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-23
AI Technical Summary
When designing spacecraft electronic control systems, the existing technology needs to define the assembly constraint relationship of electrical components one by one, resulting in the extension of the design cycle and the consistency of drawings.
Through secondary development based on Creo software, the automatic assembly method of three-dimensional models is realized, including building reference surfaces of modules to be assembled and main components, searching and matching reference surfaces, and using the AFX module library and Creo API interface to achieve automatic assembly.
It realizes efficient, accurate and automatic assembly of electrical components, simplifies the operation of repetitive assembly to define constraint relationships, and improves the quality control and drawing consistency of the design process.
Smart Images

Figure CN120030695A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of electrical control system design, and relates to a method for realizing automatic assembly of three-dimensional models based on secondary development of Creo software. Background Art
[0002] With the rapid development of aerospace technology, design indicators and functional modules are constantly improving, and the electronic components of the internal electronic control system are becoming more and more complex. A large number of electronic devices are highly integrated, which causes the design process to spend a lot of time on the assembly of electrical components, extending the design cycle. In addition, due to different designers, different references are selected, resulting in Figure 1 The consistency is not high. In order to solve the tedious process of assembling electrical appliances one by one, it is urgent to develop a technology that can be applied to the automatic assembly of a large number of electrical component models.
[0003] The existing technology for assembling electronic components inside a spacecraft requires retrieving parts or sub-components, analyzing the assembly characteristics of the parts, that is, the six degrees of freedom in the object space, selecting corresponding references based on the layout of the electronic components in the spacecraft, and setting matching constraint relationships to complete the assembly, thereby achieving full constraints on the six degrees of freedom or retaining one or more degrees of freedom. It can be seen that for the assembly of a large number of electrical components, it is necessary to repeatedly define assembly relationships, and this operation method takes up a lot of design time. Summary of the invention
[0004] The technical problem solved by the present invention is: to overcome the shortcomings of the prior art, to propose a method for realizing automatic assembly of three-dimensional models based on secondary development of Creo software, to provide designers in this technical field with an efficient, accurate and automatic electrical component assembly method, and to solve the problem of repeatedly defining the assembly of a large number of electrical components.
[0005] The solution to the technical problem of the present invention is: a method for realizing automatic assembly of three-dimensional models based on secondary development of Creo software, comprising the following steps:
[0006] Step 1: construct a reference surface for the module to be assembled;
[0007] Step 2: Create the main component in Creo software, and build the reference surface of the main component based on the assembly relationship between the module to be assembled and the main component;
[0008] Step 3: retrieve the reference surfaces in the model to be assembled and the main component, save the retrieved reference surfaces to the process, and use the assembly position relationship between the module to be assembled and the main component as a constraint condition to match the reference surface of the assembly module with the reference surface of the main component to achieve automatic assembly;
[0009] Step 4: Encapsulate the operations of step 1 and step 3 into the AFX module library. After setting the reference surface in the main component during assembly, the AFX module library is called through the Creo API interface to realize automatic assembly of the model.
[0010] Furthermore, a reference surface of the module to be assembled is constructed, including:
[0011] By analyzing the installation features and reserved degrees of freedom of the module to be assembled, the number and positions of the reference surfaces to be selected are determined, and the selected reference surfaces are perpendicular to each other.
[0012] Furthermore, the reference surface of the main component is constructed, including:
[0013] The position and number of the reference surfaces constructed by the main component are consistent with the modules to be assembled; the reference surfaces selected by the main component are perpendicular to each other.
[0014] Furthermore, when it is necessary to complete the positioning of the modules to be assembled with a specific positional relationship on the main component, it is necessary to create an orientation reference.
[0015] Furthermore, the reference surface of the assembly module is matched with the reference surface of the main component by writing command statements:
[0016] The reference surfaces of the module to be assembled are defined as reference surface 11 and reference surface 12, and the reference surfaces of the main component are defined as reference surface 21 and reference surface 22;
[0017] Write a command to retrieve the reference surface of the module to be assembled, set the retrieval object to be the module to be assembled, set the retrieval type to the reference plane, retrieve the reference surface 11, and save the obtained reference surface 11 in the name of "P01"; retrieve the reference surface 12, and save the obtained reference surface 12 in the name of "P02";
[0018] Write a command to retrieve the reference plane of the main component, set the retrieval object to the main component, the retrieval type to the reference plane, retrieve the reference plane 21, and save the obtained reference plane 21 in the name "A01"; retrieve the reference plane 22, and save the obtained reference plane 22 in the name "A02";
[0019] Save each automatically searched reference surface in the process for pairing;
[0020] Write the enable assembly command and specify that the assembly model is the module to be assembled;
[0021] Write a constraint relationship command, set the constraint relationship to match the retrieved module to be assembled with the main component, and write the following operations: A01 and P01 match, the constraint condition is overlap; A02 and P02 match, the constraint condition is overlap;
[0022] Write the end assembly command.
[0023] Furthermore, the reference surface of the main assembly can be matched with the reference surfaces of a plurality of modules to be assembled.
[0024] The beneficial effects of the present invention compared with the prior art are:
[0025] (1) The present invention adopts a design method with built-in assembly command statements for electrical component models to achieve one-click automatic assembly from model retrieval to assembly. Compared with the inefficient method in the prior art that relies on designers to define assembly constraints one by one, the present invention simplifies the tedious operation of repetitive assembly definition constraints while meeting the requirements of efficient, accurate and automatic assembly, and develops a process that autonomously searches for reference targets and automatically completes assembly.
[0026] (2) The automatic assembly method of the present invention avoids human operation errors by presetting assembly references, execution sequences, constraint relationships and other automatic execution schemes for a large number of electronic component models, improves the consistency of output drawings, facilitates quality control of the design process, and ensures a zero error rate in the assembly process of electronic components. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a flow chart of the method of the present invention;
[0028] Figure 2 This is a schematic diagram of the degree of freedom analysis of an air switch installed on a guide rail according to an embodiment of the present invention;
[0029] Figure 3 A schematic diagram of the definition of the reference surface for assembling the air switch and the guide rail according to an embodiment of the present invention;
[0030] Figure 4 The command language of the embodiment of the present invention has a built-in model program relationship. DETAILED DESCRIPTION
[0031] like Figure 1 As shown, the present invention proposes a method for realizing automatic assembly of three-dimensional models based on secondary development of Creo software, comprising the following steps:
[0032] Step 1: construct a reference surface for the module to be assembled;
[0033] Step 2: Create the main component in Creo software, and build the reference surface of the main component based on the assembly relationship between the module to be assembled and the main component;
[0034] Step 3: retrieve the reference surfaces in the model to be assembled and the main component, save the retrieved reference surfaces to the process, and use the assembly position relationship between the module to be assembled and the main component as a constraint condition to match the reference surface of the assembly module with the reference surface of the main component to achieve automatic assembly;
[0035] Step 4: Encapsulate the operations of step 1 and step 3 into the AFX module library. After setting the reference surface in the main component during assembly, the AFX module library is called through the Creo API interface to realize automatic assembly of the model.
[0036] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0037] Example 1
[0038] by Figure 3 As shown, the main feature of this embodiment is to install the air switch 1 on the guide rail 2 by running command statements, so that the assembly can be completed by calling it, simplifying the assembly process.
[0039] The main contents of this embodiment include flexible setting of the reference surface of the air switch 1 of the module to be assembled and the reference surface of the guide rail 2 of the main component, editing of command statements, and establishment of the AFX module library file using the Creo API interface extension, such as Figure 1 As shown, the specific technical solution is divided into the following three implementation steps.
[0040] 1. Construct the reference surface of the module to be assembled
[0041] Step 11: First, analyze the actual installation fixing state of the module to be assembled, and the fitting surface of the virtual assembly state and the actual installation state are consistent, such as Figure 2 As shown, after the air switch 1 is clamped on the guide rail 2, it still retains a degree of freedom for horizontal movement;
[0042] Specifically, by analyzing the installation characteristics and the reserved degrees of freedom of the air switch 1, two reference surfaces, namely the reference surface 11 and the reference surface 12, are constructed to meet the assembly constraint conditions:
[0043] like Figure 3 As shown, the specific construction feature is to construct a reference surface 11 based on the slot surface opened on the back of the air switch, with the constraint condition that it coincides with the slot surface, and select the back plane to construct a reference surface 12, with the constraint condition that the reference surface 12 is perpendicular to the reference surface 11.
[0044] 2. Build the reference surface of the main component.
[0045] like Figure 3 As shown, the specific method is to use the Creo software component environment, take the guide rail 2 as the main component, build the reference surface 21 according to the upper surface of the guide rail, and the constraint condition is that it coincides with the upper surface of the guide rail, and build the reference surface 22 in line with the front surface of the guide rail, and the constraint condition is that the reference surface 22 is perpendicular to the reference surface 21, and the position and number of the reference surface built by the guide rail 2 are consistent with the air switch 1;
[0046] Preferably, since the end faces on the main component on which the electrical module needs to be installed are relatively fixed, a reference surface method can be adopted with general reference as the main and directional reference as the auxiliary to reduce the number of reference settings; wherein the general reference is the conventional assembly surface of the main component, and when it is necessary to complete the positioning of the module to be assembled with a specific positional relationship on the main component, it is necessary to create a directional reference.
[0047] 3. Write command statements to pair the reference surface of the assembly module with the reference surface of the main component.
[0048] like Figure 4 As shown, a complete automatic assembly process must include: retrieving reference commands, enabling assembly command statements, constraint relationship commands, and ending assembly command statements. The above command statements are built-in through the software program editing dialog box. The specific technical solution is as follows:
[0049] Step 31, write a command to search for the reference surface of the module to be assembled (SEARCH_MDL1_REF), set the search object to be assembled (THIS), the search type to be reference plane (PLANE), search for reference surface 11, and the program saves the obtained reference surface 11 in the name (P01);
[0050] The above command is written again to retrieve reference surface 12 and save it in the name (P02);
[0051] Step 32, write a command to search for the reference plane of the main assembly (SEARCH_MDL2_REF), set the search object to the main assembly (ASSEMBLY), the search type to the reference plane (PLANE), search for the reference plane 21, and the program saves the obtained reference plane 21 in the name (A01);
[0052] The above command is written again to retrieve reference surface 22 and save it in the name (A02);
[0053] Through steps 31 and 32, the two pairs of reference surfaces of the air switch 1 of the module to be assembled and the guide rail 2 of the main assembly can be retrieved, and the automatically searched reference surfaces are saved in the process for subsequent pairing;
[0054] Step 33, write an enable assembly command (ASSEMBLE), and stipulate that the assembly model is the module to be assembled (THIS) called;
[0055] Step 34, write a constraint relationship command (MATE), set the constraint relationship to match the retrieved module air switch 1 with the main component guide rail 2, and repeat the following operations:
[0056] A01 and P01 match, and the constraint is coincidence;
[0057] A02 and P02 match, and the constraint is coincidence;
[0058] Step 35, write the end assembly command (END_ASSEMBLE);
[0059] The above operations are automatically run using built-in program commands, and one-click automatic assembly can be achieved by calling them. Finally, the operations of step one and step three are encapsulated into the AFX module library, and the AFX module library is called through the Creo API interface, and the reference is set in the main component to achieve automatic assembly of the model.
[0060] Although the present invention has been disclosed as above in the form of a preferred embodiment, it is not intended to limit the present invention. Any person skilled in the art may make possible changes and modifications to the technical solution of the present invention by using the methods and technical contents disclosed above without departing from the spirit and scope of the present invention. Therefore, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the protection scope of the technical solution of the present invention.
[0061] The contents not described in detail in the specification of the present invention belong to the common knowledge of those skilled in the art.
Claims
1. A method for realizing automatic assembly of three-dimensional models based on secondary development of Creo software, characterized in that: The following steps are involved: Step 1: construct a reference surface for the module to be assembled; Step 2: Create the main component in Creo software, and build the reference surface of the main component based on the assembly relationship between the module to be assembled and the main component; Step 3: retrieve the reference surfaces in the model to be assembled and the main component, save the retrieved reference surfaces to the process, and use the assembly position relationship between the module to be assembled and the main component as a constraint condition to match the reference surface of the assembly module with the reference surface of the main component to achieve automatic assembly; Step 4: Encapsulate the operations of step 1 and step 3 into the AFX module library. After setting the reference surface in the main component during assembly, the AFX module library is called through the Creo API interface to realize automatic assembly of the model.
2. The method for realizing automatic assembly of three-dimensional models based on secondary development of Creo software according to claim 1, characterized in that: Build the reference surface of the module to be assembled, including: By analyzing the installation features and reserved degrees of freedom of the module to be assembled, the number and positions of the reference surfaces to be selected are determined, and the selected reference surfaces are perpendicular to each other.
3. The method for realizing automatic assembly of three-dimensional models based on secondary development of Creo software according to claim 2 is characterized in that: Reference surfaces for constructing the main assembly, including: The position and number of the reference surfaces constructed by the main component are consistent with the modules to be assembled; the reference surfaces selected by the main component are perpendicular to each other.
4. The method for realizing automatic assembly of three-dimensional models based on secondary development of Creo software according to claim 3 is characterized in that: When it is necessary to position the modules to be assembled with a specific position relationship on the main component, it is necessary to create an orientation reference.
5. The method for realizing automatic assembly of three-dimensional models based on secondary development of Creo software according to claim 3 is characterized in that: Pair the reference surface of the assembly module with the reference surface of the main component by writing command statements: The reference surfaces of the module to be assembled are defined as reference surface 11 and reference surface 12, and the reference surfaces of the main component are defined as reference surface 21 and reference surface 22; Write a command to retrieve the reference surface of the module to be assembled, set the retrieval object to be the module to be assembled, the retrieval type to be the reference plane, retrieve reference surface 11, and save the obtained reference surface 11 in the name of "P01"; retrieve reference surface 12, and save the obtained reference surface 12 in the name of "P02"; Write a command to retrieve the reference plane of the main component, set the retrieval object to the main component, the retrieval type to the reference plane, retrieve the reference plane 21, and save the obtained reference plane 21 in the name "A01"; retrieve the reference plane 22, and save the obtained reference plane 22 in the name "A02"; Save each automatically searched reference surface in the process for pairing; Write the enable assembly command and specify that the assembly model is the module to be assembled; Write a constraint relationship command, set the constraint relationship to match the retrieved module to be assembled with the main component, and write the following operations: A01 and P01 match, the constraint condition is overlap; A02 and P02 match, the constraint condition is overlap; Write the end assembly command.
6. The method for realizing automatic assembly of three-dimensional models based on secondary development of Creo software according to claim 1, characterized in that: The reference surface of the main assembly can be matched with the reference surfaces of multiple modules to be assembled.