Route modeling method and device based on cross-section template

Through the route modeling method based on cross-sectional templates, users can independently create and modify GIS models, solving the problems of large modeling volume and inflexible processing in the existing technology, and achieving the effect of reducing development costs and improving user experience.

CN113888718BActive Publication Date: 2025-05-23TUNNEL TANG TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111224032.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-18
Publication Date
2025-05-23
Estimated Expiration
2041-10-18

AI Technical Summary

Technical Problem

In the prior art, when BIM data is imported into GIS scenarios, users cannot create and modify GIS models independently, resulting in large amounts of modeling and inflexible processing, which increases development costs and reduces users' usage experience.

Method used

The route modeling method based on cross-section template is adopted. By obtaining the model parameter information of the cross-section template model, copying it to each path point, reconstructing the model parameter information, and building the head and tail joint model and the longitudinal surface model, finally rendering these models to generate the target route model.

Benefits of technology

It realizes the ability of users to create and modify GIS models independently, reduces development costs, improves users' usage experience, and solves the problems of large modeling and inflexible processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113888718B_ABST
    Figure CN113888718B_ABST
Patent Text Reader

Abstract

The present invention provides a route modeling method and device based on a cross-section template, which relates to the technical field of computer modeling, including: obtaining model parameter information of a cross-section template model, and copying the cross-section template model to each first path point; determining the reconstruction model parameter information of the cross-section template model on each first path point, and constructing a head-to-tail joint model based on the parameter information, and a longitudinal surface model composed of longitudinal surface grids between a front cross section and a rear cross section; finally, rendering the head-to-tail joint model and the longitudinal surface model to generate a target route model. This method alleviates the technical problems that all current GIS-related businesses must go through the modeling process of the BIM team, users cannot independently create and modify GIS models, and the modeling is difficult and the processing is not flexible enough, thereby achieving the technical effect of reducing development costs and improving user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer modeling, and in particular to a route modeling method and device based on a cross-section template. Background Art

[0002] Building Information Modeling (BIM) technology is a digital tool used in engineering design, construction, and management. By integrating digital and information models of buildings, engineering and technical personnel can correctly understand and efficiently respond to various building information. BIM data derived from BIM tools is used to describe computer-aided design that is mainly based on three-dimensional graphics, object-oriented, and related to architecture.

[0003] At present, after BIM data is designed in some professional design software (such as 3DMax), it is imported into the Geographic Information System (GIS) scene for model display. In other words, all GIS-related businesses must go through the modeling process of the BIM team. Users cannot create and modify GIS models independently, especially when modeling simple routes based on cross-section templates. The modeling process leads to high development costs, great difficulty, and inflexible processing, which greatly reduces the user experience. Summary of the invention

[0004] The purpose of the present invention is to provide a route modeling method and device based on a cross-section template to alleviate the technical problems existing in the prior art of large modeling volume and inflexible processing.

[0005] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:

[0006] In a first aspect, an embodiment of the present invention provides a route modeling method based on a cross-section template, comprising:

[0007] Obtain model parameter information of a cross-section template model, and copy the cross-section template model to each first path point; the first path point is a point on a target route; the target route includes a plurality of sub-paths, and the target route includes a front cross section and a rear cross section;

[0008] Determine the reconstruction model parameter information of the cross-section template model at each of the first path points, and construct the head and tail joint model and the longitudinal surface model based on the reconstruction model parameter information; the longitudinal surface model includes the longitudinal surface grid between the front cross section and the rear cross section;

[0009] The end-end joint model and the longitudinal surface model are rendered to generate a target route model.

[0010] In some possible embodiments, the above model parameter information includes model vertex positions, model triangle face indices, and model UVs;

[0011] The above step of determining the reconstructed model parameter information of the cross-section template model at each of the above first path points includes:

[0012] Calculating the reconstructed vertex positions, reconstructed triangle face indices, and reconstructed model UVs of the cross-section template model at each of the above first path points.

[0013] In some possible embodiments, the above model parameter information further includes: surface material and texture, cross-section material and texture;

[0014] The above surface material and texture are used to display the surface of the above target route model parallel to the tangent direction;

[0015] The above cross-section material and texture are used to display the two cross-sections of the above head and tail joint model.

[0016] In some possible embodiments, the step of constructing the head and tail joint model based on the above reconstructed model parameter information includes:

