A model rendering method, device, computer device, and readable storage medium

By decomposing CAE model faces into triangular facets and utilizing WebGL for rendering, the method addresses inefficiencies in CAE model rendering, significantly reducing processing time.

CN115205431BActive Publication Date: 2025-07-15SHANGHAI AVIATION IND GRP CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210904618.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2025-07-15
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

When rendering a CAE model, the rendering time is too long and the efficiency is inefficient due to the huge number of geometric bodies constructed by massive units.

Method used

Split each face of the target unit in the CAE model into a triangular one-sided surface, construct the surface geometry, and render it using the WebGL engine, combining the edge line geometry of one-dimensional, two-dimensional and three-dimensional units to reduce the number of rendered objects.

Benefits of technology

By splitting and building triangle one-sided surfaces, the number of rendered geometry is reduced, the rendering efficiency is improved, and the rendering time is shortened.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115205431B_ABST
    Figure CN115205431B_ABST
Patent Text Reader

Abstract

The present application provides a model rendering method, apparatus, computer device, and readable storage medium. Among them, each face of the target cells in the CAE model is split into triangular patches, where the target cells include all two-dimensional cells and all three-dimensional cells in the CAE model; according to the vertex coordinates of all the triangular patches in the target cells, all the triangular patches are constructed into the face geometry of the target cells; the face geometry, the first line geometry, and the second line geometry are stored as the candidate model file content of the candidate three-dimensional model; the WebGL engine is used to render the candidate model file content to display the candidate three-dimensional model on the Web side. By adopting the above method, the time required for model rendering can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer model simulation, and more particularly, to a model rendering method, apparatus, computer device, and readable storage medium. Background Art

[0002] In the prior art, when rendering a CAE model, for each unit in the CAE model, at least one geometric body needs to be constructed for the unit, and then the geometric bodies constructed for all units in the CAE model are rendered.

[0003] The inventors found in their research that since a CAE model usually includes a huge number of units, the number of geometric bodies constructed from the huge number of units is also huge. Then, when rendering a three-dimensional model, the number of geometric bodies to be rendered is also huge. And since the computer renders geometric bodies one by one after one geometric body rendering is completed, when rendering a huge number of geometric bodies, a large amount of time is required, thus increasing the time required for model rendering. Summary of the Invention

[0004] In view of this, an object of the present invention is to provide a model rendering method, apparatus, computer device, and readable storage medium, which can reduce the time required for model rendering.

[0005] In a first aspect, an embodiment of the present application provides a model rendering method, the method including:

[0006] Split each face of a target unit in a CAE model into triangular patches, where the target unit includes all two-dimensional units and all three-dimensional units in the CAE model;

[0007] Construct all triangular patches into a face geometric body of the target unit according to the vertex coordinates of the target unit;

[0008] Store the face geometric body, a first line geometric body, and a second line geometric body as candidate model file content of a candidate three-dimensional model, where the first line geometric body is constructed according to an edge line of the target unit, the edge line is generated according to the vertex coordinates of the target unit using a preset edge line connection rule, and the second line geometric body is constructed according to one-dimensional units in the CAE model;

[0009] Render the candidate model file content using a WebGL engine to display the candidate three-dimensional model on the Web side.

[0010] Optionally, before splitting each face of a target unit in a CAE model into triangular patches, the method further includes:

[0011] Identify the elements with a line structure in the CAE model as the one-dimensional elements;

[0012] Identify the elements with a surface structure in the CAE model as the two-dimensional elements;

[0013] Identify the elements with a volume structure in the CAE model as the three-dimensional elements.

[0014] Optionally, after storing the surface geometry, the first line geometry, and the second line geometry as the candidate model file content of the candidate three-dimensional model, the method further includes:

[0015] Upload the candidate model file content to the cloud file library of the cloud server so that all users who can access the cloud server can obtain the candidate model file content from the cloud file library.

[0016] Optionally, after rendering the candidate model file content using the WebGL engine to display the candidate three-dimensional model on the Web side, the method further includes:

[0017] Add the target rendering data to the candidate model file content to obtain the target model file content of the target three-dimensional model, where the target rendering data is the rendering data for modifying the rendering effect of the candidate three-dimensional model to the rendering effect of the target three-dimensional model;

[0018] Use the WebGL engine to render the target model file content to display the target three-dimensional model on the Web side.

[0019] In a second aspect, an embodiment of the present application provides a model rendering device, and the device includes:

[0020] A triangle surface determination module, configured to split each surface of the target element in the CAE model into triangle surfaces, where the target element includes all two-dimensional elements and all three-dimensional elements in the CAE model;

[0021] A surface geometry determination module, configured to construct all triangle surfaces into the surface geometry of the target element according to the vertex coordinates of the target element;

[0022] A first candidate model file content storage module, configured to store the surface geometry, the first line geometry, and the second line geometry as the candidate model file content of the candidate three-dimensional model, where the first line geometry is constructed according to the edge lines of the target element, the edge lines are generated according to the vertex coordinates of the target element using a preset edge line connection rule, and the second line geometry is constructed according to the one-dimensional elements in the CAE model;

[0023] A candidate model file content rendering module, configured to render the content of the candidate model file by using a WebGL engine, so as to display the candidate 3D model on the Web side.

[0024] Optionally, the device further includes:

[0025] A one-dimensional unit determination module, configured to determine a unit with a line structure in the CAE model as the one-dimensional unit before splitting each face of the target unit in the CAE model into triangular patches;

[0026] A two-dimensional unit determination module, configured to determine a unit with a face structure in the CAE model as the two-dimensional unit;

[0027] A three-dimensional unit determination module, configured to determine a unit with a body structure in the CAE model as the three-dimensional unit.

[0028] Optionally, the device further includes:

[0029] A second candidate model file content storage module, configured to upload the candidate model file content to a cloud file library on a cloud server after storing the face geometry, the first line geometry, and the second line geometry as the candidate model file content of the candidate 3D model, so that all users who can access the cloud server can obtain the candidate model file content from the cloud file library.

[0030] Optionally, the device further includes:

[0031] A target model file content determination module, configured to add target rendering data to the candidate model file content to obtain the target model file content of the target 3D model after rendering the candidate model file content by using a WebGL engine to display the candidate 3D model on the Web side, where the target rendering data is rendering data for modifying the rendering effect of the candidate 3D model to the rendering effect of the target 3D model;

[0032] A target model file content rendering module, configured to render the target model file content by using the WebGL engine to display the target 3D model on the Web side.

[0033] In a third aspect, an embodiment of the present application provides a computer device, including: a processor, a memory, and a bus, where the memory stores machine-readable instructions executable by the processor. When the computer device runs, the processor communicates with the memory through the bus. When the machine-readable instructions are executed by the processor, the steps of the model rendering method in any optional implementation manner in the first aspect are executed.

[0034] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the model rendering method described in any of the optional implementation manners in the first aspect above.

[0035] The technical solutions provided by the present application include but are not limited to the following beneficial effects:

[0036] Each face of the target unit in the CAE model is split into triangular patches, where the target unit includes all two-dimensional units and all three-dimensional units in the CAE model. Through the above steps, each face of the two-dimensional and three-dimensional units can be split into the smallest units recognizable by the rendering engine, namely triangular patches; according to the vertex coordinates of the target unit, all triangular patches are constructed into the face geometry of the target unit. Through the above steps, the construction of the face geometry for realizing the rendering of the target model can be carried out based on the two-dimensional and three-dimensional units; the face geometry, the first line geometry, and the second line geometry are stored as the candidate model file content of the candidate three-dimensional model, where the first line geometry is constructed based on the edge lines of the target unit, and the edge lines are generated using a preset edge line connection rule according to the vertex coordinates of all triangular patches in the target unit, and the second line geometry is constructed based on the one-dimensional units in the CAE model. Through the above steps, all necessary elements for realizing the rendering of the target model, namely the face geometry and all related line geometries, can be aggregated and stored to prepare the necessary rendering data for the rendering of the target model; the WebGL engine is used to render the candidate model file content to display the candidate three-dimensional model on the Web side. By adopting the above method, by extracting all triangular patches in the unit to construct the face geometry, constructing the first line geometry from the edge lines, extracting all one-dimensional units to construct the second line geometry, and then rendering the above one face geometry and two line geometries, the rendering of the three-dimensional model can be realized. That is to say, the computer only needs to render three geometries to realize the model rendering, which can reduce the time required for model rendering.

