Model approximate decomposition-based parameterization equipment simple model generation method and device and medium

By splitting the equipment three-dimensional solid model into component models and decomposing it into regular polyhedrons, the problem of data storage and computing burden in equipment three-dimensional modeling is solved, an efficient and low-cost modeling process is realized, and visual quality and key features are maintained.

CN119810363APending Publication Date: 2025-04-11HUNAN HANGRUI DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411883225.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The prior art has problems with data storage and computing burden caused by high-precision models in equipment three-dimensional modeling, and the modeling process is low efficiency, high cost and poor adaptability.

Method used

The parametric equipment simplified model generation method based on model approximate decomposition is adopted. By splitting the equipment three-dimensional solid model into component models and decomposing the component model into regular polyhedrons, the data storage volume and the modeling efficiency are improved.

Benefits of technology

It realizes that while maintaining visual quality and retaining key features, the amount of modeling data is reduced, the modeling efficiency and adaptability is improved, and it is suitable for complex three-dimensional models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810363A_ABST
    Figure CN119810363A_ABST
Patent Text Reader

Abstract

The invention discloses a parameterization equipment simple model generation method and device based on model approximate decomposition, and a medium. The method comprises the following steps: step S01, splitting a target entity model into various component models according to structural components; s02, decomposing each component model into a plurality of polyhedrons, judging whether decomposition needs to be continued or not according to the curved surface states of the polyhedrons in the decomposition process, stopping decomposition if the polyhedrons are regular polyhedrons without curved surfaces, and continuing decomposition if the polyhedrons are irregular polyhedrons with curved surfaces; s03, the vertex coordinate data, the shape and the material of each polyhedron obtained through decomposition are correspondingly combined together and stored; and S04, reading three-dimensional model data of each model part, generating a corresponding polyhedron, endowing the polyhedron with a corresponding material, and constructing a simple model. The simplified model of the complex model entity can be efficiently generated, the data storage amount is reduced, and meanwhile the visual quality is kept.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of three-dimensional modeling, and in particular to a method, device and medium for generating a simple model of a parametric equipment based on approximate decomposition of a model. Background Art

[0002] Constructing a 3D model of equipment in equipment visualization simulation can realistically present the equipment operation process and support a variety of application scenarios such as equipment operation simulation, equipment virtual maintenance, and equipment simulation operation. However, high-precision 3D models of equipment often contain a large amount of geometric information, which not only increases the demand for data storage, but also brings a huge computing burden to real-time rendering. In addition, the 3D modeling process requires obtaining basic model data through measurement, photography, laser scanning, etc. Using 3D modeling software to construct a 3D model not only has high labor costs and low efficiency, but also makes data management difficult. Model simplification can efficiently simplify complex model entities based on the basic data of the equipment structure, while maintaining the authenticity and details of its visual effects, which has important application value for equipment visualization.

[0003] In order to meet the requirements of high-performance rendering, model simplification should not only ensure that sufficient visual quality can be maintained under low complexity, but also retain the key features of the equipment as much as possible. In the prior art, parametric modeling methods are usually used for three-dimensional modeling, that is, by mapping the three-dimensional model to a two-dimensional space, texture mapping and detail editing can be easily performed. However, the parametric modeling method in the prior art usually divides the three-dimensional model according to a fixed structural shape and uses a detailed data structure to complete the modeling, which will have the following problems:

[0004] 1) Traditional parametric modeling methods rely on professional modeling software, which has poor adaptability and low execution efficiency.

[0005] 2) Detailed data structures are required for modeling, which has high modeling costs and contains a large amount of redundant information, and cannot meet the visualization cost requirements of simple simulation systems.

[0006] 3) Three-dimensional model data has complex shapes and structures. The method of using fixed structural shapes to divide the model lacks flexibility, and it is actually difficult to split the complex structure into sufficiently small units, which will increase the cost of data storage. Summary of the invention

[0007] The technical problem to be solved by the present invention is: in response to the technical problems existing in the prior art, the present invention provides a method that is simple to implement, low in cost, high in modeling efficiency, small in data storage volume, and highly flexible and adaptable. It can improve the modeling efficiency while reducing the data storage volume of the modeling while maintaining sufficient visual quality and retaining key features as much as possible.

[0008] In order to solve the above technical problems, the technical solution proposed by the present invention is:

[0009] A method for generating a parameterized equipment simple model based on model approximate decomposition, comprising the following steps:

[0010] Step S01. Split the target equipment 3D solid model into individual component models according to the structural components;

[0011] Step S02. Decompose each component model into multiple polyhedrons, and determine whether to continue decomposing according to the surface state of the decomposed polyhedron during the decomposition process. If the decomposed polyhedron is a regular polyhedron without a curved surface or an approximate regular polyhedron, stop decomposing. If the decomposed polyhedron is an irregular polyhedron with a curved surface, continue decomposing until each polyhedron formed by decomposition is a regular polyhedron or an approximate regular polyhedron. After the decomposition is completed, a series of polyhedrons are obtained.

[0012] Step S03. The vertex coordinate data of each polyhedron obtained by decomposition is combined with the shape of each polyhedron and the material information of each polyhedron to form the three-dimensional model data of each model component, and stored in order;

