WebGL-based highway and railway parameterized dynamic modeling method
By using a WebGL-based parametric dynamic modeling method to generate and render 3D models of highways and railways, the problem of traditional methods relying on specialized software is solved, achieving cross-platform, low-cost, and efficient modeling.
Patent Information
- Application Number
- CN202411176382.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-11-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing 3D modeling methods rely on specialized software, resulting in high modeling difficulty and cost, making them difficult for ordinary users and small and medium-sized enterprises to widely apply.
A WebGL-based parametric dynamic modeling method is adopted, which generates geometry through a BIM Geometry generator and renders the 3D scene in the browser using a WebGL renderer. Combined with CSG Boolean operations and server-side calculations, cross-platform and low-cost modeling is achieved.
It reduces the difficulty of modeling, enables cross-platform operation, reduces dependence on professional software, lowers modeling costs, and improves modeling efficiency and accuracy.
Smart Images

Figure CN118965541A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of highway and railway modeling, and in particular relates to the design of a highway and railway parameterized dynamic modeling method based on WebGL. Background Art
[0002] With the rapid development of computer graphics, 3D modeling technology has been widely used in the fields of highway and railway engineering. Traditional 3D modeling methods usually rely on professional modeling software and high-performance computing equipment, and the modeling efficiency is generally not high. In addition, the proficiency and skills required for modeling software are also high, which poses high technical and economic barriers to ordinary users and small and medium-sized enterprises.
[0003] WebGL (Web Graphics Library) is a browser-based graphics rendering technology that allows complex 3D graphics to be rendered directly in the browser through JavaScript without installing any plug-ins. The emergence of WebGL makes lightweight 3D graphics rendering possible, allowing users to interact and display 3D graphics on any device that supports modern browsers. Summary of the invention
[0004] The purpose of the present invention is to solve the problems of high modeling difficulty and high cost caused by reliance on professional software in existing modeling methods, and propose a road and railway parametric dynamic modeling method based on WebGL.
[0005] The technical solution of the present invention is: a WebGL-based road and railway parametric dynamic modeling method, comprising the following steps:
[0006] S1. Obtaining linear parameters and unit project parameters according to the type of highway and railway unit project;
[0007] S2. Create BIM Geometry generators according to different unit project types;
[0008] S3. Generate the geometry of the unit engineering component according to the line type parameters and the unit engineering parameters using the BIM Geometry generator;
[0009] S4. According to the geometry of the unit engineering component, the geometry is rendered into a three-dimensional scene using a WebGL renderer to obtain a three-dimensional model of the highway and railway unit engineering;
[0010] S5. Modify and optimize the three-dimensional modeling to complete the parametric dynamic modeling of roads and railways.
[0011] The beneficial effects of the present invention are:
[0012] 1. The parametric dynamic modeling method proposed in the present invention effectively reduces the difficulty of modeling.
[0013] 2. The WebGL-based modeling method proposed in the present invention can be run on any device that supports a modern browser, thus achieving cross-platform operation.
[0014] 3. The present invention separates computing from rendering by adopting a server-side computing and a Web-side rendering method, thereby achieving a faster computing speed.
[0015] Preferably, the line type parameters in step S1 include an elevation element table, an element table and a broken link table;
[0016] The elevation element table includes intersection pile number, intersection elevation, vertical curve radius, longitudinal slope, angle, tangent length and curve main point mileage data;
[0017] The element table includes intersection coordinates, intersection stake numbers, circular curve radius and transition curve data;
[0018] The broken chain table includes total mileage, measurement pile number, broken chain pile number, broken chain growth, broken chain shortening, broken chain accumulation and converted continuous mileage data.
[0019] The beneficial effects of the above preferred solution are:
[0020] Line type is the basis for drawing BIM models of highway and railway projects. This preferred solution uses the elevation feature table, the second feature table and the broken link table as line type parameters, which reduces the difficulty of modeling and helps to build more accurate three-dimensional models of highway and railway projects.
[0021] Preferably, the unit engineering parameters in step S1 include foundation parameters and structural parameters;
[0022] The basic parameters include the starting pile number, the ending pile number and the left and right width information;
[0023] The beneficial effects of the above preferred solution are:
[0024] This preferred solution comprehensively considers basic parameters and structural parameters, realizes the distinction between unit project types, reduces the difficulty of modeling, and helps to build more accurate three-dimensional models of highway and railway projects.
[0025] Preferably, when creating the BIM Geometry generator in step S2, different BIM Geometry generators are created according to different unit project types, Bridge Geometry Generators are created for bridges, Tunnel Geometry Generators are created for tunnels, and Roadbed Geometry Generators are created for roadbeds.
[0026] The beneficial effects of the above preferred solution are:
[0027] Selecting different BIM Geometry generators according to different unit project types and generating component geometries that meet the needs of different unit projects will help build more accurate three-dimensional models of highway and railway projects.
[0028] Preferably, the step S3 specifically comprises the following steps:
[0029] S31. Instantiate the coordinate manager and read the line type parameters and unit engineering parameters;
[0030] S32. For different parts of different structures of the unit project, instantiate the corresponding model generator;
[0031] S33. Generate corresponding geometric bodies according to the line type parameters and unit engineering parameters using the model generators corresponding to different structural parts.
[0032] Preferably, when the WebGL renderer is used to render the geometry into the three-dimensional scene in step S4, the component needs to be Booleaned, and the Boolean uses CSG, specifically: the geometry is converted into CSG and stored in a stack; the CSG in the stack is read in sequence and Booleaned with the previous CSG to obtain a Booleaned result; the Booleaned result is Booleaned with the next CSG until all elements in the stack are traversed, and the last Boolean result is converted into a geometry to obtain a Booleaned geometry; the Booleaned geometry is added to the model queue to complete the model Boolean.
[0033] Preferably, the step S4 specifically comprises the following steps:
[0034] S41. parsing the geometric information of the component through the Web end, generating a stretched geometry and a cylindrical geometry according to different types of the geometry of the component, and storing the stretched geometry and the cylindrical geometry in a network visualization tool;
[0035] S42. Use the WebGL renderer to read the geometry stored in the model queue, and render the geometry into a three-dimensional scene to obtain a three-dimensional model of the highway and railway unit project.
[0036] The beneficial effects of the above preferred solution are:
[0037] Through this preferred solution, rendering is performed on the Web side, which can achieve efficient real-time rendering and effectively reduce the cost of modeling.
[0038] Preferably, the modification of the model in step S5 is specifically as follows: recalculating and drawing the components that need to be modified; searching the influence domain of the components according to the action chain to obtain a second-generation component queue that needs to be modified; traversing the component queue and redrawing the components in the component queue; repeating the above steps until all action chains are traversed to complete the model modification.
[0039] The beneficial effects of the above preferred solution are:
[0040] Through this preferred solution, the parameters of the model can be viewed in real time, and the model can be adjusted in time to obtain more accurate three-dimensional modeling. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 Shown is a flow chart of a WebGL-based parametric dynamic modeling method for highway and railway.
[0042] Figure 2 The figure shows a schematic diagram of the overall architecture of a WebGL-based road and railway parametric dynamic modeling method.
[0043] Figure 3 Shown is a schematic diagram of the model Boolean. DETAILED DESCRIPTION
[0044] Now, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be understood that the embodiments shown and described in the accompanying drawings are only exemplary and are intended to explain the principles and spirit of the present invention, rather than to limit the scope of the present invention.
[0045] like Figure 1 As shown, a WebGL-based road and railway parametric dynamic modeling method includes the following steps:
[0046] S1. Obtaining linear parameters and unit project parameters according to the type of highway and railway unit project;
[0047] S2. Create a BIM Geometry generator based on different unit project types;
[0048] S3. Generate the geometry of the unit engineering component according to the line type parameters and the unit engineering parameters using the BIM Geometry generator;
[0049] S4. According to the geometry of the unit engineering component, the geometry is rendered into a three-dimensional scene using a WebGL renderer to obtain a three-dimensional model of the highway and railway unit engineering;
[0050] S5. Modify and optimize the three-dimensional modeling to complete the parametric dynamic modeling of roads and railways.
[0051] In this embodiment, the line type parameters in step S1 include an elevation element table, an element table, and a broken link table;
[0052] The elevation element table includes intersection pile number, intersection elevation, vertical curve radius, longitudinal slope, angle, tangent length and curve main point mileage data;
[0053] The element table includes intersection coordinates, intersection stake numbers, circular curve radius and transition curve data;
[0054] The broken chain table includes total mileage, measurement pile number, broken chain pile number, broken chain growth, broken chain shortening, broken chain accumulation and converted continuous mileage data.
[0055] In this embodiment, the unit engineering parameters in step S1 include foundation parameters and structural parameters;
[0056] The basic parameters include the starting pile number, the ending pile number and the left and right width information;
[0057] In this embodiment, different structural parameters are selected according to different engineering structures. For bridge structures, the structural parameters include connection, span, section, support pad stone, cap beam, tie beam, pier body, pile foundation and abutment.
[0058] In this embodiment, if Figure 2 As shown, in step S2, the Web end and the back-end interface establish a WebSocket connection. When creating a BIM Geometry generator, the back-end interface uses different BIM Geometry generators according to different unit project types. Bridges use bridge geometry generators (Bridge Geometry Generators), tunnels use tunnel geometry generators (Tunnel Geometry Generators), and roadbeds use roadbed geometry generators (Roadbed Geometry Generators).
[0059] In this embodiment, when the BIM model is constructed on the Web side, and the BIM Geometry generator generates a geometric body, each time the generator generates a component geometric body, the geometric body information is sent to the Web side through a WebSocket connection. The step S3 specifically includes the following steps:
[0060] S31. Instantiate the coordinate manager and read the line type parameters and unit engineering parameters;
[0061] S32. For different parts of different structures of the unit project, instantiate the corresponding model generator;
[0062] S33. Generate corresponding geometric bodies according to the line type parameters and unit engineering parameters using the model generators corresponding to different structural parts.
[0063] In this embodiment, if Figure 3 As shown, in the step S4, when the WebGL renderer is used to render the geometry into the three-dimensional scene, the component needs to be Booleaned, and the Boolean is represented by voxel construction (Constructive Solid Geometry, CSG), specifically: the geometry is converted into CSG and stored in the stack; the CSG in the stack is read in sequence and Boolean operations are performed with the previous CSG to obtain the Boolean result; the Boolean result is Booleaned with the next CSG until all elements in the stack are traversed, and the last Boolean result is converted into a geometry to obtain the Boolean geometry; the Boolean geometry is added to the MeshVisualizer to complete the model Boolean.
[0064] In this embodiment, step S4 specifically includes the following steps:
[0065] S41. parsing the geometric information of the component through the Web end, generating a stretched geometry and a cylindrical geometry according to different types of the component geometry, and storing the stretched geometry and the cylindrical geometry in the MeshVisualizer;
[0066] S42. Use the WebGL renderer to read the geometric bodies stored in the MeshVisualizer, and render each geometric body into the three-dimensional scene in turn to obtain the three-dimensional modeling of the highway and railway unit project.
[0067] When the BIM Geometry generator has completed the generation of all components in the unit project, it disconnects the WebSocket link with the Web client.
[0068] In this embodiment, the modification of the model in step S5 is specifically as follows: recalculating and drawing the components that need to be modified; searching the influence domain of the components according to the action chain to obtain the second-generation component queue that needs to be modified; traversing the component queue and redrawing the components in the component queue; repeating the above steps to obtain the third-generation component queue that needs to be modified and the fourth-generation component queue that needs to be modified in turn, until all action chains are traversed to complete the model modification.
[0069] The present invention uses WebGL for modeling without relying on any professional modeling software, which reduces the cost of purchasing professional software and makes the access and sharing of models more convenient, so that users can design and modify them anytime and anywhere. And through the parametric dynamic modeling method, the modeling difficulty is effectively reduced. Through the separation mode of calculation and rendering, the modeling efficiency is improved while the requirements for the client computer are also reduced.
[0070] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A WebGL-based road and railway parametric dynamic modeling method, characterized in that: The following steps are involved: S1. Obtaining linear parameters and unit project parameters according to the type of highway and railway unit project; S2. Create BIM Geometry generators according to different unit project types; S3. Generate the geometry of the unit engineering component according to the line type parameters and the unit engineering parameters using the BIM Geometry generator; S4. According to the geometry of the unit engineering component, the geometry is rendered into a three-dimensional scene using a WebGL renderer to obtain a three-dimensional model of the highway and railway unit engineering; S5. Modify and optimize the three-dimensional modeling to complete the parametric dynamic modeling of roads and railways.
2. The WebGL-based road and railway parameterized dynamic modeling method according to claim 1, characterized in that: The line type parameters in step S1 include an elevation element table, an element table and a broken link table; The elevation element table includes intersection pile number, intersection elevation, vertical curve radius, longitudinal slope, angle, tangent length and curve main point mileage data; The element table includes intersection coordinates, intersection stake numbers, circular curve radius and transition curve data; The broken chain table includes total mileage, measurement pile number, broken chain pile number, broken chain growth, broken chain shortening, broken chain accumulation and converted continuous mileage data.
3. The WebGL-based road and railway parameterized dynamic modeling method according to claim 1, characterized in that: The unit engineering parameters in step S1 include foundation parameters and structural parameters; The basic parameters include the starting pile number, the ending pile number and the left and right width information.
4. The WebGL-based road and railway parameterized dynamic modeling method according to claim 1, characterized in that: When creating the BIM Geometry generator in step S2, different BIM Geometry generators are used according to different unit project types, Bridge Geometry Generators are used for bridges, Tunnel Geometry Generators are used for tunnels, and Roadbed Geometry Generators are used for roadbeds.
5. The WebGL-based road and railway parameterized dynamic modeling method according to claim 1, characterized in that: The step S3 specifically comprises the following steps: S31. Instantiate the coordinate manager and read the line type parameters and unit engineering parameters; S32. For different parts of different structures of the unit project, instantiate the corresponding model generator; S33. Generate corresponding geometric bodies according to the line type parameters and unit engineering parameters using the model generators corresponding to different structural parts.
6. The WebGL-based road and railway parameterized dynamic modeling method according to claim 1, characterized in that: When the WebGL renderer is used to render the geometric body into the three-dimensional scene in step S4, the component needs to be Booleaned, and the Boolean uses CSG, specifically: the geometric body is converted into CSG and stored in the stack; the CSG in the stack is read in sequence and Booleaned with the previous CSG to obtain the Booleaned result; the Booleaned result is Booleaned with the next CSG until all elements in the stack are traversed, and the last Boolean result is converted into a geometric body to obtain the Booleaned geometry; the Booleaned geometry is added to the model queue to complete the model Boolean.
7. The WebGL-based road and railway parameterized dynamic modeling method according to claim 1, characterized in that: The step S4 specifically comprises the following steps: S41. parsing the geometric information of the component through the Web end, generating a stretched geometry and a cylindrical geometry according to different types of the geometry of the component, and storing the stretched geometry and the cylindrical geometry in a network visualization tool; S42. Use the WebGL renderer to read the geometry stored in the model queue, and render the geometry into a three-dimensional scene to obtain a three-dimensional model of the highway and railway unit project.
8. The WebGL-based road and railway parameterized dynamic modeling method according to claim 1, characterized in that: The modification of the model in step S5 is specifically as follows: recalculating and drawing the components that need to be modified; searching the influence domain of the components according to the action chain to obtain the second-generation component queue that needs to be modified; traversing the component queue and redrawing the components in the component queue; Repeat the above steps until all action chains are traversed and the model modification is completed.
Citation Information
Patent Citations
A lightweight BIM model webpage end display method
CN109657169A
Open type BIM cross-platform online visualization method based on WebGL
CN110414148A
Mine three-dimensional display method based on WebGL and C #
CN110796732A
Method and system for rapidly calculating engineering quantity of any part of mass concrete in water conservancy and hydropower engineering and medium
CN110992475A
Attribute information modification method and related devices
CN111159609A
