A thread hole type identification method, device and system and processing equipment

By obtaining the target complete circle of the threaded hole and constructing the theoretical cylinder, the problem of non-standard threaded holes cannot be automatically identified is solved, achieving efficient identification and classification and improving the level of automation in design and manufacturing.

CN121861647BActive Publication Date: 2026-06-05ZHUHAI GREE PRECISION MOLD CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHUHAI GREE PRECISION MOLD CO LTD
Filing Date
2026-03-19
Publication Date
2026-06-05

Smart Images

  • Figure CN121861647B_ABST
    Figure CN121861647B_ABST
Patent Text Reader

Abstract

The application discloses a thread hole type identification method, device and system and a processing equipment, and belongs to the field of mechanical processing. After a target complete circle on a part to be detected is acquired, a target bolt diameter corresponding to a preset bottom hole diameter is acquired based on a parameter table; a theoretical cylinder is constructed at the position of the target complete circle; then, the theoretical cylinder and the part to be detected are subtracted to obtain a target entity, and the type of the surface of the target entity is a cylindrical surface; if the target entity with the target bolt diameter exists, it is determined that the thread hole type at the position of the theoretical cylinder is a target type. The application scheme actually adopts two parameters of the bottom hole diameter and the bolt diameter to identify the thread hole. Even if the thread hole is a non-standard geometric body, the thread hole can be accurately identified and classified, and the identification efficiency and the automation level are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machining, and in particular to a method, apparatus, system and processing equipment for identifying threaded hole types. Background Technology

[0002] In modern manufacturing, hole features are among the most basic and frequently used geometric elements in part structures, widely used for functions such as connection, positioning, assembly, and fastening. With the widespread application of CAD software (such as UG / NX, SolidWorks, CATIA, etc.), designers often use third-party plugins to quickly generate threaded holes to improve modeling efficiency.

[0003] However, the threaded holes generated by these add-ons are usually non-parametric and non-standard geometries with complex internal structures, including multiple layers of features such as pilot holes, chamfers, and thread profiles, and do not comply with national standards such as ISO and GB. These holes cannot be automatically recognized in the downstream CAM programming stage and must be manually replaced one by one with standard thread features, which seriously restricts the automation level of the integrated design and manufacturing process. Summary of the Invention

[0004] To overcome the shortcomings of existing technologies, this application provides a threaded hole type identification method, device, system, and processing equipment to address the problem that existing threaded holes generated by third-party plug-ins are typically non-parametric, non-standard geometries with complex internal structures, including multiple layers of features such as bottom holes, chamfers, and thread profiles, and do not comply with national standards such as ISO and GB. Such holes cannot be automatically identified in the downstream CAM programming stage and must be manually replaced with standard thread features one by one, which seriously restricts the automation level of the integrated design and manufacturing process.

[0005] The technical solution adopted by this application to solve its technical problem is:

[0006] Firstly, a method for identifying threaded hole types is provided, including:

[0007] Obtain the target complete circle on the part to be inspected. The bottom hole diameter of the target complete circle is the same as the preset bottom hole diameter in the parameter table of the target type. The correspondence between the preset bottom hole diameter and the bolt diameter is different in the parameter tables of different types.

[0008] Based on the parameter table, obtain the target bolt diameter corresponding to the preset bottom hole diameter;

[0009] A theoretical cylinder is constructed at the location of the target complete circle. The diameter of the base of the theoretical cylinder is larger than the diameter of the target bolt. The axis of the theoretical cylinder coincides with the normal vector direction of the target complete circle, and the center of the target complete circle is located on the axis of the theoretical cylinder.

[0010] The target entity is obtained by subtracting the theoretical cylinder from the part to be tested, and the type of the surface of the target entity is cylindrical surface;

[0011] If a target entity with a diameter equal to that of the target bolt exists, then the thread hole type at the location of the theoretical cylinder is determined to be the target type.

[0012] As an optional implementation of this application, obtaining the target complete circle on the part to be inspected includes:

[0013] Obtain all faces of the 3D model of the part to be inspected;

[0014] Get the target surface with a cylindrical surface type;

[0015] Obtain the diameter of the bottom hole for all complete circles on the target surface;

[0016] The complete circle whose bottom hole diameter is the same as the preset bottom hole diameter in the parameter table of the target type is used as the target complete circle.

[0017] As an optional implementation of this application, when constructing the theoretical cylinder at the position of the target complete circle, the following method is further included:

[0018] The base diameter of the theoretical cylinder is calculated based on the target bolt diameter, where...

[0019] The theoretical diameter of the cylinder's base = target bolt diameter + preset value, or, the theoretical diameter of the cylinder's base = preset coefficient * target bolt diameter;

[0020] Wherein, the preset value is greater than 0, and the preset coefficient is greater than 1.

[0021] As an optional implementation of this application, the step of obtaining the target entity by subtracting the theoretical cylinder from the part to be tested includes:

[0022] By using the theoretical cylinder as the target body and the part to be tested as the tool body, Boolean operations are performed to calculate the difference, resulting in multiple entities;

[0023] Obtain the attribute information for each entity, including the type and size of the face;

[0024] Use the entity with a cylindrical face as the target entity.

[0025] As an optional implementation of this application, it also includes:

[0026] If a target entity with a diameter equal to that of the target bolt exists, the target entity is highlighted in a preset format.

[0027] Secondly, a method for identifying threaded hole types is provided, including:

[0028] Determine whether all threaded holes on the part to be inspected are standard holes;

[0029] If the threaded hole is a non-standard hole, the threaded hole type identification shall be performed by the method described in any of the above technical solutions.

