Electric appliance model assembly automatic punching method based on Creo software secondary development

By constructing reference surface and hole feature parameters in Creo software, creating a custom feature set and writing command statements, the automatic generation of fixed matching hole positions of electronic components in the spacecraft electronic control system is realized, and the problems of cumbersome generation of hole positions and errors are solved in the existing technology are solved, and efficient, accurate and flexible automatic hole drilling design is achieved.

CN120030696APending Publication Date: 2025-05-23BEIJING INST OF AEROSPACE CONTROL DEVICES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411984319.2
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

Technical Problem

In the prior art, when designing spacecraft electronic control systems, the generation process of fixed mating hole positions of electronic components is cumbersome and inflexible, and when the distribution position of electronic components changes, hole position adjustment is prone to errors or omissions.

Method used

The automatic hole punching method of electrical model assembly based on the secondary development of Creo software is adopted. By constructing the reference surface and hole feature parameters of the module to be assembled, a custom feature set is created, and a command statement is written to bind it to the reference surface and hole feature parameters of the module to be assembled, automatic hole punching is achieved.

Benefits of technology

It realizes the automatic creation of fixed hole positions on the sheet parts quickly, accurately and flexibly, saving design time and avoiding errors or omissions in hole position adjustment when electronic components change position.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120030696A_ABST
    Figure CN120030696A_ABST
Patent Text Reader

Abstract

The invention relates to an electric appliance model assembly automatic punching method based on Creo software secondary development. The method comprises the following steps: constructing a reference surface and hole characteristic parameters of a module to be assembled; creating a user-defined feature set; binding the user-defined feature set with reference surface and hole feature parameters of the to-be-assembled module; and packaging the above operations into an AFX module library, and calling the AFX module library through a Creo API interface to realize automatic punching when the electric appliance model is assembled. According to the method, due to the fact that full-parametric modeling is adopted, and the design method of parameter assignment and transmission is adopted, position adjustment change or model size change of the electronic device and synchronous change of the size of the bottom hole matched with the electronic device are achieved, and the problems of change omission or errors and the like are avoided; a design method of adjusting hole sites one by one is needed, and the inspection process of adjusting and comparing electronic components one by one is simplified on the premise that human intervention is not needed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of electrical control system design, and relates to an automatic punching method for assembling an electrical model based on secondary development of Creo software. Background Art

[0002] With the continuous improvement of the technical indicators and operating accuracy of spacecraft, the electronic components of its internal electronic control system are becoming more and more complex. In the process of designing a digital whole machine, a large number of electronic device models need to refer to the installation holes of the electrical model after they are assembled inside the spacecraft. Hundreds of hole features are created on the sheet metal of different internal parts to fix the corresponding electrical components. If the hole features are established one by one, the operation process is extremely cumbersome. Then how to realize that after the electrical model is assembled in position, the hole features that match the electronic components are automatically generated on the structural parts, and the hole features are parameterized and associated with the electrical model, that is, the hole size can be changed synchronously when the position or size of the electrical model changes.

[0003] If the generation of fixed matching holes of electronic components is realized in the software, the existing technology first assembles the electronic component model installation requirements inside the spacecraft, and sets the drilling reference and drilling parameters for hundreds of holes one by one according to the distribution position of the electrical component model, such as hole spacing, hole diameter, hole depth and hole type. The operation process is extremely cumbersome and inflexible. It is easy to make mistakes or lose holes when changing the distribution position of electronic components. These rely on the manual operation of designers and take 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 an automatic punching method for assembling an electrical model based on secondary development of Creo software, and to provide designers in this technical field with an efficient, accurate and flexible solution for automatic punching of assembly coordination.

[0005] The solution to the technical problem of the present invention is: an automatic punching method for assembling an electrical model based on secondary development of Creo software, comprising the following steps:

[0006] Step 1: construct reference surface and hole feature parameters of the module to be assembled;

[0007] Step 2: Create a part environment in Creo software, build a three-dimensional model, calibrate the reference surface and hole feature parameters on the three-dimensional model according to the method of step 1, and create corresponding hole positions, activate the custom feature set dialog box, select the operations of calibrating the reference surface and hole feature parameters and creating the corresponding hole positions, and define the variable names of the calibrated reference surface and hole feature parameters respectively to complete the creation of the custom feature set;

