Rapid rendering method and device based on CAD model in manufacturing industry
By dynamically merging the mesh data of CAD models and grouping and merging them according to the color and material of the curved surfaces, the problem of lag during the rendering of large CAD models is solved, and efficient and stable rendering results are achieved.
Patent Information
- Application Number
- CN202511102755.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-11-18
AI Technical Summary
The visualization of large CAD models in existing technologies suffers from lag issues, especially when rotating, panning, and zooming, making them unusable for browsing.
By dynamically merging mesh data according to the color and material of the CAD model's surface, grouping and merging the data, a new mesh model is generated, and the relationship between the new mesh model and the surface is recorded. Material changes are monitored and the model is dynamically updated.
It improves rendering efficiency, ensures the stability and efficiency of the rendering process, and avoids instability in the rendering process caused by changes in materials.
Smart Images

Figure CN120976390A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of CAD technology, specifically to a rapid rendering method, apparatus, and computing device based on manufacturing CAD models. Background Technology
[0002] CAD models are models created using CAD software. They serve as the data foundation for CAE and CAM software and are widely used in the manufacturing industry, making them of great significance.
[0003] Because CAD models are widely used in real-world manufacturing, their shapes and dimensions must be extremely precise. Therefore, when visualizing a part's CAD model, the mesh data describing its appearance is often enormous. This is especially true for complex assemblies, which contain thousands or even tens of thousands of parts; therefore, rapid rendering of the CAD model of such assemblies becomes a crucial technical challenge.
[0004] Currently, when visualizing CAD models using CAD software, large assemblies often exhibit display lag. In severe cases, it becomes impossible to rotate, translate, or scale the model properly for browsing purposes. Summary of the Invention
[0005] One of the objectives of this invention is to solve the technical problem of lag in the visualization of existing large CAD models, and to provide a fast rendering method and apparatus for manufacturing CAD models. By dynamically merging surface mesh data with the same color and material, the mesh data of the parts is grouped and then rendered in batches to improve rendering efficiency.
[0006] To address the aforementioned technical problems, in a first aspect, embodiments of the present invention provide a rapid rendering method based on a manufacturing CAD model, the method comprising:
[0007] The mesh data of the CAD model is dynamically merged based on the color and material of the curved surfaces.
[0008] Iterate through all surfaces of the CAD model and render the merged mesh model corresponding to each surface in turn.
[0009] In a preferred embodiment, the dynamic merging of the mesh data of the CAD model based on the color and material of the CAD model's surface specifically includes:
[0010] S101. Obtain the original mesh data and color / material data of all surfaces in the CAD model;
[0011] S102. Group the surfaces of the CAD model according to their color and material.
[0012] S103. After grouping the surfaces, merge the original mesh data of all surfaces in each group to generate a new mesh model.
[0013] S104. After merging the grouping results to generate a new mesh model, record the new mesh model and the relationship between the new mesh model and the corresponding surface, and retain the original mesh data corresponding to each surface.
[0014] In a preferred embodiment, the merging process of the original mesh data for all surfaces in each group specifically includes:
[0015] Obtain and retain the original mesh data of the grouped surfaces, reorganize and integrate the vertex and index data of the mesh, and generate a new mesh model.
[0016] In a preferred embodiment, the method further includes:
[0017] Continuously monitor the color and material of the CAD model surfaces. If the color and material of any surface in the CAD model changes, repeat steps S101-S104 to regroup the surfaces of the CAD model and merge the corresponding mesh data.
[0018] In a preferred embodiment, the step of traversing all surfaces of the CAD model and rendering the merged mesh model corresponding to each surface in sequence specifically includes:
[0019] S201. Before rendering the CAD model, initialize all merged mesh models and mark the mesh models as unrendered.
[0020] S202. Based on the rendering status of the merged mesh model corresponding to each surface of the CAD model, render the merged mesh model corresponding to each surface in sequence and mark it as rendered.
[0021] In a preferred embodiment, the step of rendering the merged mesh model corresponding to each surface of the CAD model sequentially according to the rendering state of the merged mesh model corresponding to each surface specifically includes:
[0022] S2021. When rendering a surface, first obtain the merged mesh model corresponding to the surface.
[0023] S2022. Check the marker of the merged mesh model corresponding to the surface being rendered. If it is marked as rendered, it means that the current surface has been rendered and does not need to be rendered again. If it is marked as unrendered, render the merged mesh model corresponding to the current surface and mark it as rendered.
[0024] S2023. After the current surface rendering is completed, check the CAD model to determine whether all its surfaces have been rendered. If not, traverse the next surface and repeat steps S2021-S2022. If all surfaces have been rendered, the current CAD model rendering is complete.
[0025] Secondly, in order to solve the technical problem of the present invention, embodiments of the present invention also provide a rapid rendering device based on a manufacturing CAD model, the device comprising:
[0026] The dynamic merging module is used to dynamically merge the mesh data of the CAD model based on the color and material of the curved surfaces.
[0027] The rendering module is used to traverse all surfaces of the CAD model and render the merged mesh model corresponding to each surface in turn.
[0028] In a preferred embodiment, the apparatus further includes:
[0029] The monitoring module is used to continuously monitor the color and material of the CAD model surfaces. If the color and material of any surface of the CAD model changes, it will trigger the regrouping of the surfaces of the CAD model and the merging of the corresponding mesh data.
[0030] In a preferred embodiment, the rendering module specifically includes:
[0031] An initialization unit is used to initialize all merged mesh models before rendering the CAD model and mark the mesh models as unrendered.
[0032] The sequential rendering unit is used to render the merged mesh model corresponding to each surface in turn, based on the rendering status of the merged mesh model corresponding to each surface of the CAD model.
[0033] Thirdly, embodiments of the present invention also provide a computing device, which includes a processor and a memory. The memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method described above.
[0034] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor or calculator, cause the processor to perform the method described above.
[0035] Compared with the prior art, the fast rendering method and apparatus based on manufacturing CAD models provided in this invention have at least the following beneficial effects:
[0036] This invention provides a method for efficient rendering using a merged mesh model. The main subject of the rendering process is the model surface, not the merged mesh model itself. This design ensures a relatively stable rendering process, unaffected by dynamic changes in the merging result. That is, when the color and material of the model surface change, only the relationship between the surface and the newly generated mesh model needs to be altered; the rendering process and the main subject of the traversal remain unchanged. Using the merged model for batch rendering significantly improves rendering efficiency; furthermore, the merging operation is dynamic and does not directly affect the rendering process, ensuring its stability. Attached Figure Description
[0037] The preferred embodiments will now be described in a clear and easy-to-understand manner, in conjunction with the accompanying drawings, to further explain the above-mentioned characteristics, technical features, advantages, and implementation methods of the present invention.
[0038] Figure 1 This is a flowchart illustrating a fast rendering method based on a manufacturing CAD model, according to an embodiment of the present invention.
[0039] Figure 2 This is a schematic diagram of the surface rendering process of the fast rendering method based on manufacturing CAD models according to an embodiment of the present invention.
[0040] Figure 3 This is a schematic diagram of a part based on a manufacturing CAD model, according to an embodiment of the present invention.
[0041] Figure 4 This is a schematic diagram of a computing device structure according to an embodiment of the present invention. Detailed Implementation
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without any creative effort.
[0043] To keep the drawings concise, only the parts relevant to the invention are shown schematically in each figure, and they do not represent the actual structure of the product. Furthermore, to facilitate understanding, in some figures, only one of components with the same structure or function is schematically depicted, or only one is labeled. In the embodiments of this invention, "one" not only means "only one," but can also mean "more than one." The following detailed description of the implementation of the technical solution of this invention will primarily use some specific embodiments as examples.
[0044] like Figure 1As shown, in order to achieve the objective of this invention, an embodiment of this invention provides a fast rendering method based on a manufacturing CAD model, the method comprising:
[0045] The mesh data of the CAD model is dynamically merged based on the color and material of the curved surfaces.
[0046] Iterate through all surfaces of the CAD model and render the merged mesh model corresponding to each surface in turn.
[0047] The following detailed explanation is provided in conjunction with the accompanying drawings and examples:
[0048] Existing CAD models generally use the BREP boundary representation method for modeling.
[0049] Therefore, the shape of a CAD model can be composed of a set of surfaces (which may include planes, cylindrical surfaces, NURBS surfaces, etc.). During the visualization of the CAD model, each surface can be discretized into a set of mesh data.
[0050] Because each surface of a CAD model can be assigned an independent color and material, the entire CAD model cannot be visualized using a single set of mesh data.
[0051] In addition, the color of each surface may change at any time. For example, a picking operation may occur to highlight the surface and then modify the surface color. Therefore, a dynamic merging method is needed to process the mesh data of the CAD model.
[0052] like Figure 1 As shown, in this embodiment of the invention, the mesh data of the CAD model is first dynamically merged. The steps for dynamically merging the mesh data are as follows:
[0053] S101. Obtain the original mesh data and color / material data of all surfaces in the CAD model;
[0054] For example: A CAD part model consists of 501 surfaces, and the part contains 3 different colored materials.
[0055] Color 1 is applied to surface 1, surface 2, ..., surface 100;
[0056] Color 2 is applied to surfaces 101, 102, ..., 200, 301, 302, ..., 400;
[0057] Color 3 is applied to surfaces 201, 202, ..., 300, 401, 402, ..., 501.
[0058] S102. Group the surfaces of the CAD model according to their color and material.
[0059] Because CAD models have numerous surfaces, but the number of color materials that can be applied to those surfaces is often limited. For example, if a part contains hundreds of surfaces but only uses three color materials, then the part is divided into three groups, and all its surfaces are assigned to the groups corresponding to the three color materials. However, if a part uses only one color material, then the part has only one group, and all its surfaces are assigned to that group.
[0060] Taking a part composed of 501 curved surfaces, involving only 3 colors, as an example, the curved surfaces are divided into 3 groups:
[0061] The first group corresponds to color 1, and includes surface 1, surface 2, ..., surface 100;
[0062] The second group corresponds to color 2, including surface 101, surface 102, ..., surface 200, surface 301, surface 302, ..., surface 400;
[0063] The third group corresponds to color 3, including surface 201, surface 202, ..., surface 300, surface 401, surface 402, ..., surface 501.
[0064] S103. After grouping the surfaces, merge the original mesh data of all surfaces in each group:
[0065] The merging process is as follows:
[0066] Obtain and retain the original mesh data of the grouped surfaces, reorganize and integrate the vertex and index data of the mesh, and generate a brand new mesh model;
[0067] Since the surfaces to be merged may be discontinuous in the original CAD model, when merging mesh data, it is necessary to re-integrate and sort out the vertex data and index data of the mesh to generate a completely new mesh model.
[0068] The first group contains 100 surfaces. All the original mesh data of these 100 surfaces are merged to generate a new mesh model, which is denoted as mesh model 1.
[0069] The second group contains 200 surfaces. All the original mesh data of these 200 surfaces are merged to generate a new mesh model, denoted as mesh model 2.
[0070] The third group contains 201 surfaces. All the original mesh data of these 201 surfaces are merged to generate a new mesh model, denoted as mesh model 3.
[0071] In one implementation method, the merging method is as follows:
[0072] (1) Assume that the mesh data of the original mesh model corresponding to surface 1 contains 3 vertices P1(x11,y11,z11), P2(x12,y12,z12), P3(x13,y13,z13) and the index data of 1 triangle P1P2P3.
[0073] (2) Assume that the mesh data of the original mesh model corresponding to surface 2 contains 4 vertices P1(x21,y21,z21), P2(x22,y22,z22), P3(x23,y23,z23), P4(x24,y24,z24) and 2 triangle index data P1P2P3, P1P3P4;
[0074] (3) Merge the vertex data of surface 1 and surface 2 to obtain 7 vertices: P1(x11,y11,z11), P2(x12,y12,z12), P3(x13,y13,z13), P4(x21,y21,z21), P5(x22,y22,z22), P6(x23,y23,z23), P7(x24,y24,z24)
[0075] (4) Merge the triangle index data of surface 1 and surface 2. Note: Since the positions of the original vertices have changed in the new vertex array, the triangle indices also need to be changed accordingly. After merging, we get the index data of 3 triangles: P1P2P3, P4P5P6, and P4P6P7.
[0076] (5) After merging, a new mesh model is generated, which contains 7 vertex data P1(x11,y11,z11), P2(x12,y12,z12), P3(x13,y13,z13), P4(x21,y21,z21), P5(x22,y22,z22), P6(x23,y23,z23), P7(x24,y24,z24) and 3 triangle mesh index data P1P2P3, P4P5P6, P4P6P7.
[0077] S104. After merging the grouping results to generate a new mesh model, record the mesh model and the relationship between the mesh model and the corresponding surface, and retain the original mesh data corresponding to each surface.
[0078] For example, all the surfaces of a certain part are divided into 3 groups, and 3 new mesh models are generated by merging them. After merging, it is necessary to record these 3 new mesh models and which surface mesh data they are from.
[0079] For example, record the merged mesh model 1, mesh model 2, and mesh model 3, and record the relationship between these merged mesh models and the surface:
[0080] Mesh model 1 is formed by merging the original mesh data of surface 1, surface 2, ..., surface 100;
[0081] Mesh model 2 is formed by merging the original mesh data of surfaces 101, 102, ..., 200, 301, 302, ..., 400;
[0082] Mesh model 3 is formed by merging the original mesh data of surfaces 201, 202, ..., 300, 401, 402, ..., 501.
[0083] Retain the original mesh data corresponding to surface 1, surface 2, ..., surface 501.
[0084] The original mesh data corresponding to the surface needs to be preserved. Since the color and material data of the surface change dynamically, the merged result is not static but needs to be updated dynamically. Therefore, the original mesh data corresponding to the surface needs to be preserved as the data basis for the next merge process.
[0085] The method further includes:
[0086] S105. Continuously monitor the color and material of the CAD model surfaces. If the color and material of any surface in the CAD model changes, repeat steps S101-S104 to regroup the surfaces of the CAD model and merge the corresponding mesh data.
[0087] like Figure 2 As shown, before any changes to the surface color or material of the CAD model, the latest merged result is used for efficient rendering. The rendering steps for the CAD model are as follows:
[0088] S201. Before rendering the CAD model, initialize all merged mesh models and mark the mesh models as unrendered.
[0089] The relationship between the CAD model surface and its corresponding merged mesh model is many-to-one. Therefore, to avoid duplicate rendering, a flag is set for each merged mesh model, and it is initialized to an unrendered state before rendering begins.
[0090] S202. Based on the rendering status of the merged mesh model corresponding to each surface of the CAD model, render the merged mesh model corresponding to each surface in sequence and mark it as rendered.
[0091] The CAD model is considered complete only after all surfaces have been rendered.
[0092] Specifically, S202 includes:
[0093] S2021. When rendering a surface, first obtain the merged mesh model corresponding to that surface.
[0094] The relationship between the merged mesh model data and the corresponding surface has been pre-recorded during the dynamic merging of mesh data. Therefore, the merged mesh model corresponding to the surface currently being rendered can be found.
[0095] S2022. Check the marker of the merged mesh model corresponding to the surface being rendered. If it is marked as rendered, it means that the current surface has been rendered and does not need to be rendered again. If it is marked as unrendered, render the merged mesh model corresponding to the current surface and mark it as rendered.
[0096] Mark the merged mesh model as rendered to avoid duplicate rendering.
[0097] The merged mesh model is rendered using the color and material of the current surface. Since this merged mesh model is obtained by combining mesh data from one or more surfaces, this rendering is actually a batch rendering of multiple surfaces, making it highly efficient. However, although this rendering is a batch rendering of multiple surface mesh data, the process still treats it as rendering only the current surface. Therefore, the completion of this rendering only indicates the end of rendering for the current surface and does not affect the rendering process of other surfaces.
[0098] S2023. After the current surface rendering is completed, check the CAD model to determine whether all its surfaces have been rendered. If not, traverse the next surface and repeat steps S2021-S2022. If all surfaces have been rendered, the current CAD model rendering is complete.
[0099] like Figure 3 As shown, for example, before the surface color and material of the part change, mesh models 1, 2, and 3 generated by the above dynamic merging method can be used for efficient rendering. The specific implementation process is as follows:
[0100] Step 1: Initialize the merged mesh model of the part, and mark mesh model 1, mesh model 2, and mesh model 3 as unrendered.
[0101] Step 2: Traverse the 501 surfaces of the part and render them one by one.
[0102] Taking the first surface as an example, the specific implementation process is further explained as follows:
[0103] Step 3: Obtain the merged mesh model corresponding to surface 1 to obtain mesh model 1.
[0104] Step 4: Determine that the marker for mesh model 1 is in an unrendered state, and proceed to the next step.
[0105] Step 5: Mark mesh model 1 as rendered.
[0106] Step 6: Render mesh model 1 using the color material (color 1) of surface 1.
[0107] Step 7: Surface 1 rendering complete.
[0108] Step 8: Determine if not all 501 surfaces of the part have been rendered. Traverse the next surface (surface 2) and repeat steps 3 through 8.
[0109] Taking the second surface as an example, the specific implementation process is further explained as follows:
[0110] Step 3: Obtain the merged mesh model corresponding to surface 2 to obtain mesh model 1.
[0111] Step 4: Determine that the marker for mesh model 1 is rendered. Proceed directly to step 7. Surface 2 is now rendered.
[0112] Step 8: Determine that not all 501 surfaces of the part have been rendered. Traverse the next surface (surface 3) and repeat the process from step 3 to step 8.
[0113] Taking the 501st surface as an example, the specific implementation process is further illustrated as follows:
[0114] Step 3: Obtain the merged mesh model corresponding to surface 501 to obtain mesh model 3.
[0115] Step 4: Determine that the marker for mesh model 3 is in a rendered state, then proceed directly to step 7. Surface 501 is now rendered.
[0116] Step 8: Determine that all 501 surfaces of the part have been rendered.
[0117] Step 9: The part model rendering is complete.
[0118] The method for efficient rendering using the merged mesh model provided by this invention traverses the model surfaces, not the merged mesh model itself. This design makes the rendering process relatively stable and unaffected by dynamic changes in the merging result. That is, when the color and material of the model surfaces change, only the relationship between the surfaces and the newly generated mesh model needs to be altered; the rendering process and the traversal subject remain unchanged.
[0119] Secondly, in order to solve the technical problem of the present invention, embodiments of the present invention also provide a rapid rendering device based on a manufacturing CAD model, the device comprising:
[0120] The dynamic merging module is used to dynamically merge the mesh data of the CAD model based on the color and material of the curved surfaces.
[0121] The rendering module is used to traverse all surfaces of the CAD model and render the merged mesh model corresponding to each surface in turn.
[0122] In a preferred embodiment, the apparatus further includes:
[0123] The monitoring module is used to continuously monitor the color and material of the CAD model surfaces. If the color and material of any surface of the CAD model changes, it will trigger the regrouping of the surfaces of the CAD model and the merging of the corresponding mesh data.
[0124] In a preferred embodiment, the rendering module specifically includes:
[0125] An initialization unit is used to initialize all merged mesh models before rendering the CAD model and mark the mesh models as unrendered.
[0126] The sequential rendering unit is used to render the merged mesh model corresponding to each surface in turn, based on the rendering status of the merged mesh model corresponding to each surface of the CAD model.
[0127] The rendering module renders dozens of frames per second (constantly refreshing the screen), and each frame (drawing a complete image on the screen) requires rendering all surfaces of all models. Before each frame is rendered, the models are initialized, marking the mesh models as unrendered; after each frame is rendered, a large number of mesh models have been marked as rendered. Therefore, before the next frame is rendered, they need to be re-initialized. That is, this initialization occurs once per frame.
[0128] This invention provides a rapid rendering device based on manufacturing CAD models. The implementation methods and approaches are described one by one, so they will not be repeated here.
[0129] The fast rendering method based on manufacturing CAD models provided in this invention traverses the model's surfaces, rather than the merged mesh model. This design makes the rendering process relatively stable and unaffected by dynamic changes in the merging results. That is, when the color and material of the model surfaces change, only the relationship between the surfaces and the newly generated mesh model needs to be altered; the rendering process and the traversal subject remain unchanged. Using the merged model for batch rendering significantly improves rendering efficiency; simultaneously, the merging operation is dynamic and does not directly affect the rendering process, ensuring its stability.
[0130] Thirdly, embodiments of the present invention also provide a computing device, the computing device including a processor and a memory, the memory being used to store a computer program, the computer program including program instructions, and the processor or calculator being configured to call the program instructions to execute the method described above.
[0131] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor or calculator, cause the processor or calculator to perform the method described above.
[0132] like Figure 4 As shown in the figure, an embodiment of this application provides a computing device 1000, which includes a processor or calculator (not shown) 1001 and a memory 1002. The processor or calculator 1001 and the memory 1002 can be interconnected via a communication bus 1003. The communication bus 1003 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 1003 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the memory 1002 is used to store a computer program, which includes program instructions. The processor 1001 is configured to call the program instructions, and the program includes steps for executing some or all of the steps in the aforementioned methods.
[0133] The processor 1001 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the above-mentioned program.
[0134] The memory 1002 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or it may be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.
[0135] The computing device 1000 may further include a communication module 1004 and a display 1005. The communication module 1004 can communicate with the optical tracking device. The communication module 1004 can be a wireless communication module (e.g., a WiFi module, a Bluetooth module, etc.) or a wired communication module.
[0136] In addition, the computing device 1000 may also include general components such as communication interfaces (e.g., USB interfaces, microphone interfaces, etc.) and antennas, which will not be described in detail here.
[0137] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0138] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0139] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.
[0140] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0141] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software program module.
[0142] If the integrated unit is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0143] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage device, which may include: a flash drive, a read-only memory, a random access memory, a magnetic disk, or an optical disk, etc.
[0144] The embodiments of this application have been described in detail above. Specific examples have been used in the embodiments of this invention to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
[0145] It should be noted that the above embodiments can be freely combined as needed. The above are merely preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A fast rendering method based on manufacturing CAD models, characterized in that, The method includes: The mesh data of the CAD model is dynamically merged based on the color and material of the curved surfaces. Iterate through all surfaces of the CAD model and render the merged mesh model corresponding to each surface in turn.
2. The rapid rendering method based on manufacturing CAD models as described in claim 1, characterized in that, The dynamic merging of mesh data of the CAD model based on the color and material of the curved surfaces specifically includes: S101. Obtain the original mesh data and color / material data of all surfaces in the CAD model; S102. Group the surfaces of the CAD model according to their color and material. S103. After grouping the surfaces, merge the original mesh data of all surfaces in each group to generate a new mesh model. S104. After merging the grouping results to generate a new mesh model, record the new mesh model and the relationship between the new mesh model and the corresponding surface, and retain the original mesh data corresponding to each surface.
3. The rapid rendering method based on manufacturing CAD models as described in claim 2, characterized in that, The specific steps of merging the original mesh data of all surfaces in each group include: Obtain and retain the original mesh data of the grouped surfaces, reorganize and integrate the vertex and index data of the mesh, and generate a new mesh model.
4. The rapid rendering method based on manufacturing CAD models as described in claim 1, characterized in that, The method further includes: Continuously monitor the color and material of the CAD model surfaces. If the color and material of any surface in the CAD model changes, repeat steps S101-S104 to regroup the surfaces of the CAD model and merge the corresponding mesh data.
5. The rapid rendering method based on manufacturing CAD models as described in claim 1, characterized in that, The process of traversing all surfaces of the CAD model and rendering the merged mesh model corresponding to each surface in sequence includes: S201. Before rendering the CAD model, initialize all merged mesh models and mark the mesh models as unrendered. S202. Based on the rendering status of the merged mesh model corresponding to each surface of the CAD model, render the merged mesh model corresponding to each surface in sequence and mark it as rendered.
6. The rapid rendering method based on manufacturing CAD models as described in claim 5, characterized in that, The step of rendering the merged mesh model corresponding to each surface of the CAD model in sequence, based on the rendering state of the merged mesh model corresponding to each surface, specifically includes: S2021. When rendering a surface, first obtain the merged mesh model corresponding to the surface. S2022. Check the marker of the merged mesh model corresponding to the surface being rendered. If it is marked as rendered, it means that the current surface has been rendered and does not need to be rendered again. If it is marked as unrendered, render the merged mesh model corresponding to the current surface and mark it as rendered. S2023. After the current surface rendering is completed, check the CAD model to determine whether all its surfaces have been rendered. If not, traverse the next surface and repeat steps S2021-S2022. If all surfaces have been rendered, the current CAD model rendering is complete.
7. A rapid rendering device based on manufacturing CAD models, characterized in that, The device includes: The dynamic merging module is used to dynamically merge the mesh data of the CAD model based on the color and material of the curved surfaces. The rendering module is used to traverse all surfaces of the CAD model and render the merged mesh model corresponding to each surface in turn.
8. The rapid rendering device based on manufacturing CAD models as described in claim 7, characterized in that, The device further includes: The monitoring module is used to continuously monitor the color and material of the CAD model surfaces. If the color and material of any surface of the CAD model changes, it will trigger the regrouping of the surfaces of the CAD model and the merging of the corresponding mesh data.
9. The rapid rendering device based on manufacturing CAD models as described in claim 7, characterized in that, The rendering module specifically includes: An initialization unit is used to initialize all merged mesh models before rendering the CAD model and mark the mesh models as unrendered. The sequential rendering unit is used to render the merged mesh model corresponding to each surface in turn, based on the rendering status of the merged mesh model corresponding to each surface of the CAD model.
10. A computing device, characterized in that, The computing device includes a processor and a memory, the memory being used to store a computer program, the computer program including program instructions, and the processor being configured to invoke the program instructions to execute the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
3D model merging and rendering system, method and terminal
CN106780686A
Batch processing rendering method for game scene, device and server
CN111744182A
Building information model rendering method and device, electronic equipment and storage medium
CN114297746A
Light map resolution determination method and device, electronic equipment and storage medium
CN114299216A
Implementation method for improving digital-analog simplification effect of digital factory
CN114549782A