Industrial three-dimensional model data processing method and equipment

By realizing the full-process automation processing method of industrial three-dimensional model data, the problems of missing automation processes, poor accuracy control and low system coupling in the existing technology are solved, and the effects of rapid loading, development process reduction and cost reduction are achieved.

CN120147580AInactive Publication Date: 2025-06-13SHENYANG RUIQU TECH CO LTD

Patent Information

Application Number
CN202510629790.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-06-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology cannot realize automated processes when processing industrial three-dimensional model data, and the accuracy control is missing. Traditional cutting algorithms destroy the model topology, and the system coupling is low and rely on manual intervention.

Method used

Provide an industrial three-dimensional model data processing method to realize the full process automation from data analysis to multi-format export, and support dynamic optimization with adjustable accuracy. The method includes obtaining the target format file, parsing the B-rep topology, converting it into triangular mesh data, performing optimization processing, and packaging it into an engine common interface.

Benefits of technology

It realizes rapid loading of large-scale industrial model files, reduces development processes, reduces traditional engineering costs, improves system robustness and model compatibility, and supports high-precision visualization and lightweight transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147580A_ABST
    Figure CN120147580A_ABST
Patent Text Reader

Abstract

The invention relates to the field of three-dimensional model data processing, in particular to a method and equipment for processing industrial three-dimensional model data. The method comprises the steps of obtaining a target format file, analyzing the target format file, and extracting a B-rep topological structure to obtain geometric information; converting the geometric information into triangular surface grid data; based on the triangular surface grid data, performing optimization model information processing to obtain optimized triangular surface data; and packaging the optimized triangular surface data into an engine universal interface. In this way, the problems that in the prior art, an industrial model processing flow is split, optimization efficiency is low, and format compatibility is poor can be solved, and dynamic optimization with adjustable precision is supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention generally relates to the field of three-dimensional model data processing, and more specifically, to a method and device for processing industrial three-dimensional model data. Background Art

[0002] In the field of industrial design, the STEP / STP format (ISO 10303 standard) is widely used to store three-dimensional model data. The boundary representation method (B-rep) is used to describe the topology and parametric geometric information (such as NURBS surfaces, cylindrical surfaces, etc.) of geometric entities (such as faces, edges, vertices). However, B-rep data cannot be directly rendered by a three-dimensional engine (such as Unity, Unreal), and needs to be converted into a triangular mesh (such as STL, OBJ) before it can be used.

[0003] The prior art usually uses traditional CAD software for format processing. For example, open a STEP file through software such as SolidWorks and CATIA, and manually export it to an intermediate format (such as STL); use third-party tools for optimization. For example, use tools such as MeshLab and Blender for face count optimization or cutting operations; use a three-dimensional engine for import. For example, import the optimized model into a three-dimensional engine for editing, and finally export the target format (such as FBX).

[0004] However, the existing lightweight algorithms use a fixed simplification rate and cannot dynamically adjust the model accuracy, resulting in a lack of accuracy control; the traditional cutting algorithms damage the model topology structure, resulting in limited subsequent editing functions and damaged data integrity; each processing module is independent of each other and relies on manual intervention for data transfer, resulting in a low system coupling degree. Summary of the Invention

[0005] According to the present invention, a processing solution for industrial three-dimensional model data is provided. This solution realizes the full-process automation from data parsing to multi-format export, and supports dynamic optimization with adjustable accuracy.

[0006] In the first aspect of the present invention, a method for processing industrial three-dimensional model data is provided. The method includes: Obtain a target format file, parse the target format file, extract the B-rep topology structure, and obtain geometric information; Convert the geometric information into triangular face mesh data; Based on the triangular face mesh data, perform optimized model information processing to obtain optimized triangular face data; Package the optimized triangular face data into an engine general interface.

[0007] Further, after obtaining the target format file, it further includes determining whether the format of the obtained target format file is the target format. If so, the target format file is used as the file to be parsed; Determining whether the format of the obtained target format file is the target format includes: Establishing a key information table for the target format file, where the key information table for the target format file contains the key information of the target format file; Parsing the key information of the target format file according to the file header of the obtained target format file. If the key information is consistent with the key information of the target format file in the key information table for the target format file, then the format of the target format file is the target format.

