Method, device, equipment and medium for identifying characteristic regions of vehicle model files

By identifying the common edges and characteristic edges of triangular facets in STL files and establishing topological relationships, the problem of poor quality of triangular facet units in STL files is solved, and efficient characteristic area recognition and processing are achieved, which is suitable for computer-aided engineering.

CN114155343BActive Publication Date: 2025-10-03CHINA AUTOMOTIVE INNOVATION CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111430072.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2025-10-03
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

The quality of triangular facet elements in existing STL files is poor, which makes them unable to be directly applied in computer-aided engineering, and existing technologies are difficult to efficiently identify feature areas.

Method used

By obtaining the geometric information of the triangular facets, the common edges and characteristic edges are determined based on the vertex coordinate numbers, and the characteristic areas are identified using parameters such as area ratio, aspect ratio and dihedral angle. The topological relationship between points, edges and units is established, the common edges and characteristic edges are identified, and a closed figure is formed.

Benefits of technology

It improves the accuracy and efficiency of feature area recognition, reduces the amount of calculation, adapts to STL files with complex shapes, expands the scope of application, and facilitates STL file processing and secondary development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114155343B_ABST
    Figure CN114155343B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, apparatus, device and medium for identifying characteristic regions of a vehicle model file. The method comprises: obtaining geometric information of each triangular facet in the vehicle model file; numbering the vertices of each triangular facet based on vertex coordinates to obtain three vertex numbers corresponding to each triangular facet, with the same vertex coordinates corresponding to the same vertex number; determining the shared edges between each triangular facet and adjacent triangular facets and the first characteristic edge of the vehicle model file based on the three vertex numbers corresponding to each triangular facet; identifying the shared edges that do not meet preset requirements as second characteristic edges; determining the characteristic region to which each triangular facet belongs based on the first characteristic edge and the second characteristic edge, with the characteristic region being a closed figure formed by connecting multiple first characteristic edges and / or multiple second characteristic edges end to end. When identifying characteristic regions, the present disclosure does not need to calculate the curvature of the surface at the vertex, which greatly saves computational effort and improves computational efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of graphic file processing, and in particular to a method, device, equipment, and medium for identifying a feature area of ​​a vehicle model file. Background Art

[0002] With the continuous advancement of computer technology, computational graphics has experienced rapid development, giving rise to the discipline of Computer Aided Design (CAD). Currently, CAD, as a front-end development tool for Computer Aided Engineering (CAE), is widely used in various fields, including mechanical manufacturing, architecture, and aerospace.

[0003] In CAD, common 3D model formats include stereolithography and Initial Graphics Exchange Specification (IGES) formats. Stereolithographic (STL) files are widely used in 3D printing, rapid prototyping, mesh generation, and other fields due to their simple format, strong versatility, and ease of reading and writing. STL files are composed of multiple independent triangular facet units, each of which contains geometric information such as a normal vector and three vertex coordinates. In actual engineering, the mesh quality of the triangular facets in STL files is often poor, with many units having extremely large aspect ratios and large differences in adjacent areas, making them unsuitable for direct application in CAE (Computer Aided Engineering). Summary of the Invention

[0004] In a first aspect, the present disclosure provides a method for identifying feature areas of a vehicle model file, wherein the graphic file is a triangular facet model file, the method comprising:

[0005] Acquire geometric information of each triangular facet in a graphics file, wherein the graphics file includes a plurality of interconnected triangular facets, and the geometric information includes vertex coordinates of three vertices;

[0006] Numbering the vertices of each triangular face based on the vertex coordinates to obtain three vertex numbers corresponding to each triangular face, where the same vertex coordinates correspond to the same vertex number;

[0007] Determine the shared edge between each triangle and an adjacent triangle and the first characteristic edge of the graphic file based on the three vertex numbers corresponding to each triangle;

[0008] Identify the shared edges that do not meet the preset requirements as second characteristic edges;

[0009] A characteristic region to which each triangular facet belongs is determined based on the first characteristic edges and the second characteristic edges. The characteristic region is a closed figure formed by connecting multiple first characteristic edges and / or multiple second characteristic edges end to end.

[0010] Furthermore, the determining, based on the three vertex numbers corresponding to each triangular facet, the shared edge between each triangular facet and an adjacent triangular facet and the first characteristic edge of the graphic file includes:

[0011] Numbering the edges of each triangular face based on the three vertex numbers corresponding to each triangular face to obtain edge numbers corresponding to the three edges of each triangular face;

[0012] When the same edge number corresponds to different triangles, the edge corresponding to the edge number is the shared edge;

[0013] When the edge number does not correspond to different triangles, the edge corresponding to the edge number is the first characteristic edge.

