A tunnel three-dimensional center line generation method and system based on multi-source heterogeneous data

CN122674152APending Publication Date: 2026-09-01CHENGDU UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610820335.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-08
Publication Date
2026-09-01

AI Technical Summary

Technical Problem

[0006]本发明的目的在于,为解决现有技术中多源异构数据无法统一解析、平竖曲线不能自动空间复合、点位高程无法按里程自动计算、中心线无法按分段长度自动生成、BIM平台无法直接调用的技术问题,提供一种基于多源异构数据的隧道三维中心线生成方法及系统,实现隧道三维中心线全自动、高精度、可配置生成

Benefits of technology

(1)实现了离散路线设计数据向连续三维中心线的自动转换,提高了隧道空间建模精度;(2)通过平曲线与竖曲线空间复合计算,减少了人工计算带来的累计误差;(3)实现了平曲线与竖曲线对象的自动识别与自动分类,提高了路线数据处理效率;(4)通过统一里程参数体系,实现了平纵曲线的精准对应,避免了空间错位问题;(5)自动生成三维控制点,提高了隧道参数化建模效率;(6)基于曲线导数自动推导断面法向平面,实现了构件姿态自动控制;(7)减少了BIM建模过程中人工旋转与人工校正工作量;(8)提高了隧道数字化设计、施工模拟及智能建造的自动化水平;(9)为后续数字孪生、智能施工及施工监测提供统一空间坐标基础。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122674152A_ABST
    Figure CN122674152A_ABST
Patent Text Reader

Abstract

The application discloses a tunnel three-dimensional center line generation method and system based on multi-source heterogeneous data. The method acquires plane route data and longitudinal elevation data of a tunnel to be built, extracts route control points and route curve objects from the data, identifies and classifies the route curve objects to obtain horizontal curve objects and vertical curve objects; establishes unified mileage parameters shared by the two objects and performs space mapping, performs space composition according to the plane projection coordinates and longitudinal elevation at the same mileage, generates three-dimensional control points and constructs a tunnel three-dimensional center line. The application can realize accurate correspondence of horizontal and vertical curves and automatic conversion of discrete route design data into continuous three-dimensional center lines, reduces manual calculation errors, and improves the automation degree of tunnel center line generation and the spatial modeling precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of tunnel modeling technology, specifically to a method and system for generating three-dimensional centerlines of tunnels based on multi-source heterogeneous data. Background Technology

[0002] With the rapid development of BIM, digital twin, and intelligent construction technologies in underground engineering, tunnel engineering is gradually shifting from traditional two-dimensional design to three-dimensional digital design. The tunnel's three-dimensional centerline, as the spatial geometric framework of the tunnel, is a crucial foundation for subsequent cross-section layout, lining modeling, steel arch positioning, and construction simulation. Currently, route design data for highway and railway tunnels is typically stored separately in Excel or CAD files in the form of horizontal curve intersection tables, vertical curve gradient change point tables, and longitudinal section design tables. This data is discrete and independent, lacking a unified three-dimensional spatial representation method.

[0003] In existing technologies, the three-dimensional centerline of a tunnel is usually generated manually or semi-automatically. Technicians need to calculate the plane coordinates, elevation coordinates and spatial direction according to the design mileage, and then manually combine them to form a three-dimensional spatial curve. This method has the following problems: (1) The horizontal curve and vertical curve data are independent of each other, and the spatial composite process is complex; (2) The manual calculation steps are cumbersome and the calculation efficiency is low; (3) Accumulated errors are easy to be generated during long-distance continuous calculation; (4) Centerline offset will lead to overall positioning errors of lining, steel arch frame and BIM components; (5) The cross-section rotation angle usually needs to be manually adjusted, and the degree of automation is low; (6) Traditional modeling methods are difficult to meet the requirements of parametric BIM modeling.

[0004] In addition, most existing methods rely on manual identification of horizontal and vertical curve objects, lacking automatic classification and automatic association mechanisms, making it difficult to form a unified parameter system between route data and BIM models.

[0005] Therefore, there is an urgent need to propose a method that can automatically read route design data and realize automatic identification of horizontal and vertical curves, spatial composite, three-dimensional centerline generation, and automatic control of cross-section attitude, so as to improve the accuracy and automation level of tunnel digital modeling. Summary of the Invention

[0006] The purpose of this invention is to address the technical problems in the prior art, such as the inability to uniformly analyze multi-source heterogeneous data, the inability to automatically spatially composite horizontal and vertical curves, the inability to automatically calculate point elevations by mileage, the inability to automatically generate centerlines by segment length, and the inability to directly call BIM platforms. This invention provides a method and system for generating three-dimensional centerlines of tunnels based on multi-source heterogeneous data, achieving fully automatic, high-precision, and configurable generation of three-dimensional centerlines of tunnels.

[0007] To achieve the above objectives, this invention provides a method for generating a three-dimensional centerline of a tunnel based on multi-source heterogeneous data, the method comprising: Obtain multi-source heterogeneous route design data for the tunnel to be constructed, including horizontal route data and longitudinal elevation data; Extract route control points and route curve objects from the multi-source heterogeneous route design data; The route curve objects are identified and classified to obtain horizontal curve objects that represent horizontal routes and vertical curve objects that represent longitudinal elevation routes. Establish a unified mileage parameter shared by the horizontal curve object and the vertical curve object, and perform spatial mapping on the horizontal curve object and the vertical curve object based on the unified mileage parameter; Based on the unified mileage parameters and spatial mapping results, the planar projection coordinates of the corresponding mileage are obtained on the horizontal curve object, and the longitudinal elevation of the corresponding mileage is obtained on the vertical curve object. The planar projection coordinates and longitudinal elevation corresponding to the same mileage are spatially combined to generate corresponding three-dimensional control points, and the three-dimensional centerline of the tunnel is generated based on the three-dimensional control points.