[0008] Further, parsing the target format file to extract the B-rep topological structure and obtain geometric information includes: Extracting the file header of the target format file and traversing the model entities to extract the B-rep topological structure; Extracting the geometric information of each face from the B-rep topological structure; the geometric information includes: plane information, cylindrical surface information, and NURBS surface information.

[0009] Further, converting the geometric information into triangular mesh data includes: Based on the plane information, performing plane triangulation to obtain the triangular mesh data corresponding to the plane; and Based on the cylindrical surface information, performing cylindrical surface triangulation to obtain the triangular mesh data corresponding to the cylindrical surface; and Based on the NURBS surface information, performing NURBS surface triangulation to obtain the triangular mesh data corresponding to the NURBS surface; The triangular mesh data corresponding to the plane, the triangular mesh data corresponding to the cylindrical surface, and the triangular mesh data corresponding to the NURBS surface together constitute the triangular mesh data.

[0010] Further, the NURBS surface triangulation includes: For the NURBS surface information, calculating the curvature data of the NURBS surface patches; If the curvature data meets the subdivision condition, then mark the corresponding surface patch as the area to be subdivided; Performing dynamic recursive subdivision on the area to be subdivided according to the subdivision rules to obtain the subdivided surface patches; Calculating the 3D coordinates of the 4 corner points of each subdivided surface patch to obtain a rectangular surface patch; Performing patch triangulation on the rectangular surface patch to obtain the triangular mesh data corresponding to the NURBS surface; The subdivision conditions include:

[0011] wherein, is the curvature data of the surface patch; is the subdivision precision value.

[0012] Furthermore, the calculation of the curvature data of the NURBS surface patch includes: Parameterize the surface as , and calculate the curvature data of the surface patch using the Gaussian curvature formula; The Gaussian curvature formula is:

[0013] wherein, is the square of the length of the tangent vector of the surface in the first parameter direction ; is the dot product of the tangent vectors of the two parameter directions and ; is the square of the length of the tangent vector of the surface in the second parameter direction ; is the normal curvature along the first parameter direction ; is the normal curvature in the mixed parameter directions and ; is the normal curvature along the parameter direction ; is the curvature data of the surface patch.

[0014] Furthermore, the dynamic recursive subdivision of the area to be subdivided according to the subdivision rule includes: Subdivide the surface parameter domain of the area to be subdivided according to the subdivision rule to obtain the subdivided sub-surface patches; Judge the convergence condition for the subdivided sub-surface patches, and subdivide the surface parameter domain that meets the convergence condition according to the subdivision rule again; Repeat the above process until none of the subdivided sub-surface patches meet the convergence condition; The subdivision rule includes: Quadrisect the surface parameter domain, and then subdivide each of the equalized sub-surface patches by calculating the chord height error; wherein, the calculation of the chord height error includes:

[0015] wherein, is the chord height error value; is the actual coordinate of the midpoint of the surface; are the coordinates of the linear interpolation points.

[0016] Further, after obtaining the triangular mesh data, it further includes mesh stitching the triangular mesh data, performing edge consistency optimization on the stitched triangular mesh data to obtain optimized triangular mesh data; The mesh stitching of the triangular mesh data includes: For the shared edge vertices of adjacent patches in the triangular mesh data, find vertices with similar coordinates through a hash table and merge them into the same vertex; The edge consistency optimization of the stitched triangular mesh data includes: Filter out the shared edges of the triangular patches in the stitched triangular mesh data; Judge the problematic shared edges from the shared edges, where the problematic shared edges are the shared edges with non - opposite vertex orders in the corresponding two triangles, and flip the vertex order of any one of the problematic shared edges; Traverse each shared edge to obtain the optimized triangular mesh data.

[0017] Further, the optimizing the model information based on the triangular mesh data to obtain optimized triangular data includes: Identify candidate feature edges from the triangular mesh data and mark the candidate feature edges; Perform edge collapse optimization on the marked candidate feature edges to obtain edge - collapsed optimized mesh data; Recalculate the normal vectors of the edge - collapsed optimized mesh data to obtain optimized triangular data.