[0037] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following specific preferred embodiments are given in conjunction with the accompanying drawings and described in detail as follows. Description of the Drawings

[0038] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0039] Figure 1 Shows the flowchart of a model rendering method provided in Embodiment 1 of the present invention;

[0040] Figure 2 Shows the schematic diagram of a rectangular surface splitting method for a two-dimensional unit provided in Embodiment 1 of the present invention;

[0041] Figure 3 Shows the schematic diagram of a rectangular surface splitting method for a three-dimensional unit provided in Embodiment 1 of the present invention;

[0042] Figure 4 Shows the flowchart of a unit determination method provided in Embodiment 1 of the present invention;

[0043] Figure 5 Shows the flowchart of a target model file content rendering method provided in Embodiment 1 of the present invention;

[0044] Figure 6 Shows the schematic diagram of the structure of a model rendering device provided in Embodiment 2 of the present invention;

[0045] Figure 7 Shows the schematic diagram of the structure of another model rendering device provided in Embodiment 2 of the present invention;

[0046] Figure 8 Shows the schematic diagram of the structure of another model rendering device provided in Embodiment 2 of the present invention;

[0047] Figure 9 Shows the schematic diagram of the structure of another model rendering device provided in Embodiment 2 of the present invention;

[0048] Figure 10 Shows the schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Detailed implementation manners