[0013] Step S04. Read the three-dimensional model data of each model component in sequence according to the storage order, generate a polyhedron of corresponding shape according to the read three-dimensional model data and assign corresponding material, and finally construct a simple model of the three-dimensional solid model of the target equipment.

[0014] Furthermore, the regular polyhedron includes any one of a cuboid, a cube, a triangular prism, and a tetrahedron, and the irregular polyhedron includes a cylinder or a curved polyhedron.

[0015] Furthermore, in step S02, the surface state of the polyhedron is judged by Gaussian curvature. If the Gaussian curvature of each face is less than a preset curvature threshold, the current polyhedron is judged to be a regular polyhedron without a curved surface or an approximate regular polyhedron. Otherwise, the current polyhedron is judged to be an irregular polyhedron containing a curved surface.

[0016] Furthermore, the step S02 includes:

[0017] Step S201. Obtain a component model as the current model to be decomposed;

[0018] Step S202. Decompose the current model to be decomposed into multiple polyhedrons;

[0019] Step S203: Take a polyhedron after decomposition of the current model to be decomposed as the current target polyhedron;

[0020] Step S204. Calculate the Gaussian curvature of each face in the current target polyhedron;

[0021] Step S205. Determine the calculated Gaussian curvature of each face. If the Gaussian curvature of each face is less than the preset curvature threshold, determine that the current target polyhedron is a regular polyhedron without a curved surface or an approximate regular polyhedron, stop decomposing and proceed to step S206. Otherwise, determine that the current polyhedron to be decomposed is an irregular polyhedron containing a curved surface, take the current target polyhedron as a new model to be decomposed, and proceed to step S202.

[0022] Step S206. Determine whether all polyhedrons decomposed from the current model to be decomposed have been processed. If yes, proceed to step S207. Otherwise, take the next polyhedron decomposed from the current model to be decomposed as the current target polyhedron and return to step S204.

[0023] Step S207: Determine whether all component models have been processed. If so, exit. Otherwise, take the next component model as the current model to be decomposed and go to step S203.

[0024] Furthermore, the step S202 includes:

[0025] Step S221. Establish an XYZ spatial coordinate system for the current model to be decomposed and calculate the center point of the current model to be decomposed in three dimensions: x, y, and z;

[0026] Step S222. Use the three spatial planes x=X0, y=y0, and Z=z0 as cutting planes to divide the current model to be decomposed and decompose it into multiple polyhedrons, where x0, y0, and z0 are the center points of the current model to be decomposed in the x, y, and z dimensions respectively.

[0027] Furthermore, in step S204, the projection width d of each face of the current target polyhedron on the coordinate axis is divided into multiple intervals according to the distance, a point is taken as a detection point in each divided interval, and the Gaussian curvature at each detection point is calculated; in step S205, if the Gaussian curvature of all detection points on each face of the current target polyhedron is less than a preset curvature threshold, the current polyhedron is determined to be a regular polyhedron without a curved surface or an approximate regular polyhedron, otherwise the current polyhedron is determined to be an irregular polyhedron containing a curved surface.

[0028] Furthermore, in step S02, the decomposition process may further include marking regular polyhedrons with a Gaussian curvature of 0 obtained by decomposition, and after the decomposition is completed, merging the marked polyhedrons.

[0029] Furthermore, in step S03, the three-dimensional model data is written into an XML file for storage, and the storage shape and vertex data coordinates stored in each node are set.

[0030] Further, step S04 includes:

[0031] Step S401. Read the three-dimensional model data of a model component as the current three-dimensional model data;

[0032] Step S402. Read the vertex data of a polyhedron and the material corresponding to each face from the current three-dimensional model data;

[0033] Step S403. Generate corresponding faces according to the read vertex data, and configure corresponding materials for each face to obtain a simple model of the polyhedron;

[0034] Step S404: Determine whether the simplified model generation of the current model component is completed. If yes, proceed to step S405; otherwise, read the vertex data of the next polyhedron and the material corresponding to each face, and return to step S403;

[0035] Step S405. Determine whether the generation of simple models of all model components is completed. If yes, exit and output the simple model of the currently generated three-dimensional solid model of the target equipment. Otherwise, read the three-dimensional model data of the next model component as the current three-dimensional model data and return to step S402.

[0036] A computer device comprises a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to perform the above method.

[0037] A computer-readable storage medium storing a computer program, wherein the computer program implements the above method when executed by a processor.

[0038] Compared with the prior art, the advantages of the present invention are: the present invention realizes the generation of equipment simple model by adopting the method of approximate decomposition of three-dimensional model based on parametric modeling method, judges whether to continue decomposition according to the surface state of the polyhedron during the decomposition process, and uses the approximate decomposition method to evaluate whether the currently decomposed unit can be approximated as a regular polyhedron, which can quickly and effectively split sufficiently small units, greatly reducing the amount of data storage in the modeling process, not only maintaining sufficient visual quality, but also retaining key features as much as possible, while effectively improving the efficiency and flexibility of modeling. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a schematic diagram of the implementation process of the method for generating a simple model of a parametric equipment based on approximate model decomposition in this embodiment.

[0040] Figure 2 It is a schematic diagram of the principle of calculating the center point of a three-dimensional model in a specific application embodiment of the present invention.