[0018] In a second aspect of the present invention, there is provided an electronic device. The electronic device includes at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method of the first aspect of the present invention.

[0019] Compared with the prior art, the present invention has the following beneficial technical effects: Through the high - performance parsing and visualization interaction system, rapid loading of large - scale industrial model files is achieved, the development process is reduced, and traditional engineering costs are lowered.

[0020] It should be understood that the content described in the summary of the invention is not intended to limit the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In conjunction with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages, and aspects of the embodiments of the present invention will become more apparent. In the drawings, the same or similar reference numerals denote the same or similar elements, where: Figure 1 shows a flowchart of a method for processing industrial three-dimensional model data according to an embodiment of the present invention; Figure 2 shows a flowchart of determining the format of a target format file according to an embodiment of the present invention; Figure 3 shows a flowchart of obtaining geometric information according to an embodiment of the present invention; Figure 4 shows a flowchart of converting geometric information into triangular mesh data according to an embodiment of the present invention; Figure 5 shows a flowchart of NURBS surface triangulation according to an embodiment of the present invention; Figure 6 shows a flowchart of mesh stitching of triangular mesh data according to an embodiment of the present invention; Figure 7 shows a flowchart of edge consistency optimization according to an embodiment of the present invention; Figure 8 shows a flowchart of optimized model information processing according to an embodiment of the present invention; Figure 9 shows a block diagram of an exemplary electronic device capable of implementing the embodiments of the present invention.

[0022] Among them, 900 is an electronic device, 901 is a computing unit, 902 is a ROM, 903 is a RAM, 904 is a bus, 905 is an I / O interface, 906 is an input unit, 907 is an output unit, 908 is a storage unit, and 909 is a communication unit. Detailed implementation manners

[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0024] In addition, the term "and / or" in this text is merely a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this text generally indicates that the associated objects before and after are in an "or" relationship.

[0025] In the present invention, by extracting the topological structure of the parsed target format file, geometric information is obtained, and the geometric information is converted into triangular mesh data. Then, the triangular mesh data is optimized, and the optimized triangular mesh data is packaged into a general engine interface. The system and method for parsing and optimizing industrial model data through the above algorithm are applicable to the fields of computer-aided design (CAD), 3D visualization, and digital twin.

[0026] Figure 1 The flowchart of the method for processing industrial 3D model data according to an embodiment of the present invention is shown.

[0027] The method includes: S101. Obtain a target format file, parse the target format file, extract the B-rep topological structure, and obtain geometric information.

[0028] Specifically, after obtaining the target format file, it further includes judging whether the format of the obtained target format file is the target format. If so, the target format file is used as the file to be parsed.

[0029] Among them, as Figure 2 shown, judging whether the format of the obtained target format file is the target format includes: S201. Establish a key information table for the target format file, and the key information table for the target format file contains the key information of the target format file.

[0030] Among them, a key information table for the target format file is established by using a syntax parser based on the EXPRESS language specification.

[0031] As some alternative embodiments of this embodiment, the key information of the target format file includes the following fields (ISO 10303-21 standard): FILE_NAME (file name, timestamp, author, etc.), FILE_DESCRIPTION (file description and implementation level), and FILE_SCHEMA (the STEP schema followed by the file). For example: FILE_NAME('example.stp', '2023-10-01T12:00:00', ('John Doe'), ('ACME Inc.')); FILE_DESCRIPTION(('CADModel of Part A'), '2;1'); FILE_SCHEMA(('AUTOMOTIVE DESIGN {AP214}')).

[0032] S202. Parse the key information of the target format file according to the file header of the obtained target format file. If the key information is consistent with the key information of the target format file in the target format file key information table, the format of the target format file is the target format.

[0033] Specifically, the target format file is an industrial standard STEP / STP file; the file header of the target format file is parsed by C#.

[0034] Judging whether the format of the obtained target format file is the target format through the key information table can quickly identify the target file, so as to correctly parse the data of the target file. By establishing a key information table for the target format file and quickly verifying the file header information, the target format file (such as STEP / STP) can be accurately identified, avoiding parsing failures caused by incorrect file formats; in this way, the system robustness is significantly improved, ensuring that the subsequent processing process only operates on valid files, reducing the consumption of invalid computing resources, and at the same time supporting the compatibility parsing of multiple versions of STEP files.