[0017] Constructing a first cross-section model and a second cross-section model based on the above reconstructed model parameter information;

[0018] The above target route further includes a path start point and a path end point; the position of the above first cross-section model is at the above path start point, and the position of the above second cross-section model is at the above path end point; the direction of the above first cross-section model is the direction towards the above path start point, and the direction of the above second cross-section model is the direction towards the above path end point.

[0019] In some possible embodiments, before the step of rendering the above head and tail joint model and the above longitudinal surface model to generate the target route model, the above method further includes: calculating the texture coordinate UVs of each vertex in the above longitudinal surface mesh.

[0020] In some possible embodiments, the above step of calculating the texture coordinate UVs of each vertex in the above longitudinal surface mesh includes:

[0021] Based on all the vertices of the above cross-section template model, calculating the perimeter of the above cross-section template model and the first distance of each vertex based on the starting vertex; the horizontal axis of the above texture coordinate UV is the ratio of the above first distance to the perimeter of the above cross-section template model;

[0022] Based on the length of each of the above sub-paths, the total length of the above target route and the length at the above first path point are calculated; the vertical axis of the above mapping coordinate UV is the ratio of the length at the above first path point to the total length of the above target route.

[0023] In some possible implementations, the step of rendering the head and tail joint model and the longitudinal surface model further includes:

[0024] The first cross-sectional model and the second cross-sectional model are sequentially arranged after the longitudinal surface model, so as to achieve rendering using different materials.

[0025] In a second aspect, an embodiment of the present invention provides a route modeling device based on a cross-section template, comprising:

[0026] A parameter information acquisition module, used to acquire model parameter information of a cross-section template model, and copy the cross-section template model to each first path point; the first path point is a point on a target route; the target route includes a plurality of sub-paths, and the target route includes a front cross section and a rear cross section;

[0027] A model building module, used to determine the reconstruction model parameter information of the cross-section template model at each of the first path points, and to build a head-to-tail joint model and a longitudinal surface model based on the reconstruction model parameter information; the longitudinal surface model includes a longitudinal surface grid between the front cross section and the rear cross section;

[0028] The model generation module is used to render the head and tail joint models and the longitudinal surface model to generate a target route model.

[0029] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the computer program, the steps of any one of the methods described in the first aspect are implemented.

[0030] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores machine-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to execute any method described in the first aspect above.

[0031] The present invention provides a route modeling method and device based on a cross-section template, the method comprising: obtaining model parameter information of a cross-section template model, and copying the cross-section template model to each first path point; determining the reconstructed model parameter information of the cross-section template model at each first path point, and constructing a head-to-tail joint model and a longitudinal surface model composed of longitudinal surface grids between a front cross section and a rear cross section based on the parameter information; finally, rendering the head-to-tail joint model and the longitudinal surface model to generate a target route model. The above method can alleviate the technical problems that all current GIS-related businesses must go through the modeling process of the BIM team, users cannot independently create and modify GIS models, and the modeling volume is large and the processing is not flexible enough, thereby achieving the effect of reducing development costs and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 A schematic diagram of a flow chart of a route modeling method based on a cross-section template provided in an embodiment of the present invention;

[0034] Figure 2 Schematic diagrams of various types of cross-sectional models provided for embodiments of the present invention;

[0035] Figure 3 A schematic diagram of model grid construction provided by an embodiment of the present invention;

[0036] Figure 4 A schematic diagram of roadbed modeling provided by an embodiment of the present invention;

[0037] Figure 5 A starting point joint model and an end point joint model provided by an embodiment of the present invention;

[0038] Figure 6 A schematic diagram of the principle of reconstructing a triangular surface index provided by an embodiment of the present invention;

[0039] Figure 7 A schematic diagram of a rendering result provided by an embodiment of the present invention;

[0040] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0041] In order to make the purpose, 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 in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0042] 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 invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present invention. Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0043] Building Information Modeling (BIM) technology is a digital tool used in engineering design, construction, and management. By integrating the digital and information models of buildings, engineering and technical personnel can correctly understand and efficiently respond to various building information. BIM data exported by BIM tools is used to describe computer-aided design that is mainly based on three-dimensional graphics, object-oriented, and related to architecture. At present, after the BIM model is designed in some professional design software (such as 3DMax), it is imported into the geographic information system (GIS) scene for model display. In other words, all GIS-related businesses currently have to go through the modeling process of the BIM team. Users cannot create and modify GIS models independently. The modeling process leads to high development costs, high difficulty, and inflexible processing, which greatly reduces the user experience.