[0041] Figure 3 It is a schematic diagram of the effect of cutting a cuboid in a specific application embodiment of the present invention.

[0042] Figure 4 It is a schematic diagram of the principle of decomposing a three-dimensional model in a specific application embodiment of the present invention.

[0043] Figure 5 It is a schematic diagram of the effect after decomposing the three-dimensional model in a specific application embodiment of the present invention.

[0044] Figure 6 It is a schematic diagram of the effect of decomposing an equipment structure into multiple polyhedrons in a specific application embodiment of the present invention.

[0045] Figure 7 It is a schematic diagram of the effect of decomposing another equipment structure into multiple polyhedrons in a specific application embodiment of the present invention.

[0046] Figure 8 It is a schematic diagram of the effect of constructing a polyhedron coordinate system and vertices in a specific application embodiment of the present invention.

[0047] Fig. 9 It is a schematic diagram of the effect of constructing a right triangular prism coordinate system and vertices in a specific application embodiment of the present invention.

[0048] Fig.10 It is a schematic diagram of the effect of constructing a tetrahedral coordinate system and vertices in a specific application embodiment of the present invention.

[0049] Fig.11 It is a schematic diagram of the principle of implementing XML file production in a specific application embodiment of the present invention.

[0050] Fig.12 A schematic diagram of the principle of realizing the generation of each surface in a specific application embodiment of the present invention.

[0051] Fig.13 It is a schematic diagram of the effect of the original structure and the generated simple model in a specific application embodiment of the present invention. DETAILED DESCRIPTION

[0052] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.

[0053] The present invention realizes the generation of equipment simple model by adopting the method of approximate decomposition of three-dimensional model based on parameterized modeling method. In the process of splitting the three-dimensional model data, the whole three-dimensional solid model of the equipment is first split into various component models according to the components, and then each component model is respectively decomposed into multiple polyhedrons. Considering that the data storage volume of irregular polyhedrons is large, whether to continue decomposition is determined according to the surface state of the polyhedron during the decomposition process, so as to use the approximate decomposition method to evaluate whether the currently decomposed unit can be approximately regarded as a regular polyhedron, so that after continuous iterative decomposition, each face of each polyhedron formed by decomposition is a regular polyhedron, and it can be applicable to various types of complex three-dimensional models, and can quickly and effectively split sufficiently small units, greatly reducing the data storage volume in the modeling process; after decomposition, the vertex coordinate data and other information of each polyhedron are stored, and each polyhedron is generated by using the stored vertex coordinate data, and then a simple model of the equipment three-dimensional solid model is generated, which can not only maintain sufficient visual quality, but also retain key features as much as possible, and effectively improve the efficiency and flexible applicability of modeling.

[0054] In the present invention, approximate decomposition refers to continuous decomposition according to the surface state of the polyhedron, so that all decomposed units can be approximately regarded as regular polyhedrons. If the currently decomposed unit is a regular polyhedron, it means that the current polyhedron can be represented by a simple combination of surface elements, and the polyhedron will not be decomposed any more; if the currently decomposed unit has an irregular surface, that is, it does not belong to a polyhedron in the strict sense, it means that the current unit structure cannot be composed of simple surface elements, and it is necessary to continue to split and decompose, and iterate the above decomposition until each small unit of the decomposition can be approximately regarded as a polyhedron.

[0055] like Figure 1 As shown, the steps of the method for generating a parameterized equipment simple model based on model approximate decomposition in this embodiment include:

[0056] Step S01: split the three-dimensional solid model of the target equipment into individual component models according to the structural components.

[0057] Specifically, the three-dimensional entity can be preliminarily split into multiple component models according to the composition characteristics of the equipment model. For example, assuming that the equipment three-dimensional entity model contains multiple sub-components of different shapes: a rectangular component 1, an irregular component 2, and a cylindrical component 3, then according to the structural composition of the standard equipment three-dimensional entity model, the components 1, 2, and 3 can be preliminarily split in turn to obtain the models of component 1, component 2, and component 3, respectively, so as to facilitate the subsequent approximate decomposition of each component model.

[0058] It is understandable that for a solid model with only a few components, it is not necessary to perform preliminary splitting and directly execute step S02, that is, directly perform approximate decomposition of the polyhedron. For larger and more complex solid models, preliminary division can be performed according to the component composition to reduce the difficulty of decomposition and improve the efficiency of decomposition.

[0059] Step S02. Decompose each component model into multiple polyhedrons, and determine whether to continue decomposing according to the surface state of the decomposed polyhedron during the decomposition process. If the decomposed polyhedron is a regular polyhedron without a curved surface, stop decomposing; if the decomposed polyhedron is an irregular polyhedron with a curved surface, continue decomposing until each polyhedron formed by decomposition is a regular polyhedron or an approximate regular polyhedron, and a series of polyhedrons are obtained after the decomposition is completed.

[0060] Optionally, the regular polyhedron includes a cuboid, a cube, a triangular prism, a tetrahedron, etc., and the irregular polyhedron includes a cylinder or a curved surface polyhedron. Taking an irregular solid model similar to a cylinder, a curved surface, etc. as an example, by further decomposing the model, it can eventually be decomposed into smaller cuboids, so that the irregular solid model can be approximately represented by a polyhedron.