[0035] In this embodiment, as Figure 3 shown, when parsing the target format file to extract the B-rep topological structure to obtain geometric information, it includes: S301. Extract the file header of the target format file and traverse the model entities to extract the B-rep topological structure.

[0036] Specifically, in addition to the key information of the target format file, the file header of the target format file also includes information such as the coordinate system unit and the entity version number; the model entities include TopoDS_Face (face), TopoDS_Edge (edge), and TopoDS_Vertex (fixed point).

[0037] S302. Extract the geometric information of each face from the B-rep topological structure; the geometric information includes: plane information, cylindrical surface information, and NURBS surface information.

[0038] Specifically, the plane information includes: normal vector and origin coordinates; the cylindrical surface information includes: radius, axis direction, center coordinates, control points, knot vector, order; the NURBS surface information includes: control points, knot vector, order.

[0039] By correctly obtaining the target file, it provides a basis for the extraction of geometric information. If the detected file is incorrect, the user can be notified of the file error information, and in this way, the type of the file can be determined quickly and accurately. By retaining the topological structure and parametric geometric information (such as NURBS surfaces, cylindrical surfaces) of the model entities, it provides a high-precision data basis for subdivision and optimization; in this way, the problem of information loss during manual export of traditional CAD software is avoided, ensuring the integrity of the model features, especially suitable for the refined processing of complex industrial components.

[0040] S102. As Figure 4 shown, convert the geometric information into triangular mesh data, including: S401. Based on the plane information, perform plane triangulation to obtain the triangular mesh data corresponding to the plane; and based on the cylindrical surface information, perform cylindrical surface triangulation to obtain the triangular mesh data corresponding to the cylindrical surface; and based on the NURBS surface information, perform NURBS surface triangulation to obtain the triangular mesh data corresponding to the NURBS surface.

[0041] Specifically, the plane triangulation includes:

[0042] Among them, the plane triangular mesh data result; is the origin; is the first normal vector in the plane direction; is the second normal vector in the plane direction; is the precision range in the first normal vector direction; is the precision range in the second normal vector direction.

[0043] In this embodiment, by obtaining the radius, axis direction, and center coordinates of the cylindrical shape of the file, perform cylindrical surface triangulation, and obtain two direction vectors X and Y in the axial direction of the circular cross-section through the center coordinates and the axis direction. Specifically, the cylindrical surface triangulation includes:

[0044] Among them, the cylindrical surface triangular mesh data result of is the precision of the rotation angle about the axis; is the precision of the height; is the radius of the cylindrical cross-section; is on the circular cross-section axis direction vector; is on the circular cross-section axis direction vector; is the direction vector of the axis direction.

[0045] Specifically, as Figure 5 shown, the triangulation of the NURBS surface includes: S501. For the NURBS surface information, calculate the curvature data of the NURBS surface patch, including: Parameterize the surface into and calculate the curvature data of the surface patch using the Gaussian curvature formula.

[0046] The Gaussian curvature formula is:

[0047] where is the square of the length of the tangent vector of the surface in the first parameter direction ; is the dot product of the tangent vectors of the two parameter directions and ; is the square of the length of the tangent vector of the surface in the second parameter direction ; is the normal curvature along the first parameter direction ; is the normal curvature in the mixed parameter direction and ; is the normal curvature along the parameter direction ; is the curvature data of the surface patch.

[0048] Quantifying the local curvature of the surface based on the Gaussian curvature formula can accurately identify high-curvature regions (such as rounded corners and grooves), providing a scientific basis for dynamic subdivision. Compared with the traditional fixed subdivision strategy, the present invention adaptively adjusts the subdivision density in combination with curvature features, reducing the number of redundant triangular patches while ensuring the model accuracy, and optimizing the calculation efficiency and storage overhead.

[0049] S502. If the curvature data meets the subdivision condition, mark the corresponding surface patch as the area to be subdivided.

[0050] Specifically, the subdivision condition includes:

[0051] Among them, is the curvature data of the surface patch; is the subdivision precision value.