[0014] Furthermore, the geometric information further includes a normal vector of a triangular facet, and the taking the common edge that does not meet the preset requirements as a second characteristic edge includes:

[0015] Determining an area ratio and a dihedral angle of adjacent triangular facets and their respective aspect ratios based on the shared edge, wherein the area and the aspect ratio of the triangular facets are determined based on vertex coordinates of the corresponding triangular facets, and the dihedral angle is determined based on normal vectors corresponding to the adjacent triangular facets;

[0016] When the area ratio is greater than a preset area ratio threshold, one or both of the aspect ratios of the adjacent triangular facets are not greater than a preset aspect ratio threshold, and the dihedral angle is greater than a preset first angle threshold, it is determined that the common edge does not meet the preset requirements, and the common edge is identified as the second feature edge.

[0017] Furthermore, the method further comprises:

[0018] When one of the aspect ratios of the adjacent triangular facets is greater than a preset aspect ratio threshold, the shared edge is the shortest edge in the triangular facet, and the dihedral angle is greater than a preset first angle threshold, it is determined that the shared edge does not meet the preset requirements and the shared edge is identified as the second feature edge.

[0019] Furthermore, the method further comprises:

[0020] When the ratio of the area of ​​one of the adjacent triangular facets to the area of ​​all the triangular facets is greater than a preset ratio threshold, and the dihedral angle is greater than a preset first angle threshold, it is determined that the common edge does not meet the preset requirements, and the common edge is identified as the second feature edge.

[0021] Furthermore, the method further comprises:

[0022] When the dihedral angle is greater than a preset second angle threshold, it is determined that the shared edge does not meet a preset requirement, and the shared edge is identified as the second characteristic edge.

[0023] Furthermore, the determining of a characteristic region to which each triangular facet belongs based on the first characteristic edges and the second characteristic edges, wherein the characteristic region is a closed figure formed by connecting multiple first characteristic edges and / or multiple second characteristic edges end to end, includes:

[0024] Select the target patch in the specified feature area;

[0025] Determine whether the target surface has a corresponding region identification number;

[0026] If the target surface does not have a corresponding region identification number, adding a region identification number to the target surface;

[0027] Determining whether the three edges of the target face are the first characteristic edges or the second characteristic edges respectively;

[0028] When the edge of the target face is the first characteristic edge or the second characteristic edge, recording the number of the first characteristic edge or the second characteristic edge;

[0029] Adding the region identification number to the adjacent triangular facets of the three edges of the target facet that are not the first characteristic edge or the second characteristic edge, and using the triangular facets adjacent to the target facet as the target facet;

[0030] Repeat the steps of: determining whether the remaining two edges of the target face are the first feature edge or the second feature edge; when the edge of the target face is the first feature edge or the second feature edge, recording the number of the first feature edge or the second feature edge; adding the area identification number to the adjacent triangles of the remaining two edges of the target face that are not the first feature edge or the second feature edge, until the number of the first feature edge and the second feature edge of the target face is the same as the number of the first feature edge and the second feature edge in the specified feature area.

[0031] In another aspect, the present disclosure provides a device for identifying feature regions of a graphic file, wherein the graphic file is a triangular facet model file, and the device comprises:

[0032] An information acquisition module, configured to acquire geometric information of each triangular facet in a graphic file, wherein the graphic file includes a plurality of interconnected triangular facets, and the geometric information includes vertex coordinates of three vertices;

[0033] A numbering module, configured to number the vertices of each triangular facet based on the vertex coordinates to obtain three vertex numbers corresponding to each triangular facet, wherein the same vertex coordinates correspond to the same vertex number;

[0034] an edge determination module, configured to determine, based on the three vertex numbers corresponding to each triangular facet, the shared edges between each triangular facet and an adjacent triangular facet and the first characteristic edge of the graphic file;

[0035] A second characteristic edge identification module is used to identify the common edges that do not meet the preset requirements as second characteristic edges;

[0036] The feature area recognition module is used to determine the feature area to which each triangular facet belongs based on the first feature edge and the second feature edge. The feature area is a closed figure formed by connecting multiple first feature edges and / or multiple second feature edges end to end.

[0037] On the other hand, the present disclosure provides a computer-readable storage medium, which stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the feature area recognition method of the graphic file as described above.

[0038] On the other hand, the present disclosure provides an electronic device comprising at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the feature area recognition method of the graphic file as described above by executing the instructions stored in the memory.

[0039] The technical solutions provided by the embodiments of the present disclosure bring at least the following beneficial effects:

[0040] The methods, devices, equipment, and media for identifying feature regions in graphic files provided in the embodiments of this specification reconstruct the geometric topology of STL files and establish correspondences between points, edges, and cells. This not only improves the accuracy and efficiency of feature region identification but also facilitates STL file processing and secondary development. Furthermore, when identifying feature regions, there is no need to calculate the curvature of the surface at its vertices, significantly reducing computational effort and improving efficiency.