[0044] Based on this, the embodiment of the present invention provides a route modeling method and device based on a cross-section template. To facilitate understanding of the present embodiment, a route modeling method based on a cross-section template disclosed in the embodiment of the present invention is first described in detail. Figure 1 The flowchart of a route modeling method based on a cross-section template is shown. The method can be executed by an electronic device and mainly includes the following steps S110 to S130:

[0045] S110: Obtain model parameter information of a cross-section template model, and copy the cross-section template model to each first path point; the first path point is a point on a target route; the target route includes a plurality of sub-paths, and the target route includes a front cross section and a rear cross section;

[0046] The cross-section template model can be a variety of cross-section model FBXs created by 3DMax software, such as a roadbed cross-section model, a bridge deck cross-section model, a tunnel cross-section model, etc. (see Figure 2 ). The axis positions of various types of cross-section models are unified at the center of the road surface, and the width of the road surface is kept consistent, which can avoid the fracture problem caused by inconsistent widths between different road surfaces.

[0047] The model parameter information may include model vertex positions, model triangle surface indices, and model UVs. In other words, the vertex positions, triangle surface indices, and UVs in the cross-sectional model FBX may be extracted.

[0048] Usually, the joint model is only added at the beginning and end of the entire path of the target route, that is, the front cross section and the back cross section. The cross-section mesh vertices are copied at the remaining path points, and the longitudinal surface mesh is generated based on these vertices (see Figure 3 Schematic diagram of model mesh construction shown in Figure 4).

[0049] In addition, it is necessary to specify the surface material and texture, the material and texture of the head and tail cross sections for the cross section template model, so as to complete the production of the cross section template model. In other words, the model parameter information can also include: surface material and texture, cross section material and texture. Among them, the surface material and texture are used to display the surface of the target route model parallel to the tangent direction; the cross section material and texture are used to display the two cross sections of the head and tail joint model, that is, the sealing model.

[0050] For surface maps with distinct textures such as roadbeds, there is one thing that needs special attention. The horizontal axis U of the map, that is, from left to right, needs to be spread out in the direction of the vertex record according to the starting vertex of the cross-section template model. It can be understood that the cross-section template is a closed polygon, and the polygon perimeter TotalCircle can be obtained. Then the horizontal axis of the map is from left to right, that is, starting from the starting vertex and going around the polygon in turn, so as to ensure that the texture of the longitudinal surface model can be rendered correctly. For details, please refer to Figure 4 A schematic diagram of roadbed modeling is shown, where part (A) represents the roadbed map, part (B) is a schematic diagram of the cross-sectional mesh vertex index, and part (C) shows the longitudinal surface model.

[0051] For the prepared cross-section template model, two types of mesh data, vertex and triangle face index, can be extracted from the FBX model file. The index of the template mesh vertex is generally not in order. Starting from a vertex of the cross-section model, the vertex position is recorded counterclockwise or clockwise until the starting point, so as to facilitate the subsequent orderly generation of the longitudinal surface mesh.

[0052] When the density of the path points provided by the user is not enough, directly using them will result in the generated route model being a broken line. Therefore, the path points are usually subdivided into more detailed path points based on the path curve and curve algorithm, that is, each path point is further subdivided into a specified number of path points, which is the first path point on the target route.

[0053] For example, if each path segment is further subdivided into 10 path points, the curve algorithm can use the quadratic Bezier curve algorithm, and the formula is as follows:

[0054] B(t)=(1-t)^2*P0+2*t*(1-t)*P1+t^2*P2, t∈[0,1]

[0055] The calculation formula for the tangent direction of the quadratic Bezier curve is:

[0056] y=2*((1-t)*(P1-P0)+t*(P2-P1)), t∈[0,1]

[0057] In order to ensure that the curve can pass through each path point, it is necessary to generate the control points of the quadratic Bezier curve based on the path points provided by the user. The number of control points is consistent with the path points, the first and last points are consistent with the path points, and the remaining control points of each path are calculated from the previous and next path points. The formula is as follows:

[0058] Pc=2*P1-(P0+P2) / 2

[0059]

[0060] Using the first path point obtained after segmentation to build the model can make the generated route model smoother.

[0061] S120: determining reconstruction model parameter information of the cross-section template model at each first path point, and constructing a head-to-tail joint model and a longitudinal surface model based on the reconstruction model parameter information; the longitudinal surface model includes a longitudinal surface grid between the front cross section and the rear cross section;

[0062] Constructing the end-to-end joint model includes constructing the first cross-section model and the second cross-section model. The target route also includes the path start point and the path end point; the first cross-section model is located at the path start point, and the second cross-section model is located at the path end point; the first cross-section model is oriented toward the path start point, and the second cross-section model is oriented toward the path end point. As an example, two cross-section template models can be copied, and the model material and map can be specified as the cross-section material map. Place one of the cross-section template models at the path start point, with the direction facing the start point; place the other cross-section template model at the path end point, with the direction facing the end point, and the end-to-end joint model can be generated.

[0063] That is to say, the joint model is the same as the cross-section template model, with two in total. Assign the model material and map as the cross-section material map. One is placed at the start of the path, with the direction facing the start direction; the other is placed at the end of the path, with the direction facing the end direction. The direction vector can be calculated using the calculation formula for the tangent direction of the curve, taking the values ​​of t=0 and t=1, that is, the head and tail directions. The start joint model and the end joint model refer to Figure 5 In addition, the head and tail joint models are placed after the longitudinal surface model as sub-models in the final model, so as to achieve rendering with different materials.

[0064] In one embodiment, determining the reconstructed model parameter information of the cross-sectional template model at each first path point includes: calculating the reconstructed vertex position, the reconstructed triangle face index and the reconstructed model UV of the cross-sectional template model at each first path point.

[0065] Each segment of the subdivided path is traversed, and the vertices of the front and rear cross-section models of each segment of the path are triangulated and reconstructed in turn to form a longitudinal surface mesh, that is, a mesh of the longitudinal surface between the cross sections.

[0066] Because the vertices of the model template are in order, we can directly traverse the vertices of the cross-section template model, and complete the two triangles between the four vertices of each longitudinal surface between the front cross section prev and the back cross section next, such as Figure 6 As shown. Since Unity uses a left-hand coordinate system, triangle indices are declared in clockwise form. According to the left-hand rule, the face normal is facing upwards in the clockwise case. In single-sided rendering, the image can be seen from top to bottom. The same process is performed on each vertex of the front cross section and the back cross section to generate the longitudinal surface mesh.

[0067] S130: Rendering the head and tail joint models and the longitudinal surface model to generate a target route model.

[0068] The present invention provides a route modeling method based on a cross-section template, the method comprising: obtaining model parameter information of a cross-section template model, and copying the cross-section template model to each first path point; determining the reconstructed model parameter information of the cross-section template model at each first path point, and constructing a head-to-tail joint model and a longitudinal surface model composed of longitudinal surface grids between a front cross section and a rear cross section based on the parameter information; finally, rendering the head-to-tail joint model and the longitudinal surface model to generate a target route model. The method can alleviate the technical problems that all current GIS-related businesses must go through the modeling process of the BIM team, users cannot independently create and modify GIS models, and the modeling volume is large and the processing is not flexible enough, thereby achieving the effect of reducing development costs, and because users can independently create and modify GIS models, the user experience is improved.

[0069] In one embodiment, before rendering the longitudinal surface model in step S130, it is necessary to calculate the texture coordinate UV of each vertex in the longitudinal surface mesh.

[0070] Furthermore, the step of calculating the mapping coordinate UV of each vertex in the longitudinal surface mesh includes:

[0071] Based on all vertices of the cross-section template model, the perimeter of the cross-section template model and the first distance of each vertex based on the starting vertex are calculated; the horizontal axis of the mapping coordinate UV is the ratio of the first distance to the perimeter of the cross-section template model;

[0072] Based on the length of each sub-path, the total length of the target route and the length at the first path point are calculated; the vertical axis V of the texture coordinate UV is the ratio of the length at the first path point to the total length of the target route.

[0073] Among them, the first path point can be each subdivision path point, and the length at the first path point includes the length in two directions: the horizontal axis U direction, that is, the perimeter of the cross-section vertex; the vertical axis V direction, that is, the route direction. The length Length at each subdivision path point is calculated, that is, the length between the two cross-section templates.