[0052] In this embodiment, the area to be subdivided is marked, and the area to be subdivided can be continuously and recursively subdivided until the target surface complexity is met. By setting the curvature threshold, only the high-curvature areas are subdivided and marked, avoiding resource waste caused by global uniform subdivision; in this way, the combination of local refinement and global simplification is achieved, taking into account both the model accuracy and the rendering performance, and is especially suitable for industrial design scenarios that require high-fidelity display.

[0053] S503. Dynamically and recursively subdivide the area to be subdivided according to the subdivision rule to obtain the subdivided surface patch, including: Subdivide the surface parameter domain of the area to be subdivided according to the subdivision rule to obtain the subdivided sub-surface patches; judge the convergence condition for the subdivided sub-surface patches, and subdivide the surface parameter domain that meets the convergence condition according to the subdivision rule again. Repeat the above process until none of the subdivided sub-surface patches meet the convergence condition.

[0054] The subdivision rule includes: Quadrisect the surface parameter domain, and then subdivide each of the equally divided sub-surface patches by calculating the chord height error; among them, the calculation of the chord height error includes:

[0055] Among them, is the chord height error value; is the actual coordinate of the midpoint of the surface; is the coordinate of the linear interpolation point.

[0056] Through the calculation of the chord height error, the maximum geometric deviation between the surface and its approximate mesh can be quantified, which is used to dynamically control the balance between the precision and efficiency of the subdivision process.

[0057] Specifically, the convergence condition is:

[0058] Among them, is the convergence precision.

[0059] Specifically, the subdivided surface patch refers to the set of all sub-surface patches that do not meet the convergence condition after dynamic recursive subdivision.

[0060] Surfaces that do not meet the target accuracy can be subdivided into surfaces with the target accuracy through dynamic recursive subdivision, and finally the surface data will be converted into 4-corner surface patches with average subdivision; in this way, an optimal balance is achieved between geometric approximation error and computational efficiency, ensuring the efficient conversion of complex surfaces (such as turbine blades), while avoiding performance bottlenecks caused by excessive subdivision.

[0061] S504. Calculate the 3D coordinates of the 4 corner points of each subdivided surface patch to obtain a rectangular surface patch.

[0062] Specifically, the calculation formula for the 3D coordinates of the 4 corner points of the surface patch is:

[0063] where is the rectangular patch data information, where is the accuracy parameter range of subdivision in the first direction, is the accuracy parameter range of subdivision in the second direction; is the point index in the direction; is the number of points in the direction; is the point index in the direction; is the smoothness; is the local support range; is along the parameter direction of the B-spline basis function, , determine the smoothness and local support range of the basis function; is along the parameter direction of the B-spline basis function; is the point in 3D space, forming a control grid; is the point in 3D space associated scalar value, used to adjust the influence strength of the point on the surface shape.

[0064] S505. Triangulate the rectangular surface patch to obtain the triangular mesh data corresponding to the NURBS surface.

[0065] Specifically, triangulating the rectangular surface patch is to split each rectangular surface patch into 2 triangles (diagonal splitting); the triangular mesh data includes vertex coordinates, face indices, and normal vectors.

[0066] By uniformly converting planes, cylindrical surfaces, and NURBS surfaces into triangular mesh data, efficient standardization processing of industrial models is achieved. Through dynamic subdivision and optimization, while retaining key geometric features, the data volume is significantly reduced, enabling the model to be compatible with mainstream 3D engines, supporting high-precision visualization and lightweight transmission, and meeting the full-process requirements from design to digital twin.

[0067] S402. The triangular mesh data corresponding to the plane, the triangular mesh data corresponding to the cylindrical surface, and the triangular mesh data corresponding to the NURBS surface together constitute the triangular mesh data.

[0068] In this embodiment, after obtaining the triangular mesh data, it further includes mesh stitching the triangular mesh data, and performing edge consistency optimization on the mesh-stiched triangular mesh data to obtain the optimized triangular mesh data. The mesh stitching of the triangular mesh data is as Figure 6 shown, and includes: S601. For the shared edge vertices of adjacent patches in the triangular mesh data, find vertices with similar coordinates through a hash table and merge them into the same vertex. Specifically, it includes the following steps: (1) Divide the three-dimensional space of the triangular mesh data into virtual mesh cells. Vertices with similar coordinates will be assigned to the same or adjacent mesh cells, thereby narrowing the comparison range.

