CN113888718A - Route modeling method and device based on cross section template - Google Patents

Route modeling method and device based on cross section template Download PDF

Info

Publication number
CN113888718A
CN113888718A CN202111224032.6A CN202111224032A CN113888718A CN 113888718 A CN113888718 A CN 113888718A CN 202111224032 A CN202111224032 A CN 202111224032A CN 113888718 A CN113888718 A CN 113888718A
Authority
CN
China
Prior art keywords
model
cross
section
route
parameter information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111224032.6A
Other languages
Chinese (zh)
Inventor
张森
连朝晖
向继昱
徐雨同
张春平
何晓梅
和艳玲
刘书培
陆俊龙
蔡贵军
郭宏克
畅敏
于利民
潘隆丰
张琴
巩建
杨亮亮
谭浩然
高亦鹏
向静
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tunnel Tang Technology Co ltd
Original Assignee
Tunnel Tang Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tunnel Tang Technology Co ltd filed Critical Tunnel Tang Technology Co ltd
Priority to CN202111224032.6A priority Critical patent/CN113888718A/en
Publication of CN113888718A publication Critical patent/CN113888718A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • G06T17/205Re-meshing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/13Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/18Network design, e.g. design based on topological or interconnect aspects of utility systems, piping, heating ventilation air conditioning [HVAC] or cabling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping

Abstract

The invention provides a route modeling method and a route modeling device based on a cross section template, which relate to the technical field of computer modeling and comprise the following steps: obtaining model parameter information of the cross section template model, and copying the cross section template model to each first path point; determining the parameter information of a reconstruction model of the cross section template model on each first path point, and constructing a head-to-tail joint model and a longitudinal surface model consisting of longitudinal surface meshes between the front cross section and the rear cross section on the basis of the parameter information; and finally, rendering the head-to-tail joint model and the longitudinal surface model to generate a target route model. The method solves the technical problems that all the existing GIS-related services need to pass through the modeling process of the BIM team, users cannot independently create and modify a GIS model, the modeling difficulty is high, and the processing is not flexible enough, and achieves the technical effects of reducing the development cost and improving the use experience of the users.

Description