[0008] As a further improvement to the above technical solution, the step of obtaining multi-source heterogeneous route design data of the tunnel to be built includes: preprocessing the tunnel CAD plan drawing, extracting the tunnel plan line, inserting route control points and placing the coordinate origin at the starting point of the tunnel plan line, and using the tunnel plan line as the plan route data; preprocessing the tunnel profile drawing, extracting the vertical curve, and using the vertical curve as the longitudinal elevation data.

[0009] As a further improvement to the above technical solution, the extraction steps of the route control points and route curve objects include: based on the Dynamo visual programming platform, reading the horizontal and vertical curve design objects in the CAD through the ActiveX interface; obtaining the CAD object through the ActiveX.GetCOMObjects node; extracting the point object attributes in the CAD object through the ActiveX.PointProperties node to obtain the point object COM Points, and using the point object COM Points as the route control points; extracting the polyline object attributes in the CAD object through the ActiveX.PolylineProperties node to obtain the polyline object COM PolyCurves, and using the polyline object COM PolyCurves as the route curve object; and controlling the data reading process of the CAD object through a Boolean trigger node.

[0010] As a further improvement to the above technical solution, the steps for obtaining the horizontal curve object and the vertical curve object include: using the route polylines corresponding to the route control points and polyline objects as input, sorting and classifying the route polylines using a Python script; establishing a distant reference point, calculating the distance between the curve starting point of each route polyline and the distant reference point, and obtaining a distance sequence; sorting the route polylines in the distance sequence in ascending order of distance; defining the route polylines that are sorted first and meet the horizontal curve recognition conditions as horizontal curve objects, and retaining the original planar coordinates of the horizontal curve objects; performing coordinate translation on the route polylines that are sorted later and meet the vertical curve recognition conditions, and defining the coordinate-translated route polylines as vertical curve objects.

[0011] As a further improvement to the above technical solution, the step of establishing unified mileage parameters includes setting route parameters, which include starting mileage, starting elevation, target mileage sequence, segment length, horizontal curve object, vertical curve object, continuous mileage control parameters, and intermediate segment control parameters. The starting mileage is used to determine the starting benchmark for route mileage calculation, the target mileage sequence is used to determine the set of mileage values ​​to be calculated, and the set of mileage values ​​is segmented according to the segment length and intermediate segment control parameters to obtain a mileage sequence as a unified mileage parameter. The horizontal curve object is associated with the unified mileage parameter to obtain the planar projection coordinates at the corresponding mileage; the vertical curve object is associated with the unified mileage parameter to obtain the longitudinal elevation at the corresponding mileage.

[0012] As a further improvement to the above technical solution, before spatially mapping the horizontal curve object and the vertical curve object based on the unified mileage parameter, the method further includes spatial normalization processing of the vertical curve object. The spatial normalization processing includes: obtaining the starting coordinates of the vertical curve object; establishing a translation vector based on the starting coordinates; and performing spatial translation on the vertical curve object according to the translation vector, so that the vertical curve object is uniformly moved to a preset coordinate reference position.

[0013] As a further improvement to the above technical solution, the step of obtaining the longitudinal elevation at the corresponding mileage on the vertical curve object includes: establishing a corresponding cross-sectional plane based on the mileage value in the unified mileage parameters; solving for the intersection point between the vertical curve object and the corresponding cross-sectional plane; and obtaining the longitudinal elevation corresponding to the mileage value based on the longitudinal coordinates of the intersection point and the starting elevation.

[0014] As a further improvement to the above technical solution, the step of generating the three-dimensional control points includes: determining a plane point at the corresponding mileage on the horizontal curve object according to the unified mileage parameters and spatial mapping results; translating the plane point along the Z-axis according to the longitudinal elevation at the corresponding mileage; and using the plane point after elevation translation as the three-dimensional control point at the corresponding mileage. It also includes: generating a three-dimensional control point sequence according to the order of each mileage, and constructing a three-dimensional centerline of the tunnel based on the three-dimensional control point sequence.

[0015] As a further improvement to the above technical solution, the step of generating the tunnel's three-dimensional centerline includes: determining whether to perform intermediate segmentation based on the intermediate segmentation control parameters; when intermediate segmentation is not performed, outputting the three-dimensional control points corresponding to the endpoints of the mileage interval; when intermediate segmentation is performed, discretizing the mileage interval at equal intervals according to the segment length to obtain multiple segment mileages, and generating three-dimensional control points corresponding to each segment mileage; when the remaining distance of the mileage interval is less than the segment length, taking the endpoint of the mileage interval as the final segmentation point; generating discrete nodes for the centerline according to the mileage order of each three-dimensional control point, and generating the tunnel's three-dimensional centerline based on the discrete nodes for the centerline; Before generating the discrete nodes of the centerline, the lengths of the horizontal curve object and the vertical curve object are obtained respectively, and the minimum value of the two is taken as the computable length. When the input mileage exceeds the computable length, the calculation of the corresponding mileage is terminated.