[0069] (2) Establish a hash table with each cell corresponding to a hash key.

[0070] (3) Find vertices with a tolerance ≤ 0.01 mm as vertices with similar coordinates through the hash table and merge them into the same vertex.

[0071] Merging the shared vertices of adjacent patches through the hash table, eliminating duplicate vertices and redundant patches, significantly reducing the triangular mesh data volume (generally reducing by 30% - 50%); in this way, not only the GPU rendering pressure is reduced, but also model cracks or rendering anomalies caused by inconsistent vertices are avoided, improving the visualization effect and system stability.

[0072] S602. The edge consistency optimization of the mesh-stiched triangular mesh data is as Figure 7 shown, and includes: S701. Screen out the shared edges of the triangular patches in the mesh-stiched triangular mesh data.

[0073] S702. Determine the problematic shared edges from the shared edges. The problematic shared edges are the shared edges where the vertex orders in the corresponding two triangles are not opposite. Flip the vertex order of any one of the problematic shared edges.

[0074] S703. Traverse each shared edge to obtain the optimized triangular mesh data.

[0075] Specifically, divide the three-dimensional space of the triangular mesh data into virtual grid cells, and establish a hash table with each cell corresponding to a hash key.

[0076] By detecting and correcting the vertex order conflicts of shared edges (such as inconsistent normal vector directions), ensure the topological consistency of adjacent triangular patches; in this way, the "jagged" or "flickering" phenomena on the model surface can be effectively eliminated, improving the authenticity of light and shadow rendering, and at the same time providing structurally coherent mesh data for subsequent physical simulations (such as stress analysis).

[0077] By converting parametric geometric data (such as NURBS surfaces) into triangular mesh data, the industry problem that B-rep data cannot be directly rendered is solved. Through dynamic subdivision and stitching optimization, the generated three-dimensional mesh can be directly compatible with mainstream engines (such as Unity, Unreal), supporting real-time interaction and visualization, and shortening the development cycle from design to application.

[0078] S103. As Figure 8 shown, based on the triangular mesh data, perform optimized model information processing to obtain the optimized triangular data, including: S801. Identify candidate feature edges from the triangular mesh data and mark the candidate feature edges.

[0079] Specifically, calculate the average curvature change of each edge in the angular mesh data. If the average curvature change is greater than , then mark the current edge as a "candidate feature edge" and prohibit it from being folded during optimization.

[0080] The calculation formula for the average curvature change is:

[0081] Where is the average curvature change; is the Gaussian curvature of the first face; is the Gaussian curvature of the second face. and are the two faces adjacent to the edge.

[0082] S802. Perform edge collapse optimization on the marked candidate feature edges to obtain the mesh data after edge collapse optimization.

[0083] In this embodiment, the edge collapse optimization is iterative optimization, and the specific process is as follows: (1) Calculate the cost value of each edge:

[0084] Among them, is the cost function; is the coordinate of the first endpoint of the edge; is the coordinate of the second endpoint of the edge; is the first normal vector; is the second normal vector; is a configuration parameter, usually 0.5 and can be configured.

[0085] (2) Arrange the edges in ascending order of cost, and preferentially fold the edges with low cost.

[0086] (3) For each folded edge, reduce the number of triangles by 2, and determine whether the target number of faces is reached. If so, stop the optimization; if not, jump to step (1).

[0087] S803. Re-calculate the normal vectors for the mesh data after folding the edges to obtain the optimized triangular face data.

[0088] In this embodiment, the re-calculation of the normal vectors means that for each vertex, smoothing is performed based on the weighted average of the normal vectors of adjacent faces.

[0089] Specifically, the weighting formula is:

[0090] Among them, is the finally calculated normal vector (unit vector) of vertex v, which is used for lighting calculation during rendering, and the direction is the weighted average of the normal vectors of adjacent faces; is the index of the adjacent faces of the vertex; is the total number of adjacent faces of the vertex; is the area of the adjacent triangle; is the normal vector of the triangle.