[0008] Step 3, write a command statement to bind the custom feature set to the reference surface and hole feature parameters of the module to be assembled: select the assembly reference relationship between the module to be assembled and the installation matching surface, match and bind the three-dimensional model with the module to be assembled, so that the reference surface of the three-dimensional model coincides with the reference surface of the module to be assembled, and the hole feature parameter variables of the three-dimensional model are assigned to the hole feature parameters of the module to be assembled. When the position of the module to be assembled changes or the feature size changes, the position and hole size of the three-dimensional model bound to it change synchronously;

[0009] Step 4: Encapsulate the operations of step 1 to step 3 into the AFX module library, and call the AFX module library through the Creo API interface to realize automatic punching during assembly of the electrical model.

[0010] Furthermore, a reference surface of the module to be assembled is constructed, including:

[0011] A reference plane 11 is constructed based on the bottom surface of the module to be assembled. The constraint condition is that it coincides with the bottom surface. Diagonal lines are selected between the centers of the four holes on the bottom surface to form an intersection. The intersection is used as constraint 1 and perpendicular to the reference plane 11 is used as constraint 2 to construct two perpendicularly intersecting reference planes 12 and 13. The three reference planes created are perpendicular to each other in space.

[0012] Furthermore, the hole feature parameters of the module to be assembled are constructed, including:

[0013] The analytical calibration method is used to calibrate the three parameters of the hole size kd1, kd2, and kd3 of the module to be assembled. kd1 is the center distance between the two holes located on the long side of the bottom surface, kd2 is the center distance between the two holes located on the short side of the bottom surface, and kd3 is the aperture. The parameters kd1, kd2, and kd3 are saved in the relationship parameter list as digital features.

[0014] Furthermore, the value of kd3 is set to 80% of the actual aperture to avoid installation errors.

[0015] Furthermore, the method for creating a custom feature set is as follows:

[0016] Step 21. Create a part environment using Creo software. First, build a cube and build three reference surfaces on the upper surface of the cube.

[0017] The construction method is to construct a reference surface 21 based on the upper surface of the cube, with the constraint condition being coincidence with the upper surface of the cube, and to construct two perpendicularly intersecting reference surfaces 22 and 23 with the constraint condition passing through the center point of the cube and being perpendicular to the reference surface 21, and the mutual positional relationship of the three reference surfaces is consistent with the three reference surfaces of the module to be assembled;

[0018] Step 22, using the intersecting vertical reference line of the reference plane 22 and the reference plane 23 as the symmetry axis, create four reference points on the reference plane 21, the four reference points are symmetrical up and down and left and right, distributed in four intersecting areas, and are named PNT0, PNT1, PNT2, and PNT3 respectively;

[0019] Step 23, calibrate two positioning dimensions kd4 and kd5, the calibration of kd4 and kd5 is only associated with the three reference surfaces 21 to 23; wherein kd4 is the center distance between the two holes on the long side of the reference surface 21, and kd5 is the center distance between the two holes on the short side of the reference surface 21;

[0020] Step 24, draw hole features, set the assembly punching surface as reference surface 21, set the center point to any one of PNT0 to PNT3, calibrate the shape dimension kd3, the kd3 dimension is not associated with the outside, and set the hole depth to penetrate the assembly punching surface;

[0021] Step 25, using the point command in the array command, select the hole feature drawn in step 24, and create the remaining three hole positions by copying the four reference point positions created in step 22;

[0022] Step 26. Activate the Custom Feature Set dialog box, select steps 22 to 25 above to group them, select reference surface 21 and define its name as sketch plane, select reference surface 22 and define its name as mid surface, select reference surface 23 and define its name as lateral surface, set variable dimension kd5 to width, kd4 to length, and kd3 to diameter.

[0023] Furthermore, the command statements written include:

[0024] User selection command, reference retrieval command, parameter retrieval command, enable call custom feature set command, reference pairing command, parameter assignment command;

[0025] User selection command: used to select the assembly reference relationship between the module to be assembled and the mounting mating surface;

[0026] Retrieve reference command: Set the retrieval model to retrieve parts, the retrieval type to reference plane, retrieve reference plane 11, save it in the name of "D-1"; retrieve reference plane 12, save it in the name of "D-2"; retrieve reference plane 13, save it in the name of "D-3";

[0027] Search parameter command: Set the search model to retrieve parts, the search parameter to kd2, saved in the name of "width"; search parameter kd1, saved in the name of "length", search parameter kd3, saved in the name of "diameter";

[0028] Enable the call of custom feature set command, which is used to call the user selected command;

[0029] Reference pairing command: match the sketch bottom surface with D-1, with the constraint of coincidence; match the middle surface with D-2, with the constraint of coincidence; match the lateral surface with D-3, with the constraint of coincidence;

[0030] Parameter assignment command: Assign the power module hole size W1 to the custom feature set width; assign the power module hole size L1 to the custom feature set length; assign the power module hole size D1 to the custom feature set diameter.

[0031] Furthermore, the written command statement also includes a user input command and an enable IF command;

[0032] User input command: Set the input type to integer, the agreed trigger value is 1, and inputting other values ​​is invalid;

[0033] Enable IF command: Determine whether the value entered by the user is trigger value 1. If so, execute the enable call custom feature set command, reference pairing command and parameter assignment command in sequence; otherwise, do not execute the operation.

[0034] The beneficial effects of the present invention compared with the prior art are:

[0035] (1) The present invention uses a combination of a custom feature set and a model built-in command language to achieve the automatic creation of fixed holes on a selected sheet metal part through an automatic hole punching design method, thereby saving a lot of time. Compared with the method of obtaining hole positions through a series of operation definitions in the prior art, the present invention simplifies the design process of repeatedly defining and generating hundreds or thousands of hole positions in the design of an electronic control module while meeting the requirements of high efficiency, accuracy and flexibility;

[0036] (2) The present invention adopts full parametric modeling and a design method of parameter assignment and transmission to achieve position adjustment of electronic components or size changes of models. The size of the bottom holes matched with them will change synchronously, avoiding problems such as omissions or errors in changes. Compared with the design method in the prior art in which the electronic components are changed to match the bottom holes, and the hole positions need to be adjusted one by one, this method simplifies the inspection process of adjusting and comparing the electronic components one by one without the need for human intervention. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 is a flow chart of the method of the present invention;

[0038] Figure 2 A schematic diagram of a power module parameter reference relationship according to an embodiment of the present invention;

[0039] Figure 3A schematic diagram of element relationships constructed for a custom feature set according to an embodiment of the present invention;

[0040] Figure 4 The model program relationship is built-in for the command statement of the embodiment of the present invention;

[0041] Figure 5 This is a schematic diagram of automatically generating hole features on a sheet metal part when a power module and a sheet metal part are matched according to an embodiment of the present invention. DETAILED DESCRIPTION

[0042] like Figure 1 As shown, the present invention proposes an automatic punching method for assembling an electrical model based on secondary development of Creo software, comprising the following steps:

[0043] Step 1: construct reference surface and hole feature parameters of the module to be assembled;

[0044] Step 2: Create a part environment in Creo software, build a three-dimensional model, calibrate the reference surface and hole feature parameters on the three-dimensional model according to the method of step 1, and create corresponding hole positions, activate the custom feature set dialog box, select the operations of calibrating the reference surface and hole feature parameters and creating the corresponding hole positions, and define the variable names of the calibrated reference surface and hole feature parameters respectively to complete the creation of the custom feature set;

[0045] Step 3, write a command statement to bind the custom feature set to the reference surface and hole feature parameters of the module to be assembled: select the assembly reference relationship between the module to be assembled and the installation matching surface, match and bind the three-dimensional model with the module to be assembled, so that the reference surface of the three-dimensional model coincides with the reference surface of the module to be assembled, and the hole feature parameter variables of the three-dimensional model are assigned to the hole feature parameters of the module to be assembled. When the position of the module to be assembled changes or the feature size changes, the position and hole size of the three-dimensional model bound to it change synchronously;

[0046] Step 4: Encapsulate the operations of step 1 to step 3 into the AFX module library, and call the AFX module library through the Creo API interface to realize automatic punching during assembly of the electrical model.

[0047] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0048] Example 1

[0049] by Figure 5 As shown, the main feature of this embodiment is that the power module 1 is installed and fixed on the sheet metal 2, and at this time the sheet metal 2 automatically punches four through holes matching the power module 1 for screws and nuts to penetrate, connect and lock.

[0050] The main contents of this embodiment include flexible setting of parameter reference, construction of custom feature set and editing of command language, and the establishment of AFX module library file extended by Creo API interface, such as Figure 1 As shown, the specific technical solution is divided into the following three implementation steps.

[0051] 1. Construct the reference surface and hole feature parameters of the power module

[0052] Step 11: First edit the 3D model using software, such as Figure 2 As shown, reference plane 11, reference plane 12, and reference plane 13 are constructed according to the hole distribution characteristics of the power module 1;

[0053] The specific construction feature is to construct reference plane 11 based on the bottom surface of the power module, with the constraint condition of coinciding with the bottom surface, select the four holes on the bottom surface and connect them diagonally to form an intersection point, and use the intersection point as constraint condition 1, and perpendicular to reference plane 11 as constraint condition 2 to construct two perpendicularly intersecting reference planes 12 and 13. The three reference planes created are perpendicular to each other in space. The purpose of step 11 is to provide a positioning reference for the custom feature set;

[0054] Step 12: Figure 2 As shown, the analytical calibration method is used to calibrate the three parameters of the power model hole size kd1, kd2, and kd3. kd1 is the center distance of the two holes located on the long side of the bottom surface, kd2 is the center distance of the two holes located on the short side of the bottom surface, and kd3 is the aperture, which is 80% of the actual aperture to avoid installation errors. The parameters kd1, kd2, and kd3 are saved in the relationship parameter list as digital features.

[0055] 2. Construct a custom feature set, which is essentially to package multiple operation features into a group and call the group of operation steps to complete a fixed shape, which is punching in this embodiment.

[0056] Step 21. Create a part environment using Creo software. First, build a cube and build three reference surfaces on the upper surface of the cube.

[0057] The specific construction method is to construct a reference plane 21 based on the upper surface of the cube. The constraint condition is to coincide with the upper surface of the cube. Two vertically intersecting reference planes 22 and 23 are constructed with the constraint condition passing through the center point of the cube and perpendicular to the reference plane 21. The relative position relationship of the three reference planes is consistent with the three reference planes of the power module 1.

[0058] Step 22, using the intersecting vertical reference line of the reference plane 22 and the reference plane 23 as the symmetry axis, create four reference points on the reference plane 21, the four reference points are symmetrical up and down and left and right, distributed in four intersecting areas, and are named PNT0, PNT1, PNT2, and PNT3 respectively;

[0059] Step 23, calibrate two positioning dimensions kd4 and kd5, the calibration of kd4 and kd5 is only associated with the three reference surfaces 21 to 23; wherein kd4 is the center distance between the two holes on the long side of the reference surface 21, and kd5 is the center distance between the two holes on the short side of the reference surface 21;

[0060] Step 24, draw the hole feature, set the assembly punching surface to reference surface 21, and set the center point to any one of PNT0 to PNT3, such as Figure 3 As shown, the calibrated dimension kd3 is not associated with the outside, and the hole depth is set to penetrate the assembly punching surface;

[0061] Step 25, using the point command in the array command, select the hole feature drawn in step 24, and create the remaining three hole positions by copying the four reference point positions created in step 22;

[0062] Step 26, activate the custom feature set dialog box, select the above steps 22 to 25 to package them into a group, select reference surface 21 through the prompt program and define the name as sketch plane, select reference surface 22 and define the name as middle surface, select reference surface 23 and define the name as horizontal surface, and finally switch the command to set the variable dimension kd5 to define the name as width, kd4 to define the name as length, and kd3 to define the name as diameter; in step 26, enter the name as the dialog box prompt character.

[0063] Preferably, independent characteristics need to be set before saving the custom feature set (i.e., steps 22 to 25 are packaged into a group and no parameter association is generated with step 21), and no parameter association is generated with the original part environment. The electrical model reference surface and hole feature parameters are bound later through command statements.

[0064] 3. Write command statements to bind the custom feature set to the reference surface and hole feature parameters of the module to be assembled.

[0065] like Figure 4 As shown, a complete automatic punching process needs to include: user selection statement, search command statement, user input statement, IF statement, call UDF statement, UDF reference and electrical model pairing statement, UDF parameter assignment statement. The above command statements are edited through the software program dialog box. The specific technical solution is as follows:

[0066] Step 31, write a user selection command (USER_SELECT) to select the assembly reference relationship between the module to be assembled and the mounting mating surface.

[0067] In this embodiment, the selection type is set to shell surface (Filter), such as Figure 4As shown, the sheet metal surface R1 is selected as the mounting mating surface, and the program saves the sheet metal surface R1 in the name (select component assembly bottom surface);

[0068] Step 32, write a search reference command (SEARCH_MDL_REF), set the search model to retrieve the part (THIS), the search type to the reference plane (PLANE), search for reference plane 11, and the program saves the reference plane 11 in the name (D-1);

[0069] The above command is written repeatedly twice, respectively to retrieve reference surface 12 and save it in the name (D-2), and to retrieve reference surface 13 and save it in the name (D-3).

[0070] Through step 32, the three reference surfaces of the power supply model can be retrieved, and the automatically collected reference surfaces are saved in the process for subsequent pairing.

[0071] Step 33, write the search parameter command (SEARCH_MDL_PARAM), set the search model to retrieve the part (THIS), the search parameter to kd2, and the program saves the kd2 parameter in the (width) name;

[0072] The above command is written twice, respectively retrieving the parameter kd1 and saving it in the name (length), and retrieving the parameter kd3 and saving it in the name (diameter).

[0073] Through step 33, the three parameters of the power model can be retrieved, and the automatically collected parameters are saved in the process for subsequent assignment.

[0074] Step 34, write the user input command (USER_INPUT_PARAM), set the input type to integer (INTEGER), agree that the trigger value is 1, and inputting other values ​​is invalid. The program saves the integer 1 in the name (whether to enable automatic UDF punching, open hole: 1, no hole: 0);

[0075] This command statement setting can automatically open the human-computer dialogue window and prompt the operator for input in the system.

[0076] Step 35, write and enable the IF command (IF_1), set the judgment type to parameter value (PARAM_TRUE), and agree that the trigger condition is the user input value in step 4;

[0077] Step 36, write and enable the call of the custom feature set command (CREATE_UDF), agree on the custom feature set name, and agree on the surface position of the shell opening;

[0078] The surface position of the shell opening is the sheet metal surface R1, which is selected by step 31. In this step, the name (select component assembly bottom surface) is input to call step 31.

[0079] Step 37. Write the reference pairing command (UDF_REF), enter the custom signature set reference and the power module reference, and bind them accordingly. Repeat the following steps:

[0080] The sketched bottom surface matches D-1, with the constraint that it coincides;

[0081] The mid-surface and D-2 are matched, and the constraint is that they coincide;

[0082] The lateral surface is matched with D-3, and the constraint is coincidence;

[0083] Step 38: Write the parameter assignment command (UDF_DIM) to assign the power model parameters to the custom feature set that can be automatically punched, and match and bind them accordingly. Repeat the following operations:

[0084] Assign the power module hole size W1 to the custom feature set width;

[0085] Assign the power module hole size L1 to the custom feature set length;

[0086] Assign the power module hole size D1 to the custom feature set diameter.

[0087] Step 39, write the end custom feature set call command (END_CREATE_UDF); write the end IF command (END_IF_1).

[0088] The above operations adopt full parametric modeling. Through the design method of parameter assignment and transfer, the position adjustment of electronic components or the size change of the model is realized. The size of the bottom hole matched with it will change synchronously to avoid problems such as omissions or errors in changes. The function of automatically generating mounting holes while assembling electronic components and assembly surfaces is realized.

[0089] Finally, the operations of step 1 to step 3 are encapsulated into the AFX module library, and the AFX module library is called through the Creo API interface to realize automatic punching during assembly of the electrical model.

[0090] 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.

[0091] 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. An automatic punching method for electrical model assembly based on secondary development of Creo software, characterized in that: The following steps are involved: Step 1: construct reference surface and hole feature parameters of the module to be assembled; Step 2: Create a part environment in Creo software, build a three-dimensional model, calibrate the reference surface and hole feature parameters on the three-dimensional model according to the method of step 1, and create corresponding hole positions, activate the custom feature set dialog box, select the operations of calibrating the reference surface and hole feature parameters and creating the corresponding hole positions, and define the variable names of the calibrated reference surface and hole feature parameters respectively to complete the creation of the custom feature set; Step 3, write a command statement to bind the custom feature set to the reference surface and hole feature parameters of the module to be assembled: select the assembly reference relationship between the module to be assembled and the installation matching surface, match and bind the three-dimensional model with the module to be assembled, so that the reference surface of the three-dimensional model coincides with the reference surface of the module to be assembled, and the hole feature parameter variables of the three-dimensional model are assigned to the hole feature parameters of the module to be assembled. When the position of the module to be assembled changes or the feature size changes, the position and hole size of the three-dimensional model bound to it change synchronously; Step 4: Encapsulate the operations of step 1 to step 3 into the AFX module library, and call the AFX module library through the Creo API interface to realize automatic punching during assembly of the electrical model.

2. According to claim 1, an automatic punching method for electrical model assembly based on secondary development of Creo software is characterized in that: Build the reference surface of the module to be assembled, including: A reference plane 11 is constructed based on the bottom surface of the module to be assembled. The constraint condition is that it coincides with the bottom surface. Diagonal lines are selected between the centers of the four holes on the bottom surface to form an intersection. The intersection is used as constraint 1 and perpendicular to the reference plane 11 is used as constraint 2 to construct two perpendicularly intersecting reference planes 12 and 13. The three reference planes created are perpendicular to each other in space.