[0016] This invention also provides a tunnel three-dimensional centerline generation system based on multi-source heterogeneous data, the system comprising: The data acquisition module is used to acquire multi-source heterogeneous route design data of the tunnel to be built, which includes horizontal route data and longitudinal elevation data. The route object extraction module is used to extract route control points and route curve objects from the multi-source heterogeneous route design data. The route object classification module is used to identify and classify the route curve objects to obtain horizontal curve objects that represent the planar route and vertical curve objects that represent the longitudinal elevation of the route. The unified mileage mapping module is used to establish a unified mileage parameter shared by the horizontal curve object and the vertical curve object, and to perform spatial mapping on the horizontal curve object and the vertical curve object based on the unified mileage parameter; The coordinate elevation acquisition module is used to obtain the planar projection coordinates of the corresponding mileage on the horizontal curve object and the longitudinal elevation of the corresponding mileage on the vertical curve object based on the unified mileage parameters and spatial mapping results. The centerline generation module is used to spatially combine the planar projection coordinates and longitudinal elevation corresponding to the same mileage to generate corresponding three-dimensional control points, and generate the tunnel three-dimensional centerline based on the three-dimensional control points.

[0017] Compared with the prior art, the method and system for generating three-dimensional centerlines of tunnels provided by the present invention have the following advantages: (1) Automatic conversion of discrete route design data to continuous three-dimensional centerline was realized, improving the accuracy of tunnel spatial modeling; (2) The cumulative error caused by manual calculation was reduced by the composite calculation of horizontal and vertical curves; (3) Automatic identification and classification of horizontal and vertical curve objects were realized, improving the efficiency of route data processing; (4) Accurate correspondence between horizontal and vertical curves was realized by the unified mileage parameter system, avoiding spatial misalignment problems; (5) Three-dimensional control points were automatically generated, improving the efficiency of tunnel parametric modeling; (6) The normal plane of the section was automatically derived based on the curve derivative, realizing automatic control of component posture; (7) The workload of manual rotation and manual correction in BIM modeling was reduced; (8) The automation level of tunnel digital design, construction simulation and intelligent construction was improved; (9) A unified spatial coordinate basis was provided for subsequent digital twins, intelligent construction and construction monitoring. Attached Figure Description

[0018] Figure 1 This is a flowchart of the method for generating a tunnel three-dimensional centerline based on multi-source heterogeneous data in an embodiment of the present invention; Figure 2 This is a framework diagram of a tunnel 3D centerline generation system based on multi-source heterogeneous data in an embodiment of the present invention; Figure 3 This is a diagram of the tunnel planar line elements in an embodiment of the present invention; Figure 4 This is a diagram of the vertical curve elements of the tunnel in an embodiment of the present invention; Figure 5 Import the script diagram for the horizontal and vertical curve elements of the tunnel in the embodiments of the present invention; Figure 6 This is a classification diagram of the horizontal and vertical curve elements of the tunnel in an embodiment of the present invention; Figure 7 This is a diagram showing the processing of horizontal and vertical curve elements of the tunnel in an embodiment of the present invention; Figure 8 This is a diagram showing the generation of horizontal and vertical curves of a tunnel in an embodiment of the present invention; Figure 9 This is a tunnel contour generation diagram in an embodiment of the present invention; Figure 10 This is a diagram of the tunnel entity in an embodiment of the present invention. Detailed Implementation

[0019] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the following embodiments are only used to illustrate the present invention and are not intended to limit the scope of protection of the present invention; in the absence of conflict, the following embodiments and the technical features in the embodiments can be combined with each other.

[0020] Example 1 like Figure 1 As shown, this embodiment provides a method for generating a tunnel's 3D centerline based on multi-source heterogeneous data. The method executes in the following order: acquiring multi-source heterogeneous route design data for the tunnel to be built; extracting route control points and route curve objects; identifying and classifying the route curve objects; spatially mapping horizontal and vertical curve objects based on unified mileage parameters; obtaining the planar projection coordinates and longitudinal elevation corresponding to the same mileage; and spatially compositing to generate 3D control points and then generating the tunnel's 3D centerline. This method can be implemented using Dynamo and IronPython environments and specifically includes the following steps: S1: Obtain multi-source heterogeneous route design data for the tunnel to be built. The multi-source heterogeneous route design data includes horizontal route data and vertical elevation data. Specifically, the tunnel CAD plan drawings are preprocessed to extract the tunnel horizontal lines, and route control points are inserted at the starting points of the tunnel horizontal lines, with a coordinate origin placed. These tunnel horizontal lines are used as the horizontal route data. The tunnel profile drawings are preprocessed to extract vertical curves, which are used as the vertical elevation data. Figure 3 As shown, the tunnel horizontal line is used to represent the curved shape of the route on the horizontal projection plane; for example... Figure 4 As shown, the vertical curve is used to represent the elevation change of the route in the longitudinal direction.

[0021] S2: Automatic Reading of CAD Tunnel Curve Objects This step is used to extract route control points and route curve objects from the multi-source heterogeneous route design data. Specifically, based on the Dynamo visual programming platform, horizontal and vertical curve design objects in the CAD are read through the ActiveX interface; CAD objects are obtained through the ActiveX.GetCOMObjects node; point object properties in the CAD objects are extracted through the ActiveX.PointProperties node to obtain point objects (COM Points), which are then used as route control points; polyline object properties in the CAD objects are extracted through the ActiveX.PolylineProperties node to obtain polyline objects (COM PolyCurves), which are then used as route curve objects; the data reading process of the CAD objects is controlled through a Boolean trigger node, such as... Figure 5As shown in the figure. Wherein, point objects are used for identifying vertical curve control points, and polyline objects are used for identifying horizontal routes.