[0074] Among them, the texture coordinate UV is used for texture sampling, U and V refer to the horizontal axis and vertical axis of the 2D space, the lower left corner is (0, 0), and the upper right corner is (1, 1). The computer automatically uses linear interpolation for sampling between vertices.

[0075] The horizontal axis U determines the texture sampling of the road from left to right, which is related to the current length and total length of the cross-section template vertex. Traverse each vertex of the cross-section template model, calculate the distance between vertices in turn, and add them up to form the template perimeter TotalCircle; calculate the perimeter Circle of each vertex located at the starting vertex of the cross-section template, and you can get U = Circle / TotalCircle, (0 <= U <= 1).

[0076] The vertical axis V determines the texture sampling from the front to the back of the road line, which is related to the length of the current path point and the total length of the path. According to the subdivided path points, the length of each path segment is calculated separately, and the total length of the path TotalLength and the length of each subdivided path point are calculated cumulatively, that is, V = Length / TotalLength, (0 <= V <= 1).

[0077] Through the above process, the vertices, triangle face indexes, and UVs of the route model mesh are ready, and you can create a Mesh class object in the Unity engine and assign values:

[0078] Assign vertex data to the Mesh.vertices property; assign triangle face index to the Mesh.triangles property; assign UV data to the Mesh.uv property;

[0079] Then call the Mesh class to recalculate the normal and tangent interface. This class automatically calculates the normal and tangent of each vertex based on the above properties to ensure the final rendering effect of the model.

[0080] Finally, set the texture scaling properties of the longitudinal surface mesh material to (TotalCircle,TotalLength), and you can use the mesh object for rendering. Figure 7 The rendered final roadbed model (A), final bridge deck model (B) and final tunnel model (C) are shown respectively.

[0081] The present invention provides a route modeling method based on a cross-section template. The method uses a road cross-section model template, such as a roadbed cross section, a bridge deck cross section, a tunnel cross section, etc., for a simple route with the same cross section. According to the path curve formed by the path points, the cross-section template model is copied and reconstructed into a grid for program modeling. The method can alleviate the technical problems that all current GIS-related businesses must go through the modeling process of the BIM team, users cannot independently create and modify GIS models, and the modeling volume is large and the processing is not flexible enough, thereby achieving the effect of reducing development costs. In addition, since users can independently create and modify GIS models, the user experience is improved.

[0082] The embodiment of the present invention further provides a route modeling device based on a cross-section template, comprising:

[0083] A parameter information acquisition module is used to acquire model parameter information of a cross-section template model and copy the cross-section template model to each first path point; the first path point is a point on a target route; the target route includes a plurality of sub-paths, and the target route includes a front cross section and a rear cross section;

[0084] A model building module, used to determine the reconstruction model parameter information of the cross-section template model at each first path point, and to build the head and tail joint model and the longitudinal surface model based on the reconstruction model parameter information; the longitudinal surface model includes the longitudinal surface grid between the front cross section and the rear cross section;

[0085] The model generation module is used to render the head and tail joint models and the longitudinal surface model to generate the target route model.

[0086] An embodiment of the present application further provides an electronic device. Specifically, the electronic device includes a processor and a storage device. The storage device stores a computer program, and when the computer program is executed by the processor, it executes any one of the methods in the above implementation modes.

[0087] Figure 8 A structural schematic diagram of an electronic device provided in an embodiment of the present application, the electronic device 400 includes: a processor 40, a memory 41, a bus 42 and a communication interface 43, wherein the processor 40, the communication interface 43 and the memory 41 are connected via the bus 42; the processor 40 is used to execute an executable module stored in the memory 41, such as a computer program.

[0088] The memory 41 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 43 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0089] The bus 42 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0090] Among them, the memory 41 is used to store programs, and the processor 40 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 40 or implemented by the processor 40.

[0091] The processor 40 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 40. The above processor 40 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor to execute, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 41, and the processor 40 reads the information in the memory 41 and completes the steps of the above method in combination with its hardware.

[0092] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

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