[0041] This disclosure significantly improves the accuracy of feature region recognition by leveraging the influence of dihedral angles and the influence of parameters such as the aspect ratio and area ratio of triangular facet units on feature region recognition. Furthermore, this disclosure eliminates the need to classify basic shapes in STL files. By performing feature region recognition based on points, edges, and units, it reduces the number of STL file recognition steps and can adapt to STL files of various complex shapes, expanding the application scope of STL file feature region recognition.

[0042] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.

[0044] Figure 1 is a schematic diagram showing an application environment according to an exemplary embodiment;

[0045] Figure 2 is a flow chart showing a method for identifying a feature area of ​​a graphic file according to an exemplary embodiment;

[0046] Figure 3 is a flow chart showing another method for identifying a feature area of ​​a graphic file according to an exemplary embodiment;

[0047] Figure 4 This is a block diagram of a device for identifying a feature area of ​​a graphic file according to an exemplary embodiment;

[0048] Figure 5 The present invention is a block diagram showing an electronic device for identifying feature areas of a graphic file according to an exemplary embodiment. DETAILED DESCRIPTION

[0049] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0050] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.

[0051] See also Figure 1 , Figure 1 1 is a schematic diagram showing an application environment according to an exemplary embodiment. The application environment may include a terminal 110 and a server 120. The terminal 110 and the server 120 may be connected via a wired network or a wireless network.

[0052] The terminal 110 includes physical devices such as smart phones, desktop computers, tablet computers, laptops, digital assistants, smart wearable devices, etc., and may also include software running in the physical device, such as an application (Application, referred to as App for short). The application may be an application specifically provided for reading STL files, or other applications with the function of reading STL files, such as CAD, etc. The operating system running on the physical device in the embodiment of the present application may include but is not limited to Android, IOS, Linux, Unix, Windows, etc. The terminal 110 may include a UI (User Interface) layer, and the terminal 110 provides external input and display of STL files through the UI layer. In addition, the terminal 110 sends corresponding information to the server 120 based on the API (Application Programming Interface).

[0053] Server 120 may be a server that provides background services for applications in terminal 110. Specifically, the service provided by server 120 may be feature area recognition. Server 120 may be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or 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.

[0054] In a first aspect, the present disclosure provides a method for identifying feature regions of a graphic file. Figure 2FIG. 1 is a flow chart showing a method for identifying a feature region of a graphic file according to an exemplary embodiment. Figure 2 As shown, the method can be applied to the above-mentioned terminal or server. The graphic file mainly processed by the present disclosure can be a triangular face model file (STL file). The method may include the following steps:

[0055] In step S201 , geometric information of each triangular facet in a graphic file is obtained. The graphic file includes a plurality of interconnected triangular facets, and the geometric information includes vertex coordinates of three vertices.

[0056] Specifically, STL files have a simple format and can only describe the geometric information of three-dimensional objects. They do not support information such as color and material. They are the most common file format supported by computer graphics processing CG, digital geometry processing such as CAD, and digital geometry industrial applications such as 3D printers.

[0057] Specifically, a binary STL file uses a fixed number of bytes to represent the geometric information of each triangle. For example, the first 80 bytes of the file are the file header, which stores the file name. This is followed by a 4-byte integer describing the number of triangles in the model, followed by the geometric information for each triangle. Each triangle occupies a fixed 50 bytes, for example, b0-b49, which represent: three 4-byte floating-point numbers b0-b11 representing the normal vector of the triangle; three 4-byte floating-point numbers b12-b23 representing the coordinates of one vertex; three 4-byte floating-point numbers b24-b35 representing the coordinates of two vertices; three 4-byte floating-point numbers b36-b47 representing the coordinates of three vertices; and the last two bytes b48 and b49 describe the triangle's attributes. The size of a complete binary STL file is the number of triangles multiplied by 50 plus 84 bytes.

[0058] After the terminal or server obtains the STL file, the geometric information of each triangular face in the STL file can be read out. The geometric information may include the normal vector of the triangular face and the vertex coordinates of the three vertices.

[0059] It is understandable that a graphic file, ie, an STL file, may include a plurality of interconnected triangular facets, that is, the graphic file may be a separate device model, such as a vehicle model.

[0060] In step S203, the vertices of each triangular facet are numbered based on the vertex coordinates to obtain three vertex numbers corresponding to each triangular facet, and the same vertex coordinates correspond to the same vertex number;

[0061] Specifically, each triangular face in the graphics file is connected to each other, that is, adjacent triangular facets have two identical vertex coordinates.