[0061] In this embodiment, the surface state of the polyhedron is judged by Gaussian curvature, that is, the surface state of the polyhedron to be decomposed is evaluated by calculating the Gaussian curvature of each face of the decomposition unit. If the Gaussian curvature of each face is less than the preset curvature threshold, the current polyhedron is judged to be a regular polyhedron without a surface or an approximate regular polyhedron, that is, the current unit is considered to meet the requirements of an approximate polyhedron. Otherwise, the current polyhedron is judged to be an irregular polyhedron containing a surface, that is, the approximate decomposition of the model of the current unit is considered to be insufficient. Using the above method, the Gaussian curvature can be fully utilized to quickly achieve sufficient decomposition of the model, so that it can eventually be decomposed into sufficiently small units, thereby reducing the amount of data storage.

[0062] As an optional implementation, the steps of implementing approximate decomposition of each component model based on Gaussian curvature are specifically as follows:

[0063] Step S201. Obtain a component model as the current model to be decomposed;

[0064] Step S202. Decompose the current model to be decomposed into multiple polyhedrons;

[0065] Step S203: Take a polyhedron after decomposition of the current model to be decomposed as the current target polyhedron;

[0066] Step S204. Calculate the Gaussian curvature of each face in the current target polyhedron;

[0067] Step S205. Determine the calculated Gaussian curvature of each face. If the Gaussian curvature of each face is less than the preset curvature threshold, determine that the current target polyhedron is a regular polyhedron without a curved surface or an approximate regular polyhedron, stop decomposing and proceed to step S206. Otherwise, determine that the current polyhedron to be decomposed is an irregular polyhedron containing a curved surface, take the current target polyhedron as a new model to be decomposed, and proceed to step S202.

[0068] Step S206. Determine whether all polyhedrons decomposed from the current model to be decomposed have been processed. If yes, proceed to step S207. Otherwise, take the next polyhedron decomposed from the current model to be decomposed as the current target polyhedron and return to step S204.

[0069] Step S207: Determine whether all component models have been processed. If so, exit. Otherwise, take the next component model as the current model to be decomposed and go to step S203.

[0070] The above approximate decomposition is to continuously decompose the equipment entity component model. Each time the decomposition is performed, the Gaussian curvature of each face of the entity model of all decomposition results is analyzed. If the Gaussian curvature of each face of the entity model is less than the preset curvature threshold, it indicates that it can be represented by a polyhedron, and then it can be stored using vertex data. At this time, there is no need to further refine the current entity; otherwise, it indicates that the current entity model cannot be represented by a polyhedron, and the entity model needs to be further iteratively decomposed. Decomposition is performed continuously in this way until each polyhedron formed by the decomposition is a regular polyhedron or an approximate regular polyhedron, and the termination decomposition condition is reached. After the above decomposition, all the decomposition results are polyhedrons. Through the reconstruction of these elements, the original equipment entity model can be accurately restored to ensure visual quality while retaining key features as much as possible.

[0071] As an optional implementation, the above step S202 can be decomposed in a manner similar to octree segmentation of the three-dimensional model, and the specific steps include:

[0072] Step S221. Establish an XYZ spatial coordinate system for the current model to be decomposed and calculate the center point of the current model to be decomposed in three dimensions: x, y, and z;

[0073] Step S222. Use the three spatial planes x=x0, y=y0, and z=z0 as cutting planes to divide the current model to be decomposed and decompose it into multiple polyhedrons, where x0, y0, and z0 are the center points of the current model to be decomposed in the x, y, and z dimensions respectively.

[0074] In a specific application embodiment, a three-dimensional model component is used as the basis to establish an XYZ spatial coordinate system, and a projection mapping method is used to calculate the center point of the three-dimensional model in the x, y, and z dimensions, such as Figure 2 As shown (the figure shows the midpoint values ​​of the x-axis and y-axis, and the same applies to the z-axis); then after calculating the center points in each dimension, the three spatial planes x=x0, y=y0, and z=z0 are used as cutting planes to divide the three-dimensional model components. The decomposition result is eight decomposition blocks. The midpoint calculation formula is x0=(x2+x1) / 2, y0=(y2+y1) / 2, z0=(z2+z1) / 2. The example of dividing the rectangular parallelepiped is as follows Figure 3 As shown; then for each decomposition block, a judgment is made, and each face of the decomposition block is counted to obtain the Gaussian curvature of each face. If the Gaussian curvature is between 0 and the preset threshold, the face is considered to be a regular plane; when the Gaussian curvature exceeds the preset threshold, the face is considered to be a curved surface; the Gaussian curvature of each face of the decomposition block is counted. If there are face elements exceeding the threshold, the current decomposition block is considered to be an irregular curved surface, otherwise, the current decomposition block is considered to be a regular polyhedron. The effect of splitting a two-dimensional plane is shown in the figure. Figure 4 As shown in the figure, the decomposition effect on a certain section of the 3D model is shown. When the decomposition block is a regular polyhedron, the decomposition and splitting operation of the decomposition block is terminated. When the decomposition block is an irregular surface, the above decomposition operation is performed again based on the decomposition block. After several divisions, a smaller module that can be approximated as a regular polyhedron is finally obtained. For example, Figure 4 The decomposition results in the above are further decomposed. If the decomposed small blocks are not regular in shape, they are further decomposed into smaller modules, such as Figure 5 shown.