[0030] As an optional implementation of this application, determining whether all threaded holes of the part to be inspected are standard holes includes:

[0031] Obtain the thread characteristics of the threaded hole;

[0032] Determine whether it is a standard hole based on the described thread characteristics;

[0033] If not, then the threaded hole is determined to be a non-standard hole.

[0034] Thirdly, a threaded hole type identification device is provided, comprising:

[0035] The target complete circle acquisition module is used to acquire the target complete circle on the part to be inspected. The bottom hole diameter of the target complete circle is the same as the preset bottom hole diameter in the parameter table of the target type. The correspondence between the preset bottom hole diameter and the bolt diameter is different in the parameter tables of different types.

[0036] The target bolt diameter acquisition module is used to acquire the target bolt diameter corresponding to the preset bottom hole diameter based on the parameter table.

[0037] A theoretical cylinder construction module is used to construct a theoretical cylinder at the position of the target complete circle. The bottom diameter of the theoretical cylinder is larger than the diameter of the target bolt. The axis of the theoretical cylinder coincides with the normal vector direction of the target complete circle, and the center of the target complete circle is located on the axis of the theoretical cylinder.

[0038] The target entity acquisition module is used to obtain the target entity by subtracting the theoretical cylinder from the part to be inspected, wherein the surface type of the target entity is a cylindrical surface;

[0039] The thread hole type identification module is used to determine the thread hole type at the location of the theoretical cylinder as the target type if there is a target entity with a diameter equal to that of the target bolt.

[0040] Fourthly, a threaded hole type identification system is provided, comprising:

[0041] At least one processor and at least one memory;

[0042] The memory stores the executable instructions of the processor;

[0043] The processor is configured to perform the thread hole type identification method described in any of the above-described methods.

[0044] Fourthly, a threaded hole processing device is provided, which applies the threaded hole type identification method described in any of the above-mentioned embodiments.

[0045] Beneficial effects:

[0046] This application provides a method, apparatus, system, and processing equipment for identifying threaded hole types. After obtaining a target complete circle on the part to be inspected, the target bolt diameter corresponding to the preset bottom hole diameter is obtained based on the parameter table. A theoretical cylinder is constructed at the position of the target complete circle, the bottom diameter of the theoretical cylinder being larger than the target bolt diameter, the axis of the theoretical cylinder coinciding with the normal vector direction of the target complete circle, and the center of the target complete circle located on the axis of the theoretical cylinder. Then, the difference between the theoretical cylinder and the part to be inspected is calculated to obtain a target entity, the surface type of which is a cylindrical surface. If a target entity with a diameter equal to the target bolt diameter exists, the threaded hole type at the position of the theoretical cylinder is determined to be the target type. Since the bottom hole diameter of the target complete circle is the same as the preset bottom hole diameter in the parameter table for the target type, and the correspondence between the preset bottom hole diameter and the bolt diameter differs in parameter tables for different types, this application actually uses two parameters—the bottom hole diameter and the bolt diameter—to identify the threaded hole. Even if the threaded hole is a non-standard geometric shape, it can be accurately identified and classified, greatly improving identification efficiency and automation. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a flowchart of a threaded hole type identification method provided in an embodiment of this application;

[0049] Figure 2 This is a flowchart of a method for obtaining a complete target circle on a part to be inspected, provided in an embodiment of this application.

[0050] Figure 3 This is a schematic diagram of the structure of a part to be tested provided in an embodiment of this application;

[0051] Figure 4 This is a schematic diagram of the bottom hole diameter and bolt diameter provided in an embodiment of this application;

[0052] Figure 5 This is a flowchart of a method for obtaining a target entity by subtracting the theoretical cylinder from the part to be tested, according to an embodiment of this application.

[0053] Figure 6 This is a flowchart of another thread hole type identification method provided in an embodiment of this application;

[0054] Figure 7 This is a schematic diagram of a standard hole and a non-standard hole provided in an embodiment of this application;

[0055] Figure 8 This is a flowchart of a specific thread hole type identification method provided in an embodiment of this application;

[0056] Figure 9 This is a schematic diagram of a thread hole type identification device provided in an embodiment of this application;

[0057] Figure 10 This is a schematic diagram of a thread hole type identification system provided in an embodiment of this application. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be described in detail below with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0059] While some existing technologies rely on geometric feature matching or rule bases for thread recognition, such as directly creating a 3D model of the thread feature during modeling, and using machine vision algorithms to analyze 2D images of physical parts or CAD models to identify thread features and calculate corresponding parameters, other methods employ general 3D model feature recognition algorithms. The core method involves pre-defining the attribute adjacency graph of the thread feature and performing subgraph matching with the attribute adjacency graph of features in the 3D model to achieve thread feature recognition. Another approach involves preprocessing the B-rep (boundary representation) model to remove virtual edges, obtaining a set of engineering surfaces. Then, a cycle search is performed on each model edge on the engineering surfaces to determine if it is a seed cycle, resulting in a set of seed cycles. The face-edge graph on the non-base side of the seed cycle is traversed to obtain all model edges and vertices of the feature, removing virtual vertices to obtain a set of engineering edges for that feature. Finally, each engineering edge in the set is checked to determine if it is a thread line and its corresponding thread feature is extracted. However, these methods generally suffer from the following drawbacks:

[0060] 1. The hole structure is only generated for specific brands or specific plug-ins, resulting in poor generalization ability;

[0061] 2. Relying on preset templates makes it difficult to adapt to new or variant structures;