[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are only a part rather than all of the embodiments of the present invention. Components of the embodiments of the present invention described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed present invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.

[0050] Embodiment 1

[0051] For ease of understanding of this application, the following combines Figure 1 the content described in the flowchart of a model rendering method provided in Embodiment 1 of the present invention shown in

[0052] Refer to Figure 1 shown in Figure 1 the flowchart of a model rendering method provided in Embodiment 1 of the present invention is shown. The method includes steps S101 to S104:

[0053] S101: Split each face of the target cells in the CAE model into triangular patches, where the target cells include all two-dimensional cells and all three-dimensional cells in the CAE model.

[0054] Specifically, CAE (Computer Aided Engineering) is an approximate numerical analysis method for using a computer to assist in solving problems such as the analysis and calculation of the mechanical properties of complex engineering and product structural strength, stiffness, buckling stability, dynamic response, heat conduction, three-dimensional multi-body contact, elastoplasticity, etc., as well as the optimization design of structural performance.

[0055] When splitting the faces of the two-dimensional cells and three-dimensional cells in the CAE model, the model file of the CAE model originally carries the vertex coordinates of each vertex of the two-dimensional cells and three-dimensional cells. The two-dimensional cells and three-dimensional cell faces are split according to the point set composed of the vertex coordinates of each vertex to obtain triangular patches.

[0056] Refer to Figure 2 shown in Figure 2The figure shows a schematic diagram of a method for splitting a rectangular face of a two-dimensional unit provided in the first embodiment of the present invention. Taking the two-dimensional unit A as an example, the two-dimensional unit A is a rectangular face, and the four vertices of this rectangular face are A1, A2, A3, and A4 respectively, with coordinates A1(a1, b1, c1), A2(a2, b2, c2), A3(a3, b3, c3), and A4(a4, b4, c4). Among them, A1 and A2 are connected by the rectangular side A1A2, A2 and A3 are connected by the rectangular side A2A3, A3 and A4 are connected by the rectangular side A3A4, and A4 and A1 are connected by the rectangular side A4A1. When splitting the rectangular face of the two-dimensional unit A, any two adjacent (having a common endpoint) rectangular sides (A1A2 and A2A3 or A2A3 and A3A4 or A4A1 and A1A4 or A4A1 and A1A2) are arbitrarily selected, and a triangular face is determined with the three vertices of these two adjacent rectangular sides as the three vertices of the triangle. Then, the remaining part in the rectangular face is used as another triangular face.

[0057] See Figure 3 as shown in Figure 3 The figure shows a schematic diagram of a method for splitting a rectangular face of a three-dimensional unit provided in the first embodiment of the present invention. Taking the three-dimensional unit D as an example, the three-dimensional unit D is a cuboid. The 8 vertices of this three-dimensional unit D are respectively marked as D1, D2, D3, D4, D5, D6, D7, and D8. The four vertices of the first rectangular face are D1, D2, D3, and D4 respectively, with coordinates D1(d1, e1, f1), D2(d2, e2, f2), D3(d3, e3, f3), and D4(d4, e4, f4). Among them, D1 and D2 are connected by the rectangular side D1D2, D2 and D3 are connected by the rectangular side D2D3, D3 and D4 are connected by the rectangular side D3D4, and D4 and D1 are connected by the rectangular side D4D1. When splitting the first rectangular face of the three-dimensional unit D, any two adjacent (having a common endpoint) rectangular sides are arbitrarily selected, and a triangular face is determined with the three vertices of these two adjacent rectangular sides as the three vertices of the triangle. Then, the remaining part in the rectangular face is used as another triangular face; thus, 12 triangular faces can be obtained by splitting the three-dimensional unit D.

[0058] S102: Construct the surface geometry of the target unit with all the triangular faces according to the vertex coordinates of the target unit.

[0059] Specifically, after obtaining all the triangular faces in the target unit in step S101, construct the surface geometry of the target unit according to the vertex coordinates in the target unit (this data is carried in the model file of the original CAE model).

[0060] S103: Store the surface geometric body, the first-line geometric body, and the second-line geometric body as the content of the candidate model file of the candidate three-dimensional model, where the first-line geometric body is constructed according to the edge line of the target unit, the edge line is generated according to the vertex coordinates of the target unit using a preset edge line connection rule, and the second-line geometric body is constructed according to the one-dimensional units in the CAE model.

[0061] Specifically, when determining the first-line geometric body, construct the edge line of the target unit according to the vertex coordinates of the target unit. For example, for a two-dimensional rectangular unit, take its four rectangular sides as the edge lines, and then construct the first-line geometric body of the target unit with all the edge lines. The target unit is the set of all two-dimensional units and three-dimensional units. When determining the second-line geometric body, directly construct the second-line geometric body according to the vertex coordinates of all one-dimensional units.

[0062] Store the first-line geometric body, the second-line geometric body, and the surface geometric body obtained in step S102 as the content of the candidate model file of the candidate three-dimensional model.

[0063] S104: Render the content of the candidate model file using the WebGL engine to display the candidate three-dimensional model on the Web side.

[0064] Specifically, when the user needs to render the candidate three-dimensional model file, the front-end three-dimensional visualization component can be enabled by clicking the render button in the Web page. The three-dimensional visualization component can use the WebGL (Web Graphics Library, a 3D drawing protocol) engine to render the candidate three-dimensional model to render the candidate three-dimensional model on the Web (World Wide Web) side.

[0065] In a feasible implementation, as shown in Figure 4 shown, Figure 4 shows the flowchart of a unit determination method provided in Embodiment 1 of the present invention. Before splitting each face of the target unit in the CAE model into triangular patches, the method further includes steps S401 to S403:

[0066] S401: Determine the units with a line structure in the CAE model as the one-dimensional units.

[0067] Specifically, determine the units with a line structure such as rod units and beam units in the CAE model as one-dimensional units.

[0068] S402: Determine the units with a surface structure in the CAE model as the two-dimensional units.

[0069] Specifically, units with surface structures such as shell units and shear units in the CAE model are determined as two-dimensional units.

[0070] S403: Determine units with a volume structure in the CAE model as the three-dimensional units.

[0071] Specifically, units with a volume structure such as tetrahedral units, pentahedral units, and hexahedral units in the CAE model are determined as three-dimensional units.

[0072] In a feasible implementation, after storing the surface geometric body, the first-line geometric body, and the second-line geometric body as the content of the candidate model file of the candidate three-dimensional model, the method further includes:

[0073] Upload the content of the candidate model file to the cloud file library of the cloud server so that all users who can access the cloud server can obtain the content of the candidate model file from the cloud file library.

[0074] Specifically, taking the candidate model file of civil aircraft engineering as an example, after uploading the content of the candidate model file to the cloud file library of the cloud server, the content of the candidate model file of civil aircraft engineering in the cloud file library is accessed and stored through the object storage service, and combined with the content delivery network technology, so that all users who can access the cloud server can obtain or download the content of the candidate model file from the cloud file library.

[0075] In a feasible implementation, refer to Figure 5 as shown, Figure 5 The figure shows a flowchart of a method for rendering the content of a target model file provided in the first embodiment of the present invention. Among them, after using the WebGL engine to render the content of the candidate model file to display the candidate three-dimensional model on the Web side, the method further includes steps S501 to S502:

[0076] S501: Add the target rendering data to the content of the candidate model file to obtain the content of the target model file of the target three-dimensional model, where the target rendering data is the rendering data for modifying the rendering effect of the candidate three-dimensional model to the rendering effect of the target three-dimensional model.

[0077] Specifically, when it is necessary to modify the rendering effect of the candidate 3D model obtained through step S104, it is first necessary to determine the data that needs to be modified in the candidate model file content when modifying the rendering effect of the candidate 3D model. Taking the content of the candidate model file for civil aircraft engineering as an example, the computing engine of the server calculates the target rendering data of the unit that needs to modify the model rendering attributes (such as color, etc.). The target rendering data is the rendering data for modifying the rendering effect of the candidate 3D model to the rendering effect of the target 3D model. Then, the target rendering data is added to or modified in the original candidate model file content to obtain the target model file content that can achieve the rendering effect of the target 3D model.

[0078] S502: Use the WebGL engine to render the target model file content to display the target 3D model on the Web side.

[0079] Specifically, when the user needs to render the target 3D model file, the front-end 3D visualization component can be enabled by clicking the rendering button on the Web page. The 3D visualization component can use the WebGL engine to render the target 3D model to render the target 3D model on the Web side.

[0080] Embodiment 2

[0081] See Figure 6 as shown Figure 6 shows the structural schematic diagram of a model rendering device provided in Embodiment 2 of the present invention. Among them, as Figure 6 shown, a model rendering device provided in Embodiment 2 of the present invention includes:

[0082] The triangular facet determination module 601 is used to split each face of the target unit in the CAE model into triangular facets, where the target unit includes all two-dimensional units and all three-dimensional units in the CAE model.

[0083] The face geometry determination module 602 is used to construct the face geometry of the target unit from all the triangular facets according to the vertex coordinates of the target unit.

[0084] The first candidate model file content storage module 603 is used to store the face geometry, the first line geometry, and the second line geometry as the candidate model file content of the candidate 3D model, where the first line geometry is constructed according to the edge lines of the target unit, the edge lines are generated according to the vertex coordinates of the target unit using a preset edge line connection rule, and the second line geometry is constructed according to the one-dimensional units in the CAE model.

[0085] The candidate model file content rendering module 604 is configured to render the content of the candidate model file by using a WebGL engine, so as to display the candidate 3D model on the Web side.

[0086] In a feasible implementation, refer to Figure 7 as shown Figure 7 FIG. shows a schematic structural diagram of another model rendering device provided in the second embodiment of the present invention. Among them, as Figure 7 shown, another model rendering device provided in the second embodiment of the present invention includes:

[0087] The one-dimensional unit determination module 701 is configured to determine the unit with a line structure in the CAE model as the one-dimensional unit before splitting each face of the target unit in the CAE model into triangular patches.

[0088] The two-dimensional unit determination module 702 is configured to determine the unit with a face structure in the CAE model as the two-dimensional unit.

[0089] The three-dimensional unit determination module 703 is configured to determine the unit with a body structure in the CAE model as the three-dimensional unit.

[0090] In a feasible implementation, refer to Figure 8 as shown Figure 8 FIG. shows a schematic structural diagram of another model rendering device provided in the second embodiment of the present invention. Among them, as Figure 8 shown, another model rendering device provided in the second embodiment of the present invention includes:

[0091] The second candidate model file content storage module 801 is configured to upload the candidate model file content to the cloud file library on the cloud server after storing the face geometry, the first line geometry, and the second line geometry as the candidate model file content of the candidate 3D model, so that all users who can access the cloud server can obtain the candidate model file content from the cloud file library.

[0092] In a feasible implementation, refer to Figure 9 as shown Figure 9 FIG. shows a schematic structural diagram of another model rendering device provided in the second embodiment of the present invention. Among them, as Figure 9 shown, another model rendering device provided in the second embodiment of the present invention includes:

[0093] The target model file content determination module 901 is configured to, after rendering the candidate model file content by using the WebGL engine to display the candidate 3D model on the Web side, add the target rendering data to the candidate model file content to obtain the target model file content of the target 3D model, where the target rendering data is the rendering data for modifying the rendering effect of the candidate 3D model to the rendering effect of the target 3D model;

[0094] The target model file content rendering module 902 is configured to render the target model file content by using the WebGL engine to display the target 3D model on the Web side.

[0095] Embodiment III

[0096] Based on the same application concept, refer to Figure 10 as shown Figure 10 shows a schematic structural diagram of a computer device provided in Embodiment III of the present invention. As shown Figure 10 a computer device 1000 provided in Embodiment III of the present application includes:

[0097] a processor 1001, a memory 1002, and a bus 1003. The memory 1002 stores machine-readable instructions executable by the processor 1001. When the computer device 1000 runs, the processor 1001 communicates with the memory 1002 through the bus 1003. When the machine-readable instructions are run by the processor 1001, the steps of a model rendering method shown in the above Embodiment I are executed.

[0098] Embodiment IV

[0099] Based on the same application concept, the present application embodiment also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is run by a processor, the steps of a model rendering method described in any one of the above embodiments are executed.

[0100] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems and devices can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.

[0101] The computer program product for model rendering provided by the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the foregoing method embodiments. For specific implementation, refer to the method embodiments, and will not be described herein again.

[0102] A model rendering device provided by an embodiment of the present invention can be specific hardware on a device or software or firmware installed on the device, etc. For the device provided by the embodiment of the present invention, its implementation principle and the technical effects produced are the same as those of the foregoing method embodiment. For the sake of brief description, for the parts not mentioned in the device embodiment, reference can be made to the corresponding content in the foregoing method embodiment. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the foregoing described systems, devices, and units can all refer to the corresponding processes in the foregoing method embodiment, and will not be elaborated herein.

[0103] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some communication interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.

[0104] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0105] In addition, the functional units in the embodiments provided by the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.