[0022] Specifically, in Figure 5 the process of importing the tunnel horizontal and vertical curve elements shown by the script, the left Boolean control is set to True first, triggering the ActiveX.GetCOMObjects node to read all primitive data in the drawing through the COM interface of AutoCAD, wherein the extracted CAD point objects are connected to the ActiveX.PointProperties node to parse and obtain the coordinates of control points, and the polyline and spline curve objects are connected to the ActiveX.PolylineProperties node to parse and obtain the linear geometric information of horizontal curves and vertical curves; the coordinates of control points and curve geometric data are respectively input into the tunnel center line node, which integrates point position and linear information, completes tunnel spatial center line fitting, continuous mileage calculation and route segmentation, and then transfers the split horizontal line, vertical curve, mileage and segmented data to the tunnel model structure route parameter node, which further calculates and generates parameters such as three-dimensional coordinate points, tangent vectors and elevations, and finally outputs basic route data that can be used for parametric BIM modeling of tunnel linings and steel archs on the Revit platform.

[0023] S3: Automatic classification of route objects This step is used to identify and classify the route curve objects, and obtain horizontal curve objects for representing horizontal routes and vertical curve objects for representing longitudinal elevation routes. After the system reads the route objects, it takes the route control points and route polylines corresponding to polyline objects as inputs, and sorts and classifies the route polylines through a Python script. The Dynamo program inputs include: point: route control points; polycurves: route polylines. The Python program sorts and classifies the input curves based on the distance relationship between the starting point of the curve and the reference point, as shown in Figure 6 the figure. The corresponding execution process code is: import clr import sys sys.path.append(r"C:\Program Files (x86)\IronPython 2.7\Lib") import codecs#Import the coding block codecs #with codecs.open(r"C:\Users\86133\Desktop\输出中文.xls",mode="w",encoding="utf-8") as f : #f.write("Can output Chinese characters externally") clr.AddReference('ProtoGeometry') from Autodesk.DesignScript.Geometry import * po=IN[0] pl=IN[1] tespo=Point.ByCoordinates(-100000000,0,0) distance=[[i,tespo.DistanceTo(i)] for i in pl] new_list=sorted(distance,key=lambda x:x[1]) horizontal_pl=new_list[0][0].Translate(-po.X,-po.Y,0) ve_startpo=new_list[1][0].StartPoint vertical_pl=new_list[1][0].Translate(-ve_startpo.X,-ve_startpo.Y,0) OUT=horizontal_pl,vertical_pl In the above execution process, two Input nodes input the line control point and the polycurve set respectively. The two types of data are connected to the IN[0] and IN[1] input terminals of the custom IronPython script node for “classification of horizontal and vertical curves”. The script relies on the input point and curve data, and automatically completes the identification and classification of horizontal and vertical curves and integrates them into a set of data through the logic of benchmark distance measurement sorting and coordinate translation. The output data is sent to the Code Block node, and the data is split using indexes a[0] and a[1]. Finally, the horizontal and vertical curves are output separately through the two Output nodes to realize the automatic classification and separation of tunnel horizontal and vertical curves.

[0024] The corresponding core implementation logic is as follows: (1) Establish reference points The program first establishes a distant reference point: P0 = ( 100000000,0,0), the route order is determined by the distance relationship between the reference point and the starting point of the curve.

[0025] (2) Calculate the distance sequence The program calculates the starting distance for all curve objects:

[0026] The multi-segment lines of each route are then sorted in the distance sequence from shortest to longest distance. Let be the distance from the starting point of the curve of the i-th route polyline. Let i be the starting point of the polyline curve of the i-th route. For distant reference points.

[0027] (3) Horizontal curve recognition The route polylines that are ranked first and meet the criteria for horizontal curve identification are defined as horizontal curve objects, and the original planar coordinates of the horizontal curve objects are retained for subsequent horizontal route fitting.

[0028] (4) Vertical curve recognition Perform coordinate translation on the route polylines that are ranked later and meet the vertical curve recognition criteria:

[0029] After eliminating the effects of planar offset, the translated route polyline is defined as a vertical curve object. This method can automatically distinguish between planar routes and longitudinal elevation routes without requiring manual specification of the object type. Let x, y, and z be the coordinates of the point after the coordinate translation, and z be the coordinates of the point before the translation. , This is the corresponding plane offset.

[0030] S4: Establishment of Unified Mileage Parameters and Spatial Mapping This step is used to establish a unified mileage parameter shared by the horizontal curve object and the vertical curve object, and to perform spatial mapping between the horizontal curve object and the vertical curve object based on the unified mileage parameter. The program input parameters include: start_data: starting mileage; elevation: starting elevation; mileage_data: target mileage sequence; division_length: segment length; plane_curve: horizontal curve object; vertical_curve: vertical curve object; continuous_mileage: continuous mileage control parameter; division: intermediate segment control parameter.

[0031] Specifically, `start_data` determines the starting reference for route mileage calculation, `mileage_data` determines the set of mileage values ​​to be calculated, and the mileage value set is segmented according to `division_length` and `division` to obtain a mileage sequence as a unified mileage parameter; `plane_curve` is associated with the unified mileage parameter and is used to obtain the planar projection coordinates at the corresponding mileage; `vertical_curve` is associated with the unified mileage parameter and is used to obtain the longitudinal elevation at the corresponding mileage; `elevation` is used as the starting elevation for the longitudinal elevation; and `continuous_mileage` is used as the control parameter for continuous or non-continuous mileage.

[0032] S5: Spatial Combination of Horizontal and Vertical Curves Based on unified mileage parameters and spatial mapping results, the system obtains the planar projected coordinates of the corresponding mileage point on the horizontal curve object. The spatial composite representation of the horizontal line is as follows:

[0033] Where: s is the route mileage. Represents the projection point on the plane; , Using the corresponding X and Y coordinates, a smooth transition between horizontal curves is achieved through piecewise continuous calculation.