[0062] In practical applications, the vertices of each triangle can be numbered according to the vertex coordinates, that is, the same vertex coordinates correspond to the same vertex number. For example, the three vertex coordinates of triangle A are a1, a2 and a3, and the three vertex coordinates of triangle B are a1, a2 and b1, then it can be determined that triangle A and triangle B are adjacent. When numbering each vertex, you can arbitrarily select a vertex as the initial number, and the subsequent numbers can be determined by accumulation. For example, if the initial number is 1, the subsequent numbers are 2...N, where N is a positive integer greater than 2. When numbering, adjacent triangles can be set with the same vertex number. For example, the three vertex coordinates of triangle A are 1, 2 and 3, and the three vertex coordinates of triangle B are 1, 2 and 4, and so on, until all vertex coordinates are numbered. The three vertex numbers corresponding to each triangle can be obtained.

[0063] In the embodiment of this specification, each vertex is numbered by comparing the coordinates of each vertex to construct a topological relationship between triangles and vertices, so as to facilitate searching for adjacent triangles.

[0064] In an optional embodiment, the vertices may be sorted in order of number, and a relationship between the triangles and the re-sorted vertices may be established.

[0065] In step S205 , the shared edges between each triangular facet and adjacent triangular facets and the first characteristic edge of the graphic file are determined based on the three vertex numbers corresponding to each triangular facet.

[0066] Specifically, adjacent triangles correspond to the same two vertex numbers. By searching the vertex numbers, the shared edges between each triangle and the adjacent triangles and the first characteristic edge of the graphic file can be determined.

[0067] In an optional embodiment, Figure 3 is a flow chart showing another method for identifying a feature region of a graphic file according to an exemplary embodiment. Figure 3 As shown, determining the shared edge between each triangular facet and an adjacent triangular facet and the first characteristic edge of the graphic file based on the three vertex numbers corresponding to each triangular facet includes:

[0068] In step 301, the edges of each triangular facet are numbered based on the three vertex numbers corresponding to each triangular facet to obtain edge numbers corresponding to the three edges of each triangular facet.

[0069] Specifically, you can select any triangle as the current triangle, and record the three sides of the current triangle as sides 1, 2, and 3 respectively; then select adjacent triangles, and compare whether the numbers of the two endpoints of each edge in the current triangle are the same as the endpoint numbers of the existing numbered edges. If they are the same, ignore them; if they are different, add a new edge number and record the numbers of the two endpoints of this edge. Use the adjacent triangle as the current triangle and repeat: compare whether the numbers of the two endpoints of each edge in the current triangle are the same as the endpoint numbers of the existing numbered edges. If they are the same, ignore them; if they are different, add a new edge number and record the numbers of the two endpoints of this edge, until the three sides of all triangles are numbered.

[0070] In step 303, when the same edge number corresponds to different triangles, the edge corresponding to the edge number is the shared edge;

[0071] In step 305 , when the edge number does not correspond to a different triangle patch, the edge corresponding to the edge number is the first feature edge.

[0072] Wherein, triangular facets with different shared edges have the same two vertex numbers and / or the same edge numbers. For example, the shared edge of triangular facets A and B is the line connecting vertex a1 and vertex a2.

[0073] The first characteristic edge can be understood as the boundary of the graphic file, that is, the triangle where the first characteristic edge is located does not have a triangle with which it shares the first characteristic edge, that is, the right unit of the edge is empty. It can be understood that the vertex number corresponding to the first characteristic edge does not exist in different triangles. For example, if the vertex numbers corresponding to triangle C are 5, 6, and 7, and the edge number is 5a, 5a represents the line connecting 5 and 6, 6a represents the line connecting 5 and 7, and 7a represents the line connecting 6 and 7, while other triangles do not have 5 and 6, or do not have 5a, then it can be determined that the line 5a connecting vertices 5 and 6 is the first characteristic edge.

[0074] In step S207, the shared edges that do not meet the preset requirements are identified as second characteristic edges.

[0075] Specifically, the preset requirement may be pre-set.

[0076] In an optional embodiment, identifying the shared edge that does not meet the preset requirement as a second characteristic edge includes:

[0077] The area ratio and dihedral angle of adjacent triangular facets and their respective aspect ratios are determined based on the shared edge.

[0078] Specifically, the area of ​​each triangle can be calculated based on the vertex coordinates of the triangle. The area ratio can include two values: the ratio of triangle A to triangle B, and the ratio of triangle B to triangle A. The embodiments of this specification use a larger-area triangle to compare with a smaller-area triangle.

[0079] The aspect ratio can be understood as the maximum value of the ratio of the length of the three sides to the height. It can be understood that the product of the above side length and height is the area of ​​the triangle.

[0080] The normal vector refers to the normal coordinate of the triangle pointing to the outside of the solid. The dihedral angle can be determined by the normal vectors corresponding to adjacent triangles.

[0081] Afterwards, the area ratio may be compared with a preset area ratio threshold, the aspect ratio may be compared with a preset aspect ratio threshold, and the dihedral angle may be compared with a preset angle threshold.

[0082] When the area ratio is greater than a preset area ratio threshold, one or both of the aspect ratios of the adjacent triangular facets are not greater than a preset aspect ratio threshold, and the dihedral angle is greater than a preset first angle threshold, it is determined that the common edge does not meet the preset requirements, and the common edge is identified as the second feature edge.

[0083] Specifically, the preset area ratio threshold, the preset aspect ratio threshold and the preset first angle threshold are not specifically limited in the embodiments of this specification and can be set according to actual needs. For example, the preset area ratio threshold can be set to 5, the preset aspect ratio threshold can be set to 5, and the preset first angle threshold can be set to 0.001°.

[0084] Specifically, the area ratio is used to characterize the presence of triangles with larger areas among adjacent triangles. In the STL file, if the area is relatively large, the shared edge can be determined to be the second characteristic edge. In order to better determine the second characteristic edge, the present disclosure further limits the aspect ratio and the dihedral angle to avoid inaccurate identification of the second characteristic edge.

[0085] In an optional embodiment, the method further includes: when one of the aspect ratios of the adjacent triangular facets is greater than a preset aspect ratio threshold, the shared edge is the shortest edge in the triangular facet, and the dihedral angle is greater than a preset first angle threshold, then it is determined that the shared edge does not meet the preset requirements, and the shared edge is identified as the second feature edge.

[0086] Specifically, if one of the aspect ratios of adjacent triangles is greater than a preset aspect ratio threshold, the triangle with the larger aspect ratio has a relatively larger area. In an STL file, smaller triangles have higher surface resolution. In an STL file, the areas of individual triangles are relatively small. If a triangle has an aspect ratio greater than a preset aspect ratio threshold, the shared edge is the shortest edge in the triangle, and the dihedral angle is greater than a preset first angle threshold, then the shared edge is determined to not meet the preset requirements and is identified as a second characteristic edge.

[0087] In an optional embodiment, the method further includes:

[0088] When the ratio of the area of ​​one of the adjacent triangular facets to the area of ​​all the triangular facets is greater than a preset ratio threshold, and the dihedral angle is greater than a preset first angle threshold, it is determined that the common edge does not meet the preset requirements, and the common edge is identified as the second feature edge.

[0089] Specifically, the preset ratio threshold can be set according to actual needs. For example, the preset ratio threshold can be set to 10%. That is, when the area of ​​the triangular facet is greater than 10% of the area of ​​all triangular facets, and the dihedral angle is greater than the preset first angle threshold, the common edge can be identified as the second feature edge.

[0090] In an optional embodiment, the method further includes:

[0091] When the dihedral angle is greater than a preset second angle threshold, it is determined that the shared edge does not meet a preset requirement, and the shared edge is identified as the second characteristic edge.

[0092] Specifically, the preset second angle threshold is used to represent a standard value for the angular offset between adjacent triangular facets. This preset second angle threshold is not specifically limited in the embodiments of this specification and can be set according to actual needs, such as being set to 30°. That is, if the dihedral angle exceeds 30°, the corresponding shared edge can be determined to be a second characteristic edge.

[0093] It is understood that a large dihedral angle indicates that adjacent triangles are not in the same plane and are bent. By comparing the dihedral angle with a preset second angle threshold, it can be determined whether adjacent triangles are coplanar. If adjacent triangles are not coplanar, the shared edge can be determined to be a second characteristic edge.

[0094] In a specific embodiment, the area ratio, aspect ratio and dihedral angle of adjacent triangular facets on both sides of the common edge can be determined in turn. When the area ratio of the left and right units of the common edge exceeds a certain preset area ratio threshold, the common edge is determined to be a second characteristic edge; when the aspect ratio of the left and right units of the edge both exceeds a certain preset aspect ratio threshold, the edge is determined not to be a second characteristic edge; when the aspect ratio of a triangular facet in the left and right units of the common edge exceeds a certain preset aspect ratio threshold, and the common edge is the shortest of the three edges, the edge is determined to be a second characteristic edge; when the aspect ratio of a triangular facet in the left and right units of the common edge exceeds a certain preset aspect ratio threshold, and the common edge is the shortest of the three edges, the edge is determined to be a second characteristic edge; If the ratio of the area of ​​a triangular face unit in the left and right units with edges to the area of ​​all triangular facets is greater than a preset ratio threshold, the edge is determined to be a second feature edge; when the dihedral angle between the left and right units of the shared edge exceeds the preset second angle threshold, the edge is determined to be a second feature edge; when the dihedral angle between the left and right units of the shared edge is less than the preset first angle threshold, the shared edge is determined not to be a second feature edge. It can be understood that the above judgment is made for a shared edge in sequence, that is, only after all judgments are completed can it be determined whether the shared edge is a second feature edge.

