Method and device for geometrically recognizing feature shape, electronic equipment and medium
Through automated three-dimensional model processing and feature extraction methods, the problem of time-consuming and missed recognition of geometric feature shapes in the prior art is solved, and efficient and accurate geometric feature shape recognition is achieved.
Patent Information
- Application Number
- CN202411992736.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, when identifying geometric features such as holes, grooves, etc. in parts, manual judgment and measurement are required, which leads to a long time-consuming and easy to miss identification.
By obtaining the three-dimensional model of the part to be identified, the geometric element faces and edges are extracted, and the geometric element holes and feature shapes are determined based on the feature structure, so as to achieve automatic recognition.
It realizes efficient and accurate geometric feature shape recognition, reducing the time and leakage recognition rate of manual measurement.
Smart Images

Figure CN119810478A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic equipment and medium for geometrically identifying characteristic shapes. Background Art
[0002] Geometric feature shapes are a common way to express 3D model parts. Parts are composed of various holes, slots and other shapes to form a complete part. In the process of model inspection, cost accounting, programming and processing, these geometric feature shapes need to be manually determined and measured for specific data before the next step of related work can be carried out. This leads to the problem of time-consuming.
[0003] According to the known prior art, when identifying geometric features such as holes and slots in parts, manual judgment is required and specific data of the corresponding geometric elements are measured, which may cause problems such as missed identification or time-consuming measurement. Summary of the invention
[0004] The main purpose of the embodiments of the present invention is to provide a method, device, electronic device and medium for geometrically identifying characteristic shapes in order to solve at least one problem of the prior art. The present invention can efficiently and accurately realize geometrically identifying characteristic shapes.
[0005] Obtaining a three-dimensional model of the part to be identified, and obtaining a geometric element surface of the part to be identified according to the three-dimensional model;
[0006] When the geometric element surface includes the first element surface, the geometric element edge is extracted according to the contour shape of the first element surface; the first element surface includes a semi-cylindrical surface and a semi-conical surface;
[0007] When the identifier of the geometric element edge meets the preset condition, a geometric element hole formed by the first element face and the geometric element edge is determined; the geometric element hole includes a circular hole and / or a conical hole;
[0008] Determine the characteristic shape of the part to be identified according to the characteristic structure of the geometric element hole;
[0009] When a geometric element surface contains a second element surface, the second element surface with the largest area is used as the reference surface; the second element surface includes a plane;
[0010] The characteristic shape of the part to be identified is determined according to the geometric relationship between the reference plane and other second element planes.
[0011] In some embodiments, the geometric element edge includes two arc edges and two straight line edges; when the identifier of the geometric element edge meets the preset condition, determining the geometric element hole formed by the first element face and the geometric element edge includes the following steps:
[0012] When the geometric element surface contains multiple semi-cylindrical surfaces, the straight line edge of each semi-cylindrical surface is obtained as the first identification feature;
[0013] When the first identification features of the two semi-cylindrical surfaces are aligned identically, a circular hole is formed according to the corresponding two semi-cylindrical surfaces;
[0014] When the geometric element surface contains multiple semi-conical surfaces, the straight line edge of each semi-conical surface is obtained as the second identification feature;
[0015] When the second identification features of the two semi-conical surfaces are aligned to be the same, a conical hole is formed according to the corresponding two semi-conical surfaces.
[0016] In some embodiments, the geometric element edge includes two arc edges and two straight edges, and the characteristic shape includes a common round hole, a countersunk hole, and a threaded hole; when the geometric element hole includes a round hole, determining the characteristic shape of the part to be identified according to the characteristic structure of the geometric element hole includes the following steps:
[0017] Determine whether there is a thread feature on the first element surface, and if there is a thread feature on the first element surface, determine that the part to be identified is a threaded hole;
[0018] When there is no thread feature on the first element surface, determine whether there are two circular holes in the geometric element hole with inconsistent arc edge lengths;
[0019] If there are no two circular holes with different arc lengths in the geometric element holes, it is determined that the part to be identified is a common circular hole; otherwise, the center point and distance of the two circular holes are obtained;
[0020] When the distance between the two circular holes is 0, and the center points of the connecting planes of the two circular holes are the same, it is determined that the part to be identified is a countersunk hole.
[0021] In some embodiments, the characteristic shape includes a common tapered hole and a countersunk tapered hole; when the geometric element hole includes a tapered hole, determining the characteristic shape of the part to be identified according to the characteristic structure of the geometric element hole includes the following steps:
[0022] Determine whether there are circular holes in the geometric element hole;
[0023] If there is no circular hole in the geometric element hole, it is determined that the part to be identified is a common tapered hole; otherwise, the center point and distance between the tapered hole and the circular hole are obtained;
[0024] When the distance between the tapered hole and the round hole is 0, and the center points of the connecting planes of the tapered hole and the round hole are the same, it is determined that the part to be identified is a countersunk tapered hole.
[0025] In some embodiments, the characteristic shape includes a through-internal groove, a through-outline groove, and a step groove; determining the characteristic shape of the part to be identified according to the geometric relationship between the reference plane and other second element planes includes the following steps:
[0026] When the reference surface has an internal contour, another second element surface connected to all edges of the internal contour is obtained in the three-dimensional model as a first determination surface;
[0027] When the first determination surface is parallel to the reference surface, and the positional relationship between the first determination surface and the reference surface in the three-dimensional model is opposite, the part to be identified is determined to be a through-internal groove;
[0028] Or, when the reference surface does not have an internal contour, all edges connected to the external contour of the reference surface are obtained in the three-dimensional model as the external contour edges; another second element face connected to all the edges of the external contour is obtained in the three-dimensional model as the second determination face;
[0029] When the second determination surface is parallel to the reference surface, and the positional relationship between the second determination surface and the reference surface in the three-dimensional model is opposite, the part to be identified is determined to be a through-shaped groove; wherein the shape of the through-shaped groove is determined based on the shape edge;
[0030] Or, obtaining a plane in the three-dimensional model that is parallel to the reference plane and has the farthest distance from the reference plane as the third determination plane;
[0031] When there are a plurality of second element surfaces in the three-dimensional model that are parallel to and in the same direction as the reference surface and the third determination surface, it is determined that the part to be identified is a step groove.
[0032] In some embodiments, the characteristic shape includes a U-hole and a half-U-hole; when the first element surface is a semi-cylindrical surface, the geometric element edge includes two arc edges and two straight line edges; the method further includes the following steps:
[0033] When the identification of the geometric element edge does not satisfy the preset condition, two geometric element faces adjacent to the two straight line edges are obtained in the three-dimensional model;
[0034] If the two geometric element faces adjacent to the two straight line edges are both second element faces, determine whether the other ends of the two second element faces are connected to another semi-cylindrical face;
[0035] When the other ends of the two second element surfaces are connected to another semi-cylindrical surface, the part to be identified is determined to be a U-hole; otherwise, the part to be identified is determined to be a semi-U-hole.
[0036] To achieve the above object, another aspect of an embodiment of the present invention provides a device for geometrically identifying characteristic shapes, the device comprising:
[0037] The first module is used to obtain a three-dimensional model of the part to be identified, and obtain a geometric element surface of the part to be identified according to the three-dimensional model;
[0038] The second module is used for extracting the geometric element edge according to the contour shape of the first element surface when the geometric element surface includes the first element surface; the first element surface includes a semi-cylindrical surface and a semi-conical surface;
[0039] The third module is used to determine the geometric element hole formed by the first element surface and the geometric element edge when the identifier of the geometric element edge meets the preset condition; the geometric element hole includes a circular hole and / or a conical hole;
[0040] The fourth module is used to determine the characteristic shape of the part to be identified based on the characteristic structure of the geometric element hole;
[0041] The fifth module is used for taking the second element surface with the largest area as the reference surface when the geometric element surface includes the second element surface; the second element surface includes the plane;
[0042] The sixth module is used to determine the characteristic shape of the part to be identified based on the geometric relationship between the reference plane and other second element planes.
[0043] In some embodiments, the characteristic shape includes a U-hole and a half-U-hole; when the first element surface is a semi-cylindrical surface, the geometric element edge includes two arc edges and two straight line edges; the device further includes:
[0044] The seventh module is used for obtaining two geometric element faces adjacent to the two straight line edges in the three-dimensional model when the identification of the geometric element edge does not meet the preset condition;
[0045] The eighth module is used to determine whether the other ends of the two second element faces are connected to another semi-cylindrical face if the two geometric element faces adjacent to the two straight line edges are both second element faces;
[0046] The ninth module is used to determine that the part to be identified is a U hole when the other ends of the two second element surfaces are also connected to another semi-cylindrical surface; otherwise, the part to be identified is determined to be a semi-U hole.
[0047] To achieve the above objective, another aspect of an embodiment of the present invention provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above method when executing the computer program.
[0048] To achieve the above objective, another aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0049] The embodiments of the present invention include at least the following beneficial effects: The present invention provides a method, device, electronic device and medium for geometric recognition of characteristic shapes. The scheme obtains a three-dimensional model of a part to be recognized, obtains a geometric element surface of the part to be recognized according to the three-dimensional model; when the geometric element surface includes a first element surface, extracts a geometric element edge according to the contour shape of the first element surface; the first element surface includes a semi-cylindrical surface and a semi-conical surface; when the identification of the geometric element edge meets the preset conditions, the geometric element hole formed by the first element surface and the geometric element edge is determined; the geometric element hole includes a circular hole and / or a conical hole; the characteristic shape of the part to be recognized is determined according to the characteristic structure of the geometric element hole; when the geometric element surface includes a second element surface, the second element surface with the largest area is used as a reference surface; the second element surface includes a plane; the characteristic shape of the part to be recognized is determined according to the geometric relationship between the reference surface and other second element surfaces. The present invention uses the three-dimensional model of the part to be recognized as the recognition source, starts from the three-dimensional model, extracts and recognizes the faces and edges in the geometric elements, and then determines and recognizes the corresponding commonly used geometric shapes based on the characteristic relationship of the recognized geometric elements, so as to realize automatic shape judgment. The present invention can ensure the completeness rate of each shape recognition in the part, and realize the recognition of geometric characteristic shapes efficiently and accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 is a flow chart of a method for geometrically identifying characteristic shapes provided by an embodiment of the present invention;
[0051] Figure 2 is a flowchart of a method for geometrically identifying characteristic shapes provided by an embodiment of the present invention;
[0052] Figure 3 is another example flow chart of the device for geometrically identifying characteristic shapes provided by an embodiment of the present invention;
[0053] Figure 4 is a schematic diagram of the structure of a device for geometrically identifying characteristic shapes provided by an embodiment of the present invention;
[0054] Figure 5 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present invention. They are only examples of devices and methods consistent with some aspects of the embodiments of the present invention as detailed in the attached claims.
[0056] It is understood that the terms "first", "second", etc. used in the present invention can be used to describe various concepts in the present invention, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determination".
[0057] The terms "at least one", "multiple", "each", "any", etc. used in the present invention, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0058] Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the present invention are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.
[0059] The method for geometrically identifying characteristic shapes provided in an embodiment of the present invention relates to the field of data processing technology. The method for geometrically identifying characteristic shapes provided in an embodiment of the present invention can be applied to a terminal, can be applied to a server, or can be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a vehicle-mounted terminal, etc., but is not limited thereto; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application of the method for implementing geometrically identifying characteristic shapes, etc., but is not limited to the above forms.
[0060] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0061] Figure 1 is an optional flow chart of the method for geometrically identifying characteristic shapes provided by an embodiment of the present invention. Figure 1 The method may include but is not limited to steps S100 to S600.
[0062] S100, obtaining a three-dimensional model of a part to be identified, and obtaining a geometric element surface of the part to be identified according to the three-dimensional model;
[0063] Exemplarily, in some specific implementations, the present invention first collects geometric elements in the three-dimensional model: faces. In some specific application scenarios, the geometric element faces include but are not limited to semi-cylindrical faces, semi-conical faces and planes.
[0064] S200, when the geometric element surface includes a first element surface, extracting a geometric element edge according to a contour shape of the first element surface;
[0065] Wherein, the first element surface includes a semi-cylindrical surface and a semi-conical surface;
[0066] Exemplarily, in some specific implementations, for a semi-cylindrical surface, the contour of the semi-cylindrical surface is analyzed to obtain all geometric edge elements: 2 arc edges (of the same size) and 2 straight edges; for a semi-conical surface, the contour of the semi-conical surface is analyzed to obtain all geometric edge elements: 2 arc edges of different sizes and 2 straight edges.
[0067] S300, when the identifier of the geometric element edge meets a preset condition, determining a geometric element hole formed by the first element face and the geometric element edge;
[0068] Wherein, the geometric element hole includes a circular hole and / or a tapered hole;
[0069] It should be noted that the geometric element edges include two arc edges and two straight edges; in some embodiments, step S300 may include the following steps: when the geometric element surface contains multiple semi-cylindrical surfaces, the straight edges of each semi-cylindrical surface are respectively obtained as the first identification feature; when the first identification features of the two semi-cylindrical surfaces are aligned the same, a circular hole is formed according to the corresponding two semi-cylindrical surfaces; when the geometric element surface contains multiple semi-conical surfaces, the straight edges of each semi-conical surface are respectively obtained as the second identification feature; when the second identification features of the two semi-conical surfaces are aligned the same, a conical hole is formed according to the corresponding two semi-conical surfaces.
[0070] For example, in some specific implementations, for a semi-cylindrical surface: first, obtain the identifiers of two straight edges; then, obtain the identifiers of two straight edges from another semi-cylindrical surface; if the identifiers of the two straight edges of the two semi-cylindrical surfaces are the same, then determine that the geometric element hole formed by the first element surface and the geometric element edge is a circular hole. For a semi-conical surface: first, obtain the identifiers of two straight edges; then, obtain the identifiers of two straight edges from another semi-conical surface; if the identifiers of the two straight edges of the two semi-conical surfaces are the same, then determine that the geometric element hole formed by the first element surface and the geometric element edge is a conical hole.
[0071] S400, determining a characteristic shape of a part to be identified according to a characteristic structure of a geometric element hole;
[0072] For example, in some specific implementations, the shape type of the final hole (corresponding to the characteristic shape of the part to be identified) can be obtained by determining the characteristic structure of the corresponding geometric element hole, determining the geometric structure, and calculating the spatial distance of the center point.
[0073] It should be noted that the geometric element edges include two arc edges and two straight edges, and the characteristic shapes include ordinary round holes, countersunk holes and threaded holes; in some embodiments, when the geometric element hole includes a round hole, determining the characteristic shape of the part to be identified based on the characteristic structure of the geometric element hole may include the following steps: determining whether there is a threaded feature on the first element surface, and when there is a threaded feature on the first element surface, determining that the part to be identified is a threaded hole; when there is no threaded feature on the first element surface, determining whether there are two round holes with inconsistent arc edge lengths in the geometric element hole; if there are no two round holes with inconsistent arc edge lengths in the geometric element hole, determining that the part to be identified is an ordinary round hole; otherwise, obtaining the center point and distance of the two round holes; when the distance between the two round holes is 0, and the center points of the connecting plane of the two round holes are the same, determining that the part to be identified is a countersunk hole.
[0074] Exemplarily, in some specific implementations, first, the center point of the circular hole is obtained, and it is determined whether the feature of the cylindrical surface is a threaded hole. If so, it is determined that the geometric element hole is a threaded hole. Otherwise, it is further determined whether there are two circular holes with the same center points in the same direction and the distance between the two circular holes is 0. If so, it is determined that the geometric element hole is a countersunk hole. Otherwise, it is determined that the geometric element hole is an ordinary circular hole.
[0075] It should be noted that the characteristic shapes include ordinary tapered holes and countersunk tapered holes; in some embodiments, when the geometric element hole includes a tapered hole, determining the characteristic shape of the part to be identified based on the characteristic structure of the geometric element hole may include the following steps: determining whether there is a circular hole in the geometric element hole; if there is no circular hole in the geometric element hole, determining that the part to be identified is an ordinary tapered hole; otherwise, obtaining the center point and distance between the tapered hole and the circular hole; when the distance between the tapered hole and the circular hole is 0, and the center points of the connecting planes of the tapered hole and the circular hole are the same, determining that the part to be identified is a countersunk tapered hole.
[0076] Exemplarily, in some specific embodiments, exemplary, in some specific embodiments, first, the center point of the tapered hole is obtained, and it is further determined whether there is a circular hole and whether there are two center points that are the same in the same direction of the tapered hole and the circular hole, and the distance is 0. If so, it is determined that the geometric element hole is a countersunk hole, otherwise, it is determined that the geometric element hole is an ordinary tapered hole.
[0077] S500, when the geometric element surface includes a second element surface, taking the second element surface with the largest area as a reference surface; the second element surface includes a plane;
[0078] Illustratively, in some specific implementations, the plane with the largest area is analyzed and the largest plane is used as a reference.
[0079] S600: Determine the characteristic shape of the part to be identified according to the geometric relationship between the reference plane and other second element planes.
[0080] Exemplarily, in some specific implementations, by determining the outer shape reference plane, the faces parallel to and in the same direction as the reference plane can be automatically identified and searched, and the positional relationship between the faces can be identified as the judgment conditions for the step groove; in addition, the internal groove and the outer shape groove can be constructed by identifying the geometric elements in the part: the faces, and obtaining the corresponding edges through the faces, and then classifying the geometric elements to construct the geometric shape.
[0081] It should be noted that the characteristic shape includes a through-internal groove, a through-outer groove and a step groove; in some embodiments, step S600 may include the following steps:
[0082] When the reference plane has an internal contour, another second element face connected to all edges of the internal contour is obtained in the three-dimensional model as a first determination face; when the first determination face is parallel to the reference plane, and the positional relationship between the first determination face and the reference plane in the three-dimensional model is opposite, it is determined that the part to be identified is a through internal groove;
[0083] Exemplarily, in some specific implementations, the internal contour of the surface is first analyzed with the positive X-plane (i.e., the reference plane) as a reference, and then all the edges of the internal contour are analyzed to find the other side connected by all the edges to form a shape. If the shape looks for another connected side from the positive X-plane downward, if it is parallel and opposite to the positive X-plane, then it is determined that the part to be identified is a groove that penetrates the internal groove.
[0084] Or, when the reference plane does not have an internal contour, all edges connected to the external contour of the reference plane are obtained in the three-dimensional model as the external contour edges; another second element face connected to all the edges of the external contour is obtained in the three-dimensional model as the second determination face; when the second determination face is parallel to the reference plane, and the positional relationship between the second determination face and the reference plane in the three-dimensional model is opposite, it is determined that the part to be identified is a through-outline groove; wherein the shape of the through-outline groove is determined based on the external contour edge;
[0085] Exemplarily, in some specific implementations, the outer contour of the surface is first analyzed with the positive X-plane (i.e., the reference plane) as the reference, all edges of the outer contour are analyzed, the outermost edges are found, and the remaining edges are the edges of the outer shape groove; then, all outer shape edges are analyzed, and the edges connected together are defined as a group of edges as an outer shape groove shape; if the shape is found from the positive X-plane downward to another connected surface, if it is parallel and opposite to the positive X-plane, it is determined that the part to be identified is a through outer shape groove.
[0086] Or, obtaining a plane in the three-dimensional model that is parallel to the reference plane and has the farthest distance from the reference plane as the third determination plane;
[0087] When there are a plurality of second element surfaces in the three-dimensional model that are parallel to and in the same direction as the reference surface and the third determination surface, it is determined that the part to be identified is a step groove.
[0088] Exemplarily, in some specific implementations, first, taking the largest plane as a reference, a pair of planes parallel to and farthest from it are analyzed as the positive X-plane and the negative X-plane; then, taking the positive X-plane and the negative X-plane as a reference, all planes parallel to and in the same direction as these two planes are analyzed (identified and obtained), and such shapes are defined as step grooves.
[0089] It should also be noted that in some specific application scenarios, all planes perpendicular to the positive X plane (i.e., the reference plane) can be further analyzed, and then a pair of parallel and farthest planes can be found in the vertical planes as the positive Y plane and the reverse Y plane, and the shape can be analyzed using the same logic as the X plane. Similarly, all planes perpendicular to the positive Y plane can be analyzed in the vertical planes, and a pair of parallel and farthest planes can be found as the positive Z plane and the reverse Z plane, and the shape can be analyzed using the same logic as the X plane.
[0090] It should also be noted that the characteristic shapes include U-holes and half-U-holes; in some embodiments, when the first element surface is a semi-cylindrical surface, the geometric element edges include two arc edges and two straight edges; the method may also include the following steps: when the identification of the geometric element edge does not meet the preset conditions, obtain two geometric element surfaces adjacent to the two straight edges in the three-dimensional model; if the two geometric element surfaces adjacent to the two straight edges are both second element surfaces, determine whether the other ends of the two second element surfaces are also connected to another semi-cylindrical surface; when the other ends of the two second element surfaces are also connected to another semi-cylindrical surface, determine that the part to be identified is a U hole; otherwise, determine that the part to be identified is a half-U hole.
[0091] Exemplarily, in some specific implementations, for a semi-cylindrical surface: first, obtain the identifiers of two straight edges; then, also obtain the identifiers of two straight edges from another semi-cylindrical surface; if the identifiers of the two straight edges of the two semi-cylindrical surfaces are different, or there is no other semi-cylindrical surface, obtain the adjacent surfaces of the two straight edges of the semi-cylindrical surface; if the two adjacent surfaces are both planes and are parallel and equal; then perform further judgment; if the two planes are also connected to another semi-cylindrical surface, determine that the part to be identified is a U-hole; otherwise, determine that the part to be identified is a semi-U-hole.
[0092] It should also be noted that in some specific application scenarios, the data of each geometric element is calculated based on the geometric element faces and geometric element edges extracted from the three-dimensional model of the part to be identified through existing three-dimensional modeling software or three-dimensional solution algorithms to achieve automated measurement.
[0093] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.
[0094] First of all, it should be noted that geometric feature shapes are a common way of expressing parts in 3D models. Parts are composed of various holes, slots and other shapes to form a complete part. In the process of model inspection, cost accounting, and programming and processing, these geometric feature shapes need to be manually determined and measured for specific data before the next step of related work can be carried out. This leads to the problem of time-consuming.
[0095] In order to solve this problem, the present invention automatically identifies common geometric shapes contained in parts, automatically determines the shapes, and calculates the data of each geometric element through an algorithm to ensure the completeness of the recognition of each shape in the parts and the accuracy of the measurement of the overall recognition process method.
[0096] In some specific application scenarios, such as Figure 2 As shown, the technical solution of the present invention collects geometric elements in the three-dimensional model: faces, and then obtains the identification of the geometric element edges of the corresponding faces by identifying and analyzing the shapes of the faces. By judging the identifications, the characteristic structure of the corresponding geometric element holes is formed; then, by judging the characteristic structure of the corresponding geometric element holes, judging the geometric structure and calculating the spatial distance of the center points, the shape type of the final hole is obtained; in addition, as Figure 3 As shown, the present invention can also automatically identify and search for faces parallel to and in the same direction as the reference plane by determining the outer shape reference plane, and identify the positional relationship between the faces as the judgment condition of the step groove; at the same time, the internal groove and outer shape groove: the system identifies the geometric elements in the part: the face, and obtains the corresponding edge through the face, and then classifies the geometric elements to construct the geometric shape. Among them, Figure 2 and Figure 3 The specific process steps involved are described with reference to the example of the specific implementation of the aforementioned steps S100 to S600, which will not be repeated here.
[0097] In summary, the technical solution of the present invention realizes automatic recognition of geometric feature shapes, and adopts geometric feature construction algorithm for classification and data extraction. For example, information such as hole: diameter, depth, groove: length, width, depth, etc. is directly extracted for application in other modules. For example, in cost valuation, to calculate the cost of a hole, information such as diameter and depth is required. At this time, it can be directly substituted into the calculation formula to directly obtain the result.
[0098] Compared with the prior art, the present invention has at least the following beneficial effects:
[0099] 1. Compared with manual shape information measurement, we can automatically determine the shape based on the geometric feature recognition algorithm and collect relevant data to improve efficiency;
[0100] 2. Omissions may occur during manual measurement. The geometric feature recognition shape algorithm can effectively reduce the omissions.
[0101] like Figure 4 As shown, the embodiment of the present invention further provides a device 900 for geometrically identifying characteristic shapes, which may include:
[0102] The first module 901 is used to obtain a three-dimensional model of the part to be identified, and obtain a geometric element surface of the part to be identified according to the three-dimensional model;
[0103] The second module 902 is used for extracting geometric element edges according to the contour shape of the first element surface when the geometric element surface includes a first element surface; the first element surface includes a semi-cylindrical surface and a semi-conical surface;
[0104] The third module 903 is used to determine the geometric element hole formed by the first element surface and the geometric element edge when the identifier of the geometric element edge meets the preset condition; the geometric element hole includes a circular hole and / or a conical hole;
[0105] The fourth module 904 is used to determine the characteristic shape of the part to be identified according to the characteristic structure of the geometric element hole;
[0106] The fifth module 905 is used for, when the geometric element surface includes a second element surface, taking the second element surface with the largest area as a reference surface; the second element surface includes a plane;
[0107] The sixth module 906 is used to determine the characteristic shape of the part to be identified according to the geometric relationship between the reference plane and other second element planes.
[0108] In some embodiments, the characteristic shape includes a U-hole and a half-U-hole; when the first element surface is a semi-cylindrical surface, the geometric element edge includes two arc edges and two straight line edges; the device may further include:
[0109] The seventh module is used for obtaining two geometric element faces adjacent to the two straight line edges in the three-dimensional model when the identification of the geometric element edge does not meet the preset condition;
[0110] The eighth module is used to determine whether the other ends of the two second element faces are connected to another semi-cylindrical face if the two geometric element faces adjacent to the two straight line edges are both second element faces;
[0111] The ninth module is used to determine that the part to be identified is a U hole when the other ends of the two second element surfaces are also connected to another semi-cylindrical surface; otherwise, the part to be identified is determined to be a semi-U hole.
[0112] The contents of the method embodiments of the present invention are all applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0113] The embodiment of the present invention further provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned method of geometric recognition feature shape when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0114] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0115] See also Figure 5 , Figure 5 The hardware structure of an electronic device 1000 of another embodiment is illustrated. The electronic device 1000 includes:
[0116] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0117] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1002, and the processor 1001 calls and executes the method for geometric recognition feature shape of the embodiment of the present invention;
[0118] Input / output interface 1003, used to implement information input and output;
[0119] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0120] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );
[0121] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0122] An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method for geometrically identifying characteristic shapes is implemented.
[0123] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0124] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0125] The method for geometric recognition of characteristic shapes, the device for geometric recognition of characteristic shapes, the electronic device and the storage medium provided by the embodiment of the present invention obtain the three-dimensional model of the part to be recognized, obtain the geometric element surface of the part to be recognized according to the three-dimensional model; when the geometric element surface contains the first element surface, extract the geometric element edge according to the contour shape of the first element surface; the first element surface includes a semi-cylindrical surface and a semi-conical surface; when the identification of the geometric element edge meets the preset conditions, determine the geometric element hole formed by the first element surface and the geometric element edge; the geometric element hole includes a circular hole and / or a conical hole; determine the characteristic shape of the part to be recognized according to the characteristic structure of the geometric element hole; when the geometric element surface contains the second element surface, take the second element surface with the largest area as the reference surface; the second element surface includes a plane; determine the characteristic shape of the part to be recognized according to the geometric relationship between the reference surface and other second element surfaces. The present invention uses the three-dimensional model of the part to be recognized as the recognition source, starts from the three-dimensional model, extracts and recognizes the faces and edges in the geometric elements, and then determines and recognizes the corresponding commonly used geometric shapes based on the characteristic relationship of the recognized geometric elements, so as to realize automatic shape judgment. The present invention can ensure the completeness rate of each shape recognition in the part, and realize the recognition of geometric characteristic shapes efficiently and accurately.
[0126] The embodiments described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those skilled in the art can appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.
[0127] Those skilled in the art will appreciate that the technical solutions shown in the figures do not limit the embodiments of the present invention and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0128] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0129] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0130] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0131] It should be understood that in the present invention, "at least one (item)" refers to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can represent: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0132] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0133] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0134] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0135] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including multiple instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store programs.
[0136] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the embodiments of the present invention is not limited thereby. Any modification, equivalent substitution and improvement made by those skilled in the art without departing from the scope and essence of the embodiments of the present invention shall be within the scope of the rights of the embodiments of the present invention.
Claims
1. A method for geometrically identifying characteristic shapes, characterized in that: The method comprises the following steps: Acquire a three-dimensional model of the part to be identified, and obtain a geometric element surface of the part to be identified according to the three-dimensional model; When the geometric element surfaces include a first element surface, extracting a geometric element edge according to the contour shape of the first element surface; the first element surface includes a semi-cylindrical surface and a semi-conical surface; When the identifier of the geometric element edge meets a preset condition, determining a geometric element hole formed by the first element surface and the geometric element edge; the geometric element hole includes a circular hole and / or a conical hole; Determining the characteristic shape of the part to be identified according to the characteristic structure of the geometric element hole; When the geometric element surface includes a second element surface, the second element surface with the largest area is used as a reference surface; the second element surface includes a plane; The characteristic shape of the part to be identified is determined according to the geometric relationship between the reference plane and other second element planes.
2. The method for geometrically identifying characteristic shapes according to claim 1, characterized in that: The geometric element edges include two arc edges and two straight line edges; when the identifiers of the geometric element edges meet the preset conditions, determining the geometric element holes formed by the first element surface and the geometric element edges includes the following steps: When the geometric element surface includes a plurality of the semi-cylindrical surfaces, the straight line edge of each of the semi-cylindrical surfaces is obtained as a first identification feature; When the first identification features of the two semi-cylindrical surfaces are aligned identically, forming the circular hole according to the corresponding two semi-cylindrical surfaces; When the geometric element surface includes a plurality of the semi-conical surfaces, the straight line edge of each of the semi-conical surfaces is obtained as a second identification feature; When the second identification features of the two semi-conical surfaces are aligned identically, the tapered hole is formed according to the corresponding two semi-conical surfaces.
3. The method for geometrically identifying characteristic shapes according to claim 1, characterized in that: The geometric element edge includes two arc edges and two straight edges, and the characteristic shape includes a common round hole, a countersunk hole and a threaded hole; when the geometric element hole includes the round hole, determining the characteristic shape of the part to be identified according to the characteristic structure of the geometric element hole includes the following steps: Determine whether there is a thread feature on the first element surface, and when the thread feature exists on the first element surface, determine that the part to be identified is the threaded hole; When the thread feature does not exist on the first element surface, determining whether there are two circular holes in the geometric element hole whose arc edges have different lengths; If there are no two circular holes with inconsistent lengths of the arc sides in the geometric element holes, it is determined that the part to be identified is the common circular hole; otherwise, the center points and distances of the two circular holes are obtained; When the distance between the two circular holes is 0, and the center points of the connecting planes of the two circular holes are the same, it is determined that the part to be identified is the countersunk hole.
4. The method for geometrically identifying characteristic shapes according to claim 1, characterized in that: The characteristic shape includes a common tapered hole and a countersunk tapered hole; when the geometric element hole includes the tapered hole, determining the characteristic shape of the part to be identified according to the characteristic structure of the geometric element hole includes the following steps: Determining whether the circular hole still exists in the geometric element hole; If the circular hole does not exist in the geometric element hole, determine that the part to be identified is the common tapered hole; otherwise, obtain the center point and distance between the tapered hole and the circular hole; When the distance between the tapered hole and the circular hole is 0, and the center points of the connecting planes of the tapered hole and the circular hole are the same, it is determined that the part to be identified is the countersunk tapered hole.
5. The method for geometrically identifying characteristic shapes according to claim 1, characterized in that: The characteristic shape includes a through-internal groove, a through-outline groove and a step groove; the step of determining the characteristic shape of the part to be identified based on the geometric relationship between the reference plane and other second element planes includes the following steps: When the reference surface has an internal contour, obtaining another second element surface connected to all edges of the internal contour in the three-dimensional model as a first determination surface; When the first determination surface is parallel to the reference surface, and the positional relationship between the first determination surface and the reference surface in the three-dimensional model is opposite, the part to be identified is determined to be the through internal groove; Or, when the internal contour does not exist on the reference surface, all edges connected to the external contour of the reference surface are obtained in the three-dimensional model as the external contour edges; another second element surface connected to all the edges of the external contour is obtained in the three-dimensional model as the second determination surface; When the second determination surface is parallel to the reference surface, and the positional relationship between the second determination surface and the reference surface in the three-dimensional model is opposite, the part to be identified is determined to be the through-shaped groove; wherein the shape of the through-shaped groove is determined based on the shape edge; Or, obtaining a plane in the three-dimensional model that is parallel to the reference plane and is farthest away from the reference plane as a third determination plane; When there are a plurality of second element surfaces in the three-dimensional model that are parallel to and in the same direction as the reference surface and the third determination surface, it is determined that the part to be identified is the step groove.
6. The method for geometrically identifying characteristic shapes according to claim 1 or 2, characterized in that: The characteristic shape includes a U hole and a half U hole; when the first element surface is the semi-cylindrical surface, the geometric element edge includes two arc edges and two straight line edges; the method further includes the following steps: When the identifier of the geometric element edge does not satisfy the preset condition, obtaining two geometric element faces adjacent to the two straight line edges in the three-dimensional model; If the two geometric element faces adjacent to the two straight edges are both the second element faces, determining whether the other ends of the two second element faces are also connected to another semi-cylindrical face; When the other ends of the two second element surfaces are also connected to another semi-cylindrical surface, the part to be identified is determined to be the U-hole; otherwise, the part to be identified is determined to be the semi-U-hole.
7. A device for geometrically identifying characteristic shapes, characterized in that: The device comprises: The first module is used to obtain a three-dimensional model of the part to be identified, and obtain a geometric element surface of the part to be identified according to the three-dimensional model; The second module is used for extracting geometric element edges according to the contour shape of the first element surface when the geometric element surface includes a first element surface; the first element surface includes a semi-cylindrical surface and a semi-conical surface; The third module is used to determine the geometric element hole formed by the first element surface and the geometric element edge when the identifier of the geometric element edge meets the preset condition; the geometric element hole includes a circular hole and / or a conical hole; A fourth module is used to determine the characteristic shape of the part to be identified according to the characteristic structure of the geometric element hole; A fifth module is used for, when the geometric element surface includes a second element surface, using the second element surface with the largest area as a reference surface; the second element surface includes a plane; The sixth module is used to determine the characteristic shape of the part to be identified according to the geometric relationship between the reference plane and other second element planes.
8. The device for geometrically identifying characteristic shapes according to claim 7, characterized in that: The characteristic shapes include U-holes and half-U-holes; When the first element surface is the semi-cylindrical surface, the geometric element edges include two arc edges and two straight line edges; the device further includes: A seventh module is used for obtaining two geometric element faces adjacent to the two straight line edges in the three-dimensional model when the identifier of the geometric element edge does not meet the preset condition; An eighth module is used for determining whether the other ends of the two geometric element surfaces adjacent to the two straight edges are connected to another semi-cylindrical surface if both of the two geometric element surfaces are the second element surfaces; The ninth module is used to determine that the part to be identified is the U-hole when the other ends of the two second element surfaces are also connected to another semi-cylindrical surface; otherwise, determine that the part to be identified is the semi-U-hole.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.