[0091] Based on the feature edge marking and edge folding optimization, while retaining key geometric features (such as sharp edges, rounded corners), the number of model faces is greatly simplified (such as from millions of faces to tens of thousands of faces). Combining with the re-calculation of normal vectors, the surface distortion caused by simplification is eliminated, ensuring a smooth transition of the simplified model under lighting. In addition, it also supports users to customize the simplification rate to meet the multi-scenario requirements from high-precision display to lightweight transmission.

[0092] S104. Package the optimized triangular face data into a general interface of the engine.

[0093] According to the embodiments of the present invention, the present invention has the following advantages over the prior art: (1) Provide a full - process solution for quickly importing, optimizing and converting models from STEP / STP files to direct rendering by the engine. Through the self - developed high - performance parsing and visualization interaction system, achieve the rapid loading of large - scale industrial model files, reduce the development process, and lower traditional engineering costs.

[0094] (2) By establishing a key information table for target - format files and quickly verifying the file - header information, it can accurately identify target - format files (such as STEP / STP), avoid parsing failures caused by incorrect file formats. Significantly improve the system robustness, ensure that subsequent processing processes are only carried out for valid files, reduce the consumption of invalid computing resources, and at the same time support the compatibility parsing of multiple versions of STEP files. Solve the problems of fragmented processes, lack of precision control, and frequent manual intervention in traditional industrial model processing.

[0095] (3) The dynamic precision adjustment and feature - retention algorithm balance efficiency and quality, adapt to high - end application scenarios such as digital twins and virtual assembly, significantly reduce engineering costs and improve development efficiency. Through dynamic subdivision and optimization, while retaining key geometric features, significantly reduce the data volume, make the model compatible with mainstream 3D engines, support high - precision visualization and lightweight transmission, and meet the full - process requirements from design to digital twin.

[0096] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be carried out in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0097] The above is the introduction of method embodiments. The following is a further description of the solution of the present invention through apparatus embodiments having the same inventive concept as the methods in the foregoing embodiments.

[0098] According to an embodiment of the present invention, the present invention also provides an electronic device.

[0099] Figure 9FIG. 0 shows a schematic block diagram of an electronic device 900 that can be used to implement embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, for example, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0100] The electronic device 900 includes a computing unit 901 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0101] A plurality of components in the electronic device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a magnetic disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the electronic device 900 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0102] The computing unit 901 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 executes the various methods and processes described above, such as methods S101~S104. For example, in some embodiments, methods S101~S104 can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of methods S101~S104 described above can be executed. Alternatively, in other embodiments, the computing unit 901 can be configured to execute methods S101~S104 in any other suitable manner (e.g., by means of firmware).

[0103] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), system-on-a-chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0104] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program codes can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0105] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.

[0106] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub - combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for processing industrial three-dimensional model data, characterized in that: include: Obtaining a target format file, parsing the target format file, extracting a B-rep topological structure, and obtaining geometric information; Converting the geometric information into triangular mesh data; Based on the triangular surface mesh data, the optimization model information processing is performed to obtain the optimized triangular surface data; Package the optimized triangle surface data into a general engine interface; The target format file is parsed to extract the B-rep topological structure and obtain geometric information, including: Extract the file header of the target format file, traverse the model entities, and extract the B-rep topology structure; The geometric information of each face is extracted from the B-rep topological structure; the geometric information includes: plane information, cylindrical surface information and NURBS surface information.

2. The method according to claim 1, characterized in that After obtaining the target format file, it also includes determining whether the format of the obtained target format file is the target format, and if so, taking the target format file as the file to be parsed; The determining whether the format of the acquired target format file is the target format includes: Establishing a target format file key information table, wherein the target format file key information table contains key information of the target format file; The key information of the target format file is parsed according to the acquired file header of the target format file. If the key information is consistent with the key information of the target format file in the target format file key information table, the format of the target format file is the target format.