[0062] 3. Lack of a comprehensive judgment mechanism for "overall morphology of hole features + linkage of diameter parameters";

[0063] 4. Unable to achieve batch, automated, and high-precision recognition;

[0064] 5. It cannot be deeply integrated with mainstream CAD platforms, making it difficult to promote.

[0065] Therefore, there is an urgent need for a universal, stable, and scalable intelligent recognition method that can overcome the limitations of existing technologies, achieve accurate identification and classification of various non-standard hole structures, and bridge the data gap between CAD and CAM.

[0066] To address this issue, this application employs an intelligent thread hole identification method to automatically identify and classify non-standard thread holes. This eliminates the need for designers to manually replace and adjust them, significantly reducing design time, improving identification accuracy, and lowering the processing anomaly rate caused by manual identification errors. Ultimately, this improves mold manufacturing efficiency and product quality. Details are as follows:

[0067] Reference Figure 1 This application provides a method for identifying threaded hole types, including:

[0068] S11: Obtain the target complete circle on the part to be inspected. The bottom hole diameter of the target complete circle is the same as the preset bottom hole diameter in the parameter table of the target type. The correspondence between the preset bottom hole diameter and the bolt diameter is different in the parameter tables of different types.

[0069] Among them, obtaining the complete target circle on the part to be inspected can be achieved by, for example... Figure 2 The steps shown are as follows:

[0070] S111: Obtain all faces of the 3D model of the part to be inspected; this can be done using the functions of existing software.

[0071] S112: Obtain the target surface with a cylindrical surface type; non-cylindrical surfaces are not the threaded holes that need to be identified in this application.

[0072] S113: Obtain the diameter of the bottom hole for all complete circles on the target surface; because some non-standard threaded holes cannot form a closed circle. Therefore, complete circles are required.

[0073] S114: Use the complete circle whose bottom hole diameter is the same as the preset bottom hole diameter in the parameter table of the target type as the target complete circle.

[0074] For example, the parameter table for Yanxiu coarse thread type screw holes is shown in Table 1:

[0075] Table 1

[0076]

[0077] It is understandable that different types of threaded holes can have different pilot hole diameters, or the same pilot hole diameter but different bolt diameters. The part to be inspected can be referenced... Figure 3 A schematic diagram of the bottom hole diameter d1 and the bolt diameter d2 is shown below. Figure 4 As shown.

[0078] S12: Obtain the target bolt diameter corresponding to the preset bottom hole diameter based on the parameter table.

[0079] S13: Construct a theoretical cylinder at the position of the target complete circle. The diameter of the base of the theoretical cylinder is larger than the diameter of the target bolt. The axis of the theoretical cylinder coincides with the normal vector direction of the target complete circle, and the center of the target complete circle is located on the axis of the theoretical cylinder.

[0080] As a preferred implementation of this application, when constructing the theoretical cylinder at the position of the target complete circle, the method further includes:

[0081] The base diameter of the theoretical cylinder is calculated based on the target bolt diameter, where...

[0082] The theoretical diameter of the cylinder's base = target bolt diameter + preset value, or, the theoretical diameter of the cylinder's base = preset coefficient * target bolt diameter;

[0083] The preset value is greater than 0, and the preset coefficient is greater than 1. The preset value and preset coefficient are set based on experience.

[0084] As another implementation of this application, a corresponding table can also be set up to record the bottom diameter of the theoretical cylinder.

[0085] For example, as shown in Table 2:

[0086] Table 2

[0087]

[0088] S14: The target entity is obtained by subtracting the theoretical cylinder from the part to be tested, and the type of the surface of the target entity is cylindrical surface;

[0089] As a preferred implementation of the embodiments of this application, such as Figure 5 As shown, the step of obtaining the target entity by subtracting the theoretical cylinder from the part to be tested includes:

[0090] S141: Using the theoretical cylinder as the target body and the part to be tested as the tool body, perform Boolean operation to calculate the difference to obtain multiple entities;

[0091] S142: Obtain the attribute information of each entity, including the type and size of the face;

[0092] S143: Use the entity with a cylindrical face as the target entity.

[0093] S15: If there exists a target entity with a diameter equal to that of the target bolt, then the thread hole type at the location of the theoretical cylinder is determined to be the target type.

[0094] In addition, as a preferred implementation of this application, it also includes:

[0095] If a target entity with a diameter equal to that of the target bolt exists, the target entity is highlighted in a preset format.

[0096] The threaded hole type identification method provided in this application involves obtaining a target complete circle on the part to be inspected, and then obtaining the target bolt diameter corresponding to the preset bottom hole diameter based on the parameter table. A theoretical cylinder is constructed at the position of the target complete circle, where the bottom diameter of the theoretical cylinder is larger than the target bolt diameter, the axis of the theoretical cylinder coincides with the normal vector direction of the target complete circle, and the center of the target complete circle is located on the axis of the theoretical cylinder. Then, the difference between the theoretical cylinder and the part to be inspected is calculated to obtain a target entity, where the surface type of the target entity is a cylindrical surface. If a target entity with a diameter equal to the target bolt diameter exists, the threaded hole type at the position of the theoretical cylinder is determined to be the target type. Since the bottom hole diameter of the target complete circle is the same as the preset bottom hole diameter in the parameter table for the target type, and the correspondence between the preset bottom hole diameter and the bolt diameter differs in parameter tables for different types, this application actually uses both the bottom hole diameter and the bolt diameter as parameters to identify the threaded hole. Even if the threaded hole is a non-standard geometric shape, it can be accurately identified and classified, greatly improving identification efficiency and automation.

[0097] Example 2:

[0098] Reference Figure 6 This application provides another method for identifying threaded hole types, including:

[0099] S21: Determine whether all threaded holes of the part to be inspected are standard holes; the determination of whether all threaded holes of the part to be inspected are standard holes includes:

[0100] Obtain the thread characteristics of the threaded hole;

[0101] Determine whether it is a standard hole based on the described thread characteristics;

[0102] If not, then the threaded hole is determined to be a non-standard hole.

[0103] It should be noted that this application does not improve upon existing technology for identifying whether a threaded hole is a standard hole. The illustrations of standard and non-standard holes are shown below. Figure 7 As shown.

[0104] S22: If the threaded hole is a non-standard hole, obtain the target complete circle on the part to be inspected. The bottom hole diameter of the target complete circle is the same as the preset bottom hole diameter in the parameter table of the target type. The correspondence between the preset bottom hole diameter and the bolt diameter is different in the parameter tables of different types.

[0105] The following steps can be used to obtain the complete target circle on the part to be inspected:

[0106] Obtain all faces of the 3D model of the part to be inspected; this can be done using the functions of existing software.

[0107] Obtain the target surface with a cylindrical surface type; non-cylindrical surfaces are not the threaded holes that need to be identified in this application.

[0108] Obtain the diameter of the bottom hole for all complete circles on the target surface; because some non-standard threaded holes cannot form a closed circle. Therefore, complete circles are required.

[0109] The complete circle whose bottom hole diameter is the same as the preset bottom hole diameter in the parameter table of the target type is used as the target complete circle.

[0110] For example, the parameter table for Yanxiu coarse thread type screw holes is shown in Table 1:

[0111] It is understandable that different types of threaded holes can have different pilot hole diameters, or the same pilot hole diameter but different bolt diameters. The part to be inspected can be referenced... Figure 3 A schematic diagram of the bottom hole diameter d1 and the bolt diameter d2 is shown below. Figure 4 As shown.

[0112] S23: Obtain the target bolt diameter corresponding to the preset bottom hole diameter based on the parameter table.

[0113] S24: Construct a theoretical cylinder at the position of the target complete circle. The diameter of the base of the theoretical cylinder is larger than the diameter of the target bolt. The axis of the theoretical cylinder coincides with the normal vector direction of the target complete circle, and the center of the target complete circle is located on the axis of the theoretical cylinder.

[0114] As a preferred implementation of this application, when constructing the theoretical cylinder at the position of the target complete circle, the method further includes:

[0115] The base diameter of the theoretical cylinder is calculated based on the target bolt diameter, where...

[0116] The theoretical diameter of the cylinder's base = target bolt diameter + preset value, or, the theoretical diameter of the cylinder's base = preset coefficient * target bolt diameter;

[0117] The preset value is greater than 0, and the preset coefficient is greater than 1. The preset value and preset coefficient are set based on experience.

[0118] As another implementation of this application, a corresponding table can also be set up to record the bottom diameter of the theoretical cylinder.

[0119] Examples are shown in Table 2.

[0120] S25: The target entity is obtained by subtracting the theoretical cylinder from the part to be tested, and the type of the surface of the target entity is cylindrical surface;

[0121] As a preferred implementation of this application, the step of obtaining the target entity by subtracting the theoretical cylinder from the part to be tested includes:

[0122] By using the theoretical cylinder as the target body and the part to be tested as the tool body, Boolean operations are performed to calculate the difference, resulting in multiple entities;

[0123] Obtain the attribute information for each entity, including the type and size of the face;

[0124] Use the entity with a cylindrical face as the target entity.

[0125] S26: If there exists a target entity with a diameter equal to that of the target bolt, then the thread hole type at the location of the theoretical cylinder is determined to be the target type.

[0126] In addition, as a preferred implementation of this application, it also includes:

[0127] If a target entity with a diameter equal to that of the target bolt exists, the target entity is highlighted in a preset format.

[0128] The threaded hole type identification method provided in this application first obtains all threaded holes of the part to be inspected; then it determines whether all threaded holes of the part to be inspected are standard holes; this can reduce the number of threaded holes processed subsequently and improve the identification efficiency. If the threaded hole is a non-standard hole, after obtaining the target complete circle on the part to be inspected, the target bolt diameter corresponding to the preset bottom hole diameter is obtained based on the parameter table; a theoretical cylinder is constructed at the position of the target complete circle, the bottom diameter of the theoretical cylinder is larger than the target bolt diameter, the axis of the theoretical cylinder coincides with the normal vector direction of the target complete circle, and the center of the target complete circle is located on the axis of the theoretical cylinder; then the difference between the theoretical cylinder and the part to be inspected is calculated to obtain the target entity, and the surface type of the target entity is cylindrical surface; if there is a target entity with a diameter equal to the target bolt diameter, the threaded hole type at the position of the theoretical cylinder is determined to be the target type. Since the bottom hole diameter of the target complete circle is the same as the preset bottom hole diameter in the parameter table of the target type, and the correspondence between the preset bottom hole diameter and the bolt diameter is different in different types of parameter tables, this application actually uses two parameters, the bottom hole diameter and the bolt diameter, to identify the threaded hole. Even if the threaded hole is a non-standard geometry, it can be accurately identified and classified, greatly improving the identification efficiency and automation level.

[0129] Example 3:

[0130] like Figure 8 As shown, a specific method for identifying threaded holes is provided. Based on the UG / NX platform and combined with UG / OPENAPI for secondary development, the effectiveness of the method is verified by taking an automotive glove box mold model as an example.