Route modeling method and device based on cross section template
Technical Field
The invention relates to the technical field of computer modeling, in particular to a route modeling method and device based on a cross section template.
Background
Building Information Modeling (BIM) technology is a datamation tool applied to engineering design, construction and management. By integrating the building datamation and informatization models, engineering technicians can correctly understand and efficiently deal with various building information. BIM data derived from BIM tools is used to describe computer-aided designs based on three-dimensional graphics, object-oriented, and architectonically relevant.
At present, after being designed in some professional design software (such as 3d max), the BIM data is imported into a Geographic Information System (GIS) scene for model display. That is to say, all the services related to the GIS at present need to pass through the modeling process of the BIM team, and a user cannot create and modify a GIS model independently, and particularly when a simple route is modeled based on a cross section template, the modeling process causes high development cost, great difficulty and inflexible processing, so that the use experience of the user is greatly reduced.
Disclosure of Invention
The invention aims to provide a route modeling method and a route modeling device based on a cross section template, which are used for solving the technical problems of large modeling quantity and insufficient flexibility in processing in the prior art.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides a route modeling method based on a cross-section template, including:
obtaining model parameter information of a cross section template model, and copying the cross section template model to each first path point; the first path point is a point on a target route; said target path comprising a plurality of sub-paths, said target path comprising a front cross-section and a rear cross-section;
determining reconstruction model parameter information of the cross-section template model on each first path point, and constructing a head-to-tail joint model and a longitudinal surface model based on the reconstruction model parameter information; said longitudinal surface model comprising a longitudinal surface mesh between said front and rear cross-sections;
and rendering the head-tail joint model and the longitudinal surface model to generate a target route model.
In some possible embodiments, the model parameter information includes model vertex positions, model triangle index, and model UV;
the step of determining reconstructed model parameter information of the cross-section template model at each of the first path points includes:
and calculating the reconstructed vertex position, the reconstructed triangular surface index and the reconstructed model UV of the cross-section template model on each first path point.
In some possible embodiments, the model parameter information further includes: surface material and mapping, cross-section material and mapping;
the surface material and the map are used for displaying a surface of the target route model parallel to the tangential direction;
the cross section material and the mapping are used for displaying two cross sections of the head-tail joint model.
In some possible embodiments, the step of constructing the head-to-tail joint model based on the above reconstructed model parameter information includes:
constructing a first cross section model and a second cross section model based on the reconstructed model parameter information;
the target route further comprises a route starting point and a route ending point; said first cross-sectional model being located at said path starting point and said second cross-sectional model being located at said path ending point; the direction of the first cross-sectional model is a direction toward the starting point of the path, and the direction of the second cross-sectional model is a direction toward the ending point of the path.
In some possible embodiments, before the step of generating the target route model by rendering the head-to-tail joint model and the longitudinal surface model, the method further includes: the map coordinates UV of each vertex in the above-mentioned longitudinal surface mesh are calculated.
In some possible embodiments, the step of calculating the map coordinate UV of each vertex in the longitudinal surface mesh includes:
calculating the perimeter of the cross-section template model and a first distance of each vertex based on a starting vertex based on all the vertexes of the cross-section template model; a horizontal axis of the map coordinate UV is a ratio of the first distance to a perimeter of the cross-sectional reticle model;
calculating the total length of the target route and the length of the first path point based on the length of each sub-path; the vertical axis of the map coordinate UV is a ratio of the length at the first path point to the total length of the target route.
In some possible embodiments, the step of rendering the head-to-tail joint model and the longitudinal surface model further includes:
and arranging the first cross section model and the second cross section model after the longitudinal surface model in sequence, thereby realizing the rendering by using different materials.
In a second aspect, an embodiment of the present invention provides a route modeling apparatus based on a cross-section template, including:
the parameter information acquisition module is used for acquiring model parameter information of the cross section template model and copying the cross section template model to each first path point; the first path point is a point on a target route; said target path comprising a plurality of sub-paths, said target path comprising a front cross-section and a rear cross-section;
the model construction module is used for 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 and a longitudinal surface model based on the reconstruction model parameter information; said longitudinal surface model comprising a longitudinal surface mesh between said front and rear cross-sections;
and the model generation module is used for rendering the head-to-tail joint model and the longitudinal surface model to generate a target route model.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory stores a computer program operable on the processor, and the processor implements the steps of the method according to any one of the first aspect when executing the computer program.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing machine executable instructions that, when invoked and executed by a processor, cause the processor to perform the method of any of the first aspects.
The invention provides a route modeling method and a route modeling device based on a cross section template, wherein the method comprises the following steps: obtaining model parameter information of the cross section template model, and copying the cross section template model to each first path point; determining the parameter information of a reconstruction model of the cross section template model on each first path point, and constructing a head-to-tail joint model and a longitudinal surface model consisting of longitudinal surface meshes between the front cross section and the rear cross section on the basis of the parameter information; and finally, rendering the head-to-tail joint model and the longitudinal surface model to generate a target route model. By the aid of the method, the technical problems that all existing GIS-related services need to pass through a modeling process of a BIM (building information modeling) team, a user cannot independently create and modify a GIS model, the building modulus is large, and processing is not flexible enough can be solved, and effects of reducing development cost and improving use experience of the user are achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic flow chart of a method for modeling a route based on a cross-section template according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of various types of cross-sectional models provided by embodiments of the present invention;
FIG. 3 is a schematic diagram of a model mesh construction provided in an embodiment of the present invention;
fig. 4 is a schematic diagram of roadbed modeling according to an embodiment of the present invention;
FIG. 5 is a starting point joint model and an ending point joint model provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram of a reconstructed triangular index according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating rendering results according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
The BIM technology is a data tool applied to engineering design, construction and management. By integrating the building datamation and informatization models, engineering technicians can correctly understand and efficiently deal with various building information. BIM data derived from BIM tools is used to describe computer-aided designs based on three-dimensional graphics, object-oriented, and architectonically relevant. At present, after being designed in some professional design software (such as 3DMax), the BIM model is imported into a GIS scene of a geographic information system for model display. That is to say, all the services related to the GIS at present need to pass through the modeling process of the BIM team, and a user cannot create and modify a GIS model autonomously, so that the modeling process causes high development cost, high difficulty and inflexible processing, and greatly reduces the use experience of the user.
Therefore, in order to facilitate understanding of the present embodiment, first, a detailed description is given to a route modeling method based on a cross-section template disclosed in the present embodiment, referring to a flowchart of the route modeling method based on a cross-section template shown in fig. 1, where the method may be executed by an electronic device and mainly includes the following steps S110 to S130:
s110: obtaining model parameter information of the cross section template model, and copying the cross section template model to each first path point; the first path point is a point on the target route; the target route comprises a plurality of sub-paths, and the target route comprises a front cross section and a rear cross section;
the cross section template model may be various types of cross section models FBX established by 3d max software, such as a roadbed cross section model, a bridge deck cross section model, a tunnel cross section model, and the like (see fig. 2). The axle center position of each type of section model is unified in road surface central point, and the width on road surface keeps unanimous, can avoid appearing the fracture problem that the width is inconsistent leads to between different road surfaces.
The model parameter information may include model vertex positions, model triangle indices, and model UV. That is, the vertex position, the triangular face index, and the UV in the cross-sectional model FBX can be extracted.
Joint models, i.e. front and rear cross-sections, are usually added only end to end of the entire path of the target route. The remaining path points copy the cross-sectional mesh vertices, and the longitudinal surface mesh is generated based on these vertices (see the model mesh construction diagram shown in fig. 3).
In addition, the surface material and the mapping as well as the material and the mapping of the head-tail cross section are required to be appointed for the cross section template model, so that the manufacture of the cross section template model is completed. That is, the model parameter information may further include: surface material and mapping, cross-section material and mapping. The surface material and the map are used for displaying a surface of the target route model parallel to the tangential direction; the material and the mapping of the cross section are used for displaying two cross sections of the head-tail joint model, namely the sealing model.
There is a particular need to note for a well-textured surface map such as a subgrade, where the horizontal axis U of the map, from left to right, needs to be laid out in the direction of the vertex registration in turn from the starting vertex of the cross-sectional template model. It will be appreciated that the cross-sectional template is a closed polygon, and the perimeter of the polygon totalcircule can be obtained, and then the horizontal axis of the map passes from left to right, i.e. from the starting vertex, around the polygon in sequence, thus ensuring that the texture of the longitudinal surface model can be rendered correctly. Referring to fig. 4, a roadbed modeling diagram is shown, where part (a) represents a roadbed map, part (B) represents a cross-sectional mesh vertex index diagram, and part (C) shows a longitudinal surface model.
For the manufactured cross section template model, two kinds of grid data of vertex and triangular surface indexes can be extracted from the FBX model file. The indexes of the vertexes of the template mesh generally have no sequence, and the vertex positions are recorded from a certain vertex of the section model in a counterclockwise or clockwise mode in sequence until the vertex positions reach the starting point, so that the longitudinal surface mesh can be generated sequentially.
When the density of the path points provided by the user is not enough, the generated route model is a broken line by direct use, so the path points are usually subdivided into finer path points according to a path curve and a curve algorithm, that is, each path point is subdivided into a specified number of path points, that is, the first path point on the target route.
For example, each path segment is subdivided into 10 path points, and the curve algorithm may adopt a quadratic Bezier curve algorithm, where the formula is as follows:
B(t)=(1-t)^2*P0+2*t*(1-t)*P1+t^2*P2,t∈[0,1]
the formula for calculating the tangent direction of the quadratic Bezier curve is as follows:
y=2*((1-t)*(P1-P0)+t*(P2-P1)),t∈[0,1]
in order to ensure that the curve can pass through each path point, control points of the quadratic bezier curve are generated according to the path points provided by the user, the number of the control points is consistent with that of the path points, the positions of the head and the tail of the control points are consistent with that of the path points, and the rest of each path control point is calculated by the front path point and the rear path point, wherein the formula is as follows:
Pc=2*P1-(P0+P2)/2
Figure BDA0003308401530000081
and model construction is carried out by utilizing the first path points obtained after subdivision, so that the generated path model is smoother.
S120: determining reconstruction model parameter information of the cross section template model on 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 comprises a longitudinal surface mesh between the front cross-section and the back cross-section;
constructing the head-to-tail joint model includes constructing a first cross-sectional model and a second cross-sectional model. The target route further comprises a route starting point and a route ending point; the position of the first cross section model is at the starting point of the path, and the position of the second cross section model is at the ending point of the path; the direction of the first cross-sectional model is a direction towards the starting point of the path and the direction of the second cross-sectional model is a direction towards the end point of the path. As an example, two cross-section template models may be copied and the model material and the map designated as a cross-section material map. Placing one of the cross-section template models to the starting point of the path, wherein the direction is towards the starting point; and placing the other cross section template model to the end point of the path, wherein the direction faces to the end point direction, and then generating an end-to-end joint model.
That is, the joint model is the same as the cross-sectional stencil model, for a total of two. The model material and the map are designated as a cross-section material map. One is placed to the starting point of the path and the direction is towards the starting point; one is placed to the end of the path, in the direction of the end. The direction vector can be calculated by a calculation formula of the tangent direction of the curve, and the values of t-0 and t-1, i.e. the head and tail directions, are taken respectively. The starting point linker model and the ending point linker model are respectively referred to parts (a) and (B) of fig. 5. In addition, the head-to-tail joint models are used as sub models in the final model and are sequentially arranged behind the longitudinal surface model, and therefore different materials are used for rendering.
In one embodiment, determining reconstructed model parameter information for the cross-sectional stencil model at each first path point comprises: and calculating the reconstructed vertex position, the reconstructed triangular surface index and the reconstructed model UV of the cross section template model on each first path point.
Traversing each segment of subdivided paths, and sequentially reconstructing the vertexes of the front and rear cross section models of each segment of paths by using a triangular surface to form a longitudinal surface mesh, namely a mesh of a longitudinal surface between the cross sections.
Because the vertices of the model template are ordered in sequence, the vertices of the cross-section template model can be directly traversed, and 2 triangular surfaces are supplemented between 4 vertices of each longitudinal surface between the front cross section prev and the rear cross section next in sequence, as shown in fig. 6. Since Unity takes the left-hand coordinate system, the triangle index is declared in a clockwise fashion. According to the left-hand rule, the normal of the face is upward in the clockwise case. In single-sided rendering, the image can be seen from top to bottom. The same process is performed for each vertex of the front and rear cross-sections to generate a longitudinal surface mesh.
S130: and rendering the head-to-tail joint model and the longitudinal surface model to generate a target route model.
The invention provides a route modeling method based on a cross section template, which comprises the following steps: obtaining model parameter information of the cross section template model, and copying the cross section template model to each first path point; determining the parameter information of a reconstruction model of the cross section template model on each first path point, and constructing a head-to-tail joint model and a longitudinal surface model consisting of longitudinal surface meshes between the front cross section and the rear cross section on the basis of the parameter information; and finally, rendering the head-to-tail joint model and the longitudinal surface model to generate a target route model. The method can solve the technical problems that all the existing GIS-related services need to pass through the modeling process of the BIM team, the user cannot independently create and modify the GIS model, the building modulus is large, and the processing is not flexible enough, realizes the effect of reducing the development cost, and improves the use experience of the user because the user can independently create and modify the GIS model.
In one embodiment, before rendering the longitudinal surface model in step S130, the map coordinates UV of each vertex in the longitudinal surface mesh need to be calculated.
Further, the step of calculating the map coordinates UV of each vertex in the longitudinal surface mesh comprises:
calculating the perimeter of the cross-section template model and a first distance of each vertex based on the starting vertex based on all the vertexes of the cross-section template model; the horizontal axis of the mapping coordinate UV is the ratio of the first distance to the perimeter of the cross-sectional stencil model;
calculating the total length of the target route and the length at the first path point based on the length of each sub-path; the vertical axis V of the map coordinate UV is the ratio of the length at the first path point to the total length of the target route.
Wherein the first path point may be each subdivision path point, and the length at the first path point includes lengths in two directions: the horizontal axis U direction, namely the perimeter of the top point of the cross section; the vertical axis V direction, i.e. the course direction, calculates the Length at each subdivision path point, i.e. the Length between two cross-sectional stencils.
Wherein, the mapping coordinate UV is used for mapping sampling, U and V refer to a horizontal axis and a vertical axis of a 2D space, the lower left corner is (0, 0), the upper right corner is (1, 1), and part of the computer between the vertexes automatically adopts linear interpolation for sampling.
The horizontal axis U determines texture sampling of the road surface from left to right, and is related to the current length and the total length of the vertex of the cross-section template. Traversing each vertex of the cross-section template model, sequentially calculating the distance between the vertexes, and accumulating to form a template perimeter Totalcircle; and calculating the circumference Circle of each vertex at the initial vertex of the cross-section template to obtain U (Circle/Totalcircle) (0< (U < (1)).
The vertical axis V determines the texture sampling from front to back of the trace line, related to the length of the current waypoint and the total path length. And respectively calculating the Length of each path line according to the subdivided path points, and cumulatively calculating the total path Length and the Length at each subdivided path point, namely V (Length)/TotalLength (0< (V < (1)).
Through the processes, the vertex of the route model Mesh, the triangular surface index and the UV are ready, and then the Mesh class object in the Unity engine can be created and assigned:
assigning vertex data to a mesh. Assigning the triangular face index to a mesh. Assigning UV data to a mesh.uv attribute;
and then calling a Mesh class to recalculate interfaces of the normal line and the tangent line, wherein the class automatically calculates the normal line and the tangent line of each vertex based on the attributes so as to ensure the final rendering effect of the model.
And finally, setting a mapping scaling attribute of the longitudinal surface grid material as (Totalcircle, TotalLength), namely rendering by using the mesh object. Fig. 7 shows the final roadbed model (a), the final deck model (B) and the final tunnel model (C) after rendering, respectively.
The invention provides a route modeling method based on a cross section template, which aims at simple routes with the same cross section, uses the cross section model templates of roads, such as roadbed cross sections, bridge deck cross sections, tunnel cross sections and the like, copies a cross section template model reconstruction grid according to path curves formed by path points, and performs program modeling. The method can solve the technical problems that all the existing GIS-related services need to pass through the modeling process of the BIM team, the user cannot independently create and modify the GIS model, the building modulus is large, and the processing is not flexible enough, realizes the effect of reducing the development cost, and improves the use experience of the user because the user can independently create and modify the GIS model.
The embodiment of the invention also provides a route modeling device based on the cross section template, which comprises:
the parameter information acquisition module is used for acquiring model parameter information of the cross section template model and copying the cross section template model to each first path point; the first path point is a point on the target route; the target route comprises a plurality of sub-paths, and the target route comprises a front cross section and a rear cross section;
the model construction module is used for 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 and a longitudinal surface model based on the reconstruction model parameter information; the longitudinal surface model comprises a longitudinal surface mesh between the front cross-section and the back cross-section;
and the model generation module is used for rendering the head-to-tail joint model and the longitudinal surface model to generate a target route model.
The embodiment of the application further provides an electronic device, and specifically, the electronic device comprises a processor and a storage device; the storage means has stored thereon a computer program which, when executed by the processor, performs the method of any of the above embodiments.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where 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 through the bus 42; the processor 40 is arranged to execute executable modules, such as computer programs, stored in the memory 41.
The Memory 41 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system 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, a wide area network, a local network, a metropolitan area network, etc. may be used.
The bus 42 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
The memory 41 is used for storing a program, the processor 40 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow process disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 40, or implemented by the processor 40.
The processor 40 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 40. The Processor 40 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device 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 Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 41, and the processor 40 reads the information in the memory 41 and completes the steps of the method in combination with the hardware thereof.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that: like reference numbers and letters indicate like items in the figures, and thus once an item is defined in a figure, it need not be further defined or explained in subsequent figures, and moreover, the terms "first," "second," "third," etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for modeling a route based on a cross-section template, comprising:
obtaining model parameter information of a cross section template model, and copying the cross section template model to each first path point; the first path point is a point on a target route; the target route comprises a plurality of sub-paths, and the target route comprises a front cross section and a rear cross section;
determining reconstruction model parameter information of the cross section template model on 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 comprises a longitudinal surface mesh between the front and rear cross-sections;
and rendering the head-to-tail joint model and the longitudinal surface model to generate a target route model.
2. The cross-section template-based route modeling method according to claim 1, characterized in that said model parameter information includes model vertex positions, model triangular face indices and model UV;
the step of determining reconstructed model parameter information of the cross-section template model at each of the first waypoints includes:
and calculating the reconstructed vertex position, the reconstructed triangular surface index and the reconstructed model UV of the cross-section template model on each first path point.
3. The cross-section template-based route modeling method according to claim 2, wherein the model parameter information further includes: surface material and mapping, cross-section material and mapping;
the surface material and the map are used for displaying a surface of the target route model parallel to the tangential direction;
the cross section material and the mapping are used for displaying two cross sections of the head-tail joint model.
4. The cross-section template-based route modeling method according to claim 1, wherein the step of constructing a head-to-tail joint model based on the reconstructed model parameter information includes:
constructing a first cross section model and a second cross section model based on the reconstructed model parameter information;
the target route further comprises a route starting point and a route ending point; the position of the first cross-section model is at the starting point of the path, and the position of the second cross-section model is at the ending point of the path; the direction of the first cross-sectional model is a direction toward the starting point of the path, and the direction of the second cross-sectional model is a direction toward the ending point of the path.
5. A cross-section-stencil-based route modeling method according to claim 4, wherein prior to the step of rendering the fore-aft joint model and the longitudinal surface model to generate a target route model, the method further comprises: the map coordinates UV of each vertex in the longitudinal surface mesh are calculated.
6. A cross-section template-based route modeling method according to claim 5, characterized in that the step of calculating the map coordinates UV of each vertex in the longitudinal surface mesh comprises:
calculating the perimeter of the cross-section template model and a first distance of each vertex based on a starting vertex based on all the vertices of the cross-section template model; a horizontal axis of the map coordinate UV is a ratio of the first distance to a perimeter of the cross-sectional stencil model;
calculating a total length of the target route and a length at the first path point based on a length of each of the sub-paths; the vertical axis of the map coordinate UV is the ratio of the length at the first path point to the total length of the target route.
7. The cross-section-stencil-based route modeling method of claim 5, wherein the step of rendering the fore-aft joint model and the longitudinal surface model further comprises:
and arranging the first cross section model and the second cross section model after the longitudinal surface model in sequence, thereby realizing the rendering by using different materials.
8. A route modeling apparatus based on a cross-section template, comprising:
the parameter information acquisition module is used for acquiring model parameter information of the cross section template model and copying the cross section template model to each first path point; the first path point is a point on a target route; the target route comprises a plurality of sub-paths, and the target route comprises a front cross section and a rear cross section;
the model construction module is used for determining reconstruction model parameter information of the cross section template model on 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 comprises a longitudinal surface mesh between the front and rear cross-sections;
and the model generation module is used for rendering the head-to-tail joint model and the longitudinal surface model to generate a target route model.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program operable on the processor, and wherein the processor implements the steps of the method of any of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to execute the method of any of claims 1 to 7.
CN202111224032.6A 2021-10-18 2021-10-18 Route modeling method and device based on cross section template Pending CN113888718A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111224032.6A CN113888718A (en) 2021-10-18 2021-10-18 Route modeling method and device based on cross section template

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111224032.6A CN113888718A (en) 2021-10-18 2021-10-18 Route modeling method and device based on cross section template

Publications (1)

Publication Number Publication Date
CN113888718A true CN113888718A (en) 2022-01-04

Family

ID=79003845

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111224032.6A Pending CN113888718A (en) 2021-10-18 2021-10-18 Route modeling method and device based on cross section template

Country Status (1)

Country Link
CN (1) CN113888718A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024037116A1 (en) * 2022-08-19 2024-02-22 腾讯科技(深圳)有限公司 Three-dimensional model rendering method and apparatus, electronic device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024037116A1 (en) * 2022-08-19 2024-02-22 腾讯科技(深圳)有限公司 Three-dimensional model rendering method and apparatus, electronic device and storage medium

Similar Documents

Publication Publication Date Title
US10395419B1 (en) Non-destructive multi-resolution surface clipping
US11361503B2 (en) Systems and methods for generating volumetric models
JP2013507679A (en) Method and system capable of 3D printing of 3D object model
US6978230B1 (en) Apparatus, system, and method for draping annotations on to a geometric surface
US6570568B1 (en) System and method for the coordinated simplification of surface and wire-frame descriptions of a geometric model
CN115082699B (en) Contour shape extraction method and device, electronic equipment and storage medium
CN112329096B (en) Three-dimensional roadway model generation method and device and electronic equipment
KR101507776B1 (en) methof for rendering outline in three dimesion map
CN112733318A (en) Self-adaptive mesh subdivision method, device, equipment and storage medium
CN111127649B (en) Method and device for constructing three-dimensional block model and server
CN113888718A (en) Route modeling method and device based on cross section template
CN115797592A (en) Method and device for automatically generating building block based on oblique photography three-dimensional model
CN108744520B (en) Method and device for determining placement position of game model and electronic equipment
CN113034688B (en) Three-dimensional map model generation method and device
CN110675323A (en) Three-dimensional map semantic processing method, system, equipment and computer medium
CN110378948B (en) 3D model reconstruction method and device and electronic equipment
CN106846498B (en) Laser point cloud rendering method and device
CN112233226B (en) Index information determining method, device and system based on index and graphic linkage
CN114202642A (en) Method and device for filling oversized holes in three-dimensional triangulation network model
CN115222908B (en) Automatic construction method and system for three-dimensional road in digital twin
CN113368498B (en) Model generation method and device and electronic equipment
CN117456048B (en) Object labeling method and device in electronic map
CN117115382B (en) Map road drawing method, device, computer equipment and storage medium
JP2003196683A (en) Three-dimensional city model generating device, and three-dimensional city model generating method
CN116934986A (en) Three-dimensional road map optimization method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination