Civil aircraft CAD model mesh generation method and system based on Web end and medium
By receiving civilian CAD model files on the web, using the communication service called remote procedure to perform grid division and conversion, the problem that Gmsh cannot generate gltf files is solved, and the grid division and three-dimensional rendering of civilian CAD model is realized, reducing the Commercial software authorization restrictions are provided to meet customized development needs.
Patent Information
- Application Number
- CN202411356788.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-14
AI Technical Summary
In the prior art, the meshing tool for civilian CAD models is mainly commercial software, which limits flexible office and customized development. Open source software such as Gmsh cannot generate gltf format files, affecting web page loading and rendering.
Provide a method of grid division of civilian CAD model based on the web. By receiving step format files, using the communication service called remote procedure call three-dimensional finite element grid generation components for grid division, and converting the results into gltf format files. Performing three-dimensional rendering solves the problem that the Gmsh library cannot generate gltf files.
It realizes grid division and three-dimensional rendering of civilian CAD models on the web side, reduces the restrictions on commercial software authorization, meets customized development needs, and improves system compatibility and engineering collaboration efficiency.
Smart Images

Figure CN119312476A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer simulation, and in particular to a method and system for meshing a civil aircraft CAD model based on a Web terminal, and a medium. Background Art
[0002] Meshing is the basis of finite element simulation. Factors such as mesh type, density and quality will directly affect the accuracy of simulation results. Effective meshing of CAD models helps to obtain solutions that are closer to the real solution.
[0003] In the field of civil aircraft, the meshing tools for CAD models are mainly commercial software HyperMesh and ANSA, both of which are desktop client software that require the purchase of corresponding software licenses before use. Not only is the software's useful life limited by the purchase of software licenses, but the software also requires manual installation and updates, which is time-consuming and labor-intensive and not conducive to flexible office requirements. In addition, customized user needs need to be implemented through secondary development, which is highly dependent on system compatibility, and the core technology is not open, which creates obstacles to secondary development work.
[0004] In the prior art, there are open source software for meshing CAD models, such as Gmsh, TetGen, NetGen and other open source software and algorithm libraries, which support development in languages such as C++ and Python, and support operating systems such as Windows and Linux. It supports two-dimensional and three-dimensional meshing of geometry, generates finite element meshes that meet user needs, and supports mesh optimization. For example, the gmsh open source library supports the import of step model files for meshing, but does not support the direct generation of gltf format model files from the meshing results, which is not convenient for loading and rendering on web pages, seriously affecting the use of civil aircraft CAD models.
[0005] Based on the above problems, the applicant proposed the technical solution of this application. Summary of the invention
[0006] In view of the above-mentioned defects of the prior art, the present invention provides a civil aircraft CAD model meshing method, system and medium based on the Web, which realizes the meshing, model conversion and three-dimensional rendering of the civil aircraft CAD model on the Web, and solves the problem that the gmsh library cannot generate gltf files.
[0007] In order to achieve the above object, the present invention discloses a method for meshing a civil aircraft CAD model based on a Web terminal, comprising the following steps:
[0008] Receiving a civil aircraft CAD model file uploaded on a Web end, and storing the civil aircraft CAD model file on a server end, wherein the file data format of the civil aircraft CAD model file is a step format file;
[0009] Calling a three-dimensional finite element mesh generation component through a remote procedure call communication service, specifying the three-dimensional finite element mesh generation component to mesh the civil aircraft CAD model file according to preset meshing parameters to obtain a mesh model after meshing, wherein the mesh model after meshing includes a meshing element set;
[0010] Converting the mesh model into an initial model according to the divided mesh model and the mesh division element set, generating an initial model file according to the initial model, converting the file data format of the initial model file into a gltf format file, and transmitting the initial model file to a server;
[0011] The three-dimensional rendering component is called on the server side to perform three-dimensional rendering on the initial model file, and the three-dimensional rendering result is displayed on the Web side.
[0012] Preferably, the remote procedure call communication service is specifically a grpc service, and the three-dimensional finite element mesh generation component is specifically a gmsh library based on the C++ language.
[0013] Preferably, the step of specifying the three-dimensional finite element mesh generation component to mesh the civil aircraft CAD model file according to preset meshing parameters comprises the following steps:
[0014] Load the gmsh library based on C++ language, initialize the gmsh library, create and name a new mesh model;
[0015] Importing the civil aircraft CAD model file by calling the importShapes function of the gmsh library, and synchronizing the civil aircraft CAD model file with the mesh model;
[0016] The maximum grid size and the minimum grid size of the grid division are set, and the generate function of the gmsh library is called to generate a grid model after grid division based on the new gmsh model.
[0017] Preferably, converting the mesh model into an initial model according to the divided mesh model and the mesh division element set comprises the following steps:
[0018] Initialize and create a gltf model, call the getElements function of the gmsh library to get all the point elements, line elements and surface elements in the mesh model after meshing;
[0019] Call the getNodesByElementType function and getNodes function of the gmsh library respectively to obtain the coordinate sets corresponding to all point elements, line elements and surface elements in the grid model;
[0020] Based on the coordinate set, the gltf model is loaded, and point elements, line elements and surface elements in the gltf model are generated respectively;
[0021] Pre-set the gltf model asset.version and asset.generator, combine and load the scene, buffer, and asset generated by the point elements, line elements, and surface elements in the gltf model into the gltf model, call the WriteGltfSceneToFile function, and use the final generated gltf model as the initial model.
[0022] Preferably, the point elements in the gltf model are generated in the following manner:
[0023] Creating a point structure, wherein the point structure is used to store the three-dimensional coordinate points in the coordinate set;
[0024] Call a point loading function, where the point loading function is used to load the three-dimensional coordinate point into the buffer data of the gltf model.
[0025] Preferably, the line elements in the gltf model are generated in the following manner:
[0026] Calling a line conversion function, wherein the line conversion function is used to convert the single three-dimensional point coordinates corresponding to all line elements into a line coordinate point set consisting of two three-dimensional point coordinates as a group;
[0027] The line loading function is called, and the line loading function loads the data information contained in each group of line coordinate points into the gltf model in sequence according to the set order to generate line elements in the gltf model.
[0028] Preferably, the surface elements in the gltf model are generated in the following manner:
[0029] Calling a face conversion function, wherein the face conversion function is used for a set of three-dimensional face coordinate points corresponding to all face elements;
[0030] The surface loading function is called, and the surface loading function loads the data information contained in the three-dimensional surface coordinate points into the gltf model in sequence according to the set order to generate the surface elements in the gltf model.
[0031] Preferably, calling a three-dimensional rendering component on the server side to perform three-dimensional rendering on the initial model file comprises the following steps:
[0032] Call the initial model file in gltf format through the grpc service, and transfer the initial model file to the server;
[0033] The GLTFLoader function of the three.js component is called to load the initial model file and perform three-dimensional rendering.
[0034] The present invention also discloses a civil aircraft CAD model meshing system based on a Web terminal, comprising:
[0035] A file receiving module, used for receiving a civil aircraft CAD model file uploaded on a Web end, and storing the civil aircraft CAD model file on a server end, wherein the file data format of the civil aircraft CAD model file is a step format file;
[0036] A meshing module, used to call a three-dimensional finite element mesh generation component through a remote procedure call communication service, and specify the three-dimensional finite element mesh generation component to mesh the civil aircraft CAD model file according to preset meshing parameters to obtain a mesh model after meshing, wherein the mesh model after meshing includes a meshing element set;
[0037] A model conversion module, used for converting the mesh model into an initial model according to the divided mesh model and the mesh division element set, generating an initial model file according to the initial model, converting the file data format of the initial model file into a gltf format file, and transmitting the initial model file to a server;
[0038] The three-dimensional rendering module is used to call the three-dimensional rendering component on the server side, perform three-dimensional rendering on the initial model file, and display the three-dimensional rendering result on the Web side.
[0039] The present invention discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is processed and executed, the above-mentioned Web-based civil aircraft CAD model meshing method is implemented.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] The present invention receives a civil aircraft CAD model file in step format through a Web terminal, meshes the civil aircraft CAD model file, generates a gltf format file based on the point, line, and surface elements obtained by the meshing, performs three-dimensional rendering on the server side, and displays the rendered result on the Web side, thereby solving the problem that the gmsh library cannot generate a gltf format file, greatly reducing the authorization restrictions of commercial software on the meshing function, and being conducive to meeting customized development needs.
[0042] The concept, specific structure and technical effects of the present invention will be further described below in conjunction with the accompanying drawings to fully understand the purpose, characteristics and effects of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a flow chart of the web-based civil aircraft CAD model meshing method of the present invention. DETAILED DESCRIPTION
[0044] In order to make the technical means, creative features, objectives and effects of the invention easier to understand, the invention is further described below with reference to specific diagrams. However, the invention is not limited to the following implementation cases.
[0045] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with this technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantive technical significance. Any structural modification, change in proportion or adjustment of size, without affecting the effects and purposes that can be achieved by the present invention, should still fall within the scope of the technical contents disclosed by the present invention.
[0046] Existing CAD model meshing tools are mainly divided into commercial software, open source software and open source libraries, etc. However, these tools have some objective shortcomings. Client software is highly dependent on system compatibility and needs to be manually installed and updated, which makes it difficult to adapt to more flexible office scenarios. For commercial software, the software life is limited by the purchase of software licenses. For some users with personalized needs, secondary development is required, but when calling the API running in a black box mode, the technical details cannot be clarified, and the management and maintenance of subsequent algorithms are still highly dependent on software authorization. For civil aircraft CAD model files in step format, after using gmsh for meshing, sltf files cannot be directly generated, which is not convenient for loading and rendering on the web page. Therefore, it is necessary to develop a suitable meshing and web rendering method for civil aircraft CAD model files on the web page, so as to realize the functions of meshing, model conversion and three-dimensional rendering of civil aircraft CAD models on the Web page.
[0047] like Figure 1 As shown, the present invention discloses a method for meshing a civil aircraft CAD model based on a Web terminal, comprising the following steps:
[0048] Step S1, receiving a civil aircraft CAD model file uploaded on a Web terminal, wherein the file data format of the civil aircraft CAD model file is a step format file.
[0049] The step file format is a data exchange standard widely used in engineering and manufacturing industries. It is mainly used to exchange product and manufacturing information (PMI) between different computer-aided design (CAD), computer-aided manufacturing (CAM), computer-aided engineering (CAE) and computer-aided quality control (CMM) software. Upload the civil aircraft CAD model file in step format directly on the web page of the Web end. The file extension of the civil aircraft CAD model file is .stp or .step. The civil aircraft CAD model file contains the product's geometric information, topological structure, material properties, manufacturing process information, product specifications and tolerances, etc., and can express complex three-dimensional models, including solid, surface and wireframe models. By directly receiving the uploaded CAD model file on the Web end and storing the civil aircraft CAD model file on the server end, it is beneficial to improve the compatibility and operability of the system, ensure that the design content in the file will not be lost during the transmission process, and improve the efficiency of engineering collaboration.
[0050] Step S2, calling the three-dimensional finite element mesh generation component through the remote procedure call communication service, specifying the three-dimensional finite element mesh generation component to mesh the civil aircraft CAD model file according to preset meshing parameters to obtain a mesh model after meshing.
[0051] The divided mesh model includes a mesh division element set, the remote procedure call communication service is specifically a grpc service, and the three-dimensional finite element mesh generation component is specifically a gmsh library based on the C++ language.
[0052] The grpc service is a high-performance, open source remote procedure call (RPC) framework originally developed by Google and later became part of the Cloud Native Computing Foundation (CNCF). The grpc service provides an efficient and reliable way to implement inter-service communication in a microservice architecture. The grpc service is built on top of the HTTP / 2 protocol, taking advantage of its multiplexing, header compression, and bidirectional streaming features to improve performance and efficiency. Supports streaming communication, allowing clients and servers to send and receive data streams instead of just single requests and responses. The gmsh component or gmsh library is an automatic 3D finite element mesh generator with a built-in CAD engine and post-processor, released under GPL. In terms of mesh quality, the gmsh component is comparable to commercial mesh engines. The gmsh component is built around four modules: geometry, mesh, solver, and post-processing. Module input can be done interactively using the UI interface, or in ASCII text files using the gmsh component's own scripting language (.geo files), or using C++, C, Python, or Julia APIs.
[0053] Specifically, the civil aircraft CAD model file is meshed by the gmsh component based on the C++ language. The following steps are performed: first, the gmsh component based on the C++ language is loaded, the gmsh component is initialized, a new mesh model is created and named, and then the importShapes function of the gmsh component is called to import the civil aircraft CAD model file, and the civil aircraft CAD model file is synchronized with the mesh model. After the synchronization between the CAD entity and the gmsh component is completed, the maximum mesh size Max Mesh and the minimum mesh size Min Mesh of the mesh division are set. Finally, the generate function of the gmsh component is called to generate a mesh model after mesh division, and the mesh model after division includes a mesh division element set.
[0054] Step S3, converting the mesh model into an initial model according to the mesh division element set, generating an initial model file according to the initial model, converting the file data format of the initial model file into a gltf format file, and transmitting the initial model file to the server.
[0055] Specifically, first initialize and create a gltf model, call the getElements function of the gmsh component, and get all the point elements, line elements, and surface elements in the mesh model after meshing, expressed as vertexElement, edgeElement, and faceElement. Then, call the getNodesByElementType function of the gmsh component to process the surface elements and line elements, and call the getNodes function to process the point elements, thereby obtaining the coordinate set corresponding to all the point elements, line elements, and surface elements in the mesh model.
[0056] It should be noted that the data structures of the coordinate sets of the point, line, and surface elements obtained here are all vectors defined by gmsh <double>, that is, [x1,y1,z1,x2,y2,z2,...,xn,yn,zn], so the data structure needs to be converted into a custom three-dimensional coordinate point set, that is, the point structure myPoint. If not converted, subsequent data processing will be quite cumbersome.
[0057] Then, process the surface elements, line elements and point elements respectively. For example, process the surface elements, line elements and point elements respectively, initialize the node, mesh, primitive, accessor and bufferView according to the format characteristics of the gltf file, then update the buffer and offset, and finally load the data elements contained in all three-dimensional coordinate points into the gltf model in the order of bufferView, accessor, primitive, mesh, node and scene, and generate the surface elements, line elements and point elements in the gltf model respectively.
[0058] Finally, set the gltf model asset.version and asset.generator, load the scene and buffer generated by the point elements, line elements and surface elements in the gltf model into the gltf model, set the material of the point, line and surface elements respectively and load them into the gltf model, call the WriteGltfSceneToFile function, and use the final generated gltf file as the initial model file. And call the finalize function of gmsh to release resources and end the above call.
[0059] When generating a point element in a gltf model, it is necessary to create a point structure myPoint, which is used to store the three-dimensional coordinate points in the coordinate set. The point structure myPoint is specifically:
[0060] Struct myPoint{
[0061] double x;
[0062] double y;
[0063] double z;
[0064] }
[0065] After the three-dimensional coordinate points are stored, the point loading function addPointsToBuffer is called, and the point loading function is used to load the three-dimensional coordinate points into the buffer data of the gltf model.
[0066] Then, the face elements are processed. That is, according to the format characteristics of the gltf file, the node, mesh, primitive, accessor and bufferView are initialized through the processFaces function, and the buffer and offset are updated through the addPointsToBuffer function. Finally, the data elements contained in all three-dimensional coordinate points are loaded into the gltfmodel in the order of bufferView, accessor, primitive, mesh, node, and scene (the order cannot be changed and is performed in sequence), and the mesh name is named "Triangle" to generate the face elements in the gltf model.
[0067] The processFacePoints function is used to process the face elements, and the single 3D point coordinates corresponding to all face elements are converted into a set of two 3D coordinate points, namely faceEdgePoints. The ProcessFacesEdges function is used to initialize the node, mesh, primitive, accessor and bufferView according to the format characteristics of the gltf file, and then the addPointsToBuffer function is used to update the buffer and offset. Finally, the data information contained in all 3D coordinate points is loaded into the gltf model in the order of bufferView, accessor, primitive, mesh, node, and scene (the order cannot be changed and is carried out in sequence), and the mesh name is named "Face Line" (meaning the line in the face element, used to distinguish the line element), and the line element in the gltf model is generated.
[0068] Then, the line elements are processed to generate the line elements in the gltf model. That is, the processEdges function is used to initialize the node, mesh, primitive, accessor and bufferView according to the format characteristics of the gltf file, and the buffer and offset are updated through the addPointsToBuffer function. Finally, the data information contained in all three-dimensional coordinate points is loaded into the gltf model in the order of bufferView, accessor, primitive, mesh, node, and scene (the order cannot be changed and is performed in sequence), and the mesh name is named "Edge Line" to generate the line elements in the gltf model.
[0069] When processing point elements, the processCoords2Points function is used to process the point elements to obtain the set of three-dimensional coordinate points corresponding to all point elements. Then, according to the format characteristics of the gltf file, the node, mesh, primitive, accessor and bufferView are initialized, and the buffer and offset are updated through the addPointsToBuffer function. Finally, the data information contained in all three-dimensional coordinate points is loaded into the gltf model in the order of bufferView, accessor, primitive, mesh, node, and scene (the order cannot be changed and is performed in sequence), and the mesh name is named "Vertex" to generate the point elements in the gltf model.
[0070] In some examples, the surface elements, line elements, and point elements are further processed. For example, after obtaining the set of three-dimensional coordinate points corresponding to all line elements, the following processing is performed:
[0071] (1) Initialize and create a gltf model.
[0072] (2) Call the getElements method of gmsh to obtain all the point, line, and surface elements in the divided mesh model.
[0073] (3) Call the getNodesByElementType method of gmsh to obtain the coordinate sets of all surface and line elements respectively. Call the getNodes method of gmsh to obtain the coordinate sets of all point elements.
[0074] (4) Define the "myPoint" structure to store three-dimensional coordinate points.
[0075] (5) Define the "addPointsToBuffer" method point loading function to load a series of three-dimensional coordinate points into the buffer data of gltfmodel.
[0076] (6) Process the surface elements to obtain the corresponding coordinate point set, obtain the surface and line element data information after processing, and load it into the gltf model to generate the surface and line elements in the gltf model.
[0077] (7) Process the line elements to obtain the corresponding coordinate point set. After processing, the line element data information is obtained and loaded into the gltf model to generate the line elements in the gtlf file.
[0078] (8) Process the point elements to obtain the corresponding three-dimensional coordinate point set. After processing, the point element data information is obtained and loaded into the gltf model to generate the point elements in the gltf model.
[0079] (9) Set the asset.version and asset.generator of the gltf model, and combine the scene and buffer generated by the above point, line, and surface elements into the gltf model.
[0080] (10) Set the material of the point, line, and surface elements respectively, and load them into the gltf model
[0081] (11) Call the WriteGltfSceneToFile method of gltf to generate the final gltf format file
[0082] (12) Call the finalize method of gmsh to end the call
[0083] After generating the final gltf format file, the finalize method of the gmsh component will be called to release resources.
[0084] It should be noted that the point elements in this embodiment include:
[0085] (1) A number of points obtained by dividing a surface (composed of endpoints, lines, and surfaces) (for example, a quadrilateral surface is divided into n surfaces, and eventually more points, lines, and surfaces are obtained)
[0086] (2) A number of points obtained by splitting a line (consisting of endpoints and lines) (for example, a line is split into n lines, and eventually more points and lines will be obtained)
[0087] (3) Points (points that already exist in the original CAD model, which cannot be further divided, but do not disappear after meshing)
[0088] Line elements include: several lines obtained after line segmentation and several lines obtained after surface segmentation.
[0089] Surface elements include several surfaces obtained after surface segmentation.
[0090] Step S4, calling a three-dimensional rendering component on the server side, performing three-dimensional rendering on the initial model file, and displaying the three-dimensional rendering result on the Web side.
[0091] Specifically, the initial model file in gltf format is called through the grpc service, and the initial model file is transmitted to the server side. Then the GLTFLoader function of the three.js component is called to load the initial model file and perform three-dimensional rendering.
[0092] The second embodiment of the present invention discloses a civil aircraft CAD model meshing system based on a Web terminal, including a file receiving module, a meshing module, a model conversion module, and a three-dimensional rendering module.
[0093] The file receiving module is used to receive a civil aircraft CAD model file on a Web terminal, wherein the file data format of the civil aircraft CAD model file is a step format file.
[0094] The meshing module is used to call the three-dimensional finite element mesh generation component through the communication service of the remote procedure call, and specify the three-dimensional finite element mesh generation component to mesh the civil aircraft CAD model file according to the preset partitioning parameters to obtain a mesh model, which includes a meshing element set.
[0095] The model conversion module is used to generate an initial model according to the grid model and the grid division element set, generate an initial model file according to the initial model, convert the file data format of the initial model file into a gltf format file, and transmit the initial model file to the server.
[0096] The three-dimensional rendering module is used to call the three-dimensional rendering component on the server side, perform three-dimensional rendering on the initial model file, and display the three-dimensional rendering result on the Web side.
[0097] Since the first embodiment corresponds to this embodiment, this embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in this embodiment, and the technical effects that can be achieved in the first embodiment can also be achieved in this embodiment. In order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the first embodiment.
[0098] The third embodiment of the present invention relates to a computer-readable storage medium having a computer program / instruction stored thereon, wherein the computer program / instruction implements the steps of the method in the first embodiment when executed by a processor.
[0099] The preferred specific embodiments of the present invention are described in detail above. It should be understood that ordinary technicians in the field can make many modifications and changes based on the concept of the present invention without creative work. Therefore, all technical solutions that can be obtained by technicians in the technical field based on the concept of the present invention through logical analysis, reasoning or limited experiments on the basis of the prior art should be within the scope of protection determined by the claims.< / double>
Claims
1. A web-based civil aircraft CAD model meshing method, characterized in that: The following steps are involved: Receiving a civil aircraft CAD model file uploaded on a Web end, and storing the civil aircraft CAD model file on a server end, wherein the file data format of the civil aircraft CAD model file is a step format file; Calling a three-dimensional finite element mesh generation component through a remote procedure call communication service, specifying the three-dimensional finite element mesh generation component to mesh the civil aircraft CAD model file according to preset meshing parameters to obtain a mesh model after meshing, wherein the mesh model after meshing includes a meshing element set; Converting the mesh model into an initial model according to the divided mesh model and the mesh division element set, generating an initial model file according to the initial model, converting the file data format of the initial model file into a gltf format file, and transmitting the initial model file to a server; The three-dimensional rendering component is called on the server side to perform three-dimensional rendering on the initial model file, and the three-dimensional rendering result is displayed on the Web side.
2. The method for meshing a civil aircraft CAD model based on a Web terminal according to claim 1, characterized in that: The communication service of the remote procedure call is specifically the grpc service, and the three-dimensional finite element mesh generation component is specifically the gmsh library based on the C++ language.
3. The method for meshing a civil aircraft CAD model based on a Web terminal according to claim 2, characterized in that: The step of specifying the three-dimensional finite element mesh generation component to mesh the civil aircraft CAD model file according to preset meshing parameters comprises the following steps: Load the gmsh library based on C++ language, initialize the gmsh library, create and name a new gmsh model; Importing the civil aircraft CAD model file by calling the importShapes function of the gmsh library, and synchronizing the civil aircraft CAD model file with the gmsh model; The maximum grid size and the minimum grid size of the grid division are set, and the generate function of the gmsh library is called to generate a grid model after grid division based on the new gmsh model.
4. The method for meshing a civil aircraft CAD model based on a Web terminal according to claim 1, characterized in that: The step of converting the mesh model into an initial model according to the divided mesh model and the mesh division element set comprises the following steps: Initialize and create a gltf model, call the getElements function of the gmsh library to get all the point elements, line elements and surface elements in the mesh model after meshing; Call the getNodesByElementType function and getNodes function of the gmsh library respectively to obtain the three-dimensional coordinate point set corresponding to all point elements, line elements and surface elements in the grid model; Based on the three-dimensional coordinate point set, the gltf model is loaded, and point elements, line elements and surface elements in the gltf model are generated respectively; Pre-set the gltf model asset.version and asset.generator, combine and load the scene and buffer generated by the point elements, line elements and surface elements in the gltf model into the gltf model, call the WriteGltfSceneToFile function, and use the finally generated gltf model as the initial model.
5. The method for meshing a civil aircraft CAD model based on a Web terminal according to claim 4, characterized in that: The point elements in the gltf model are generated in the following way: Creating a point structure, wherein the point structure is used to store the three-dimensional coordinate points in the coordinate set; Call a point loading function, where the point loading function is used to load the three-dimensional coordinate point into the buffer data of the gltf model.
6. The method for meshing a civil aircraft CAD model based on a Web terminal according to claim 4, characterized in that: The line elements in the gltf model are generated in the following way: Calling a line conversion function, wherein the line conversion function is used to convert the single three-dimensional point coordinates corresponding to all line elements into a line coordinate point set consisting of two three-dimensional point coordinates as a group; The line loading function is called, and the line loading function loads the data information contained in each group of line coordinate points into the gltf model in sequence according to the set order to generate line elements in the gltf model.
7. The method for meshing a civil aircraft CAD model based on a Web terminal according to claim 4, characterized in that: The surface elements in the gltf model are generated in the following way: Calling a face conversion function, wherein the face conversion function is used for a set of three-dimensional face coordinate points corresponding to all face elements; The surface loading function is called, and the surface loading function loads the data information contained in the three-dimensional surface coordinate points into the gltf model in sequence according to the set order to generate the surface elements in the gltf model.
8. The method for meshing a civil aircraft CAD model based on a Web terminal according to claim 1, characterized in that: The method of calling the three-dimensional rendering component on the server side to perform three-dimensional rendering on the initial model file includes the following steps: Call the initial model file in gltf format through the grpc service, and transfer the initial model file to the server; The GLTFLoader function of the three.js component is called to load the initial model file and perform three-dimensional rendering.
9. A civil aircraft CAD model meshing system based on a Web terminal, characterized in that: include: A file receiving module, used for receiving a civil aircraft CAD model file uploaded on a Web end, and storing the civil aircraft CAD model file on a server end, wherein the file data format of the civil aircraft CAD model file is a step format file; A meshing module, used to call a three-dimensional finite element mesh generation component through a remote procedure call communication service, and specify the three-dimensional finite element mesh generation component to mesh the civil aircraft CAD model file according to preset meshing parameters to obtain a mesh model after meshing, wherein the mesh model after meshing includes a meshing element set; A model conversion module, used for converting the mesh model into an initial model according to the divided mesh model and the mesh division element set, generating an initial model file according to the initial model, converting the file data format of the initial model file into a gltf format file, and transmitting the initial model file to a server; The three-dimensional rendering module is used to call the three-dimensional rendering component on the server side, perform three-dimensional rendering on the initial model file, and display the three-dimensional rendering result on the Web side.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which, when processed and executed, implements the Web-based civil aircraft CAD model meshing method as described in any one of claims 1 to 8.