[0131] The mold contains 2026 parts, of which 137 require hole feature identification. If each threaded hole is manually inspected to check the bottom diameter and target diameter surface, it is estimated to take more than 3 hours, and there is a significant risk of missed detections and misjudgments.

[0132] UG secondary development is a set of tools for developing extended functions of UGNX 3D design software, including UG / OPEN API toolset, UG_GRIP, etc. The former is an object-oriented development tool based on C++, and the latter is a simple procedural development tool. The program is the process of the inventor realizing independent development from scratch.

[0133] Principle: This method detects whether the diameter surfaces of the threaded hole feature body sequentially meet the dimensional parameters. Taking the Yanxiu threaded hole as an example in the industry:

[0134] If the hole diameter is equal to any value of the bottom hole diameter d1 in the parameter table, and at the same time the hole characteristic diameter surface has parameter d2, then the threaded hole is determined to be a Yanxiu threaded hole.

[0135] If the hole diameter is equal to any value of the bottom hole diameter d1 in the parameter table, but the hole characteristic diameter surface does not exist in parameter d2, then the hole is a non-standard hole and is not judged as a Yanxiu threaded hole.

[0136] The operation steps are briefly described below:

[0137] Since the type of the target hole is unknown, first determine whether it is a Yanxiu threaded hole;

[0138] Obtain the diameter D(d1) of the complete circle. If there is a value of d1 in the parameter table, there will be a corresponding value of d2 by default. A cylinder of (d2+0.5) can be generated---refer to step 3.1 below.

[0139] With the arc diameter and direction vector, the UG command [Cylinder] can be used to form a cylinder. The next step is the difference calculation process, where the cylinder is compared with the original part with the hole to cut out the object to be identified. Subsequent identification operations are based on this cut object (cut body). --- Refer to steps 3.4 and 3.5 for details.

[0140] The diameter of the constructed cylinder should be d2 + 0.5. If created with a diameter of d2, the cylinder and the part will not intersect, resulting in no intersection. In this case, subtracting the diameter will cause an error and prevent the calculation from executing. Additionally, small gaps on some surfaces can also lead to incomplete contact. Therefore, +0.5, or even +1 or +2, is sufficient, as long as the final cylinder can completely enclose the screw hole (i.e., >d2).

[0141] The specific steps are as follows:

[0142] 1. Obtain all faces that make up the 3D model of the part;

[0143] The UF_MODL_ask_body_faces() function in the UG / OPEN API can be used to obtain data for a 3D part and all its faces.

[0144] 2. Determine the type of the face obtained in the previous step and extract the cylindrical face from it;

[0145] The faces obtained in the previous step include not only cylindrical faces but also non-cylindrical faces. The attribute information of a face can be obtained through the function UF_MODL_ask_face_data(), including the face type. Combined with a C++ for loop, all faces of type cylindrical can be obtained.

[0146] 3. Perform the following operations on each cylindrical surface obtained in the previous step:

[0147] 3.1 Obtain the diameter D of the complete circle, the direction of the axis, and the midpoint of the axis;

[0148] To obtain the diameter D of a complete circle, excluding non-closed circular surfaces such as a 3 / 4 circle, the `UF_MODL_ask_face_data()` function can be used to retrieve the surface attribute information. For cylindrical surfaces, the retrieved attribute information includes the surface's axial vector, the absolute coordinates of the axial midpoint, and the surface radius. Existing algorithms can identify standard threaded threads within the factory and filter out some threaded holes. For unidentifiable threaded holes, a circular surface is obtained to obtain the hole diameter D, i.e., the bottom hole diameter d1, which can be matched with the bolt diameter d2.

[0149] 3.2 In the previous step, the axis is the Z-axis, and the midpoint of the axis is the origin Org. The other two axes, namely the X and Y axes, are randomly defined by the software. A Cartesian coordinate system is created and set as the working coordinate system.

[0150] 3.3 Obtain the Z-axis dimension of the part, size_z;

[0151] 3.4 Starting from the origin Org, offset from the Z-axis by size_z, with a height of size_z and a diameter D of (d2+0.5), create a cylinder using the function UF_MODL_create_cylinder() along the axis of the cylindrical surface.

[0152] 3.5 Perform a Boolean operation to find the difference between the cylinder and the part generated in the previous step, and obtain the entities i1, i2, i3....

[0153] 3.6 Visualization of Results: The function UF_MODL_ask_face_data() is used again to obtain the attribute information of the largest cylindrical surface of the entity, including the type of the surface, and then combined with a C++ for loop to obtain the cylindrical surface.

[0154] If the diameter of the cylindrical surface of a solid is equal to d2, it can be identified as a Yanxiu threaded hole.

[0155] In addition, the function UF_OBJ_set_color() is used to set the surface to red, indicating that this cylindrical surface meets the judgment criteria;

[0156] 3.7 If the diameter d2 does not exist on the solid cylindrical surface, it is determined to be a non-Yanxiu thread hole and will not be processed, thus achieving the filtering of other holes.

[0157] 4. Complete the identification of all cylindrical surfaces of the part;

[0158] Leveraging the powerful computing capabilities of computers, the above logic can be completed in a very short time without any errors or omissions. The analysis and testing process for 137 parts of mold ZM701 / 3683 requiring aperture detection takes only 15 minutes. Different software and secondary development tools may have slight differences in specific implementation methods, such as the way cylinders are generated or the maximum cylindrical surface diameter of the solid object, but these do not affect the application of the method of this invention. Furthermore, it can be flexibly configured according to actual conditions, such as only determining cylindrical surfaces with a certain diameter or filtering out non-specific cylindrical surfaces.