[0095] The embodiment of this specification determines in sequence through area ratio, dihedral angle and aspect ratio, avoiding inaccurate identification of the second feature edge caused by a single judgment, improving the accuracy of second feature edge recognition, and expanding the applicable scenarios of STL file feature edge recognition.

[0096] In step S209, a characteristic region to which each triangular facet belongs is determined based on the first characteristic edges and the second characteristic edges. The characteristic region is a closed figure formed by connecting multiple first characteristic edges and / or multiple second characteristic edges end to end.

[0097] Specifically, the feature area is used to characterize that the area is different from other areas, that is, the feature area is used to characterize that the various triangular facets in the area are the same or related, wherein the feature area can be a plane or a curved surface. Each feature area is a closed figure formed by connecting multiple first feature edges and / or multiple second feature edges end to end. That is, the first feature edge or multiple second feature edges are the boundaries of the feature area, and there will be no first feature edge or multiple second feature edges inside the feature area. The triangular facet model file that identifies the feature area can be used in computer-aided engineering, such as CAE.

[0098] In an optional embodiment, determining a characteristic region to which each triangular facet belongs based on the first characteristic edges and the second characteristic edges, wherein the characteristic region is a closed figure formed by connecting multiple first characteristic edges and / or multiple second characteristic edges end to end, includes:

[0099] Select the target patch in the specified feature area;

[0100] Determine whether the target surface has a corresponding region identification number;

[0101] If the target surface does not have a corresponding region identification number, adding a region identification number to the target surface;

[0102] Determining whether the three edges of the target face are the first characteristic edges or the second characteristic edges respectively;

[0103] When the edge of the target face is the first characteristic edge or the second characteristic edge, recording the number of the first characteristic edge or the second characteristic edge;

[0104] Adding the region identification number to the adjacent triangular facets of the three edges of the target facet that are not the first characteristic edge or the second characteristic edge, and using the triangular facets adjacent to the target facet as the target facet;

[0105] Repeat the steps of: determining whether the remaining two edges of the target face are the first feature edge or the second feature edge; when the edge of the target face is the first feature edge or the second feature edge, recording the number of the first feature edge or the second feature edge; adding the area identification number to the adjacent triangles of the remaining two edges of the target face that are not the first feature edge or the second feature edge, until the number of the first feature edge and the second feature edge of the target face is the same as the number of the first feature edge and the second feature edge in the specified feature area.

[0106] In the specific implementation process, a target facet is selected in the specified feature area, starting from the target facet, and it is determined whether the target facet already belongs to a certain feature area. If the target facet has not yet been divided into an area, a new area identification number is created, and the feature area belonging status of the target facet is changed at the same time, and the target facet is recorded as the area identification number; it can be understood that each triangular facet unit contains three edges, and each edge has information about the first triangular facet or the second triangular facet, wherein the first triangular facet or the second triangular facet is an adjacent triangular facet. The target facet must be one of the adjacent triangular facets. If the common edge of the adjacent triangular facets is not a feature edge, the triangular facet on the other side of the common edge belongs to the same feature area as the adjacent triangular facet. Based on the edges of each triangular facet, the triangular facets in the same plane or surface as the target facet can be marked as the area identification number until the number of the edges of the target facet is the same as the number of the first feature edge and the second feature edge in the specified feature area. Repeat the above steps to determine the information of all triangular facets in each feature area.

[0107] In an optional embodiment, the method further includes:

[0108] Based on the designated area identification number, the geometric information of the triangular facet corresponding to the designated area identification number is output to obtain a target file, which can be applied to computer-aided engineering. The designated feature area is one or more feature areas in the graphic file.

[0109] Specifically, the terminal or server can output the geometric information of the triangular face corresponding to the specified area identification number according to the specified area identification number to obtain a target file, that is, the target file includes the geometric information of the triangular face and the identified feature area, wherein the above-mentioned feature area may include the first feature edge or the second feature edge in the triangular face.

[0110] The embodiment of this specification can output the solution information of all triangular facets in the specified area to obtain a target file by specifying the area identification number, which is convenient for users to split and use the triangular facet model file without deleting it on the terminal page, thereby improving office efficiency.

[0111] The method for identifying feature regions in graphic files, provided in the embodiments of this specification, reconstructs the geometric topology of STL files and establishes correspondences between points, edges, and cells. This not only improves the accuracy and efficiency of feature region identification but also facilitates STL file processing and secondary development. Furthermore, when identifying feature regions, there is no need to calculate the curvature of the surface at its vertices, significantly reducing computational effort and improving efficiency.