3. The automatic punching method for electrical model assembly based on Creo software secondary development according to claim 2 is characterized in that: Construct hole feature parameters of the module to be assembled, including: The analytical calibration method is used to calibrate the three parameters of the hole size kd1, kd2, and kd3 of the module to be assembled. kd1 is the center distance between the two holes located on the long side of the bottom surface, kd2 is the center distance between the two holes located on the short side of the bottom surface, and kd3 is the aperture. The parameters kd1, kd2, and kd3 are saved in the relationship parameter list as digital features.

4. The automatic punching method for electrical model assembly based on Creo software secondary development according to claim 3 is characterized in that: The kd3 value is 80% of the actual aperture to avoid installation errors.

5. The automatic punching method for electrical model assembly based on Creo software secondary development according to claim 3 is characterized in that: The specific method for creating a custom feature set is as follows: Step 21. Create a part environment using Creo software. First, build a cube and build three reference surfaces on the upper surface of the cube. The construction method is to construct a reference surface 21 based on the upper surface of the cube, with the constraint condition being coincidence with the upper surface of the cube, and to construct two perpendicularly intersecting reference surfaces 22 and 23 with the constraint condition passing through the center point of the cube and being perpendicular to the reference surface 21, and the mutual positional relationship of the three reference surfaces is consistent with the three reference surfaces of the module to be assembled; Step 22, using the intersecting vertical reference line of the reference plane 22 and the reference plane 23 as the symmetry axis, create four reference points on the reference plane 21, the four reference points are symmetrical up and down and left and right, distributed in four intersecting areas, and are named PNT0, PNT1, PNT2, and PNT3 respectively; Step 23, calibrate two positioning dimensions kd4 and kd5, the calibration of kd4 and kd5 is only associated with the three reference surfaces 21 to 23; wherein kd4 is the center distance between the two holes on the long side of the reference surface 21, and kd5 is the center distance between the two holes on the short side of the reference surface 21; Step 24, draw hole features, set the assembly punching surface as reference surface 21, set the center point to any one of PNT0 to PNT3, calibrate the shape dimension kd3, the kd3 dimension is not associated with the outside, and set the hole depth to penetrate the assembly punching surface; Step 25, using the point command in the array command, select the hole feature drawn in step 24, and create the remaining three hole positions by copying the four reference point positions created in step 22; Step 26. Activate the Custom Feature Set dialog box, select steps 22 to 25 above to group them, select reference surface 21 and define its name as sketch plane, select reference surface 22 and define its name as mid surface, select reference surface 23 and define its name as lateral surface, set variable dimension kd5 to width, kd4 to length, and kd3 to diameter.

6. The automatic punching method for electrical model assembly based on Creo software secondary development according to claim 5 is characterized in that: The command statements written include: User selection command, reference retrieval command, parameter retrieval command, enable call custom feature set command, reference pairing command, parameter assignment command; User selection command: used to select the assembly reference relationship between the module to be assembled and the mounting mating surface; Retrieve reference command: Set the retrieval model to retrieve parts, the retrieval type to reference plane, retrieve reference plane 11, save it in the name "D-1"; retrieve reference plane 12, save it in the name "D-2"; retrieve reference plane 13, save it in the name "D-3"; Search parameter command: set the search model to retrieve parts, the search parameter to kd2, saved in the name "width"; search parameter kd1, saved in the name "length", search parameter kd3, saved in the name "diameter"; Enable the call of custom feature set command, which is used to call the user selected command; Reference pairing command: match the sketch bottom surface with D-1, with the constraint of coincidence; match the middle surface with D-2, with the constraint of coincidence; match the lateral surface with D-3, with the constraint of coincidence; Parameter assignment command: Assign the power module hole size W1 to the custom feature set width; assign the power module hole size L1 to the custom feature set length; assign the power module hole size D1 to the custom feature set diameter.

7. The automatic punching method for electrical model assembly based on Creo software secondary development according to claim 6 is characterized in that: The command statements written also include user input commands and enabling IF commands; User input command: Set the input type to integer, the agreed trigger value is 1, and inputting other values ​​is invalid; Enable IF command: Determine whether the value entered by the user is trigger value 1. If so, execute the enable call custom feature set command, reference pairing command and parameter assignment command in sequence; otherwise, do not execute the operation.