[0075] As an optional implementation, in step S204, the projection width d of each face of the current target polyhedron on the coordinate axis is divided into multiple intervals according to the distance, a point is taken as a detection point in each divided interval, and the Gaussian curvature at each detection point is calculated; in step S205, if the Gaussian curvature of all detection points on each face of the current target polyhedron is less than a preset curvature threshold, the current polyhedron is determined to be a regular polyhedron without a curved surface or an approximate regular polyhedron, otherwise the current polyhedron is determined to be an irregular polyhedron containing a curved surface.

[0076] Gaussian curvature can be calculated according to the following formula:

[0077]

[0078] Among them, E, F, G are the coefficients of the first basic form, and LM, N are the coefficients of the second basic form.

[0079] Specifically, in the process of calculating the Gaussian curvature of each face of the polyhedron, several detection points are taken on each face for calculation. Only when the Gaussian curvature values ​​on the face elements where all points are located are within the preset threshold range, the face is judged to be a regular face; otherwise, the face element is judged to be a curved surface. It should be noted that the Gaussian curvature can be positive or negative. When |k|≤ε (ε is the set threshold), the feature face is judged to be a regular face. When |k|>ε, the face element is considered to be a curved surface, and the current module needs to be further decomposed.

[0080] When taking the detection points, the projection width d of the current decomposition block on the coordinate axis can be used as the basis for division according to the distance. For example, a point can be obtained every 0.05d, and 20 points can be captured in this dimension to calculate the Gaussian curvature. It can be understood that the distance interval can be configured according to actual needs. When the interval distance is smaller, the more point positions are obtained on the surface element, and the more accurate the rule judgment of the current surface element is. The same strategy is used to calculate the value of Gaussian curvature on other dimensional coordinates.

[0081] As an optional implementation, during each iterative decomposition process, a regular polyhedron with a Gaussian curvature of 0 on all faces of the decomposition block can be marked as t. After the decomposition of the entire three-dimensional model is completed, the polyhedron elements marked as t can be merged to form a whole, thereby realizing the function of merging small blocks. At this time, the decomposition result after the decomposition only contains two types of polyhedron elements: a merged polyhedron element with a Gaussian curvature of 0 on all faces, and several approximate polyhedron elements with a Gaussian curvature between 0 and a threshold.

[0082] Step S03: The vertex coordinate data of each polyhedron obtained by decomposition are correspondingly combined with the shape and material information of each polyhedron to form the three-dimensional model data of each model component, and stored in sequence.

[0083] After the decomposition in step S02, a series of regular polyhedrons can be obtained, and the vertex positions corresponding to each polyhedron are further obtained. The vertex data of these polyhedrons are saved, and the three-dimensional model data storage can be realized.

[0084] As an optional implementation, different node types can be configured accordingly in the XML file storing the three-dimensional model data, and expressed using nested tags with names such as "Root", "Structures", "Shapes", "Shape", "Points", "Point", etc., to set the storage shape and vertex data coordinates stored in each node. Each Model has at least one Component. In each Component tag, only one Structure represents a true polyhedron (Gaussian curvature is 0), and the other Structures are represented as polyhedrons approximately decomposed. Each polyhedron stores the corresponding face elements and the corresponding coordinate data. By using XML files for storing three-dimensional model data, node tags are used inside the file to express different data structures. The storage volume of the model can be reduced as much as possible while ensuring the precision of the model. It is not only highly readable, but also convenient for users to modify and adjust the three-dimensional model data, thereby improving the scalability of the three-dimensional model data. XML supports PC, Web, App and other programs, has fewer restrictions, and can be used as a universal data file in various application platforms.

[0085] Step S04. Read the three-dimensional model data of each model component in sequence according to the storage order, generate a polyhedron of corresponding shape according to the read three-dimensional model data and assign corresponding material, and finally construct a simple model of the three-dimensional solid model of the target equipment.

[0086] According to the stored three-dimensional model data such as vertex data at different positions, shapes, and materials, a three-dimensional approximate simple model is further generated based on the parametric modeling method. Surfaces are constructed based on the vertex data, and then multiple surfaces are combined into a polyhedron. Several polyhedrons are combined to generate a simple appearance model of the equipment.

[0087] As an optional implementation, the construction of a simple model of the equipment three-dimensional solid model can be achieved according to the following steps based on the stored three-dimensional model data:

[0088] Step S401. Read the three-dimensional model data of a model component as the current three-dimensional model data;

[0089] Step S402: Read the vertex data of a polyhedron and the material corresponding to each face from the current three-dimensional model data.

[0090] Step S403. Generate corresponding faces according to the read vertex data, and configure corresponding materials for each face to obtain a simple model of the polyhedron;

[0091] Step S404: Determine whether the simplified model generation of the current model component is completed. If yes, proceed to step S405; otherwise, read the vertex data of the next polyhedron and the material corresponding to each face, and return to step S403;