[0094] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0095] If the functions are implemented in the form of software functional units and sold or used as independent products, they 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 the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, electronic device, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0096] It should be noted that similar numbers and letters represent similar items in the accompanying drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A route modeling method based on cross-section templates, It is characterized in that include: Acquire model parameter information of the cross-section template model, and copy the cross-section template model to each first path point; The first path point is a point on the target route; the target route includes a plurality of sub-paths, and the target route includes a front cross section and a rear cross section; Determine the reconstruction model parameter information of the cross-section template model at each of the first path points, and construct a head-to-tail joint model and a longitudinal surface model based on the reconstruction model parameter information; the longitudinal surface model includes a longitudinal surface grid between the front cross section and the rear cross section; Rendering the end-end joint model and the longitudinal surface model to generate a target route model; The step of constructing the head-to-tail joint model based on the reconstructed model parameter information includes: constructing a first cross-sectional model and a second cross-sectional model based on the reconstructed model parameter information; The target route also includes a path start point and a path end point; the position of the first cross-sectional model is at the path start point, and the position of the second cross-sectional model is at the path end point; the direction of the first cross-sectional model is the direction toward the path start point, and the direction of the second cross-sectional model is the direction toward the path end point; The model parameter information includes model vertex positions, model triangle surface indexes and model UVs; The step of determining the reconstructed model parameter information of the cross-section template model at each of the first path points comprises: The reconstructed vertex position, the reconstructed triangle surface index and the reconstructed model UV of the cross-section template model at each of the first path points are calculated.

2. The route modeling method based on the cross-section template according to claim 1, It is characterized in that The model parameter information also includes: surface material and texture, cross-section material and texture; The surface material and texture are used to display the surface of the target route model parallel to the tangent direction; The cross-section material and map are used to display two cross-sections of the head and tail joint model.

3. The route modeling method based on the cross-section template according to claim 1, It is characterized in that Before rendering the end-to-end joint model and the longitudinal surface model to generate a target route model, the method further comprises: calculating a texture coordinate UV of each vertex in the longitudinal surface mesh.

4. The route modeling method based on the cross-section template according to claim 3, It is characterized in that The step of calculating the mapping coordinate UV of each vertex in the longitudinal surface mesh comprises: Based on all vertices of the cross-sectional template model, the perimeter of the cross-sectional template model and the first distance of each vertex based on the starting vertex are calculated; the horizontal axis of the mapping coordinate UV is the ratio of the first distance to the perimeter of the cross-sectional template model; Based on the length of each sub-path, the total length of the target route and the length at the first path point are calculated; the vertical axis of the mapping coordinate UV is the ratio of the length at the first path point to the total length of the target route.

5. The route modeling method based on the cross-section template according to claim 3, It is characterized in that The step of rendering the head and tail joint model and the longitudinal surface model further includes: The first cross-sectional model and the second cross-sectional model are arranged sequentially after the longitudinal surface model, so as to achieve rendering using different materials.

6. A route modeling device based on a cross-section template, It is characterized in that include: A parameter information acquisition module, used to acquire model parameter information of a cross-section template model, and copy the cross-section template model to each first path point; the first path point is a point on a target route; the target route includes a plurality of sub-paths, and the target route includes a front cross section and a rear cross section; A model building module, used to determine the reconstruction model parameter information of the cross-section template model at each of the first path points, and to build a head-to-tail joint model and a longitudinal surface model based on the reconstruction model parameter information; the longitudinal surface model includes a longitudinal surface grid between the front cross section and the rear cross section; A model generation module, used for rendering the end-end joint model and the longitudinal surface model to generate a target route model; Wherein, the model construction module is further used to: construct a first cross-sectional model and a second cross-sectional model based on the reconstructed model parameter information; the target route also includes a path starting point and a path end point; the position of the first cross-sectional model is at the path starting point, and the position of the second cross-sectional model is at the path end point; the direction of the first cross-sectional model is the direction toward the path starting point, and the direction of the second cross-sectional model is the direction toward the path end point; The model parameter information includes model vertex positions, model triangle surface indexes and model UVs; the step of determining the reconstructed model parameter information of the cross-sectional template model at each of the first path points includes: calculating the reconstructed vertex positions, reconstructed triangle surface indexes and reconstructed model UVs of the cross-sectional template model at each of the first path points.

7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to execute the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Apparatus and method of automatically extracting sweep / extrude / revolve feature shape from atypical digital data

    CN102880731A

  • Highway subgrade modeling method and system

    CN113094802A