[0159] It should be noted that different CAD software and secondary development platforms may have slight differences in their specific implementation methods, such as Boolean operation methods and coordinate system construction methods. However, the core logic of this invention remains applicable and can be flexibly configured according to actual needs. For example, it can identify only cylindrical surfaces of a specific diameter or filter out non-target hole structures. In addition, this embodiment can also integrate machine learning algorithms to continuously improve the intelligence level of the recognition model by learning from a large number of threaded hole samples of other specifications, thereby achieving adaptive recognition capabilities for new or variant threaded holes.

[0160] Furthermore, this invention is not limited to the UG / NX platform, but can also be adapted to other mainstream CAD systems. It can further integrate machine learning modules to collect a large number of samples of threaded holes, non-standard holes, and irregular holes; extract geometric features (diameter, height, chamfer angle, number of faces, etc.); train classification models (such as SVM, random forest, lightweight neural networks); and achieve adaptive recognition of new or variant hole structures, thereby improving the system's intelligence level.

[0161] The threaded hole type identification method provided in this application constructs a two-layer discrimination logic of "bottom hole diameter matching + target diameter surface existence verification," and combines three-dimensional geometric analysis and a parameterized rule base to achieve automated identification and classification of any non-standard hole structure. This method breaks through the reliance of traditional identification technologies on "fixed templates" or "single features," and possesses the following key innovations:

[0162] 1. Dual-parameter linkage discrimination mechanism: The hole is only identified as the target hole when the bottom diameter of the hole matches d1 in the preset parameter table and there is a corresponding diameter surface of d2, thus avoiding misidentification.

[0163] 2. Geometric construction-assisted verification method: By creating a virtual cylinder and performing Boolean operations with the original entity, the largest internal cylindrical surface is extracted, achieving "perspective" detection of hidden structures;

[0164] 3. Dynamic construction of working coordinate system: A local coordinate system is established with the midpoint of the hole axis as the origin and the axis as the Z-axis to improve recognition stability;

[0165] 4. Modular design architecture: The recognition process can be broken down into independent modules such as "surface extraction → cylindrical surface screening → diameter detection → condition judgment → result feedback", which facilitates portability and upgrades;

[0166] 5. Supports multi-scenario expansion: It can be applied to various complex structures such as threaded holes, countersunk holes, stepped holes, composite holes, and asymmetric holes;

[0167] 6. Compatible with multiple CAD platforms and secondary development tools: Supports UG / OPEN API, SolidWorks API, CATIA V5 / 6 API, etc., and has good cross-platform compatibility;

[0168] 7. Can integrate AI models: In the future, deep learning models can be introduced through training sample data to achieve adaptive recognition of new or variant pore structures.

[0169] By employing an intelligent method to identify threaded holes, non-standard threaded holes can be automatically identified and classified, eliminating the need for designers to manually replace and adjust them. This significantly reduces design time, improves identification accuracy, and lowers the rate of processing anomalies caused by human error, thereby improving mold manufacturing efficiency and product quality.

[0170] High degree of automation: Supports batch processing and can complete the identification and analysis of thousands of holes in minutes; High identification accuracy: Significantly reduces the false judgment rate through the dual verification mechanism of "bottom hole diameter + diameter surface parameter"; Supports multi-language and multi-standard adaptation; Can be configured with thread parameter tables of different national / industry standards (such as ISO, DIN, GB) to enhance international application capabilities.

[0171] It should be noted that any process or method description in the flowchart or otherwise described herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order according to the functions involved, as should be understood by those skilled in the art to which the embodiments of this application pertain.

[0172] Furthermore, in the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0173] Example 4:

[0174] Based on the same inventive concept, such as Figure 9 As shown, this application embodiment provides a thread hole type identification device 90, including:

[0175] The target complete circle acquisition module 91 is used to acquire the target complete circle on the part to be inspected. The bottom hole diameter of the target complete circle is the same as the preset bottom hole diameter in the parameter table of the target type. The correspondence between the preset bottom hole diameter and the bolt diameter is different in the parameter tables of different types. Acquiring the target complete circle on the part to be inspected includes:

[0176] Obtain all faces of the 3D model of the part to be inspected;

[0177] Get the target surface with a cylindrical surface type;

[0178] Obtain the diameter of the bottom hole for all complete circles on the target surface;

[0179] The complete circle whose bottom hole diameter is the same as the preset bottom hole diameter in the parameter table of the target type is used as the target complete circle.

[0180] The target bolt diameter acquisition module 92 is used to acquire the target bolt diameter corresponding to the preset bottom hole diameter based on the parameter table.

[0181] Theoretical cylinder construction module 93 is used to construct a theoretical cylinder at the position of the target complete circle. The bottom diameter of the theoretical cylinder is larger than the diameter of the target bolt. The axis of the theoretical cylinder coincides with the normal vector direction of the target complete circle, and the center of the target complete circle is located on the axis of the theoretical cylinder.

[0182] When constructing the theoretical cylinder at the location of the target complete circle, the following steps are also included:

[0183] The base diameter of the theoretical cylinder is calculated based on the target bolt diameter, where...

[0184] The theoretical diameter of the cylinder's base = target bolt diameter + preset value, or, the theoretical diameter of the cylinder's base = preset coefficient * target bolt diameter;

[0185] Wherein, the preset value is greater than 0, and the preset coefficient is greater than 1.

[0186] The target entity acquisition module 94 is used to obtain the target entity by subtracting the theoretical cylinder from the part to be inspected, wherein the surface type of the target entity is a cylindrical surface;