[0092] Step S405. Determine whether the generation of simple models of all model components is completed. If yes, exit and output the simple model of the currently generated three-dimensional solid model of the target equipment. Otherwise, read the three-dimensional model data of the next model component as the current three-dimensional model data and return to step S402.

[0093] In a specific application embodiment, the decomposed polyhedrons can be stored in a clockwise order from top to bottom, and then the vertex data of each polyhedron can be read in a clockwise order from top to bottom to generate the corresponding face, and finally a simple model of the three-dimensional solid model of the equipment is constructed.

[0094] This embodiment divides the equipment entity into several polyhedrons through detailed segmentation, and then records all vertex data of the polyhedron to store the three-dimensional model data of the equipment. In the parametric modeling process, the polyhedron is generated based on the vertex data and the three-dimensional model is further constructed. This can optimize the data storage method, improve the efficiency of generating three-dimensional models of equipment, reduce modeling costs and data storage volume, and compared with using three-dimensional modeling software to build simple models, the data construction cost is lower and more efficient, and it is not limited by the software or system environment. It can support equipment design and three-dimensional visualization needs in different application scenarios and improve the flexibility of application.

[0095] The present invention is further described below by taking the above method of the present invention for simple mold generation in a specific application embodiment as an example, and the detailed steps are as follows:

[0096] Step 1: Decompose the three-dimensional entity into multiple polyhedrons according to the composition characteristics of the equipment model.

[0097] The effect of initially decomposing the equipment structure into multiple polyhedrons is as follows Figure 6 , 7 As shown in the figure, it can be seen that the overall model can be split and then a simple polyhedron model can be generated. For irregular solid models such as cylinders and curved surfaces, they can be further decomposed into smaller cuboids to use polyhedrons to approximate the irregular solid model.

[0098] Step 2: According to the Gaussian curvature of each face of the decomposed polyhedron, determine whether the current 3D model meets the requirements of a regular polyhedron to determine whether further decomposition is needed. If the Gaussian curvature of each face is less than the preset threshold, it indicates that the currently decomposed model meets the requirements of the final decomposition, otherwise further decomposition is required.

[0099] Step 3: By analyzing each face of the polyhedron, obtain the coordinate data of each vertex in all face elements, and store the data in the XML database in a designed format.

[0100] by Figure 8 Take the middle polyhedron (rectangular parallelepiped) as an example. The structure in the figure is a rectangular parallelepiped composed of 8 faces, among which p1-p8 are the vertices of the rectangular parallelepiped in the spatial coordinate system, p0 is the center point of the rectangular parallelepiped (i.e. the absolute position of the rectangular parallelepiped in space), and p1-p8 are the coordinates relative to the center point. The corresponding rectangular parallelepiped is generated by the confirmed vertices, and the vertices are confirmed in a clockwise direction. Specifically, p1 is FrontLeftUp, corresponding to the point in the upper left corner of the front; p2 is FrontRightUp, corresponding to the point in the upper right corner of the front; p3 is FrontRightDown, corresponding to the point in the lower right corner of the front; p4 is FrontLeftDown, corresponding to the point in the lower left corner of the front; p5 is BackLeftUp, corresponding to the point in the upper left corner of the back; p6 is BackRightUp, corresponding to the point in the upper right corner of the back; p7 is BackRightDown, corresponding to the point in the lower right corner of the back; p8 is BackLeftDown, corresponding to the point in the lower left corner of the back.

[0101] Another example is the right triangular prism polyhedron structure Fig. 9 As shown, the triangular prism is mainly composed of 5 faces, among which p1-p6 are the vertices of the right triangular prism in the space coordinate system, p0 is the center point of the right triangular prism (that is, the absolute position of the right triangular prism in space), p1-p6 are the coordinates relative to the center point, and the corresponding right triangular prism is generated by the confirmed vertices. Generally, the vertices are confirmed in a clockwise direction.

[0102] Tetrahedral structure Fig.10 As shown, the tetrahedron is composed of four face elements, where p1-p4 are the four vertices of the tetrahedron in the space coordinate system, p0 is the center point of the tetrahedron (i.e., the absolute position of the tetrahedron in space, used for graphic positioning), p1-p4 are the coordinates relative to the center point, and the vertices are confirmed in a clockwise direction.

[0103] After the three-dimensional model is split, the vertex data of each polyhedron is written into the XML file and the corresponding material is marked. Fig.11Take the structure as an example. The structure is mainly composed of a small cube at the origin, a large rectangular parallelepiped, a small rectangular parallelepiped and a right triangular prism. The origin of the coordinate system in space is (0, 0, 0). The center point of the entire structure, that is, the position is defined as A(0, 0, 0). The large rectangular parallelepiped is actually a cube with a side length of 10. The position of its center point relative to the center point of the structure is A(5, 5, 5). The long side of the small rectangular parallelepiped is 10 and the short side is 4. The position of its center point relative to the center point of the structure is B(12, 5, 8). The position of the center point of the right triangular prism relative to the center point of the structure is B(10, 10, 10). It should be noted that when the center point of the structure is set to the origin of space, the center point of the rectangular parallelepiped is the absolute position in space. Taking the small cube at the origin as an example, the center point of the small cube at the origin is (0, 0, 0), and the relative positions of the vertices are: o1: (-0.5, 0.5, -0.5), o2: (0.5, 0.5, -0.5), o3: (0.5, -0.5, -0.5), o4: (-0.5, -0.5, -0.5), o5: (-0.5, 0.5, 0.5), o6: (0.5, 0.5, 0.5), o7: (0.5, -0.5, 0.5), o8: (-0.5, -0.5, 0.5)