[0034] A longitudinal elevation function is established based on the slope change points and slope data in the longitudinal profile. For the connecting areas between different slope segments, a continuous processing method using quadratic parabola or spline interpolation is employed to establish the elevation function.

[0035] Where: s is the route mileage; z is the design elevation. Through continuous fitting of vertical curves, the smoothness of the elevation change of the spatial centerline is ensured.

[0036] S6: Vertical Curve Space Normalization Before spatially mapping the horizontal and vertical curve objects based on the unified mileage parameters, the vertical curve objects undergo spatial normalization. Since vertical curves typically exhibit planar offset, this invention first performs translational normalization on the vertical curves. This is achieved by obtaining the starting coordinates of the vertical curve:

[0037] in, The starting coordinates of the vertical curve object. , , These are the coordinates of the starting point in the X, Y, and Z directions, respectively.

[0038] Establish a translation vector based on the starting coordinates:

[0039] in, It is a translation vector. , The coordinates of the starting point of the vertical curve object in the X and Y directions.

[0040] Then, a spatial translation is performed on the vertical curve object according to the translation vector:

[0041] Where P is the point in the vertical curve object to be translated. This is the point after spatial translation.

[0042] The vertical curve objects are uniformly moved to a preset coordinate reference position, and the spatially translated vertical curve objects are used as the vertical curve objects for obtaining longitudinal elevation in spatial mapping. This process is used to eliminate the influence of planar offset on longitudinal profile calculation and improve elevation matching accuracy.

[0043] S7: Continuous and Discontinuous Mileage Recognition This invention proposes a method for identifying intervals that is compatible with both continuous and non-continuous mileage. When continuous_mileage=True, the system automatically establishes continuous intervals.

[0044] When continuous_mileage=False, the system automatically establishes non-continuous mileage intervals:

[0045] This allows for compatibility with complex engineering scenarios such as continuous lines, segmented lines, and skipped sections. , This refers to the start and end mileage of a continuous mileage range. , This refers to the start and end mileage of a non-continuous mileage range.

[0046] S8: Solving for longitudinal elevation This step is used to obtain the longitudinal elevation at the corresponding mileage on the vertical curve object. The system obtains the corresponding elevation based on the spatial intersection relationship between the vertical curve and the cross-sectional plane. First, the longitudinal profile baseline is established:

[0047] Where L is the longitudinal profile baseline, and To determine the two endpoints of the longitudinal profile baseline.

[0048] Below the aforementioned longitudinal profile baseline, establish a corresponding cross-sectional plane based on the mileage values ​​in the unified mileage parameters:

[0049] in, The cross-sectional plane corresponding to the mileage value s This refers to the process of establishing a corresponding cross-sectional plane based on the mileage value s.

[0050] Find the intersection point of the vertical curve object and the corresponding cross-sectional plane:

[0051] in, For vertical curve objects, This is the intersection point of the vertical curve object and the corresponding cross-sectional plane.

[0052] Based on the longitudinal coordinates of the intersection point and the initial elevation, the longitudinal elevation corresponding to the mileage value is obtained:

[0053] Where H is the longitudinal elevation corresponding to the mileage value. This is the initial elevation; The vertical coordinates of the intersection point.

[0054] S9: Construction of 3D Centerline and Generation of 3D Control Points The system spatially maps horizontal and vertical curves according to unified mileage parameters to establish a three-dimensional spatial centerline:

[0055] Where: s is the route mileage. Represents the center line point in three-dimensional space; , Originating from a plane line; It originates from vertical curves. The system achieves automatic coupling between horizontal projection, longitudinal elevation, and spatial direction based on unified mileage parameters.

[0056] Based on the unified mileage parameters and spatial mapping results, determine the plane point at the corresponding mileage on the horizontal curve object:

[0057] Based on the longitudinal elevation at the corresponding mileage, the plane point is translated along the Z-axis:

[0058] The horizontal points after elevation translation are used as three-dimensional control points at corresponding mileages, and a sequence of three-dimensional control points is generated according to the order of each mileage. The three-dimensional centerline of the tunnel is then constructed based on this sequence of control points. The generation results can be found in [reference needed]. Figure 8 The core technical advantages of this invention are clearly demonstrated in the illustrated results: the left side of the figure shows the standard cross-sectional outline of the tunnel lining, and the right side shows the three-dimensional centerline of the tunnel generated by automatic classification of horizontal and vertical curves and mileage segmentation algorithms. The blue control points distributed along the line are mileage control points automatically set by the system according to preset segmentation rules. Based on the parameter calculation logic of this invention, the standard cross-section can be automatically anchored to the corresponding control point position of the centerline. The axis tangent vector and cross-section normal plane parameters obtained above are used to automatically complete the spatial rotation and orientation alignment of the cross-section, eliminating the need for manual positioning and rotation correction of the cross-section position. The system simultaneously generates a complete set of three-dimensional coordinates, elevation, and tangent vector modeling data for each control point. This enables the cross-section to be adaptively spatially arranged according to the turning of the horizontal curve and the elevation fluctuation of the vertical curve, fundamentally avoiding problems such as cross-section misalignment, inclination deviation, and elevation mismatch that occur in traditional manual modeling. It also enables one-click driving of parametric BIM for tunnel components such as lining and steel arch based on point parameters. The generation process intuitively achieves the technical effect of automatically and accurately converting two-dimensional cross-sectional drawings and route shapes into three-dimensional tunnel entity models, significantly reducing the workload of manual segmented calculation, coordinate input, and component positioning.

