A method and device for intelligently identifying a body object
By analyzing and processing non-primitive objects in the three-dimensional model, using the surface normal relationship to identify macro-geometric forms and extracting description parameters, the problem of parameterized information loss during the three-dimensional model conversion is solved, and more efficient geometric recognition and processing is achieved.
Patent Information
- Application Number
- CN202411678899.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-11-22
AI Technical Summary
The existing three-dimensional model conversion technology is prone to losing parameterized information of the original model during the conversion process, resulting in difficulty in identifying and processing subsequent geometry, especially in terms of accuracy and completeness.
By loading the standard exchange format file, non-primitive objects are processed in turn, using vertex coordinates, normal vectors and triangle index information, the surface normal direction of the triangle is generated, the surface normal relationship is analyzed, the macro geometric shape of the non-primitive objects is initially determined, and its description parameters are extracted.
Effectively retain geometric information in the three-dimensional model, reduce computing resource consumption, reduce identification complexity, improve processing efficiency, and improve the availability of subsequent tools for processing the three-dimensional model.
Smart Images

Figure CN119169609B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of graphic recognition technology, and in particular to an intelligent recognition method and device for body objects. Background Art
[0002] In the field of modern 3D design and computer-aided design (CAD), technicians often use various computer tools to create complex 3D models. In order to share and use these 3D models in different system environments, model files need to be converted from one file format to a common exchange data format, such as OBJ, STL, and STEP. However, during the conversion process, the parameter information defined in detail in the original design is often lost. This loss of information leads to subsequent difficulties in identifying and processing geometry, especially in terms of accuracy and completeness.
[0003] Current 3D model conversion technologies usually rely on surface triangulation descriptions of geometries. In this description, geometries are represented as meshes composed of many small triangles, which is helpful for rendering and display, but the parametric information of the original model (such as precise geometry, size, and relative position) may be lost during the conversion process. For example, a cylinder can be accurately defined by its radius and height in a design file, but these parameters may no longer be obvious when converted to a triangulated exchange format.
[0004] Take the cylinder as an example. During the design phase, its dimensions are clearly described by the base radius, top radius, and height. However, when converted to formats such as STL, the cylinder may simply be composed of multiple small triangles, and its parametric information is not directly saved in the file. Subsequent computer tools may need to re-identify the geometry and derive parameters of this cylinder when processing it, which increases the computational burden and may lead to recognition errors. For commonly used geometries such as cylinders, spheres, and cubes, some graphics processing files may use special methods to retain their parametric features so that they are treated as basic objects in subsequent processing. However, for uncommon or more complex geometries, this feature information is often ignored or discarded, causing them to be treated as non-basic objects in subsequent processing, increasing processing complexity.
[0005] During the geometry recognition process, subsequent graphics processing files need to face the challenge of identifying a large number of geometric objects when loading and parsing standard exchange format files, and must distinguish between primitive objects and non-primitive objects. The current recognition process faces several major challenges: First, different graphics processing files may use different triangulation methods to describe the same geometric shape. This diversity requires the recognition algorithm to have high adaptability to improve accuracy. Secondly, in order to reduce the file size, technicians simplify the model, resulting in loss of details and reduced accuracy, which increases the difficulty of geometry recognition. In addition, when dealing with large and complex models, re-identification and parameter derivation of each geometry requires a lot of computing resources.
[0006] For example, CN107391872A discloses a method, device and computer-readable storage medium for using a three-dimensional model in software, the method comprising: selecting a three-dimensional model to be embedded in a pre-set software from the PDMS software, and converting the three-dimensional model into a three-dimensional model file in STP format; using Solidworks software to convert the three-dimensional model file in STP format into a three-dimensional model file in STL format, and outputting the three-dimensional model file in STL format; calling VTK software to read the three-dimensional model file in STL format, and embedding the read three-dimensional model file in STL format into the pre-set software. This technical solution is a typical example of the prior art. During the conversion process, the parametric information of the original model (such as the precise geometric shape, size and relative position) will be lost, causing the subsequent image processing software to encounter difficulties in identifying and processing geometric bodies.
[0007] For another example, CN118552398A discloses a method for generating a two-dimensional plane map for a three-dimensional mesh model, the method comprising: obtaining triangular mesh data of a three-dimensional network model; converting the triangular mesh data according to a first preset rule to obtain contour edge data; establishing a corresponding bounding volume hierarchical structure tree according to the triangular mesh data; traversing the bounding volume hierarchical structure tree according to the contour edge data, performing clipping processing and overlapping expansion processing on the contour edge data, and obtaining a two-dimensional plane map. However, this technical solution cannot effectively solve the technical problem of the present invention.
[0008] First, the above technical solution still relies on the acquisition and processing of triangular mesh data, which means that the original geometric parameterization information (such as the radius and height of the cylinder) cannot be retained during the conversion process. Therefore, the precise geometric shape and size of the three-dimensional model in the design stage will not appear after the conversion. In addition, for the processing of complex geometric bodies, although the technical solution provides the operation of contour edge data and bounding volume hierarchical structure tree, the essential characteristics and parameterization information of the complex shape may be further lost during the clipping and overlapping expansion process, resulting in subsequent geometric recognition and parameter derivation. Difficult. Secondly, although the generation of a two-dimensional plane map can simplify some subsequent processing, the triangulation description and detail processing of the three-dimensional model still consume corresponding computing resources, which may lead to inefficiency in practical applications. Finally, for uncommon or complex geometric shapes, the technical solution fails to ensure that these shapes are recognized as basic body objects in subsequent processing, which increases the complexity of subsequent processing.
[0009] Therefore, how to improve the existing technology to accurately identify non-primitive objects and convert them into primitive objects, significantly reduce the model file size, simplify storage requirements, and reduce rendering pressure when loading the model is a problem that the present invention hopes to solve.
[0010] In addition, on the one hand, there are differences in understanding among those skilled in the art; on the other hand, the applicant studied a large number of documents and patents when making the present invention, but due to space limitations, not all details and contents are listed in detail. However, this does not mean that the present invention does not have the characteristics of these prior arts. On the contrary, the present invention already has all the characteristics of the prior art, and the applicant reserves the right to add relevant prior art to the background technology. Summary of the invention
[0011] Current 3D model conversion technologies usually rely on surface triangulation descriptions of geometries. In this description, geometries are represented as meshes composed of many small triangles, which is helpful for rendering and display, but the parametric information of the original model (such as precise geometry, size, and relative position) may be lost during the conversion process. For example, a cylinder can be accurately defined by its radius and height in a design file, but these parameters may no longer be obvious when converted to a triangulated exchange format.
[0012] In view of the deficiencies in the prior art, the present invention provides an intelligent identification method for body objects from a first aspect, the method comprising: loading a standard exchange format file, which includes a number of basic body objects and non-basic body objects; processing the non-basic body objects in sequence, wherein the non-basic body objects include a vertex coordinate set, a vertex normal vector set and a vertex index information set of each triangle, determining the triangles stretched by each vertex according to the vertex index information set of each triangle, and generating the face normal of the triangle according to the vertex normal vectors of each vertex of the stretched triangle, analyzing the face normal of each triangle and determining the non-intersecting, coplanar, parallel or intersecting relationship of the triangles, comparing the standard judgment set of the face normals of all triangles of the standard geometric shape with the face normal set of all triangles of the non-basic body object to preliminarily determine the macroscopic geometric shape of the non-basic body object; on the basis of the preliminarily determined macroscopic geometric shape of the non-basic body object, determining the face normals and relationships of each macroscopic surface, and extracting the description parameters of the non-basic body object according to these face normals and relationships.
[0013] Through the identification and processing of the device, the geometric information in the three-dimensional model is preserved, reducing the risk of information loss. In addition, the method effectively reduces the consumption of computing resources and avoids the need to re-identify and derive parameters for each geometric body, thereby reducing computational complexity and improving overall processing efficiency. At the same time, the retained parameter information enables subsequent computer tools to process three-dimensional models more efficiently, thereby improving the usability of unit models in different environments. Through the comparison of standard judgment sets and the rapid determination of macroscopic geometric morphology, the scheme significantly improves the recognition speed of geometric bodies, shows high adaptability, and can effectively handle challenges such as different triangulation methods and loss of details due to model simplification, ensuring the effective recognition of complex geometric bodies during the conversion process.
[0014] According to a preferred embodiment, the method further comprises: selecting one of the face normals of a plurality of mutually coplanar triangles as the face normal of the surface of the non-primitive object where the coplanar triangles are located.
[0015] By selecting one of the face normals of coplanar triangles as the face normal of its surface, the processing flow of the geometry can be simplified. This step can effectively reduce redundant data, increase the processing speed of the geometry, and ensure more efficient and accurate recognition of complex models.
[0016] According to a preferred embodiment, the method further comprises: in the process of loading a standard exchange format file, loading each basic body object by reading the parameters describing the basic body object. This step can not only ensure the correct loading of the basic body, but also maintain the integrity of its parametric features, significantly improving the usability and accuracy of the three-dimensional model in the subsequent processing process.
[0017] According to a preferred embodiment, the method also includes: predetermining each face of a standard geometric shape composed of at least one triangle, determining the face normal of each face of the standard geometric shape, thereby forming a typical information set of the standard geometric shape; wherein the typical information set of the face normal is used as a standard judgment set for determining the macroscopic geometric shape of a non-basic body object.
[0018] This step can provide an effective reference standard for the subsequent recognition of non-primitive objects. This process helps to improve the accuracy of recognition and reduce the complexity caused by diverse geometric shapes.
[0019] According to a preferred embodiment, the method also includes: determining the relationship and number of all planes of the standard geometric shape through the non-intersecting, coplanar, parallel or intersecting relationship of all triangles of the standard geometric shape, and pre-defining the macroscopic geometric shape of the standard geometric shape according to the mutual relationship of the normals of the planes.
[0020] By using the relationship between all triangles of standard geometric shapes to define the relationship and quantity between planes, the macroscopic structure of complex geometric bodies can be clearly defined. This step makes the device more efficient in identifying and processing complex geometric bodies, ensuring the accuracy and integrity of the geometric bodies during the conversion process.
[0021] According to a preferred embodiment, the method further comprises: adding normal vectors of each vertex of the triangle to obtain the face normal of the triangle; wherein, after adding normal vectors of each vertex to each other, the sum is normalized to obtain the face normal of the triangle.
[0022] By adding and normalizing the normal vectors of each vertex of a triangle, the face normal of the triangle can be accurately obtained. This method ensures the accuracy of the face normal, provides necessary support for subsequent geometric analysis and recognition, and improves the accuracy of the overall model processing.
[0023] According to a preferred embodiment, the method also includes: when there are two or more triangles with the same face normals in a non-primitive object, the triangles with the same face normals are regarded as parallel or coplanar triangles; and several coplanar triangles are determined by analyzing the vertex coordinates of the parallel or coplanar triangles.
[0024] When a non-primitive object has two or more triangles with the same face normal, identifying and analyzing these parallel or coplanar triangles can effectively simplify the structure of the geometry. This feature helps improve the accuracy and efficiency of geometry recognition, ensuring smoother processing of complex models.
[0025] The present invention provides an intelligent identification device for body objects from a second aspect, comprising a processor, the processor comprising a loading module, a preprocessing module, an analysis module, a judgment module and an extraction module. The loading module is used to load a standard exchange format file, which includes a number of basic body objects and non-basic body objects; the preprocessing module sequentially processes the non-basic body objects, wherein the non-basic body objects include a vertex coordinate set, a vertex normal vector set and a vertex index information set of each triangle; the analysis module determines the triangles stretched by each vertex according to the vertex index information set of each triangle, and generates the face normal of the triangle according to the vertex normal vector of each vertex of the stretched triangle, analyzes the face normal of each triangle and determines the non-intersecting, coplanar, parallel or intersecting relationship of the different faces of the triangle; the judgment module compares the standard judgment set of the face normal of all triangles of the standard geometric shape with the face normal set of all triangles of the non-basic body object to preliminarily determine the macroscopic geometric shape of the non-basic body object; the extraction module determines the face normal and relationship of each macroscopic surface on the basis of preliminarily determining the macroscopic geometric shape of the non-basic body object, and extracts the description parameters of the non-basic body object according to these face normals and relationships.
[0026] The intelligent recognition device of the present invention, the loading module ensures that the data in the standard exchange format file is extracted and processed in an orderly manner, and provides clear and structured data support for the subsequent preprocessing and analysis modules. This structured data processing method can significantly improve the processing efficiency of the subsequent modules, and reduce the interference of potential errors and redundant data. The preprocessing module can efficiently integrate and organize vertex coordinates, normal vectors and triangle index information. This integrated processing reduces repeated operations during calculation, optimizes the data flow, and enables the subsequent analysis module and judgment module to calculate and make decisions faster. The analysis module effectively generates the face normal of the triangle through the operation and logical analysis of the vertex information, and performs systematic analysis, which not only improves the efficiency of data processing, but also provides the necessary basis for subsequent judgment, ensuring the scientificity and reliability of the decision. The judgment module can efficiently process and compare the face normal data of different geometric shapes, which not only improves the speed of judgment, but also reduces the consumption of computing resources, provides a clearer judgment basis for the subsequent extraction module, and ensures the efficiency of data processing. The extraction module can efficiently generate the description parameters of non-basic body objects according to the face normal and relationship. This process effectively improves the validity and accuracy of the data by integrating the analysis results, making subsequent data processing and application smoother and ensuring the efficiency of the system when processing complex geometries.
[0027] According to a preferred embodiment, the judgment module is also configured to: predetermine each face of the standard geometric shape composed of at least one triangle, determine the face normal of each face of the standard geometric shape, and thus form a typical information set of the standard geometric shape; wherein the typical information set of the face normal is used as a standard judgment set for determining the macroscopic geometric shape of the non-primitive object.
[0028] In terms of data processing, the judgment module can efficiently classify and compare data through the typical information set of surface normals of standard geometric forms. This systematic processing method improves the efficiency of data processing and ensures that geometric shapes can be judged and extracted quickly and effectively in complex models.
[0029] According to a preferred embodiment, the judgment module is also configured to determine the relationship and number of all planes of the standard geometric shape through the non-intersecting, coplanar, parallel or intersecting relationship of all triangles of the standard geometric shape, and predefine the macroscopic geometric shape of the standard geometric shape according to the mutual relationship of the normals of the planes.
[0030] This process can form a clearer and more structured data model when processing data by analyzing and integrating the relationship between planes. This processing not only improves the accuracy of calculations, but also provides the necessary basic data support for subsequent applications and reduces the complexity of identification and processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a schematic diagram of the module connection relationship of the intelligent identification device provided by the present invention;
[0032] Figure 2 It is a schematic diagram of the steps of the intelligent identification method provided by the present invention;
[0033] Figure 3 It is a structural schematic diagram of the triangular surface of a cylinder provided by the present invention;
[0034] Figure 4 It is a normal schematic diagram of a cuboid provided by the present invention;
[0035] Figure 5 is a vector diagram of a rectangular parallelepiped provided by the present invention;
[0036] Figure 6 is a schematic diagram of the side normal of a quadrangular pyramid provided by the present invention;
[0037] Figure 7 It is a schematic diagram of the triangular end face of the cylinder provided by the present invention.
[0038] Reference numerals list
[0039] 100: processor; 110: loading module; 120: preprocessing module; 130: analysis module; 140: judgment module; 150: extraction module. DETAILED DESCRIPTION
[0040] The following is a detailed description with reference to the accompanying drawings. Example 1
[0041] Current 3D model conversion technologies usually rely on surface triangulation descriptions of geometries. In this description, geometries are represented as meshes composed of many small triangles, which is helpful for rendering and display, but the parametric information of the original model (such as precise geometry, size, and relative position) may be lost during the conversion process. For example, a cylinder can be accurately defined by its radius and height in a design file, but these parameters may no longer be obvious when converted to a triangulated exchange format.
[0042] The present invention provides an intelligent identification device for a body object, comprising a processor 100. The processor 100 is used to implement the intelligent identification method for a body object of the present invention. The present invention also provides a storage medium for storing a coding program for running the intelligent identification method for a body object.
[0043] Preferably, if Figure 1 As shown, the processor 100 includes a loading module 110, a preprocessing module 120, an analyzing module 130, a judging module 140 and an extracting module 150. These five modules are data-connected in sequence.
[0044] The loading module 110 is used to load a standard exchange format file, which includes a plurality of primitive objects and non-primitive objects.
[0045] The pre-processing module 120 processes non-primitive objects in sequence, wherein the non-primitive objects include a vertex coordinate set, a vertex normal vector set, and a vertex index information set of each triangle.
[0046] The analysis module 130 determines the triangles stretched by each vertex based on the vertex index information set of each triangle, and generates the face normal of the triangle based on the vertex normal vectors of each vertex of the stretched triangle, analyzes the face normal of each triangle and determines whether the skew faces of the triangles are non-intersecting, coplanar, parallel or intersecting.
[0047] The determination module 140 preliminarily determines the macroscopic geometry of the non-primitive object by comparing the standard determination set of face normals of all triangles of the standard geometry with the face normal set of all triangles of the non-primitive object.
[0048] The extraction module 150 determines the surface normals and relationships of each macroscopic surface based on the preliminary determination of the macroscopic geometric morphology of the non-primitive object, and extracts the description parameters of the non-primitive object according to the surface normals and relationships.
[0049] Specifically, the processor 100 may adopt a high-performance central processing unit (CPU) or a graphics processing unit (GPU) to support complex data processing and computing requirements.
[0050] The loading module 110 can be implemented as a dedicated data interface card (such as a USB or PCIe card), and its main function is to load standard exchange format files from an external storage device (such as a hard disk, a solid state drive, or a network storage). The loading module 110 may include a reader or a data decoder to ensure that data is extracted from files of different formats. The loading module 110 is connected to the external storage device through a high-speed data bus (such as SATA, USB, or PCIe), and is connected to the processor 100 through an internal data bus to pass the loaded data to the subsequent pre-processing module 120.
[0051] The preprocessing module 120 can be implemented as a functional unit inside the processor 100, or can be configured as an independent expansion module (such as FPGA or ASIC), which is specifically used to process and parse the data structure of non-basic objects. The preprocessing module 120 is connected to the loading module 110 through the memory bus of the processor 100, and receives data from the loading module 110. The preprocessing module 120 passes the processed data to the analysis module 130 to ensure smooth data flow.
[0052] The analysis module 130 is usually integrated in the computing core of the processor 100, and can use multi-core processing technology to achieve efficient geometric analysis. The analysis module 130 can also be a dedicated acceleration hardware (such as GPU, TPU) for performing complex geometric calculations. The analysis module 130 is connected to the preprocessing module 120 through the internal data bus of the processor 100, receives the preprocessed data, and passes the analysis results to the judgment module 140. The output of the analysis module 130 can be directly stored in the cache or internal memory of the processor 100 to ensure fast access.
[0053] The judgment module 140 is usually a logic and operation unit built into the processor 100, which is responsible for executing the judgment logic of the standard geometric form and may use software algorithms to compare and analyze data. The judgment module 140 is closely connected to the analysis module 130 through the internal bus of the processor 100, receives the analysis results of the normal of the triangle surface, and transmits the initially determined macroscopic geometric form to the extraction module 150.
[0054] The extraction module 150 may be a functional module or software component in the processor 100 , responsible for extracting description parameters of non-primitive objects, and may be implemented using an algorithm library or a computing framework.
[0055] The extraction module 150 is connected to the judgment module 140 via the internal data bus of the processor 100 to obtain the judgment result and perform further data processing. The extracted parameters can be stored in the memory, cache or external memory of the processor 100 for subsequent use or analysis.
[0056] The loading module 110, preprocessing module 120, analysis module 130, judgment module 140 and extraction module 150 in the entire processor 100 are connected through an internal data bus to form an efficient data processing chain. Data enters the preprocessing module 120 from the loading module 110, and after analysis and judgment, the extraction module 150 finally outputs the result. The connection between the modules ensures the continuity and processing efficiency of data flow, and can effectively support complex three-dimensional model recognition and parameter extraction tasks.
[0057] like Figure 2 As shown, the intelligent recognition method of the body object of the present invention includes:
[0058] S1: Load a standard exchange format file, which includes a number of primitive objects and non-primitive objects.
[0059] S2: Processing non-primitive objects in sequence, wherein the non-primitive objects include a vertex coordinate set, a vertex normal vector set, and a vertex index information set of each triangle.
[0060] S3: Determine the triangles stretched by each vertex according to the vertex index information set of each triangle, and generate the face normal of the triangle according to the vertex normal vectors of each vertex of the stretched triangle, analyze the face normal of each triangle and determine the non-intersecting, coplanar, parallel or intersecting relationship of the skew faces of the triangles.
[0061] S4: Preliminarily determine the macroscopic geometric form of the non-primitive object by comparing the standard judgment set of the face normals of all triangles of the standard geometric form with the face normal set of all triangles of the non-primitive object.
[0062] S5: Based on the preliminary determination of the macroscopic geometric morphology of the non-primitive object, the surface normals and relationships of each macroscopic surface are determined, and the description parameters of the non-primitive object are extracted based on these surface normals and relationships.
[0063] Each step of steps S1 to S5 is described as follows.
[0064] S1: Load a standard exchange format file. The loaded information includes a number of primitive objects and non-primitive objects.
[0065] A Standard Exchange Format file is a data file format used to store and transfer 3D model information, including descriptions of primitive objects and non-primitive objects. The file format of a Standard Exchange Format file can be recognized and used by different software or systems to facilitate data sharing and communication. For example, a file containing a 3D model (such as OBJ, STL or FBX format) can be called a Standard Exchange Format file. This file may contain all the relevant information of a house model, including elements such as walls, windows and roofs.
[0066] Primitive objects are described by parameters in standard exchange format files. Further, primitive objects refer to simple geometric shapes described parametrically in standard exchange format files. These shapes usually have simple mathematical definitions, and their characteristics and properties can be directly expressed by parameters.
[0067] For example, a cube or a sphere can be considered a primitive object. In a SIF file, a cube can be described by the length of its side, such as "cube(side=2)", and a sphere can be described by its radius, such as "sphere(radius=3)".
[0068] Non-primitive objects are composed of triangles in standard exchange format files. Specifically, non-primitive objects refer to complex geometric shapes composed of triangles in standard exchange format files. These shapes cannot be described by simple parameters, but are constructed by combining multiple triangles. Figure 3 The cylinder shown is composed of triangles and is a non-primitive object. Another example is a humanoid model, which is composed of many small triangles to represent its complex shape and details.
[0069] Preferably, the loading of each primitive object is accomplished by reading parameters describing the primitive object.
[0070] For example, first, the user selects a standard exchange format file through the terminal. The loading module 110 reads the file content and divides it into two categories: primitive objects and non-primitive objects.
[0071] For primitive objects, the loading module 110 parses the parameters describing these primitive objects, such as radius, height, width, and position, etc. By analyzing these parameters, the loading module 110 can generate corresponding geometric bodies.
[0072] When processing non-primitive objects, the loading module 110 will identify geometric bodies composed of multiple triangles. The loading module 110 will extract the vertex coordinates of each triangle and combine these coordinates into the shape of a complete non-primitive object. After completing the parsing and creation of all objects, the loading module 110 adds these geometric bodies to the three-dimensional model for subsequent operations.
[0073] S2: Process non-primitive objects one by one.
[0074] Non-primitive objects include a set of vertex coordinates, a set of vertex normal vectors, and a set of vertex index information for each triangle.
[0075] In a standard interchange format file, the vertex normal vector is determined for each vertex as follows.
[0076] S21: By calculating the corresponding vertex in the vertex coordinate set (p 1 ) in all triangles (p 1 ,p 3 ,p 4 ;p 1 ,p 2 ,p 3 ;p 1 ,p 2 ,p 5 ;p 1 ,p 4 ,p 5 ) points to the outside direction of the non-primitive object, and takes the sum of the normal vectors of all triangles where a vertex is located as the vertex normal vector of the vertex.
[0077] That is, with vertex p 1 For example, determine the specific vertex for which the normal vector needs to be calculated. In the three-dimensional model, identify all the vertices containing the vertex p 1 triangle.
[0078] For example: Triangle A 1 :(p 1 ,p 3 ,p 4 ); triangle A 2 :(p 1 ,p 2 ,p 3 ); triangle A 3 :(p 1 ,p 2 ,p 5 ); triangle A 4 :(p 1 ,p 4 ,p 5 ).
[0079] For each containing p 1 Calculate the normal vector of the triangle. Assume that the vertex coordinates of the triangle are: 1 =(x 1 ,y 1 ,z 1 );p 2 =(x 2 ,y 2 ,z 2 );p 3 =(x 3 ,y 3 ,z 3 );p 4 =(x 4 ,y 4 ,z 4 );p 5 =(x 5 ,y 5 ,z 5 ).
[0080] The normal vector of a triangle can be calculated by the following steps:
[0081] Let triangle A 1 The normal vector is N 1 , calculated using the cross product formula:
[0082] N 1 =(p 3 -p 1 )×(p 4 -p 1 ).
[0083] Calculate the normal vector N of other triangles in the same way 2 、N 3 and N 4 .
[0084] Add up all normal vectors to get vertex p 1 The vertex normal vector: V P =N 总 =N 1 +N 2 +N 3 +N 4 .
[0085] S22: Determine the vertex normal vector of each vertex in turn, thereby forming a vertex normal vector set.
[0086] For example, the vector V of each vertex P1 (x 1 ,y 1 ,z 1 )、VP2 (x 2 ,y 2 ,z 2 )、V P3 (x 3 ,y 3 ,z 3 ) and V P4 (x 4 ,y 4 ,z 4 ) represent the vertex p 1 , p 2 , p 3 and p 4 The associated normal vector. Then, the normal vector set can be expressed as: {V P1 ,V P2 ,V P3 ,V P4}.
[0087] S23: The vertex index information set of each triangle is an index pointing to the coordinates of a specific point.
[0088] In other words, the vertex index information set of a triangle is used to point to the index values of specific point coordinates, and these index values represent the positions in the vertex coordinate array.
[0089] In 3D models, each vertex is usually assigned a unique index value for quick access to its coordinates and normal vector.
[0090] For each triangle, list the indices of its vertices.
[0091] For example: For triangle A 4 (p 1 ,p 4 ,p 5 ), whose vertex indices may be:
[0092] Index corresponding to p 1 =0; index corresponds to p 4 =3; index corresponds to p 5 =4. Then the vertex index of the triangle is [0,3,4]. In addition, the index corresponds to p 2 =1; index corresponds to p 3 =2.
[0093] Repeat the above steps to record the vertex indices of all triangles.
[0094] For example: Triangle A 1 =[0,2,3]; triangle A 2 =[0,1,2]; triangle A 3 =[0,1,4]; triangle A 4=[0,3,4].
[0095] Triangle A 1 =[0,2,3] means its vertices are p 1 、p 3 and p 4 .
[0096] Triangle A 2 =[0,1,2] means its vertices are p 1 、p 2 and p 3 .
[0097] The index information of all triangles is collected into a list or array, namely the vertex index information collection, which is convenient for subsequent operations and rendering. The vertex index information collection is used to quickly find the specific vertex of each triangle for rendering or other calculations.
[0098] Using index sets saves memory and avoids repeated storage of vertex coordinates. It improves efficiency. When rendering, accessing vertex coordinates through indices can improve computing efficiency. It simplifies data structures and makes the representation of triangles more concise.
[0099] S3: Determine the triangles stretched by each vertex according to the vertex index information set of each triangle, and generate the face normal of the triangle according to the vertex normal vectors of each vertex of the stretched triangle, analyze the face normal of each triangle and determine the non-intersecting, coplanar, parallel or intersecting relationship of the skew faces of the triangles.
[0100] A tensioned triangle refers to a triangle in three-dimensional space that is tensioned by its vertices, ensuring that the triangle can maintain the optimal shape and structural integrity at a given vertex position. The "tension" here is usually related to the geometric properties and physical meaning of the triangle.
[0101] In a 3D model, triangles are the most basic polygons, and any complex shape can be made up of triangles. Tight triangles mean that the vertex positions of these triangles are optimized, usually after mesh subdivision, smoothing or physical simulation, to ensure that the shape of the model remains good and there is no self-intersection or distortion.
[0102] In a physics engine, triangles may represent the surface of some objects, and tensioned triangles are triangles that remain stable during the simulation. By applying appropriate constraints, these triangles will not be distorted too much when deformed or moved.
[0103] Using the vertex index information set of each triangle, it is easy to find the vertex corresponding to the stretched triangle. For example, if the vertex index set corresponding to a triangle is [0,1,2], then its vertex is p 1 、p 2 and p 3 .
[0104] After determining the normal vectors of the vertices, the face normal vectors of the triangle can be generated by these normal vectors. This is because the face normal vector is usually generated by the average or weighted average of the vertex normal vectors of the triangle, reflecting the direction of the triangle in space.
[0105] Preferably, the face normal vector of a triangle is a unit vector pointing to the outside of the triangle surface. By calculating the face normal vector, the specific direction of the triangle can be determined.
[0106] If the face normal vectors of two triangles differ greatly and their vertices are not in the same plane, they can be judged as non-intersecting faces.
[0107] Two triangles can be considered coplanar if they have the same face normal vector and share one or more vertices.
[0108] Two triangles are parallel if their face normals point in the same direction but are in different positions.
[0109] If the face normal vectors of two triangles are in different directions and intersect, they are intersecting.
[0110] S31: By selecting one of the face normals of several coplanar triangles (V 5 or V 6 ) as the face normal (V 56 ).
[0111] Preferably, assuming that the triangle (a, p 1 , p 2 ) are known. The face normal is calculated as follows.
[0112] The triangle (a, p 1 , p 2 ) are added to each other to obtain the face normal of the triangle. Preferably, after adding the normal vectors of each vertex to each other, the sum is standardized to obtain the face normal of the triangle.
[0113] For example, suppose the triangle (a,p 1 ,p 2 ) is: V pa =(xa ,y a ,z a );V pp1 =(x p1 ,y p1 ,z p1 );V pp2 =(x p2 ,y p2 ,z p2 ).
[0114] Face Normal V 56 It can be calculated by adding the vertex normal vectors:
[0115] V 56 =V pa +V pp1 +V pp2 .
[0116] Calculate V 56 Model: .
[0117] V 56 standardization: The obtained face normal Represents the face orientation of a triangle.
[0118] The surface normal of each coplanar triangle is accurately calculated through the above process, providing a basis for subsequent calculations.
[0119] S32: When two or more triangles of a non-primitive object have the same face normal (less than a predetermined threshold), these triangles with the same face normal are considered to be parallel or coplanar triangles. A number of coplanar triangles are determined by analyzing the vertex coordinates of the “parallel or coplanar triangles”.
[0120] For each triangle in the non-primitive object, calculate its face normal vector.
[0121] For example, suppose there are three triangles; triangle B 1 The face normal is V 1 ; Triangle B 2 The face normal is V 2 ; Triangle B 3 The face normal is V 3 .
[0122] Compare the face normal of each triangle with the face normals of the other triangles. Specifically, calculate the angular difference between the previous normal and the face normals of its neighbors (using the dot product method):
[0123] .
[0124] If the angle θ is less than a predetermined threshold (eg, 5 degrees), the two triangles are considered to be parallel or coplanar.
[0125] By comparing the face normals of all triangles, the vertex coordinates of those triangles that meet the parallel condition are collected to form a set of coplanar triangles. This method can effectively identify the coplanar areas on the polygon surface, which is convenient for subsequent optimization processing, such as simplifying the geometry.
[0126] Preferably, the face normal of each triangle points to the outside of the non-primitive object. In some cases, the face normal of each triangle may point to the inside of the non-primitive object in a coordinate system.
[0127] By explicitly specifying the direction of face normals, you can reduce misclassification of non-primitive geometry. For example, inconsistent face normals may cause triangles to be incorrectly classified as irrelevant surfaces.
[0128] Consistent face normals (especially those that are consistently outward or inward facing) help to more clearly identify the structural features of an object. This can be used more effectively by the non-primitive recognition and segmentation process to determine which triangles belong to the same surface.
[0129] By logically grouping similar normals together, the number of triangles that need to be considered during processing and calculation can be greatly reduced. This not only improves the performance of the algorithm, but also reduces the consumption of computing resources.
[0130] S4: Preliminarily determine the macroscopic geometric shape of the non-primitive object by comparing the standard judgment set of the face normals of all triangles of the standard geometric shape with the face normal set of all triangles of the non-primitive object.
[0131] The standard judgment set is a set of face normal features, geometric relations and quantitative features of standard geometric forms, which is designed to be compared with the geometric features of non-primitive objects to preliminarily determine the macroscopic geometric form of the object. The composition of this set includes the face normal feature set, which contains the face normals of all triangles in the standard geometric form, which is used to describe the directionality and geometric characteristics of the surface. At the same time, the geometric relationship part describes the relationship between triangles, including coplanar relationships, parallel relationships, non-planar relationships and intersection relationships, to clarify the spatial position of triangles and their interactions. In addition, the quantitative features quantitatively describe the number of various geometric relationships and structures to evaluate the complexity and characteristics of the form. The standard judgment set plays a role in preliminarily identifying the form of the object in geometric analysis, providing a basis for comparison, and helping to judge the similarity between the geometric features of non-primitive objects and standard geometric forms.
[0132] S41: Determine the relationship and quantity of all planes of the non-primitive object by analyzing the non-intersecting, co-planar, parallel or intersecting relationships of all triangles of the non-primitive object.
[0133] Specifically, the relationship and quantity of all planes of non-basic objects are counted.
[0134] For example, a non-primitive object consists of six triangles. The face normal of each triangle is V 1 =(0,0,1);V 2 =(0,0,1);V 3 =(0,-1,1);V 4 =(0,-1,1);V 5 =(0,0,1);V 6 =(0,-1,0).
[0135] Then, V 1 and V 2 Same, and there is a common edge. 1 and V 2 The two corresponding triangles (triangle T 1 With triangle T 2 ) are coplanar. V 3 and V 4 Same, and there is a common edge. 3 and V 4 The two corresponding triangles (triangle T 3 With triangle T 4 ) are coplanar. V 1 and V 5 Same, and there is a common edge. 1 and V 5 The two corresponding triangles (triangle T 1 With triangle T 5 ) are coplanar. V 6 and V 4 Same, and there is a common edge. 6 and V 4 The two corresponding triangles (triangle T 6 With triangle T 4 ) are coplanar. V 2 and V 5 The same as V 2 and V 5 The two corresponding triangles (triangle T 2 With triangle T 5 ) are parallel.
[0136] V 3 and V 5 Different and do not intersect.3 and V 5 The two corresponding triangles (triangle T 3 With triangle T 5 ) are non-intersecting surfaces. 3 and V 1 Different and do not intersect. 3 and V 1 The two corresponding triangles (triangle T 3 With triangle T 1 ) are non-intersecting surfaces. 2 and V 4 Different and do not intersect. 2 and V 4 The two corresponding triangles (triangle T 2 With triangle T 4 ) are non-intersecting surfaces.
[0137] Based on the above statistics, the relationship and quantity of all planes possessed by non-primitive objects are obtained:
[0138] Coplanar relationship: 4 pairs (triangle T 1 With triangle T 2 、Triangle T 1 With triangle T 5 、Triangle T 3 With triangle T 4 、Triangle T 6 With triangle T 4 ).
[0139] Parallel relationship: 1 pair (triangle T 2 With triangle T 5 ).
[0140] Intersection relationship: 0 pairs.
[0141] Non-intersecting relations: 3 pairs (triangle T 3 With triangle T 5 、Triangle T 1 With triangle T 3 、Triangle T 2 With triangle T 4 ).
[0142] S42: Determine the macroscopic geometry of the non-primitive object by comparing the relationship and quantity of all its planes with a standard judgment set of standard geometries.
[0143] Non-primitive objects can be classified as a specific geometry type or shape by comparing them to standard geometric shapes. This standardized comparison helps to quickly identify whether the non-primitive object belongs to a known basic geometric shape, such as a sphere, cube, cylinder, etc.
[0144] By analyzing the relationships between the faces of non-primitive objects (such as coplanarity, parallelism, intersection, etc.), we can understand their internal structure and external morphology. This analysis helps identify the geometric characteristics of non-primitive objects, such as whether there are flat faces or curved surfaces. Determining the macroscopic geometry can also help confirm whether the object is complete and whether there are any missing parts.
[0145] By analyzing the plane relationship, the macroscopic features of the object (such as symmetry, closure, curvature, etc.) can be identified, and then its performance in three-dimensional space can be judged. After the macroscopic geometry of non-primitive objects is identified, computer modeling and simulation can be performed more effectively.
[0146] S421: Triangle (p 1 ,p 4 ,p 3 ) and triangle (p 1 ,p 3 ,p 2 ) is to determine the coplanar relationship in the following manner.
[0147] Two triangles have a common vertex p 3 and p 1 , and the face normals of the two triangles are V 5 and V 6 are the same. From this we can determine that the two triangles are coplanar.
[0148] By identifying coplanar relationships, you can determine which parts of a surface are flat. This is very useful for surface refinement and texture generation. Coplanar relationships help understand the geometry of an object and support the identification of basic surface features in a 3D model.
[0149] S422: Triangle (p 1 ,p 4 ,p 3 ) and triangle (p 1 ,p 4 ,p 5 ) is determined as follows.
[0150] Two triangles have a common vertex p 1 and p 4 , but the normal vectors V of the two triangles 5 and V 6 are not the same; from this we can determine that the two triangles intersect.
[0151] Identifying intersection relationships helps you understand the complex interactions of a 3D model. By identifying areas of intersection, you can improve detail accuracy when modeling. In 3D model inspections, intersection relationships may indicate potential modeling errors or areas for improvement.
[0152] S43: predetermine each face (all of which are planes formed by at least one triangle) of a standard geometric form (prism, cylinder, sphere, cone), and then determine the face normal of each face of the standard geometric form, thereby forming a typical information set of the standard geometric form. Preferably, the typical information set of these face normals is used as a standard judgment set for determining the macroscopic geometric form of a non-primitive object.
[0153] Provides a standardized reference for evaluating and classifying non-primitive objects. Improves accuracy and efficiency in identifying non-primitive objects by comparing with a standard set. Helps automate the identification process and enhance the intelligence of computer-aided design and analysis systems.
[0154] S44: Determine the relationship and quantity of all planes of a standard geometric shape (prism, cylinder, sphere, cone) through the non-intersecting, coplanar, parallel or intersecting relationship of all triangles of the standard geometric shape (prism, cylinder, sphere, cone), and predefine the macroscopic geometry of the standard geometric shape according to the relationship between the normals of these planes.
[0155] The entire surface of the macro-geometry is occupied by at least one triangle spanned by the vertices of the vertex coordinate set of the non-primitive object.
[0156] Provides a comprehensive understanding of the structure of non-primitive objects by defining planar relationships of standard geometric forms.
[0157] Preferably, the face normals of the triangles of the non-primitive objects are defined in the same Cartesian coordinate system, that is, the direction of the face normals is defined in a unified coordinate system. For example, for a cylinder, since the coordinate system is unified, its top and bottom surfaces have several face normals of the same size but opposite directions, which results in a sum of zero. A similar situation exists for triangles on the circumference.
[0158] Taking a cylinder as an example, in some special cases, the number of triangles on the top and bottom surfaces may not be equal, which may cause the sum of their face normal vectors to be non-zero. However, their parallelism can be determined by checking whether the top and bottom triangles are coplanar. But for the peripheral surface, if there is an odd number of triangles, it may cause the sum of the face normals of the peripheral surface to be non-zero, so a threshold needs to be set to determine the macroscopic geometry of the non-primitive object. The threshold is determined according to the vertex index information set of each triangle, wherein the parity of the number of triangles on the top, bottom and peripheral surfaces is determined according to the vertex index information set of each triangle, and the threshold used to determine the macroscopic geometry of the non-primitive object is determined according to the parity of the number of triangles on the corresponding surface. For example, the threshold is 1.x for odd numbers and 0.x for even numbers. The reason why there are numbers after the decimal point is because there is a floating point calculation error.
[0159] Let's take a cylinder as an example.
[0160] For a cylinder, its top and bottom end faces are a group, their normals are opposite, and the sum of the normals after adding them is 0; the sum of the normals of its side faces is basically 0, and there are no completely co-directional faces.
[0161] like Figure 3 As shown, for a typical cylinder, the top and bottom surface parameters of the cylinder are:
[0162] V top =[0,0,1]; V bottom =[0,0,-1]; V top +V bottom =[0,0,0].
[0163] The side parameters of the cylinder are:
[0164] V A1 =[0,-1,0]; V A2 =[0.5,-0.866,0]; V A3 =[0.866,-0.5,0];
[0165] V A4 =[1,0,0]; V A5 =[0.866,0.5,0]; V A6 =[0.5,0.866,0];
[0166] V A7 =[0,1,0]; V A8 =[-0.5,0.866,0]; V A9 =[-0.866,0.5,0];
[0167] VA10 =[-1,0,0]; V A11 =[-0.866,-0.5,0]; V A12 =[-0.5,0.866,0];
[0168] (ΣV Ai )=[0,0,0].
[0169] exist Figure 4 In , each arrow represents the normal vector of the corresponding surface. Figure 4 As shown, for a rectangular parallelepiped: the normal vectors of the triangles of the six faces are grouped into three groups with two pairs of opposite faces. The normals of each group are opposite, and the normals are all 0 after adding them together, so the overall sum is 0.
[0170] like Figure 5 As shown, the normal vector of a cuboid (where A 4 A is the obstructed surface outside the geometric body. 5 is the face obscured by the lower part of the geometry):
[0171] V A1 =[1,0,0]; V A6 =[-1,0,0]; V A1 +V A6 =[0,0,0];
[0172] V A2 =[0,-1,0]; V A4 =[0,1,0]; V A2 +V A4 =[0,0,0];
[0173] V A3 =[0,0,1]; V A5 =[0,0,-1]; V A3 +V A5 =[0,0,0];
[0174] V A1 +V A6 +V A2 +V A4 +V A3 +V A5 =[0,0,0].
[0175] like Figure 6 As shown in the figure, for a tetrahedron, the normal vectors of its five faces have no obvious direct relationship, but if the normal vectors of the four side faces of the pyramid are added together, a new face normal vector will be formed, namely V A1 +V A2 +V A3 +V A4=V A , if V A After vector normalization, the unit normal vector V of the sum of the side normal vectors of the polygonal pyramid is obtained Anormal .
[0176] . .
[0177] Represents the magnitude (length) of a vector.
[0178] Then V Anormal +V bottom =[0,0,0]. V bottom Represents the unit normal vector of the bottom surface. Represents the base normal vector. This rule is applicable to any side of the polygonal pyramid.
[0179] S5: On the basis of preliminarily determining the macroscopic geometrical morphology of the non-primitive object, determine the surface normals and relationships of each macroscopic surface, and extract the description parameters of the non-primitive object according to the surface normals and relationships.
[0180] For example, after initially determining that the macroscopic geometry of the non-primitive object is a cylinder, the surface data of the non-primitive object is divided into three main parts: the top circular surface, the bottom circular surface, and the side cylindrical surface. The boundaries between different surfaces are identified using edge detection technology and curvature analysis.
[0181] With the face normals and the relationship between the faces determined (determined in the previous steps), the radius is calculated by measuring the diameter of the top or bottom circular face, and the height is calculated from the distance between two parallel circular faces.
[0182] Determine the axial direction of the cylinder and measure by aligning the center of the circular face.
[0183] Preferably, the deviation is calculated to verify the perfection of the cylinder, checking the smoothness and consistency of the circumference. The circumference is fitted using the least squares method to improve accuracy.
[0184] By extracting surface normals and relationships, and extracting description parameters based on this information, accurate description and analysis of the cylinder can be achieved. This not only supports the understanding and optimization of 3D models, but also provides a solid data foundation for applications in related fields. Example 2
[0185] This embodiment is a further description of Embodiment 1, and repeated contents will not be repeated here.
[0186] The present invention takes a cylinder as an example to illustrate the specific steps of the present invention.
[0187] Cylinder geometry features include:
[0188] (1) The triangular faces of a cylinder are mainly divided into three categories: the upper and lower end triangular faces, and the side triangular faces.
[0189] (2) The geometric relationship between triangular faces.
[0190] The plane where the above triangle is located is recorded as a triangular face, and all normals are unit vectors.
[0191] a. The triangular normals of the upper and lower end faces are parallel to each other; if the face {p 24 ,p 20 ,p 19} and face {p 1 ,p 3 ,p 4}parallel;
[0192] b. The normals of the upper and lower end triangles are perpendicular to the normals of the side triangles (within the error range); if the face {p 1 ,p 2 ,p 14} and the normal Vnor1 of the surface {p 13 ,p 17 ,p 18} normal V nor1 vertical.
[0193] c. A triangle face normal that is only perpendicular or parallel to the normals of other triangle faces except itself must be an end face triangle face; 13 ,p 17 ,p 18} normal V nor1 If the normals to all other faces are either perpendicular or parallel, and there is no other angular relationship, then this face is an end face triangle;
[0194] (3) The number of vertices on the upper and lower end faces is an even number.
[0195] Based on the above cylinder geometric features, recognition is performed by combining the vertex coordinates of non-basic objects and the geometric features of the triangular faces.
[0196] by Figure 3 For example, the end face of this cylinder is divided into 12 equal parts, and the resulting set is:
[0197] The set P of all vertices ts ={p 1 ,p 2 ,……,p 23 ,p 24}.
[0198] The set of all triangle indices is:
[0199] Trig={[p 1 ,p 2, p 14 ],[p 2 ,p 14 ,p 15 ],……,[p 13 ,p 22 ,p 23 ],[p 13 ,p 23 ,p 24 ]}.
[0200] Distance error value d 1 ∈(0,1 e-3 ).
[0201] Angle error value d 2 (About 5 degrees, that is, when the angle is 85 degrees, it is approximately considered a vertical relationship).
[0202] Variance error value d 3 ∈(0,0.01).
[0203] The normal is a three-dimensional vector pointing in the direction of the face, for example, the triangle {p 13 ,p 23 ,p 24}The normal direction may be {0,0,-1}, that is, downward in the vertical direction.
[0204] Count all triangles with the same normal direction and add them to the set V nor1 ={V 侧1 ,V 侧2 ,……V 上端1 ,V 上端2 ,……V 下端1 ,V 下端2 ,……V 下端10}, where the normal direction is the same as the normal direction, and the difference in unit normal distance is 0 (the distance error value d 1 ).
[0205] Filter out the triangles of the upper and lower end faces and their corresponding vertices. Calculate the angle error value d based on the perpendicular relationship between the normal of the end face triangle and the normal of the side face triangle. 2 If the judgment criteria are met, the corresponding vertex coordinates can be obtained through the triangle index.
[0206] Next, filter the upper end face vertices and the lower end face vertices. If the normals are the same, these vertices belong to the same end face triangle. If the normals are opposite, it means they belong to different end face triangles. Extract P by triangle index ts The corresponding vertex coordinates in .
[0207] If the number of vertices on the upper and lower end faces is inconsistent, or the number of vertices on the end face is odd, the possibility that the geometry is a cylinder can be ruled out.
[0208] Through the above process, it is possible to determine whether the geometric body is a cylinder, and further calculate and extract the construction parameters of the cylinder, including the coordinates of the center of the circle, the radius, and the height of the cylinder.
[0209] d. Eliminate duplicate vertices;
[0210] e. Whether the coordinates of the circle center already exist in the end face vertex. Is there a vertex whose distances to other vertices are all equal? If so, this point is the center of the circle, and the distance from this point to any other point is the radius. In this case, the bottom face triangulation form is as follows: Figure 7 shown.
[0211] f. There are no center coordinates in the end face vertices. The mean of the end face vertices = the center of the circle. The variance of the distance from the center of the circle to each vertex is within the error value (less than 0.01). The mean of all distances is the radius.
[0212] Reconstruct the cylinder based on the radius r and the height h of the cylinder obtained in the above steps d~f.
[0213] It should be noted that the above-mentioned specific embodiments are exemplary, and those skilled in the art can come up with various solutions inspired by the disclosure of the present invention, and these solutions also belong to the disclosure scope of the present invention and fall within the protection scope of the present invention. Those skilled in the art should understand that the present invention specification and its drawings are illustrative and do not constitute a limitation on the claims. The scope of protection of the present invention is defined by the claims and their equivalents. The present invention specification contains multiple inventive concepts, such as "preferably" and "according to a preferred embodiment", which means that the corresponding paragraph discloses an independent concept, and the applicant reserves the right to file a divisional application based on each inventive concept.
Claims
1. An intelligent recognition method for a body object, characterized in that: The method comprises: Load a standard exchange format file, which includes a number of primitive objects and non-primitive objects; The non-primitive objects are processed in sequence, wherein the non-primitive objects include a vertex coordinate set, a vertex normal vector set, and a vertex index information set of each triangle. Determine the triangles stretched by each vertex according to the vertex index information set of each triangle, generate the face normal of the triangle according to the vertex normal vectors of each vertex of the stretched triangle, analyze the face normal of each triangle and determine the non-intersecting, coplanar, parallel or intersecting relationship of the skew faces of the triangles, Comparing the standard judgment set of face normals of all triangles of the standard geometric form with the face normal set of all triangles of the non-primitive object to preliminarily determine the macroscopic geometric form of the non-primitive object; On the basis of preliminarily determining the macroscopic geometrical morphology of the non-primitive object, the surface normals of each macroscopic surface and the relationship between these surface normals are determined, and the description parameters of the non-primitive object are extracted according to these surface normals and their relationship.
2. The intelligent identification method according to claim 1, characterized in that: The method further includes: selecting a plurality of coplanar triangles, and using one of the surface normals of the coplanar triangles as the surface normal of the non-primitive object surface where the coplanar triangles are located.
3. The intelligent identification method according to claim 2, characterized in that: The method further comprises: In the process of loading a standard exchange format file, the loading of each primitive object is completed by reading the parameters describing the primitive object.
4. The intelligent identification method according to any one of claims 1 to 3, characterized in that: The method further comprises: Each face of predetermined standard geometry consisting of at least one triangle, Determine the surface normal of each surface of the standard geometric form, so as to form a typical information set of the standard geometric form; Among them, the typical information set of the surface normal is used as a standard judgment set for determining the macroscopic geometric form of the non-primitive object.
5. The intelligent identification method according to claim 4, characterized in that: The method further comprises: According to the non-intersecting, coplanar, parallel or intersecting relationship of all triangles in the standard geometric shape, the relationship between all planes and the number of various geometric relationships and structures of the standard geometric shape are determined. The macro geometry of the standard geometry is predefined based on the relationship of the plane surface normals to each other.
6. The intelligent identification method according to claim 4, characterized in that: The method further comprises: The normal vectors of each vertex of the triangle are added together to obtain the face normal of the triangle; wherein, after the normal vectors of each vertex are added together, the sum vector is normalized to obtain the face normal of the triangle.
7. The intelligent identification method according to claim 4, characterized in that: The method further comprises: When there are two or more triangles with the same face normals in a non-primitive object, the triangles with the same face normals are regarded as parallel or coplanar triangles; and a number of coplanar triangles are determined by analyzing the vertex coordinates of the parallel or coplanar triangles.
8. An intelligent object recognition device, comprising a processor (100), characterized in that: The processor (100) comprises: A loading module (110) loads a standard exchange format file, which includes a plurality of primitive objects and non-primitive objects; A preprocessing module (120) is used to process the non-primitive objects in sequence, wherein the non-primitive objects include a vertex coordinate set, a vertex normal vector set and a vertex index information set of each triangle. The analysis module (130) determines the triangles stretched by each vertex according to the vertex index information set of each triangle, generates the face normal of the triangle according to the vertex normal vectors of each vertex of the stretched triangle, analyzes the face normal of each triangle and determines whether the skew faces of the triangles are non-intersecting, coplanar, parallel or intersecting. A judgment module (140) compares a standard judgment set of face normals of all triangles of a standard geometric form with a face normal set of all triangles of the non-primitive object to preliminarily determine a macroscopic geometric form of the non-primitive object; The extraction module (150) determines the surface normals of each macroscopic surface and the relationship between these surface normals based on the preliminary determination of the macroscopic geometric shape of the non-basic volume object, and extracts the description parameters of the non-basic volume object according to these surface normals and their relationship.
9. The intelligent identification device according to claim 8, characterized in that: The determination module (140) is further configured to: Each face of predetermined standard geometry consisting of at least one triangle, Determine the surface normal of each surface of the standard geometric form, so as to form a typical information set of the standard geometric form; Among them, the typical information set of the surface normal is used as a standard judgment set for determining the macroscopic geometric form of the non-primitive object.
10. The intelligent identification device according to claim 8 or 9, characterized in that: The determination module (140) is further configured to: The relationship between all planes and the number of various geometric relationships and structures of the standard geometric shape are determined by the non-intersecting, co-planar, parallel or intersecting relationship of all triangles of the standard geometric shape. The macro geometry of the standard geometry is predefined based on the relationship of the plane surface normals to each other.
Citation Information
Patent Citations
Method and device for using PDMS three-dimensional model in software
CN107391872A
Three-dimensional geometric discretization processing system
CN111199086A
Characteristic edge geometry generation method and device and measurement adsorption method and device
CN117494289A