[0104] Taking the above origin node definition as an example, the XML file can be defined as follows:

[0105] <root>

[0106] <structures>

[0107] <Structure ID=″1″Name=″StructureName″X=″0″Y=″0″Z=″0″H=″0″P=″0″R=″0″>

[0108] <! --structure represents the name of a single structure, X=″0″Y=″0″Z=″0″ is the center point of the structure, that is, the absolute position of the structure in space, H=″0″P=″0″R=″0″ is the initial orientation, corresponding to the rotation of the x-axis, y-axis and z-axis respectively. If there is no rotation, it is 0, ranging from +180o to -180o-->

[0109] <shapes>

[0110] <Shape ID="1" Name="Origin" ShapeType="1" PBRType="MI_Red_01" X="0" Y="0" Z="0" H="0" P="0" R="0">

[0111] <!-- shape represents the name of a single shape. ShapeType = 1 represents a cuboid. PBRType represents the material. X = "0" Y = "0" Z = "0" are the coordinate positions of the cuboid relative to the center point of the structure Structure. H = "0" P = "0" R = "0" are the initial orientations, corresponding to the rotations around the x-axis, y-axis, and z-axis respectively. If there is no rotation, it is 0, and the range is +180°

[0112] to -180° -->

[0113] <points>

[0114] <Point Name=″FrontLeftUp″Index=″1″X=″-0.5″Y=″0.5″Z=″-0.5″ / >

[0115] <Point Name=″FrontRightUp″Index=″2″X=″0.5″Y=″0.5″Z=″-0.5″ / >

[0116] <Point Name=″FrontRightDown″Index=″3″X=″0.5″Y=″-0.5″Z=″-0.5″ / >

[0117] <Point Name=″FrontLeftDown″Index=″4″X=″-0.5″Y=″-0.5″Z=″-0.5″ / >

[0118] <Point Name=″BackLeftUp″Index=″5″X=″-0.5″Y=″0.5″Z=″0.5″ / >

[0119] <Point Name=″BackRightUp″Index=″6″X=″0.5″Y=″0.5″Z=″0.5″ / >

[0120] <Point Name=″BackRightDovn″Index=″7″X=″0.5″Y=″-0.5″Z=″0.5″ / >

[0121] <Point Name=″BackLeftDown″Index=″8″X=″-0.5″Y=″-0.5″Z=″0.5″ / >

[0122] The configuration options for material type PBRType in the XML file are shown in Table 1 below.

[0123] Table 1: Material coding correspondence table

[0124] Serial number Material code / name category 1 MI Metal 01 Metal 2 MI Chainmail 01 armor 3 MI Armor 01 Armor 4 MI_Pipe_0 1 pipeline 5 MIPlastic 01 plastic 6 MI_Rope_0 1 rope 7 MI Ruststains 01 Rust 8 MI Wood 01 wood

[0125] Step 4: After storing the 3D model data, input the XML file into the software system. The software reads the coordinate position of each vertex, generates the corresponding face according to the coordinate position of each vertex, and assigns the material according to the corresponding material number to generate a simple model of the polyhedron.

[0126] Take the generation of a cuboid as an example. Fig.12 As shown, by drawing each face in turn, we finally get a simple model of a rectangular parallelepiped.

[0127] Step 5: After generating each face, the modeling of each polyhedron is completed. Finally, each polyhedron is placed according to the coordinate position of each vertex to complete the construction of the equipment structure model.

[0128] by Figure 6 Taking the structure shown in the figure as an example, the generated simple model is compared before and after. Fig.13 shown.

[0129] This embodiment further provides a computer device, including a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to perform the above method.

[0130] It is understandable that the above method of this embodiment can be executed by a single device, such as a computer or server, etc., and can also be applied to a distributed scenario and completed by multiple devices in cooperation with each other. In the case of a distributed scenario, one of the multiple devices can only execute one or more steps in the above method of this embodiment, and multiple devices interact to complete the above method. The processor can be implemented in the form of a general-purpose CPU, a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, etc., for executing related programs to implement the above method of this embodiment. The memory can be implemented in the form of a read-only memory ROM, a random access memory RAM, a static storage device, and a dynamic storage device. The memory can store an operating system and other applications. When the above method of this embodiment is implemented by software or firmware, the relevant program code is stored in the memory and called and executed by the processor.

[0131] This embodiment further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above method is implemented.

[0132] Those skilled in the art will appreciate that the above-mentioned embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0133] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.< / points> < / shapes> < / structures> < / root>

Claims