[0106] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or this part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, etc., which can store program codes.

[0107] It should be noted that like reference numerals and letters indicate like items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used for descriptive distinction and should not be construed as indicating or implying relative importance.

[0108] Finally, it should be noted that the above-described embodiments are only specific embodiments of the present invention, used to illustrate the technical solutions of the present invention, rather than limiting it. The protection scope of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that any person skilled in the art within the technical scope disclosed by the present invention can still modify the technical solutions described in the foregoing embodiments or can easily think of changes, or make equivalent replacements for some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. All should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A model rendering method, characterized in that, The method includes: Splitting each face of the target cells in the CAE model into triangular patches, where the target cells include all two-dimensional cells and all three-dimensional cells in the CAE model; Constructing all the triangular patches into the face geometry of the target cells according to the vertex coordinates of the target cells; Storing the face geometry, the first line geometry, and the second line geometry as the candidate model file content of the candidate 3D model, where the first line geometry is constructed according to the edge lines of the target cells, the edge lines are generated according to the vertex coordinates of the target cells using a preset edge line connection rule, and the second line geometry is constructed according to the one-dimensional cells in the CAE model; Rendering the candidate model file content using the WebGL engine to display the candidate 3D model on the Web side.

2. The method according to claim 1, wherein Before splitting each face of the target cells in the CAE model into triangular patches, the method further includes: Determining the cells with a line structure in the CAE model as the one-dimensional cells; Determining the cells with a face structure in the CAE model as the two-dimensional cells; Determining the cells with a body structure in the CAE model as the three-dimensional cells.