[0112] This disclosure significantly improves the accuracy of feature region recognition by leveraging the influence of dihedral angles and the influence of parameters such as the aspect ratio and area ratio of triangular facet units on feature region recognition. Furthermore, this disclosure eliminates the need to classify basic shapes in STL files. By performing feature region recognition based on points, edges, and units, it reduces the number of STL file recognition steps and can adapt to STL files of various complex shapes, expanding the application scope of STL file feature region recognition.

[0113] In another aspect, the present disclosure provides a device for identifying characteristic regions of a graphic file. Figure 4 is a block diagram of a device for identifying a feature region of a graphic file according to an exemplary embodiment. Figure 4 , the device comprises:

[0114] An information acquisition module 401 is used to acquire geometric information of each triangular facet in a graphic file, wherein the graphic file includes a plurality of interconnected triangular facets, and the geometric information includes vertex coordinates of three vertices;

[0115] A numbering module 402 is configured to number the vertices of each triangular face based on the vertex coordinates to obtain three vertex numbers corresponding to each triangular face, where the same vertex coordinates correspond to the same vertex number;

[0116] An edge determination module 403 is configured to determine the shared edges between each triangle and its adjacent triangles and the first characteristic edge of the graphic file based on the three vertex numbers corresponding to each triangle;

[0117] A second characteristic edge identification module 404 is configured to identify the shared edges that do not meet preset requirements as second characteristic edges;

[0118] The feature region identification module 405 is configured to determine the feature region to which each triangle belongs based on the first feature edges and the second feature edges. The feature region is a closed figure formed by connecting multiple first feature edges and / or multiple second feature edges end to end.

[0119] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0120] On the other hand, the present disclosure provides a computer-readable storage medium, which stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the feature area recognition method of the graphic file as described above.

[0121] Figure 5 This is a block diagram of an electronic device for identifying feature areas of graphic files according to an exemplary embodiment. The electronic device can be a terminal or a monitoring system. The internal structure diagram thereof can be as shown in FIG. Figure 5 As shown. The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for identifying feature areas of a graphic file is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0122] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the electronic device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0123] In an exemplary embodiment, an electronic device is also provided, comprising at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the feature area recognition of the graphic file as described above by executing the instructions stored in the memory.

[0124] In an exemplary embodiment, a computer-readable storage medium is also provided. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method for identifying feature regions of a graphic file according to the embodiment of the present disclosure. The computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, or the like.

[0125] In an exemplary embodiment, a computer program product including instructions is further provided. When the computer program product is run on a computer, the computer is enabled to execute the method for identifying a feature region of a graphic file in the embodiment of the present disclosure.

[0126] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, which can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0127] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.

[0128] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for identifying characteristic regions of a vehicle model file, characterized in that: The vehicle model file is a triangular patch model file, and the method includes: Acquire geometric information of each triangular facet in a vehicle model file, wherein the vehicle model file includes a plurality of interconnected triangular facets, the geometric information including vertex coordinates of three vertices and a normal vector of the triangular facet; Numbering the vertices of each triangular face based on the vertex coordinates to obtain three vertex numbers corresponding to each triangular face, where the same vertex coordinates correspond to the same vertex number; Determine the shared edge between each triangular facet and an adjacent triangular facet and the first characteristic edge of the vehicle model file based on the three vertex numbers corresponding to each triangular facet; Identifying the shared edge that does not meet the preset requirements as a second characteristic edge, including: determining the area ratio and dihedral angle of adjacent triangular facets and their respective aspect ratios based on the shared edge, wherein the area and the aspect ratio of the triangular facets are determined according to the vertex coordinates of the corresponding triangular facets, the dihedral angle is determined according to the normal vectors corresponding to the adjacent triangular facets, and the aspect ratio is the maximum value of the ratios of the lengths to the heights of the three edges; when the area ratio is greater than a preset area ratio threshold, one or two of the aspect ratios of the adjacent triangular facets are not greater than a preset aspect ratio threshold, and the dihedral angle is greater than a preset first angle threshold, determining that the shared edge does not meet the preset requirements, and identifying the shared edge as the second characteristic edge; A characteristic region to which each triangular facet belongs is determined based on the first characteristic edges and the second characteristic edges. The characteristic region is a closed figure formed by connecting multiple first characteristic edges and / or multiple second characteristic edges end to end.

