A method for automatically generating part measuring points based on UGNX secondary development
Through the automated generation method based on UGNX secondary development, the problem of low measurement point generation efficiency and error-prone in the automotive industry is solved, and efficient and accurate measurement point generation is achieved, which improves production efficiency and reduces the error rate.
Patent Information
- Application Number
- CN202311831217.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2043-12-28
AI Technical Summary
The current automotive industry measurement point generation relies on manual operation, is inefficient and prone to errors, and cannot efficiently handle dimensional fluctuations in car body and other components efficiently and accurately.
The automatic generation method of part measurement point measurement is adopted based on UGNX secondary development. The NX OPEN function library is called through the programming language to extract part PMI information, identify features, generate measurement points according to specific rules, and automatically modify and output.
It realizes high-efficiency and high-precision automated generation of measurement points, reduces labor costs, saves time, and effectively reduces the error rate.
Smart Images

Figure CN117708993B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software development, and in particular to a method for automatically generating part measuring points based on UGNX secondary development. Background Art
[0002] Model Based Definition (MBD) combines the 3D model of parts with engineering semantic information to realize the full 3D manufacturing mode, which is the basis of digital process development. In the field of automobile manufacturing, the manufacturing dimension fluctuation of the car body exists in every link of the body manufacturing and assembly process. These dimensional fluctuations not only affect the assembly and functionality of the body in white, but also have a great impact on the appearance of the car. It is absolutely not feasible to not measure these dimensional fluctuations but to make subjective assumptions. Therefore, it is necessary to arrange measurement points for parts such as the body and conduct unified quality management. At the current stage, the generation of measurement points in the automotive industry has a complete set of measurement point development, measurement point review, measurement point release, and measurement point update processes, but the final arrangement of these measurement points is completed manually by measurement point engineers, which is inefficient and prone to errors. Summary of the invention
[0003] The purpose of the present invention is to provide a high-efficiency and high-precision automatic generation method of measuring points.
[0004] To achieve the above object, the present invention proposes a method for automatically generating part measuring points based on UGNX secondary development, which is characterized by using a programming language to call the NX OPEN function library for development, and is suitable for modeling parts with PMI information annotation based on UGNX software, including the following steps:
[0005] Step 1: Extract the part features that need to be calibrated through the part PMI;
[0006] Step 2: Determine the type of calibration object by identifying the characteristic function;
[0007] Step 3: Enter different feature calibration modules and generate measurement points according to specific rules;
[0008] Step 4: According to the requirements, the measuring points are judged and modified;
[0009] Step 5: Generate a fixed reference axis for the measuring point with the modified measuring point as the starting point;
[0010] Step six: output the modified measuring point coordinates and vector direction information.
[0011] Furthermore, the part described in step 1 is a body-in-white part. According to the PMI information of the body-in-white part, the features of the part that need to be calibrated are automatically extracted, and an Excel file is generated for subsequent use.
[0012] Furthermore, the features in step 2 are surfaces, holes and slots, and the corresponding identification feature functions are "GetSurfaceInfo()", "GetHoleInfo()" and "GetSlotInfo()" respectively.
[0013] Furthermore, the step three is specifically as follows:
[0014] 3.1 Identify the "GetHoleInfo()" method to enter the hole module, extract and calculate the inner surface of the hole to obtain the center, hole depth, hole radius and vector direction of the hole, calibrate the hole, and obtain useful information of the hole;
[0015] 3.2 Identify the "GetSlotInfo()" method to enter the slot module, find the cylindrical surfaces at both ends of the slot by screening the inner surface of the slot, calculate and analyze the cylindrical surfaces, output the slot length, slot width, slot depth, the vector of the slot along the long axis, the center point of the slot and the vector direction of the center point relative to the slot, rely on the inner surface of the slot, realize the calibration of the slot, and obtain useful information of the slot;
[0016] 3.3 Identify the "GetSurfaceInfo()" method to enter the surface module, calculate the number of scattered points according to the area and response rules of the surface, use the UV method to generate measuring points, and judge whether the generated measuring points are on the surface (the surface may have holes, grooves, etc., to avoid the generated points falling into the holes). If the point is not on the surface, use the offset method to offset the point according to a certain distance according to the rule so that it falls on the surface, thereby realizing the calibration of the surface and obtaining the required information of the surface.
[0017] Furthermore, considering the complexity and diversity of parts, the automatic generation of measuring points in step 4 can be appropriately modified according to the parts, with specific reference to the following three aspects:
[0018] 1) Determine the vector direction of the hole: Combine the vector direction of the hole and the placement position of the part during measurement, and automatically select the upper center point or the lower center point of the hole for output;
[0019] 2) In the slot information reading, the vector direction of the slot depth and the vector direction of the slot length are obtained by extracting the information of the two cylindrical surfaces; if there is a square slot, the two longer inner wall surfaces of the square slot are screened out for calculation, and combined with the placement position of the part during measurement, the upper and lower surfaces of the through-hole slot are judged;
[0020] 3) For the generation of measuring points on the surface, sometimes due to the fixed placement of parts, it is necessary to find the opposite surface to generate measuring points. Therefore, a reference line is generated to pass through the part to find the measuring points on the opposite side.
[0021] Furthermore, in step 4, for a part having a plurality of adjacent small faces with the same properties in all aspects, a stitching surface method is used to stitch the plurality of small faces into a complete surface, and points are regularly scattered on the stitching surface to avoid repeated measurements.
[0022] Furthermore, the step five is specifically as follows: taking the final measuring point generated after modification in the step four as the starting point, by adopting a method of generating a fixed reference axis, marking the position and vector direction of the final measuring point for easy observation and comparison, and generating a fixed reference axis on the part, and the fixed reference axis can be modified in color, size, length, etc. with the part.
[0023] Furthermore, the output information format of step six is a text file, and the format file such as CSV, XML, XLS, etc. can be selected according to the project requirements; the specific steps of output are: after reading the input file, the useful information generated by the final measuring point is returned and written behind the row where the corresponding feature is located, so as to realize the one-to-one correspondence between the input and the output, which is convenient for the subsequent use in measuring and comparing the measuring points.
[0024] Compared with the prior art, the advantages of the present invention are:
[0025] 1. The present invention is based on the secondary development of UGNX, automatically generates part measurement points, has high efficiency, is simple and convenient to operate, and reduces labor costs.
[0026] 2. The present invention takes into account the complex characteristics of parts, can automatically identify, analyze and determine features, and intelligently and quickly generate measurement points, greatly saving time and effectively reducing the error rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is a calculation flow chart of the automatic generation method of part measurement points based on UGNX secondary development in this embodiment DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be further described below.
[0029] This embodiment takes the body-in-white parts as a preferred example and proposes a method for automatically generating part measuring points based on UGNX secondary development. By using the UGNX developer function, custom menus and toolbar items are created to implement the functions, such as Figure 1 As shown in the figure, the specific calculation steps after completing the UGNX numerical model and environment settings are as follows:
[0030] Step 1: Extract key features. Extract the part features that need to be calibrated, such as faces, holes, and slots, through the part PMI. The operator calls the program to extract the PMI of the part that needs to generate the measuring point, and obtains the elements that need to generate the measuring point, such as feature type, requirement ID, associated entity, etc.
[0031] Step 2: Feature identification, information extraction and integration. By identifying the feature function, the type of the calibration object is determined. Different features in the body-in-white part have corresponding feature functions. This embodiment mainly generates measurement points for the surface, hole, and slot of the body-in-white part. The feature functions of these three features are named "GetSurfaceInfo()", "GetHoleInfo()" and "GetSlotInfo()" respectively.
[0032] Step 3: The rule-based point scattering module generates measurement points according to specific rules by entering different feature calibration modules;
[0033] Different features have corresponding measurement point generation rules. According to the different feature function names identified in step 2, different modules are entered to generate measurement points for them. The specific process is as follows:
[0034] 1) Identify "GetHoleInfo()" and enter the hole module. By extracting, calculating and analyzing the inner wall of the hole, the center, depth, radius and vector direction of the hole are obtained.
[0035] 2) Identify "GetSlotInfo()" to enter the slot module, find the cylindrical surfaces at both ends of the slot by screening the inner surface of the slot, calculate and analyze the cylindrical surfaces, and output the slot length, slot width, slot depth, the vector of the slot along the long axis, the center point of the slot, and the vector direction of the center point relative to the slot;
[0036] 3) Identify "GetSurfaceInfo()" to enter the surface module, first calculate the area of the surface, calculate the number of points needed by the area, and then use the UV method to generate the measurement points. Determine whether the point is on the surface (the surface may have holes and grooves, etc., to avoid the generated points falling into the holes and grooves). If the point is not on the surface, use the offset method to offset the point by a certain distance according to the rules so that it falls on the surface;
[0037] Step 4: Determine and improve the effectiveness of the measuring points. Determine and modify the measuring points according to actual needs.
[0038] Generally, the body-in-white parts are numerous and complex. To meet the needs of subsequent measurement, the selection of measuring points will be modified manually. In this embodiment, the automatic generation of measuring points can be modified appropriately with the parts, which is specifically reflected as follows:
[0039] 1) Determine the vector direction of the hole. Combined with the vector direction of the hole and the placement position of the part during measurement, the upper center point or lower center point of the hole can be automatically selected for output;
[0040] 2) If there is a square groove, the two longer inner wall surfaces of the groove are selected for calculation. Combined with the placement of the parts during measurement, the upper and lower surfaces of the through-hole groove can be judged;
[0041] 3) For the generation of measuring points on the surface, due to the fixed placement of parts and other reasons, it is necessary to find the opposite surface to generate measuring points. This embodiment adopts the method of generating reference lines, which penetrates the parts and finds the measuring points on the opposite side;
[0042] In addition, in the present embodiment, there is a part with multiple adjacent small faces, and their properties in all aspects are the same. If measuring points are generated for each small face, the problem of repeated measurement will occur. For this reason, the present embodiment uses the stitched surface method to judge whether the face needs to be stitched, stitch these small broken faces into a complete face, extract the outer contour edge of the stitched face, scatter points on the edge in equal proportion, and then offset the scattered points on the face along the direction of the vertical edge by an appropriate distance, so that the position of the measuring points is more reasonable, thereby realizing regular point scattering on the stitched face.
[0043] Step 5: Generate a fixed reference axis, using the final measuring point as the starting point to generate a fixed reference axis of the measuring point;
[0044] In order to visually observe the measurement point generation of the body-in-white parts, this embodiment adopts a method of generating a fixed reference axis, marking the measurement point position and the vector direction of the measurement point, and taking the final measurement point generated in step 4 as the starting point to generate a fixed reference axis of fixed length, style, and color. The length, style, and color of the reference axis can be appropriately adjusted and modified according to the parts.
[0045] Step 6: Output the measurement point and feature files, and output the coordinates, vector direction and other information of the final measurement point. In this embodiment, the output information is a CSV format file, which is added after the line where the corresponding feature of the original input file is located, so as to facilitate the subsequent use of measurement comparison of the measurement points.
[0046] The above is only a preferred embodiment of the present invention and does not limit the present invention in any way. Any technician in the relevant technical field, without departing from the scope of the technical solution of the present invention, makes any form of equivalent replacement or modification to the technical solution and technical content disclosed in the present invention, which does not depart from the content of the technical solution of the present invention and still falls within the protection scope of the present invention.
Claims
1. A method for automatically generating part measuring points based on UGNX secondary development, characterized in that: The development of NX OPEN function library is called by programming language, which is suitable for modeling parts with PMI information annotation based on UGNX software, including the following steps: Step 1: Extract the part features that need to be calibrated through the part PMI; Step 2: Determine the type of the calibration object by identifying the feature function; the features in step 2 are surface, hole and slot, and the corresponding identification feature functions are "GetSurfaceInfo()", "GetHoleInfo()" and "GetSlotInfo()" respectively; Step 3: Enter different feature calibration modules and generate measurement points according to specific rules; the specific steps of step 3 are as follows: 3.1 Identify the "GetHoleInfo()" method to enter the hole module, extract the inner surface of the hole, calibrate the hole, and obtain useful information of the hole; 3.2 Identify the "GetSlotInfo()" method to enter the slot module, screen the inner surface of the slot, rely on the inner surface of the slot, calibrate the slot, and obtain useful information of the slot; 3.3 Identify the "GetSurfaceInfo()" method to enter the surface module, calculate the number of scattered points according to the area of the surface and the response rule, use the UV method to calibrate the surface, and obtain the required information of the surface; Step 4: According to the requirements, the measuring points are judged and modified; the measuring points in step 4 are automatically generated, and appropriate conversion and modification are performed according to the parts, specifically: 1) Determine the vector direction of the hole: Combine the vector direction of the hole and the placement position of the part during measurement, and automatically select the upper center point or the lower center point of the hole for output; 2) In the slot information reading, the vector direction of the slot depth and the vector direction of the slot length are obtained by extracting the information of the two cylindrical surfaces; if there is a square slot, the two longer inner wall surfaces of the square slot are screened out for calculation, and combined with the placement position of the part during measurement, the upper and lower surfaces of the through-hole slot are judged; 3) For the generation of measuring points of the surface, a reference line is generated to penetrate the part and find the measuring points on the reverse side; Step 5: Generate a fixed reference axis for the measuring point with the modified measuring point as the starting point; Step six: output the modified measuring point coordinates and vector direction information.
2. The automatic generation method of part measuring points based on UGNX secondary development according to claim 1 is characterized in that: The parts described in step 1 are body-in-white parts.
3. The method for automatically generating part measuring points based on UGNX secondary development according to claim 1 is characterized in that: In the step 4, for the part having multiple adjacent small faces with the same properties in all aspects, a stitching surface method is used to stitch the multiple small faces into a complete surface, and points are regularly scattered on the stitching surface to avoid repeated measurements.
4. The method for automatically generating part measuring points based on UGNX secondary development according to claim 1 is characterized in that: The step five is specifically as follows: taking the final measuring point generated after modification in the step four as a starting point, generating a fixed reference axis on the part by adopting a method of generating a fixed reference axis, and marking the position and vector direction of the final measuring point.
5. The method for automatically generating part measuring points based on UGNX secondary development according to claim 4 is characterized in that: The output information format of step six is a text file, and the specific steps of output are: after reading the input file, the information generated by the final measuring point is returned and written behind the line where the corresponding feature is located, so as to achieve a one-to-one correspondence between input and output, which is convenient for subsequent use in measuring and comparing the measuring points.
Citation Information
Patent Citations
MBD-based aviation complex structural member inspection method
CN111027134A
Mould electrode detection method, device and equipment based on UGNX
CN113983977A