3. The method according to claim 1, characterized in that, After storing the face geometry, the first line geometry, and the second line geometry as the candidate model file content of the candidate 3D model, the method further includes: Uploading the candidate model file content to the cloud file library on the cloud server so that all users who can access the cloud server can obtain the candidate model file content from the cloud file library.

4. The method according to claim 1, characterized in that, After rendering the candidate model file content using the WebGL engine to display the candidate 3D model on the Web side, the method further includes: Adding target rendering data to the candidate model file content to obtain the target model file content of the target 3D model, where the target rendering data is the rendering data for modifying the rendering effect of the candidate 3D model to the rendering effect of the target 3D model; Rendering the target model file content using the WebGL engine to display the target 3D model on the Web side.

5. A model rendering device, characterized in that, The device includes: A triangular patch determination module, configured to split each face of the target cells in the CAE model into triangular patches, where the target cells include all two-dimensional cells and all three-dimensional cells in the CAE model; A face geometry determination module, configured to construct all the triangular patches into the face geometry of the target cells according to the vertex coordinates of the target cells; A first candidate model file content storage module, configured to store the face geometry, the first line geometry, and the second line geometry as the candidate model file content of the candidate 3D model, where the first line geometry is constructed according to the edge lines of the target cells, the edge lines are generated according to the vertex coordinates of the target cells using a preset edge line connection rule, and the second line geometry is constructed according to the one-dimensional cells in the CAE model; A candidate model file content rendering module, which is used to render the content of the candidate model file by using a WebGL engine, so as to display the candidate 3D model on the Web side.