3. The method according to claim 1, characterized in that The converting the geometric information into triangular mesh data comprises: Based on the plane information, triangulate the plane to obtain triangular surface mesh data corresponding to the plane; and Based on the cylindrical surface information, triangulate the cylindrical surface to obtain triangular surface mesh data corresponding to the cylindrical surface; and Based on the NURBS surface information, triangulate the NURBS surface to obtain triangular surface mesh data corresponding to the NURBS surface; The triangular surface mesh data corresponding to the plane, the triangular surface mesh data corresponding to the cylindrical surface, and the triangular surface mesh data corresponding to the NURBS surface together constitute the triangular surface mesh data.

4. The method according to claim 3, characterized in that The NURBS surface triangulation includes: For the NURBS surface information, calculating curvature data of the NURBS surface patch; If the curvature data meets the subdivision condition, the corresponding surface patch is marked as a region to be subdivided; Dynamically recursively subdividing the area to be subdivided according to the subdivision rule to obtain a subdivided surface patch; Calculate the 3D coordinates of the four corner points of each subdivided surface patch to obtain a rectangular surface patch; Triangulate the rectangular surface patch to obtain triangular surface mesh data corresponding to the NURBS surface; The subdivision conditions include: in, is the curvature data of the surface patch; It is the subdivision precision value.

5. The method according to claim 4, characterized in that The calculation of curvature data of the NURBS surface patch includes: Parameterize the surface as , use the Gaussian curvature formula to calculate the curvature data of the surface patch; The Gaussian curvature formula is: in, The surface is in the first parameter direction The square of the length of the tangent vector on ; For two parameter directions and The dot product of the tangent vector of ; The surface in the second parameter direction The square of the length of the tangent vector on ; Along the first parameter direction The normal curvature of is the mixing parameter direction and The normal curvature of Along the parameter direction The normal curvature of is the curvature data of the surface patch.

6. The method according to claim 4, characterized in that The dynamically recursively subdividing the area to be subdivided according to the subdivision rule includes: Subdividing the surface parameter domain of the area to be subdivided according to the subdivision rule to obtain subdivided sub-surface patches; The convergence conditions of the subdivided sub-surface patches are judged, and the surface parameter domains that meet the convergence conditions are further subdivided according to the subdivision rules; Repeat the above process until all subdivided subsurface patches fail to meet the convergence condition; The segmentation rules include: Divide the surface parameter domain into four equal parts, and then subdivide each equally divided sub-surface patch by calculating the chord height error; The calculating of the chord height error comprises: in, is the chord height error; is the actual coordinate of the midpoint of the surface; are the coordinates of the linear interpolation points.

7. The method according to claim 3, characterized in that After the triangular surface mesh data is obtained, the method further includes mesh stitching the triangular surface mesh data, and optimizing the edge consistency of the triangular surface mesh data after mesh stitching to obtain optimized triangular surface mesh data; The mesh stitching of the triangular mesh data comprises: For the shared edge vertices of adjacent facets in the triangular mesh data, the vertices with similar coordinates are searched through the hash table and merged into the same vertex; The edge consistency optimization of the triangular surface mesh data after mesh stitching includes: Filter out the shared edges of the triangle facets in the triangular face mesh data after mesh stitching; Determine a problem shared edge from the shared edges, where the problem shared edge is a shared edge corresponding to two triangles whose vertex orders are not opposite, and flip the vertex order of any one of the problem shared edges; Traverse each shared edge to obtain the optimized triangular mesh data.

8. The method according to claim 3, characterized in that The method of performing optimization model information processing based on the triangular surface mesh data to obtain optimized triangular surface data includes: Identifying candidate feature edges from the triangular mesh data, and marking the candidate feature edges; The marked candidate features are optimized by folding at the same time to obtain the grid data after folding at the same time; The mesh data after edge folding optimization is subjected to normal vector recalculation to obtain optimized triangular surface data.

9. An electronic device comprising at least one processor; and a memory connected in communication with the at least one processor; characterized in that: The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Structural design, analysis and optimization integrated method and system based on intelligent interaction

    CN117150851A

  • Analysis and identification method for geometric topological features of three-dimensional model

    CN117290290A

  • BIM rapid lightweight method

    CN118799529A

  • Method, system and equipment for supporting lightweight processing and lossless compression of multi-source three-dimensional model and storage medium

    CN119396785A

  • Tessellation Method

    US20160358373A1

Cited By

  • Process route generation method, electronic equipment and storage medium

    CN122331464A