[0187] The step of obtaining the target entity by subtracting the theoretical cylinder from the part to be tested includes:

[0188] By using the theoretical cylinder as the target body and the part to be tested as the tool body, Boolean operations are performed to calculate the difference, resulting in multiple entities;

[0189] Obtain the attribute information for each entity, including the type and size of the face;

[0190] Use the entity with a cylindrical face as the target entity.

[0191] The thread hole type identification module 95 is used to determine the thread hole type at the location of the theoretical cylinder as the target type if there is a target entity with a diameter equal to that of the target bolt.

[0192] Also includes:

[0193] If a target entity with a diameter equal to that of the target bolt exists, the target entity is highlighted in a preset format.

[0194] In another embodiment, all the threaded holes of the part to be inspected are first obtained.

[0195] Determine whether all threaded holes in the part to be inspected are standard holes; the determination of whether all threaded holes in the part to be inspected are standard holes includes:

[0196] Obtain the thread characteristics of the threaded hole;

[0197] Determine whether it is a standard hole based on the described thread characteristics;

[0198] If not, then the threaded hole is determined to be a non-standard hole.

[0199] It should be noted that this application does not improve upon existing technology for identifying whether a threaded hole is a standard hole.

[0200] If the threaded hole is a non-standard hole, the above method is used to identify the threaded hole type.

[0201] The thread hole type identification device provided in this application, after obtaining a target complete circle on the part to be inspected, obtains the target bolt diameter corresponding to the preset bottom hole diameter based on the parameter table; constructs a theoretical cylinder at the position of the target complete circle, the bottom diameter of the theoretical cylinder being larger than the target bolt diameter, the axis of the theoretical cylinder coinciding with the normal vector direction of the target complete circle, and the center of the target complete circle located on the axis of the theoretical cylinder; then, the difference between the theoretical cylinder and the part to be inspected is calculated to obtain a target entity, the surface type of the target entity being a cylindrical surface; if a target entity with a diameter equal to the target bolt diameter exists, the thread hole type at the position of the theoretical cylinder is determined to be the target type. Since the bottom hole diameter of the target complete circle is the same as the preset bottom hole diameter in the parameter table of the target type, and the correspondence between the preset bottom hole diameter and the bolt diameter differs in the parameter tables for different types, this application actually uses two parameters, the bottom hole diameter and the bolt diameter, to identify the thread hole. Even if the thread hole is a non-standard geometric shape, it can be accurately identified and classified, greatly improving the identification efficiency and automation level.

[0202] Example 5:

[0203] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the thread hole type identification method provided in any of the above embodiments.

[0204] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0205] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0206] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0207] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.

[0208] The computer-readable storage medium provided in this application embodiment stores a computer program, which, when executed by a processor, implements the steps of the thread hole type identification method provided in any of the above embodiments. After obtaining the target complete circle on the part to be inspected, the target bolt diameter corresponding to the preset bottom hole diameter is obtained based on the parameter table; a theoretical cylinder is constructed at the position of the target complete circle, the bottom diameter of the theoretical cylinder is larger than the target bolt diameter, the axis of the theoretical cylinder coincides with the normal vector direction of the target complete circle, and the center of the target complete circle is located on the axis of the theoretical cylinder; then, the difference between the theoretical cylinder and the part to be inspected is calculated to obtain a target entity, the surface type of the target entity being a cylindrical surface; if a target entity with a diameter equal to the target bolt diameter exists, the thread hole type at the position of the theoretical cylinder is determined to be the target type. Since the bottom hole diameter of the target complete circle is the same as the preset bottom hole diameter in the parameter table of the target type, and the correspondence between the preset bottom hole diameter and the bolt diameter differs in parameter tables for different types, this application solution actually uses two parameters, the bottom hole diameter and the bolt diameter, to identify the thread hole. Even if the threaded hole is a non-standard geometry, it can be accurately identified and classified, which greatly improves the identification efficiency and automation level.

[0209] Example 6:

[0210] Based on the same inventive concept, such as Figure 10 As shown, this application also provides a thread hole type identification system 100, including:

[0211] At least one processor 101 and at least one memory 102;

[0212] The memory stores the executable instructions of the processor;

[0213] The processor is configured to execute the thread hole type identification method provided in the above embodiments.

[0214] The thread hole type identification system provided in this application embodiment stores executable instructions of the processor in a memory. When the executable instructions are executed, the processor can obtain a target complete circle on the part to be inspected, and then obtain the target bolt diameter corresponding to the preset bottom hole diameter based on the parameter table. A theoretical cylinder is constructed at the position of the target complete circle, the bottom diameter of which is larger than the target bolt diameter. The axis of the theoretical cylinder coincides with the normal vector direction of the target complete circle, and the center of the target complete circle is located on the axis of the theoretical cylinder. Then, the difference between the theoretical cylinder and the part to be inspected is calculated to obtain a target entity, the surface type of which is a cylindrical surface. If a target entity with a diameter equal to the target bolt diameter exists, the thread hole type at the position of the theoretical cylinder is determined to be the target type. Since the bottom hole diameter of the target complete circle is the same as the preset bottom hole diameter in the parameter table of the target type, and the correspondence between the preset bottom hole diameter and the bolt diameter differs in different parameter tables, this application solution actually uses two parameters—the bottom hole diameter and the bolt diameter—to identify the thread hole. Even if the threaded hole is a non-standard geometry, it can be accurately identified and classified, which greatly improves the identification efficiency and automation level.

[0215] Example 7:

[0216] This application provides a threaded hole processing device that uses the threaded hole type identification method provided in any of the above embodiments.