2. The method for identifying characteristic regions of a vehicle model file according to claim 1, characterized in that: The determining, based on the three vertex numbers corresponding to each triangular facet, the shared edge between each triangular facet and an adjacent triangular facet and the first characteristic edge of the vehicle model file includes: Numbering the edges of each triangular face based on the three vertex numbers corresponding to each triangular face to obtain edge numbers corresponding to the three edges of each triangular face; When the same edge number corresponds to different triangles, the edge corresponding to the edge number is the shared edge; When the edge number does not correspond to different triangles, the edge corresponding to the edge number is the first characteristic edge.

3. The method for identifying characteristic regions of a vehicle model file according to claim 1, characterized in that: The method further comprises: When one of the aspect ratios of the adjacent triangular facets is greater than a preset aspect ratio threshold, the shared edge is the shortest edge in the triangular facet, and the dihedral angle is greater than a preset first angle threshold, it is determined that the shared edge does not meet the preset requirements and the shared edge is identified as the second feature edge.

4. The method for identifying characteristic regions of a vehicle model file according to claim 1, characterized in that: The method further comprises: When the ratio of the area of ​​one of the adjacent triangular facets to the area of ​​all the triangular facets is greater than a preset ratio threshold, and the dihedral angle is greater than a preset first angle threshold, it is determined that the common edge does not meet the preset requirements, and the common edge is identified as the second feature edge.

5. The method for identifying characteristic regions of a vehicle model file according to claim 1, characterized in that: The method further comprises: When the dihedral angle is greater than a preset second angle threshold, it is determined that the shared edge does not meet a preset requirement, and the shared edge is identified as the second characteristic edge.

6. The method for identifying characteristic regions of a vehicle model file according to claim 1, characterized in that: The determining of a characteristic region to which each triangular facet belongs based on the first characteristic edges and the second characteristic edges, wherein the characteristic region is a closed figure formed by connecting multiple first characteristic edges and / or multiple second characteristic edges end to end, includes: Select the target patch in the specified feature area; Determine whether the target surface has a corresponding region identification number; If the target surface does not have a corresponding region identification number, adding a region identification number to the target surface; Determining whether the three edges of the target face are the first characteristic edges or the second characteristic edges respectively; When the edge of the target face is the first characteristic edge or the second characteristic edge, recording the number of the first characteristic edge or the second characteristic edge; Adding the region identification number to the adjacent triangular facets of the three edges of the target facet that are not the first characteristic edge or the second characteristic edge, and using the triangular facets adjacent to the target facet as the target facet; Repeat the steps of: determining whether the remaining two edges of the target face are the first feature edge or the second feature edge; when the edge of the target face is the first feature edge or the second feature edge, recording the number of the first feature edge or the second feature edge; adding the area identification number to the adjacent triangles of the remaining two edges of the target face that are not the first feature edge or the second feature edge, until the number of the first feature edge and the second feature edge of the target face is the same as the number of the first feature edge and the second feature edge in the specified feature area.

7. A device for identifying characteristic regions of a vehicle model file, characterized in that: The vehicle model file is a triangular patch model file, and the device includes: An information acquisition module, configured to acquire geometric information of each triangular facet in a vehicle model file, wherein the vehicle model file includes a plurality of interconnected triangular facets, and the geometric information includes vertex coordinates of three vertices and a normal vector of the triangular facet; A numbering module, configured to number the vertices of each triangular facet based on the vertex coordinates to obtain three vertex numbers corresponding to each triangular facet, wherein the same vertex coordinates correspond to the same vertex number; an edge determination module, configured to determine, based on the three vertex numbers corresponding to each triangular facet, the shared edge between each triangular facet and an adjacent triangular facet and the first characteristic edge of the vehicle model file; A second characteristic edge identification module is configured to identify the shared edge that does not meet the preset requirements as a second characteristic edge, comprising: determining the area ratio and dihedral angle of adjacent triangular facets and their respective aspect ratios based on the shared edge, wherein the area and aspect ratio of the triangular facets are determined based on the vertex coordinates of the corresponding triangular facets, the dihedral angle is determined based on the normal vectors corresponding to the adjacent triangular facets, and the aspect ratio is the maximum value of the ratios of the lengths to the heights of the three edges; when the area ratio is greater than a preset area ratio threshold, one or two of the aspect ratios of the adjacent triangular facets are not greater than a preset aspect ratio threshold, and the dihedral angle is greater than a preset first angle threshold, determining that the shared edge does not meet the preset requirements, and identifying the shared edge as the second characteristic edge; The feature area recognition module is used to determine the feature area to which each triangular facet belongs based on the first feature edge and the second feature edge. The feature area is a closed figure formed by connecting multiple first feature edges and / or multiple second feature edges end to end.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the method for identifying characteristic regions of a vehicle model file according to any one of claims 1 to 6.

9. An electronic device, characterized in that: It includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the at least one processor implements the feature area recognition method of the vehicle model file as described in any one of claims 1 to 6 by executing the instructions stored in the memory.