[0059] The three-dimensional control points serve as the data basis for both BIM component positioning points and centerline discrete nodes.

[0060] S10: Intermediate segmentation control and length consistency verification This invention proposes an automatic segmentation and discretization method based on the division parameter. The method determines whether intermediate segmentation is performed based on the division parameter; when intermediate segmentation is not performed ( ), output the three-dimensional control points corresponding to the endpoints of the mileage interval; when performing intermediate segmentation ( The mileage interval is discretized at equal intervals according to the division_length to obtain multiple segmented mileages, and three-dimensional control points corresponding to each segmented mileage are generated. The discretization process satisfies:

[0061] in, s is the segment length. For the i-th segment mileage, This is the next segment mileage. If the remaining distance in the mileage interval is less than `division_length`, then... In this method, the endpoint of the mileage interval is taken as the final segmentation point, and discrete nodes of the centerline are generated according to the mileage order of each three-dimensional control point. This method avoids endpoint omission, excessively long segments, and non-uniform discretization.

[0062] Before generating the discrete nodes of the centerline, obtain the lengths of the horizontal curve object and the vertical curve object respectively, and take the minimum of the two:

[0063] in, The length of the horizontal curve object. The length of the vertical curve object. The minimum length is specified. When the input mileage exceeds the minimum length, the system automatically terminates the calculation of the corresponding mileage and outputs an error message: "Mileage value exceeds the length of the horizontal line or the vertical curve." This mechanism can prevent parameter out-of-bounds errors, centerline misalignment, and data anomalies.

[0064] like Figure 7 The tunnel horizontal and vertical curve element processing structure shown is used to undertake the aforementioned steps such as establishing unified mileage parameters, normalizing vertical curve space, identifying continuous and discontinuous mileage, solving longitudinal elevation, generating three-dimensional control points, and verifying length consistency. In the IronPython script node of Dynamo, it can be implemented through the following process: data input, parameter processing, mileage segmentation, elevation solving, three-dimensional point generation, and result output.

[0065] This Dynamo process passes mileage and basic parameters data (IN[0]), plane curve plane_curve (IN[1]), vertical curve vertical_curve (IN[2]), mileage continuous control boolean value continuous_mileage (IN[3]), and intermediate segment control boolean value division (IN[4]) to the "Route Data Processing" IronPython script node through five input nodes. The script code first extracts the starting mileage, benchmark elevation, original mileage array, and segment step length from the input data and completes the unit conversion. Then, it performs coordinate translation on the vertical curve to achieve alignment. After that, five custom functions are defined in sequence: mileage interval splitting, vertical curve elevation solution, three-dimensional line point generation, horizontal and vertical curve minimum length verification, and mileage fine segmentation. The code first sorts the original mileage and checks whether the maximum converted mileage exceeds the effective length of the horizontal / vertical curve. If it exceeds the limit, an error message is output. Otherwise, the basic mileage segment is generated based on the mileage interval division rules distinguished by the "mileage continuity" parameter. Then, according to the "intermediate segment" switch, the code selects to use only the given mileage point or to uniformly interpolate the points in the interval according to the set segment length. The curve parameters, three-dimensional spatial coordinates, tangent vectors, plane projection points, and corresponding elevation values ​​are solved point by point in a loop. Finally, the five types of results are packaged and output from the script OUT port. Subsequently, the dataset is split by the Code Block node through the index a[0]~a[4]. The parameters, three-dimensional points, tangent vectors, plane points, and elevation values ​​are output independently by the five Output nodes to complete the batch automatic calculation of the basic geometric and attitude parameters required for tunnel line modeling.

[0066] S11: Output of tangent vector, normal plane, and model parameters After generating the tunnel's 3D centerline, the system automatically solves for the corresponding parameters:

[0067] in, Let be the centerline tangent vector at mileage s. The center line in three-dimensional space. This is the differential of the mileage.

[0068] Tangent vectors are used for section orientation control, component rotation control, and normal plane establishment. The normal plane of the section is established based on the tangent vector:

[0069] in, Let P be the normal vector, and let P be any point on the normal plane of the cross section. This is the current control point, different from the distant reference point in S3. The generated 3D centerline, control point coordinates, tangential parameters, normal parameters, and attitude parameters are output to the Revit platform. Based on the output parameters, tunnel cross-section layout, lining model generation, steel arch positioning, parametric BIM modeling, and 3D construction visualization are performed, such as... Figure 9 and Figure 10 As shown, the system automatically calculates the section rotation angle based on the normal plane, enabling automatic rotation of the lining, automatic alignment of the steel arch frame, automatic layout of BIM sections, and automatic adjustment of the spatial posture of components.

[0070] like Figure 9 The tunnel outline shown in the figure intuitively demonstrates the advantages of the modeling technology of this invention: all tunnel lining cross sections are automatically and continuously arranged along the spatial tunnel centerline at set mileage intervals. The cross sections adapt to spatial torsion by following the plane curves and longitudinal elevation changes of the line. Each cross section always maintains orthogonality to the tangent of the tunnel centerline based on the axis tangent vector and normal parameters calculated by the algorithm mentioned above. The overall arrangement is smooth and fits the spatial curve shape of the tunnel. Compared with the inefficient modeling method of manually arranging cross sections one by one, manually calculating the rotation angle of each point, and repeatedly correcting the posture of the cross sections, this invention relies on a complete set of algorithms for automatic sorting of horizontal and vertical curves, intelligent segmentation of mileage, and batch solution of three-dimensional points and tangent parameters. It can complete the accurate positioning and posture self-calibration of a large number of cross sections along the entire line with one click without manual intervention. The cross section spacing is uniform and regular, without skew or misalignment, and the elevation matching is without deviation. Based on this cross section arrangement framework, a complete tunnel lining and steel arch frame BIM entity model can be automatically generated, which greatly reduces the amount of manual calculation and correction work and forms a significant technical improvement in modeling accuracy, automation and modeling efficiency.

[0071] like Figure 10 The tunnel entity shown is a detailed BIM entity model of a full-section curved tunnel generated using this invention. A magnified view clearly reveals the detailed construction of the tunnel lining structure and the external support anchor bolts. This invention utilizes a complete algorithm that automatically imports and distinguishes between horizontal and vertical curves, then batch-calculates mileage segments, centerline tangent vectors, and cross-sectional normal parameters. Standard tunnel cross-sections are automatically and accurately arranged along the spatial bending centerline, adaptively completing spatial twisting. The entire tunnel lining and anchor bolt support components are generated in batches at once. The lining contour transitions smoothly at curves, and each cross-section maintains orthogonal alignment with the route axis. This completely eliminates the tedious process of manually placing cross-sections, calculating angles and elevations, and repeatedly correcting component misalignments in traditional modeling. It achieves one-click generation of a complete 3D tunnel entity, including lining and support details, from original route drawings. This clearly demonstrates the technical advantages of this invention: high degree of automation in modeling, model alignment with actual engineering conditions, and significantly improved modeling efficiency and accuracy.

[0072] In this embodiment, a horizontal curve refers to the curve form of the route on the horizontal projection plane, including straight lines, circular curves, and transition curves; a vertical curve refers to the elevation change curve of the route in the longitudinal profile direction; a normal vector refers to the direction vector perpendicular to the cross-sectional plane; parametric modeling refers to a modeling method that automatically generates and updates the model through parameter-driven modeling; Dynamo is a visual programming tool under the Autodesk platform; and BIM stands for Building Information Modeling.

[0073] Example 2 like Figure 2 As shown, this embodiment provides a tunnel 3D centerline generation system based on multi-source heterogeneous data, which corresponds to the method described in Embodiment 1. It includes a data acquisition module, a route object extraction module, a route object classification module, a unified mileage mapping module, a coordinate elevation acquisition module, and a centerline generation module.

[0074] The data acquisition module is used to acquire multi-source heterogeneous route design data for the tunnel to be constructed, including horizontal route data and longitudinal elevation data. The route object extraction module is used to extract route control points and route curve objects from the multi-source heterogeneous route design data. The route object classification module is used to identify and classify the route curve objects, obtaining horizontal curve objects representing the horizontal route and vertical curve objects representing the longitudinal elevation route.

[0075] The unified mileage mapping module is used to establish unified mileage parameters shared by the horizontal and vertical curve objects, and to perform spatial mapping between the horizontal and vertical curve objects based on the unified mileage parameters. The coordinate elevation acquisition module is used to obtain the planar projection coordinates of the corresponding mileage on the horizontal curve object and the longitudinal elevation of the corresponding mileage on the vertical curve object, based on the unified mileage parameters and the spatial mapping results. The centerline generation module is used to spatially combine the planar projection coordinates and longitudinal elevation corresponding to the same mileage to generate corresponding three-dimensional control points, and to generate the tunnel's three-dimensional centerline based on the three-dimensional control points.

[0076] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, or arbitrary combinations of the technical features in the above embodiments made within the spirit and principles of the present invention should be included within the scope of protection of the present invention. The scope of protection of the present invention is defined by the claims.

Claims

1. A method for generating a three-dimensional centerline of a tunnel based on multi-source heterogeneous data, characterized in that, include: Obtain multi-source heterogeneous route design data for the tunnel to be constructed, including horizontal route data and longitudinal elevation data; Extract route control points and route curve objects from the multi-source heterogeneous route design data; The route curve objects are identified and classified to obtain horizontal curve objects that represent horizontal routes and vertical curve objects that represent longitudinal elevation routes. Establish a unified mileage parameter shared by the horizontal curve object and the vertical curve object, and perform spatial mapping on the horizontal curve object and the vertical curve object based on the unified mileage parameter; Based on the unified mileage parameters and spatial mapping results, the planar projection coordinates of the corresponding mileage are obtained on the horizontal curve object, and the longitudinal elevation of the corresponding mileage is obtained on the vertical curve object. The planar projection coordinates and longitudinal elevation corresponding to the same mileage are spatially combined to generate corresponding three-dimensional control points, and the three-dimensional centerline of the tunnel is generated based on the three-dimensional control points.

2. The method for generating a tunnel three-dimensional centerline based on multi-source heterogeneous data according to claim 1, characterized in that, The steps for obtaining multi-source heterogeneous route design data for the tunnel to be built include: preprocessing the tunnel CAD plan drawing, extracting the tunnel plan line, inserting route control points at the starting point of the tunnel plan line, placing the coordinate origin, and using the tunnel plan line as the plan route data; preprocessing the tunnel profile drawing, extracting the vertical curve, and using the vertical curve as the longitudinal elevation data.

3. The method for generating a tunnel three-dimensional centerline based on multi-source heterogeneous data according to claim 1, characterized in that, The steps for extracting route control points and route curve objects include: using the Dynamo visual programming platform, reading horizontal and vertical curve design objects from the CAD file via the ActiveX interface; obtaining CAD objects via the ActiveX.GetCOMObjects node; extracting point object properties from the CAD objects via the ActiveX.PointProperties node to obtain point objects COMPoints, and using the point objects COM Points as route control points; extracting polyline object properties from the CAD objects via the ActiveX.PolylineProperties node to obtain polyline objects COM PolyCurves, and using the polyline objects COM PolyCurves as the route curve objects; and controlling the data reading process of the CAD objects via Boolean trigger nodes.

4. The method for generating a tunnel three-dimensional centerline based on multi-source heterogeneous data according to claim 3, characterized in that, The steps for obtaining the horizontal curve objects and vertical curve objects include: using the route control points and the corresponding route polylines as input, sorting and classifying the route polylines using a Python script; establishing a distant reference point, calculating the distance between the curve starting point of each route polyline and the distant reference point, and obtaining a distance sequence; sorting the route polylines in the distance sequence in ascending order of distance; defining the route polylines that are ranked first and meet the horizontal curve recognition conditions as horizontal curve objects, and retaining the original planar coordinates of the horizontal curve objects; performing coordinate translation on the route polylines that are ranked last and meet the vertical curve recognition conditions, and defining the coordinate-translated route polylines as vertical curve objects.

5. The method for generating a tunnel three-dimensional centerline based on multi-source heterogeneous data according to claim 1, characterized in that, The steps for establishing the unified mileage parameters include setting route parameters, which include starting mileage, starting elevation, target mileage sequence, segment length, horizontal curve object, vertical curve object, continuous mileage control parameters, and intermediate segment control parameters. The starting mileage is used to determine the starting benchmark for route mileage calculation, the target mileage sequence is used to determine the set of mileage values ​​to be calculated, and the set of mileage values ​​is segmented according to the segment length and intermediate segment control parameters to obtain a mileage sequence as a unified mileage parameter. The horizontal curve object is associated with the unified mileage parameter to obtain the planar projection coordinates at the corresponding mileage; the vertical curve object is associated with the unified mileage parameter to obtain the longitudinal elevation at the corresponding mileage.

6. The method for generating a tunnel three-dimensional centerline based on multi-source heterogeneous data according to claim 1, characterized in that, Before spatially mapping the horizontal curve object and the vertical curve object based on the unified mileage parameter, the method further includes spatial normalization processing of the vertical curve object. The spatial normalization processing includes: obtaining the starting coordinates of the vertical curve object; establishing a translation vector based on the starting coordinates; and performing spatial translation on the vertical curve object according to the translation vector, so that the vertical curve object is uniformly moved to a preset coordinate reference position.

7. The method for generating a tunnel three-dimensional centerline based on multi-source heterogeneous data according to claim 5 or 6, characterized in that, The steps for obtaining the longitudinal elevation at the corresponding mileage on the vertical curve object include: establishing a corresponding cross-sectional plane based on the mileage value in the unified mileage parameters; solving for the intersection point between the vertical curve object and the corresponding cross-sectional plane; and obtaining the longitudinal elevation corresponding to the mileage value based on the longitudinal coordinates of the intersection point and the starting elevation.

8. The method for generating a tunnel three-dimensional centerline based on multi-source heterogeneous data according to claim 1, characterized in that, The steps for generating the three-dimensional control points include: determining a plane point at the corresponding mileage on the horizontal curve object based on the unified mileage parameters and spatial mapping results; translating the plane point along the Z-axis according to the longitudinal elevation at the corresponding mileage; and using the translated plane point as the three-dimensional control point at the corresponding mileage. It also includes: generating a three-dimensional control point sequence in the order of each mileage, and constructing a three-dimensional centerline of the tunnel based on the three-dimensional control point sequence.

9. The method for generating a tunnel three-dimensional centerline based on multi-source heterogeneous data according to claim 5, characterized in that, The steps for generating the tunnel's three-dimensional centerline include: determining whether to perform intermediate segmentation based on the intermediate segmentation control parameters; when intermediate segmentation is not performed, outputting the three-dimensional control points corresponding to the endpoints of the mileage interval; when intermediate segmentation is performed, discretizing the mileage interval at equal intervals according to the segment length to obtain multiple segment mileages, and generating three-dimensional control points corresponding to each segment mileage; when the remaining distance of the mileage interval is less than the segment length, taking the endpoint of the mileage interval as the final segmentation point; generating discrete nodes for the centerline according to the mileage order of each three-dimensional control point, and generating the tunnel's three-dimensional centerline based on the discrete nodes for the centerline; Before generating the discrete nodes of the centerline, the lengths of the horizontal curve object and the vertical curve object are obtained respectively, and the minimum value of the two is taken as the computable length. When the input mileage exceeds the computable length, the calculation of the corresponding mileage is terminated.

10. A tunnel three-dimensional centerline generation system based on multi-source heterogeneous data, characterized in that, include: The data acquisition module is used to acquire multi-source heterogeneous route design data of the tunnel to be built, which includes horizontal route data and longitudinal elevation data. The route object extraction module is used to extract route control points and route curve objects from the multi-source heterogeneous route design data. The route object classification module is used to identify and classify the route curve objects to obtain horizontal curve objects that represent the planar route and vertical curve objects that represent the longitudinal elevation of the route. The unified mileage mapping module is used to establish a unified mileage parameter shared by the horizontal curve object and the vertical curve object, and to perform spatial mapping on the horizontal curve object and the vertical curve object based on the unified mileage parameter; The coordinate elevation acquisition module is used to obtain the planar projection coordinates of the corresponding mileage on the horizontal curve object and the longitudinal elevation of the corresponding mileage on the vertical curve object based on the unified mileage parameters and spatial mapping results. The centerline generation module is used to spatially combine the planar projection coordinates and longitudinal elevation corresponding to the same mileage to generate corresponding three-dimensional control points, and generate the tunnel three-dimensional centerline based on the three-dimensional control points.