[0217] The threaded hole processing equipment provided in this application, by applying the threaded hole type identification method provided in any of the above embodiments, can obtain the target bolt diameter corresponding to the preset bottom hole diameter based on the parameter table after obtaining the target complete circle on the part to be inspected; construct a theoretical cylinder at the position of the target complete circle, the bottom diameter of the theoretical cylinder being larger than the target bolt diameter, the axis of the theoretical cylinder coinciding with the normal vector direction of the target complete circle, and the center of the target complete circle located on the axis of the theoretical cylinder; then, the difference between the theoretical cylinder and the part to be inspected is calculated to obtain the target entity, the surface type of the target entity being a cylindrical surface; if a target entity with a diameter equal to the target bolt diameter exists, the threaded hole type at the position of the theoretical cylinder is determined to be the target type. Since the bottom hole diameter of the target complete circle is the same as the preset bottom hole diameter in the parameter table of the target type, and the correspondence between the preset bottom hole diameter and the bolt diameter is different in different types of parameter tables; therefore, this application actually uses two parameters, the bottom hole diameter and the bolt diameter, to identify the threaded hole. Even if the threaded hole is a non-standard geometry, it can be accurately identified and classified, which greatly improves the identification efficiency and automation level.

[0218] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.

[0219] It should be noted that in the description of this application, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means at least two.

[0220] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A method for identifying threaded hole types, characterized in that, include: Obtain the target complete circle on the part to be inspected. The bottom hole diameter of the target complete circle is the same as the preset bottom hole diameter in the parameter table of the target type. The correspondence between the preset bottom hole diameter and the bolt diameter is different in the parameter tables of different types. Based on the parameter table, obtain the target bolt diameter corresponding to the preset bottom hole diameter; A theoretical cylinder is constructed at the location of the target complete circle. The diameter of the base of the theoretical cylinder is larger than the diameter of the target bolt. The axis of the theoretical cylinder coincides with the normal vector direction of the target complete circle, and the center of the target complete circle is located on the axis of the theoretical cylinder. The target entity is obtained by subtracting the theoretical cylinder from the part to be tested, and the type of the surface of the target entity is cylindrical surface; If a target entity with a diameter equal to that of the target bolt exists, then the thread hole type at the location of the theoretical cylinder is determined to be the target type.

2. The method according to claim 1, characterized in that: The process of obtaining the target complete circle on the part to be inspected includes: Obtain all faces of the 3D model of the part to be inspected; Get the target surface with a cylindrical surface type; Obtain the diameter of the bottom hole for all complete circles on the target surface; The complete circle whose bottom hole diameter is the same as the preset bottom hole diameter in the parameter table of the target type is used as the target complete circle.

3. The method according to claim 1, characterized in that: When constructing the theoretical cylinder at the location of the target complete circle, the following steps are also included: The base diameter of the theoretical cylinder is calculated based on the target bolt diameter, where... The theoretical diameter of the cylinder's base = target bolt diameter + preset value, or, the theoretical diameter of the cylinder's base = preset coefficient * target bolt diameter; Wherein, the preset value is greater than 0, and the preset coefficient is greater than 1.

4. The method according to claim 1, characterized in that: The step of obtaining the target entity by subtracting the theoretical cylinder from the part to be tested includes: By using the theoretical cylinder as the target body and the part to be tested as the tool body, Boolean operations are performed to calculate the difference, resulting in multiple entities; Obtain the attribute information for each entity, including the type and size of the face; Use the entity with a cylindrical face as the target entity.

5. The method according to claim 1, characterized in that, Also includes: If a target entity with a diameter equal to that of the target bolt exists, the target entity is highlighted in a preset format.

6. A method for identifying threaded hole types, characterized in that, include: Determine whether all threaded holes on the part to be inspected are standard holes; If the threaded hole is a non-standard hole, the threaded hole type shall be identified by the method described in any one of claims 1-5.

7. The method according to claim 6, characterized in that, The process of determining whether all threaded holes of the part to be inspected are standard holes includes: Obtain the thread characteristics of the threaded hole; Determine whether it is a standard hole based on the described thread characteristics; If not, then the threaded hole is determined to be a non-standard hole.

8. A threaded hole type identification device, characterized in that, include: The target complete circle acquisition module is used to acquire the target complete circle on the part to be inspected. The bottom hole diameter of the target complete circle is the same as the preset bottom hole diameter in the parameter table of the target type. The correspondence between the preset bottom hole diameter and the bolt diameter is different in the parameter tables of different types. The target bolt diameter acquisition module is used to acquire the target bolt diameter corresponding to the preset bottom hole diameter based on the parameter table. A theoretical cylinder construction module is used to construct a theoretical cylinder at the position of the target complete circle. The bottom diameter of the theoretical cylinder is larger than the diameter of the target bolt. The axis of the theoretical cylinder coincides with the normal vector direction of the target complete circle, and the center of the target complete circle is located on the axis of the theoretical cylinder. The target entity acquisition module is used to obtain the target entity by subtracting the theoretical cylinder from the part to be inspected, wherein the surface type of the target entity is a cylindrical surface; The thread hole type identification module is used to determine the thread hole type at the location of the theoretical cylinder as the target type if there is a target entity with a diameter equal to that of the target bolt.

9. A threaded hole type identification system, characterized in that, include: At least one processor and at least one memory; The memory stores the executable instructions of the processor; The processor is configured to perform the method according to any one of claims 1-5 or 6-7.

10. A threaded hole machining equipment, characterized in that, The method described in any one of claims 1-5 or 6-7.