1. A method for generating a simple model of parametric equipment based on model approximate decomposition, characterized in that the steps include: Step S01. Split the target equipment 3D solid model into individual component models according to the structural components; Step S02. Decompose each component model into multiple polyhedrons, and determine whether to continue decomposing according to the surface state of the decomposed polyhedron during the decomposition process. If the decomposed polyhedron is a regular polyhedron without a curved surface or an approximate regular polyhedron, stop decomposing. If the decomposed polyhedron is an irregular polyhedron with a curved surface, continue decomposing until each polyhedron formed by decomposition is a regular polyhedron or an approximate regular polyhedron. After the decomposition is completed, a series of polyhedrons are obtained. Step S03. The vertex coordinate data of each polyhedron obtained by decomposition is combined with the shape of each polyhedron and the material information of each polyhedron to form the three-dimensional model data of each model component, and stored in order; Step S04. Read the three-dimensional model data of each model component in sequence according to the storage order, generate a polyhedron of corresponding shape according to the read three-dimensional model data and assign corresponding material, and finally construct a simple model of the three-dimensional solid model of the target equipment.

2. The method for generating a parameterized equipment simple model based on model approximate decomposition according to claim 1 is characterized in that: In step S02, the surface state of the polyhedron is judged by Gaussian curvature. If the Gaussian curvature of each face is less than a preset curvature threshold, the current polyhedron is judged to be a regular polyhedron without a curved surface or an approximate regular polyhedron. Otherwise, the current polyhedron is judged to be an irregular polyhedron containing a curved surface.

3. The method for generating a parameterized equipment simple model based on model approximate decomposition according to claim 2 is characterized in that: The step S02 comprises: Step S201. Obtain a component model as the current model to be decomposed; Step S202. Decompose the current model to be decomposed into multiple polyhedrons; Step S203: Take a polyhedron after decomposition of the current model to be decomposed as the current target polyhedron; Step S204. Calculate the Gaussian curvature of each face in the current target polyhedron; Step S205. Determine the calculated Gaussian curvature of each face. If the Gaussian curvature of each face is less than the preset curvature threshold, determine that the current target polyhedron is a regular polyhedron without a curved surface or an approximate regular polyhedron, stop decomposing and proceed to step S206. Otherwise, determine that the current polyhedron to be decomposed is an irregular polyhedron containing a curved surface, take the current target polyhedron as a new model to be decomposed, and proceed to step S202. Step S206. Determine whether all polyhedrons decomposed from the current model to be decomposed have been processed. If yes, proceed to step S207. Otherwise, take the next polyhedron decomposed from the current model to be decomposed as the current target polyhedron and return to step S204. Step S207: Determine whether all component models have been processed. If so, exit. Otherwise, take the next component model as the current model to be decomposed and go to step S203.

4. The method for generating a parameterized equipment simple model based on model approximate decomposition according to claim 3 is characterized in that: The step S202 includes: Step S221. Establish an XYZ spatial coordinate system for the current model to be decomposed and calculate the center point of the current model to be decomposed in three dimensions: x, y, and z; Step S222. Use the three spatial planes x=x0, y=y0, and z=z0 as cutting planes to divide the current model to be decomposed and decompose it into multiple polyhedrons, where x0, y0, and z0 are the center points of the current model to be decomposed in the x, y, and z dimensions respectively.

5. The method for generating a parameterized equipment simple model based on model approximate decomposition according to claim 3 is characterized in that: In step S204, the projection width d of each face of the current target polyhedron on the coordinate axis is divided into multiple intervals according to the distance, a point is taken as a detection point in each divided interval, and the Gaussian curvature at each detection point is calculated; in step S205, if the Gaussian curvature of all detection points on each face of the current target polyhedron is less than a preset curvature threshold, the current polyhedron is determined to be a regular polyhedron without a curved surface or an approximate regular polyhedron, otherwise the current polyhedron is determined to be an irregular polyhedron containing a curved surface.

6. The method for generating a parameterized equipment simple model based on model approximate decomposition according to any one of claims 2 to 5, characterized in that: In step S02, the decomposition process may further include marking regular polyhedrons with a Gaussian curvature of 0 obtained by decomposition, and after the decomposition is completed, merging the marked polyhedrons.

7. The method for generating a parameterized equipment simple model based on model approximate decomposition according to any one of claims 1 to 5, characterized in that: In step S03, the three-dimensional model data is written into an XML file for storage, and the storage shape and vertex data coordinates stored in each node are set.

8. The method for generating a parameterized equipment simple model based on model approximate decomposition according to any one of claims 1 to 5, characterized in that: Step S04 includes: Step S401. Read the three-dimensional model data of a model component as the current three-dimensional model data; Step S402. Read the vertex data of a polyhedron and the material corresponding to each face from the current three-dimensional model data; Step S403. Generate corresponding faces according to the read vertex data, and configure corresponding materials for each face to obtain a simple model of the polyhedron; Step S404: Determine whether the simplified model generation of the current model component is completed. If yes, proceed to step S405; otherwise, read the vertex data of the next polyhedron and the material corresponding to each face, and return to step S403; Step S405. Determine whether the generation of simple models of all model components is completed. If yes, exit and output the simple model of the currently generated three-dimensional solid model of the target equipment. Otherwise, read the three-dimensional model data of the next model component as the current three-dimensional model data and return to step S402.

9. A computer device comprising a processor and a memory, wherein the memory is used to store a computer program, wherein: The processor is configured to execute the computer program to perform the method according to any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.