6. The device according to claim 5, characterized in that, The device further includes: A one-dimensional unit determination module, which is used to determine the units with a line structure in the CAE model as the one-dimensional units before splitting each face of the target unit in the CAE model into triangular patches; A two-dimensional unit determination module, which is used to determine the units with a face structure in the CAE model as the two-dimensional units; A three-dimensional unit determination module, which is used to determine the units with a volume structure in the CAE model as the three-dimensional units.

7. The device according to claim 5, characterized in that, The device further includes: A second candidate model file content storage module, which is used to upload the candidate model file content to the cloud file library on the cloud server after storing the face geometry, the first line geometry, and the second line geometry as the candidate model file content of the candidate 3D model, so that all users who can access the cloud server can obtain the candidate model file content from the cloud file library.

8. The device according to claim 5, wherein The device further includes: A target model file content determination module, which is used to add target rendering data to the candidate model file content to obtain the target model file content of the target 3D model after rendering the candidate model file content by using a WebGL engine to display the candidate 3D model on the Web side, where the target rendering data is the rendering data for modifying the rendering effect of the candidate 3D model to the rendering effect of the target 3D model; A target model file content rendering module, which is used to render the target model file content by using the WebGL engine to display the target 3D model on the Web side.

9. A computer device, characterized in that, It includes: A processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device runs, the processor communicates with the memory through the bus. When the machine-readable instructions are executed by the processor, the steps of the model rendering method according to any one of claims 1 to 4 are executed.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is run by the processor, the steps of the model rendering method according to any one of claims 1 to 4 are executed.

Citation Information

Patent Citations

  • Finite element mesh optimization method and device based on deep reinforcement learning and medium

    CN113221403A

  • Parameterizing a 3D modeled object for tessellation

    US20140184599A1