Method, electronic device and storage medium for creating long distance closed mesh surface model

By using dynamic discretization and precise normal vector positioning techniques, a closed mesh surface model is generated, which solves the problems of vertex redundancy, large errors, and excessive volume in linear engineering 3D modeling, achieving efficient and accurate modeling results.

CN121033328BActive Publication Date: 2026-01-20DONGHUI (ZHEJIANG) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511537295.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-01-20
Estimated Expiration
2045-10-27

AI Technical Summary

Technical Problem

Existing technologies for 3D modeling of linear engineering suffer from problems such as redundant vertices of straight line segments, large discretization errors of curve segments, and excessively large model size, resulting in data redundancy and low modeling efficiency.

Method used

By employing dynamic discretization and precise normal vector positioning techniques, and inserting densification points through error control, a closed mesh surface model is generated, reducing vertex redundancy and improving modeling accuracy. Furthermore, a closed mesh storage scheme is used to eliminate redundant data within the model.

Benefits of technology

It effectively reduces redundancy at the vertices of straight line segments, controls discrete errors in small-radius curve segments, reduces model size, improves modeling accuracy and efficiency, and reduces the burden on software operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121033328B_ABST
    Figure CN121033328B_ABST
Patent Text Reader

Abstract

This invention discloses a method, electronic device, and storage medium for creating a long-distance closed mesh surface model. The method includes: obtaining the position of the baseline in three-dimensional space based on the route design results of linear engineering; analyzing cross-sectional graphics and constructing cross-sectional component data; establishing constraint relationships between points in the cross-sectional graphics based on baseline points and configuring labels for each constraint; generating an initial station list according to preset segment spacing, and dynamically inserting and merging densified points into the initial station list based on curve type to form a final station list; mapping corresponding points in the cross-section to three-dimensional space according to relative coordinates and planar unit normal vectors to generate a cross-section placement list; constructing quadrilateral meshes between adjacent cross-sections and splicing them to generate a transition mesh surface, combining the transverse meshes at the start and end points to form a closed mesh surface model. This invention significantly improves the accuracy and efficiency of three-dimensional modeling for long-distance linear engineering projects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of 3D modeling in transportation and water conservancy, and in particular to a method, electronic device and storage medium for creating long-distance closed mesh surface models, applicable to BIM 3D modeling of linear projects such as roads, tunnels, pipelines, rivers, canals and waterways. Background Technology

[0002] In the field of 3D modeling of linear engineering projects (such as roads and pipelines), existing technologies have formed a relatively fixed technical path, namely "discretization of horizontal and vertical data → generation of spatial line strings → volumetric extrusion modeling". However, this technical path has exposed many problems in practical applications. The core problems are concentrated on the accuracy defects of the discretization method and the volume control bottleneck of volumetric extrusion, which will be elaborated in detail below.

[0003] 1. Discretization Defects in Composite 3D Curves Based on Horizontal and Vertical Data: The 3D baseline of linear engineering is composed of the horizontal line (XY coordinates) and the vertical profile line (station-elevation). Current technologies generally employ the equal-interval discretization method, which extracts station numbers according to fixed segment intervals to generate spatial line strings. However, this method has significant problems:

[0004] (1) Redundancy problem of straight segments: On straight segments of the horizontal or vertical profile of the route, equal-interval discretization will generate a large number of equidistant vertices. For example, when the segment spacing is set to 0.5 meters, 2,000 vertices need to be generated for a 1-kilometer straight segment. However, these vertices do not change in geometric shape, resulting in serious data redundancy. Taking a route of about 3.7 km as an example, after discretization with an equal interval of 2.5 m, the number of inflection points after three-dimensional discretization is as high as 1,523, of which a large number of inflection points are redundant data, increasing the burden of data storage and processing.

[0005] (2) Error problem in small radius curve segments: In small radius circular arcs, transition curves, or longitudinal parabolas on the route plane, the equal-interval discretization method cannot match the changes in curve curvature due to the fixed station spacing. For example, in circular arc segments with a radius ≤ 100 meters, the maximum lateral offset between the discretized line string and the actual smooth curve often exceeds the allowable error of the project, resulting in substandard accuracy. Taking a circular arc with a turning angle of 64° and a radius of 100 as an example, after discretization with an equal interval of 2.5m, the maximum deviation of the route plane line reaches 0.0078m, or 7.8mm, which is an error that cannot be ignored for linear projects with high accuracy requirements.

[0006] 2. Section positioning and volume issues in block extrusion: Existing technologies, based on discretized spatial line strings, typically use block extrusion to generate 3D models (such as road entities, pipeline entities), but this method has the following problems:

[0007] (1) Inability to precisely control the cross-sectional direction: In the traditional block stretching process, since the baseline is a three-dimensional spatial line (e.g. Figure 9 As shown), it is difficult to accurately locate the X and Y axis directions of the cross-section. During the stretching process, the cross-section will rotate uncontrollably around the reference point. For non-circular cross-sections, this will lead to misalignment of the section, affecting the accuracy of the model. For example, in actual modeling, the original cross-section and the stretched cross-section may have inconsistent directions, causing the model to fail to accurately reflect the shape and structure of the actual project (such as...). Figure 10 As shown, the angle changed from 90° to 101.2051°.

[0008] (2) Large model size: The block extrusion method generates a solid model, which requires storing vertex coordinates, face information and internal filling data. This causes the model file size to grow exponentially with the number of vertices.

[0009] For example, when dealing with long-distance linear engineering projects (such as roads spanning hundreds of kilometers), the model will consume a large amount of disk and memory space. This can not only cause software lag, but may even lead to software crashes in extreme cases, seriously affecting the efficiency and stability of the modeling work.

[0010] In summary, the following technical challenges exist in the existing 3D modeling of linear engineering:

[0011] The traditional equal-interval discretization method uses a "one-size-fits-all" rule, which leads to redundancy at the vertices of straight line segments and large errors when discretizing small-radius curve segments.

[0012] The block stretching technique relies on the local vertex difference calculation of the tangential vector and is sensitive to the initial direction of the cross section, which causes uncontrollable rotation of the cross section direction.

[0013] The physical model is large in size because it needs to store internal padding data, which seriously affects software performance. Summary of the Invention

[0014] Based on the above background, in order to overcome the shortcomings of traditional 3D modeling, such as spatial line string discretization redundancy and error, failure of block stretching direction control, and model data redundancy, and to form an efficient, accurate, and lightweight linear engineering 3D modeling solution, this invention provides a method for creating long-distance closed mesh surface models. Through dynamic discretization, accurate normal vector positioning, and closed mesh storage, this invention solves at least one of the above-mentioned problems and constructs an efficient, accurate, and lightweight linear engineering 3D modeling system.

[0015] To achieve the above objectives, the present invention adopts the following technical solution:

[0016] In a first aspect, the present invention provides a method for creating a long-distance closed mesh surface model, comprising the following steps:

[0017] Based on the route design results of linear engineering, namely the route horizontal line and the route longitudinal profile line, the baseline is discretized according to the error control method to obtain the position of the baseline in three-dimensional space.

[0018] The cross-sectional graphic with reference points is analyzed, cross-sectional component data containing component names and component points is constructed, and the relative coordinates of each point with respect to the reference point are calculated. The reference point is the intersection of the spatial curve determined by the route horizontal line and the longitudinal profile line with the cross-sectional graphic.

[0019] Based on the benchmark points, establish the constraint relationships between each point in the cross-sectional diagram. The constraint types include horizontal constraints, vertical constraints, or slope constraints, and assign labels to each constraint.

[0020] An initial station list is generated based on the preset segment spacing. Error detection is performed on the curve segments of the horizontal and vertical profile lines of the route. If the deviation between the discrete line string and the original curve exceeds the threshold, densification points are dynamically inserted based on the curve type. The densification points are then merged into the initial station list to form the final station list.

[0021] Calculate the three-dimensional spatial coordinates and plane unit normal vectors corresponding to each station in the final station list, and map the corresponding points in the cross section to three-dimensional space according to the relative coordinates and plane unit normal vectors to generate a cross section placement list.

[0022] Based on the cross-section placement list and the cross-section component data, adjacent points are extracted from the same component between adjacent cross-sections, a quadrilateral grid is constructed between adjacent cross-sections and spliced ​​to generate a transition grid surface. Then, the starting and ending transverse grids are combined with the longitudinal transition surface to form a closed grid surface model.

[0023] Furthermore, the process of analyzing the cross-sectional graphic with reference points, constructing cross-sectional component data including component names and constituent points, and calculating the relative coordinates of each point relative to the reference point includes:

[0024] Construct cross-sectional component data: including component name and the names of the points that make up the component;

[0025] Construct the point data corresponding to the component: For each point in the component, calculate the difference between the absolute coordinates of the point and the absolute coordinates of the reference point to obtain the relative coordinates of the cross-section point.

[0026] Furthermore, the calculation of the three-dimensional spatial coordinates and planar unit normal vectors corresponding to each station in the final station list, and the mapping of cross-section points to three-dimensional space based on the relative coordinates and planar unit normal vectors to generate a cross-section placement list includes:

[0027] Obtain the three-dimensional spatial coordinates P of the point corresponding to the station number, denoted as (px, py, pz), and the plane unit normal vector V, denoted as (vx, vy);

[0028] The spatial coordinates of each point in the cross section at the corresponding station number are obtained sequentially. The relative coordinates between the current processing point and the cross section reference point are denoted as (dx, dy). Then the absolute coordinates of the current cross section point in three-dimensional space are: (px+vxdx, py+vydx, pz+dy). The point names are marked, and the list of point names that make up the current component is obtained, denoted as (P0, P1, P2....Pn).

[0029] The final cross-section placement list is generated and denoted as (D0, D1, D2... Dm).

[0030] Furthermore, the process of constructing a quadrilateral grid between adjacent cross-sections and splicing them together to generate a transition grid surface based on the cross-section placement list and the cross-section component data includes:

[0031] For two adjacent cross sections in the cross section placement list, based on the point name order list corresponding to the cross section, a set of adjacent points constituting the first cross section are extracted in sequence, and two adjacent points corresponding to the set of adjacent points on the second cross section are obtained, forming a quadrilateral spatial grid with four points; the extraction is repeated until all points in the point name order list have completed the above operation, and all the generated quadrilateral spatial grids are spliced ​​in sequence to generate the transition spatial grid surface between adjacent cross sections of the corresponding components.

[0032] Furthermore, the process of combining the starting and ending transverse grids with the transition grid surface to form a closed grid surface model includes:

[0033] For all adjacent cross sections in the cross section list, generate the transition space mesh surface corresponding to each component one by one, and splice them together to form the longitudinal tensile shell of the component.

[0034] Obtain the starting and ending transverse spatial grids of the component, and combine them with the longitudinally stretched shell to form a closed grid surface, which serves as the closed grid surface of the current component based on the two-dimensional route plane line, longitudinal profile line, and cross-sectional graphic.

[0035] Furthermore, the process of generating an initial station list based on a preset segment spacing, performing error detection on the curve segments of the route's horizontal and vertical alignments, and dynamically inserting densification points based on the curve type if the deviation between the discrete line string and the original curve exceeds a threshold, and merging the station numbers after merging the densification points to form the final station list includes:

[0036] Based on the preset segment spacing, obtain the station number corresponding to the discretized benchmark point;

[0037] Extract the starting station number of the horizontal line and the longitudinal profile line of the route, and the ending station number of each sub-line element, and together with the station number corresponding to the discretized benchmark point, form an initial station number list;

[0038] For curve segments where the deviation between the discretized line string and the smooth curve of the source 3D model exceeds the maximum error value of the route, densification points are generated and merged into the initial station list to form the final station list.

[0039] Furthermore, the dynamic insertion of encryption points based on curve type includes:

[0040] If the curve segment is an arc, the following formula is used to generate the densification points:

[0041] L = 2√(2R·S - S²)

[0042] Where S is the maximum error value of the route, R is the radius of the arc, and L is the chord distance between the densification points;

[0043] If the curve segment is a transition curve or a parabola, a recursive bisection subdivision method is used for refinement. The recursive bisection subdivision algorithm is as follows: Obtain the start and end points of the curve, find the bisection point of the curve segment, calculate the perpendicular distance from the bisection point to the line connecting the start and end points. If this distance is greater than the error control value, then this point is used as the refinement point. The same method is used to further subdivide the curve segment between adjacent points and the bisection point until the perpendicular distance from the subdivision point to the line connecting the adjacent points is less than the error control value.

[0044] In a second aspect, embodiments of the present invention provide a computer device, including:

[0045] A memory and a processor, the memory storing a computer program, wherein: when executed by the processor, the computer program implements any step of a method for creating a long-distance closed mesh surface model as described in the first aspect of the invention.

[0046] Thirdly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein:

[0047] When the computer program is executed by a processor, it implements any step of a method for creating a long-distance closed mesh surface model as described in the first aspect of the invention.

[0048] The beneficial effects of this invention are as follows:

[0049] (1) By dynamically discretizing (feature point extraction combined with error control encryption), the redundancy of the vertex of the straight line segment is effectively reduced and the discretization error of the small radius curve segment is strictly controlled within the error range;

[0050] Taking a 3.7km route as an example, the traditional 2.5m equidistant discretization method has 1523 vertices, while the route discretization method implemented in this invention has 811 vertices, reducing redundant data by 53%.

[0051] Taking a 64° turning angle as an example, the traditional method with a 100m radius has a deviation of 7.8mm, while the route discretization method implemented in this invention has a curve deviation of 1mm, achieving precise control according to the specified error.

[0052] (2) It can achieve accurate normal vector positioning (reference point coordinates combined with normal vector × relative × coordinates), which effectively improves the modeling accuracy of linear engineering BIM.

[0053] (3) A closed mesh generation scheme (only surface data is stored) is adopted, which can effectively eliminate redundant data inside the model. Taking the modeling of a 62.5km rectangular channel as an example, the model size is 29.5 MB when using traditional block modeling, and 12.4 MB when using the method of this invention, the model size is reduced by 58%. Attached Figure Description

[0054] Figure 1 This is a flowchart illustrating an embodiment of the present invention;

[0055] Figure 2 This is a schematic diagram of the cross-sectional graphic analysis process according to an embodiment of the present invention;

[0056] Figure 3 This is a schematic diagram of the process for establishing cross-sectional constraints according to an embodiment of the present invention;

[0057] Figure 4 This is a schematic diagram of the planar / longitudinal section curve encryption process according to an embodiment of the present invention;

[0058] Figure 5 This is a schematic diagram illustrating the calculation process of the spatial coordinates and normal vector of the point corresponding to the station number in an embodiment of the present invention;

[0059] Figure 6 This is a schematic diagram of the process of placing a cross-section in space according to an embodiment of the present invention;

[0060] Figure 7 This is a schematic diagram of a closed mesh surface generated based on a cross-sectional component according to an embodiment of the present invention;

[0061] Figure 8 This is a graphical schematic diagram of generating a closed mesh surface based on a cross-section component according to an embodiment of the present invention;

[0062] Figure 9 This is a schematic diagram of the original cross-section of the equal-spacing discrete method in the background technology of this invention;

[0063] Figure 10This is a schematic diagram of the cross-section after stretching the original cross-section of the cross-section using the equal-spacing discrete method of the present invention. Detailed Implementation

[0064] Embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While some embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the invention. It should be understood that the accompanying drawings and embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the invention.

[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "or / and" as used herein includes any and all combinations of one or more of the associated listed items.

[0066] This invention provides a method for creating a long-distance closed mesh surface model. The technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments.

[0067] Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0068] Terminology Explanation

[0069] route:

[0070] In engineering design, a continuous path is planned to achieve a specific function (such as transportation, conveying, drainage, etc.). It is usually composed of a combination of horizontal alignment (horizontal direction and turning points) and longitudinal alignment (vertical elevation changes). It is the spatial positioning basis for linear projects such as roads, railways, pipelines, and waterways, and determines the overall direction and spatial layout of the project.

[0071] Route Horizontal Line:

[0072] It refers to the projection trajectory of a linear engineering project (such as a road or canal) on a horizontal plane. It is usually composed of line elements such as straight lines, arcs, and transition curves, and is used to represent the planar position and direction of the project in the XY coordinate system.

[0073] Transition curve:

[0074] A transition curve is a curve connecting a straight line and a circular arc or circular arcs of different radii. Its curvature gradually changes from 0 (or a certain value) to the curvature of the circular arc (or another curvature value), achieving a smooth transition in the vehicle's trajectory and reducing the impact of sudden changes in centrifugal force on driving comfort and safety. In road engineering, transition curves are typically placed between straight lines and circular curves, or between circular curves. Common forms include spirals (the most common) and cubic parabolas.

[0075] Station number:

[0076] The numbering of each point on the route is usually set with the starting point as "K0+000". Every 1,000 meters along the route is marked as a kilometer marker, and every 100 meters is marked as a 100-meter marker (e.g., K1+200 indicates a distance of 1,200 meters from the starting point). This is the core basis for engineering positioning and data discretization.

[0077] Longitudinal profile:

[0078] It reflects the elevation changes along the length of the project, with station number as the horizontal axis (representing the distance along the route) and elevation as the vertical axis. It is composed of line elements such as straight lines and parabolas and is used to control the vertical slope and undulation of the project.

[0079] Elevation: The vertical distance from a point in space along the plumb line to a reference plane, used to quantify the spatial position of terrain or objects in the vertical direction.

[0080] Slope transition point: The intersection of two adjacent slope segments with different gradients on the longitudinal profile line. It is a key control point for longitudinal topographic changes and is used to achieve a smooth transition between different slope segments.

[0081] Space curves:

[0082] The three-dimensional route spatial line, determined by the horizontal and vertical profile lines, represents the actual position of the route in three-dimensional space. Geometrically, it cannot be accurately described by a formula, and is usually approximated by a string of spatial lines formed by a finite number of points.

[0083] Discrete points:

[0084] The spatial coordinates of the points that make up the space curve are a finite number of feature points extracted from the horizontal and vertical profiles of the continuous route through a discretization process. Each point contains three-dimensional spatial coordinates (X, Y, Z).

[0085] Encryption points: a type of discrete point, referring to additional feature points inserted during the discretization process of a curve segment to control errors and improve accuracy, so as to ensure the accurate restoration of the curve shape.

[0086] Divide into two parts:

[0087] A numerical method or geometric processing technique that recursively divides a line segment or curve segment into two parts and repeats the subdivision process according to preset conditions (such as an error threshold). Its core logic is to continuously refine the data granularity by iteratively dividing the target object into two parts to meet accuracy requirements or optimize data representation.

[0088] Error control method: A technique that dynamically adjusts the sampling strategy by setting a preset error threshold to transform a continuous geometric curve into a discrete point set. Its core lies in balancing model accuracy and data redundancy, ensuring that the discretization results meet engineering accuracy requirements while avoiding unnecessary computational burden.

[0089] Cross-sectional diagram:

[0090] The cross-sectional profile perpendicular to the route direction includes the geometry of the various transverse components of the project (such as driveways, sidewalks, and ditches), and is the basis for cross-sectional design in 3D modeling.

[0091] Cross-section reference point: The intersection of the spatial curve determined by the horizontal line and the vertical line of the route through the cross-section graphic. It serves as the reference origin for calculating the coordinates of each point in the cross-section and is used to unify the spatial mapping relationship between horizontal and vertical data.

[0092] Plane unit normal vector:

[0093] This represents a plane vector, one meter in length, that is perpendicular to the plane line of the route and points to the right along the direction of travel.

[0094] Closed mesh surface:

[0095] In 3D modeling, a closed surface structure without cracks or holes is formed by seamlessly connecting multiple polygonal mesh units (such as triangles and quadrilaterals) through the topological relationships of vertices, edges, and faces. Its core characteristic is that its geometric shape is completely closed, and it can fully express the three-dimensional spatial contour of an object. It is a fundamental data model used in computer graphics, 3D modeling, and engineering simulation to describe the surface of solid objects.

[0096] like Figure 1 As shown, this embodiment of the invention provides a method for creating a long-distance closed mesh surface model, including the following steps:

[0097] Step S1: Input the horizontal and vertical alignment lines of the route; This step involves the digital modeling of the spatial benchmark for linear engineering. Based on the route design results of the linear engineering, namely the horizontal and vertical alignment lines, the benchmark is dynamically discretized using an error control method. That is, based on the local characteristics of the benchmark, the sampling strategy is automatically adjusted to transform the benchmark into a discrete point set. The discretized station list is then associated with the horizontal and vertical alignment lines of the route to generate the position of the benchmark in three-dimensional space, thus establishing the spatial positioning benchmark for the engineering entity.

[0098] In this preferred embodiment, the route plane line is a two-dimensional baseline formed by the projection of the three-dimensional engineering entity onto the XY plane, serving as a horizontal spatial positioning line. The graphic type is one of a straight line, a transition curve, or an arc, and it supports the formation of continuous curves through endpoint connections, meeting the design requirements of complex planar lines.

[0099] As a preferred embodiment, in this example, the longitudinal profile line describes the longitudinal terrain features with station number as the abscissa and elevation as the ordinate. It is a two-dimensional elevation curve that provides spatial positioning in the vertical direction and reflects the longitudinal terrain changes of the engineering entity. The X-coordinate of the longitudinal profile line represents the station number, i.e., the distance of that point along the plane curve from the starting point of the route plane line, and the Y-coordinate represents the corresponding three-dimensional spatial elevation. The longitudinal profile line can be either a straight line or a parabola, and it supports the connection of the above-mentioned line shapes through slope change points to form a continuous design.

[0100] The horizontal and vertical lines of the route are linked by station numbers to construct the positioning benchmark for the three-dimensional engineering model.

[0101] Step S2: Input a cross-sectional graphic with a reference point; the cross-sectional graphic is the cross-sectional outline of a linear project perpendicular to the route direction (such as a road cross-section including components such as carriageway, sidewalk, and side ditch), and the graphic type is one or more of the following: line string, closed line string, and closed shape; mark a reference point in the cross-sectional graphic. The reference point is the intersection of the spatial curve determined by the route horizontal line and longitudinal profile line data through the cross-section, which serves as the reference origin for subsequent coordinate transformation.

[0102] Step S3: Analyze the cross-sectional graphic and construct the cross-sectional data: By analyzing the cross-sectional graphic, define the data information of the points that make up the cross-section and the data information of the cross-sectional components. For example... Figure 2 As shown, it includes the following steps:

[0103] Step S31: Construct cross-sectional component data; traverse all graphics in the cross-section to construct cross-sectional component data; core data includes component names and the names of the points that make up the components, serving as data support for subsequent mesh modeling. Based on the number of cross-sectional graphics, component names are automatically named according to the rule for component n (i.e., component 1, component 2, component 3...), and the names of the points that make up the components are automatically named according to the rule for component i_point n (i.e., component 1_point 1, component 1_point 2, component 1_point 3...).

[0104] Step S32: For each point in the component, calculate the difference between the absolute coordinates of the point and the absolute coordinates of the reference point to obtain the relative coordinates of the cross-section point. The X coordinate in the relative coordinates represents the horizontal distance relative to the reference point, with the right side being positive and the left side being negative; the Y coordinate represents the vertical distance relative to the reference point, with the top being positive and the bottom being negative.

[0105] Step S4: Set point constraint relationships and constraint labels in the cross section: Establish constraint relationships for each point in the cross section based on the benchmark point. The constraint types include horizontal constraints, vertical constraints, or slope constraints, and configure labels for each constraint.

[0106] As a preferred implementation, in this embodiment, constraint logic for points is established according to business rules, so that each point in the cross-section is directly or indirectly constrained by a reference point. Therefore, based on the reference point coordinates and the constraint relationships of a given point, the unique cross-section coordinates of that point can be calculated, and labels are set for key constraints to facilitate subsequent local dimension modifications of the model. For example... Figure 3 As shown, taking a rectangular channel as an example, the specific steps for setting constraints on a rectangular channel are as follows:

[0107] Step S41: Create constraints for point L1: Constraint 1 is a horizontal constraint, with the parent point P0, and a constraint value of -2, representing that the difference between the X coordinate of this point and the parent point P0 is -2, which is the width of the left side of the channel; Constraint 2 is a vertical constraint, with the parent point P0, and a constraint value of 0, representing that the Y coordinate of this point is the same as that of P0. Set the label of constraint 1 for L1 to "Left Width" to facilitate local width adjustment of the model.

[0108] Step S42: Create constraints for point L2: Constraint 1 is a horizontal constraint, parent of L1, with a constraint value of 0, meaning the X coordinate of this point is the same as L1; Constraint 2 is a vertical constraint, parent of L1, with a constraint value of 3, meaning the difference between the Y coordinate of this point and L1 is 3, which is the height of the left side of the channel. Set the label of constraint 2 of L2 to "Left Height" to allow for local adjustment of the left side height of the model.

[0109] Step S43: Create constraints for point L4: Constraint 1 is a horizontal constraint, with parent L1 and constraint value of -0.2, which means that the difference between the X coordinate of this point and point L1 is -0.2, that is, the thickness of the left side structure of the channel is 0.2 meters; Constraint 2 is a vertical constraint, with parent L1 and constraint value of -0.2, which means that the difference between the Y coordinate of this point and point L1 is -0.2, that is, the thickness of the bottom of the channel is 0.2 meters.

[0110] Step S44: Create constraints for point L3: Constraint 1 is a horizontal constraint, with parent L4 and constraint value 0, meaning that the X coordinate of this point is consistent with L4; Constraint 2 is a vertical constraint, with parent L2 and constraint value 0, meaning that the Y coordinate of this point is consistent with L2.

[0111] Step S45: Establish constraints for each point on the right side using the same method. The positional relationship of L3 / R3 is only related to L2 / R2 and L4 / R4. Therefore, when adjusting the constraints corresponding to the channel height label, L3 / R3 and L2 / R2 will be updated synchronously. The positional relationship of L2 / R2 and L4 / R4 is only related to L1 / R1. Therefore, when adjusting the width of the left / right side of the channel, the four outer points will be updated synchronously.

[0112] Step S5: Obtain the benchmark station list based on the segment spacing: The segment spacing refers to the spacing between cross-sections placed along the route's horizontal line, used to control the accuracy of model generation. The generated station list will be used to convert the 3D benchmark line into spatial discrete points.

[0113] Step S6: Merging of densification points for horizontal / vertical profile lines: Obtain densification points for curve segments based on the horizontal and vertical profile line data of the route, and merge them into the station list.

[0114] The spatial points corresponding to the station list obtained through S5 are equally spaced points. However, there may be significant errors at inflection points on the horizontal and vertical alignments of the route; therefore, densification is required at these points. For example... Figure 4 As shown, it includes the following steps:

[0115] Step S61: Extract feature points of the route plane line; Based on the route plane line input in S1, extract the starting station number of the entire route plane line and the ending station number of each sub-line element. If the corresponding station number does not exist in the station number list in step S5, then merge it into the station number list.

[0116] Step S62: Extract route horizontal line error control points: Based on the route horizontal line input in S1, extract discrete points on the curve segments. If the maximum lateral offset of the discretized line string from the smooth curve exceeds the engineering allowable error (usually 0.001 meters), then dynamically insert additional points based on the curve type. If the corresponding station number does not exist in the station number list in step S5, then merge it into the station number list.

[0117] Step S63: Extract longitudinal profile feature points; Based on the longitudinal profile input in S1, extract the starting station number of the entire longitudinal profile and the ending station number of each sub-line element. If the corresponding station number does not exist in the station number list in step S5, then merge it into the station number list.

[0118] Step S64: Extract longitudinal profile error control points: Based on the longitudinal profile input in S1, extract discrete points on the curve segment. If the maximum lateral offset of the discretized line string from the smooth curve exceeds the engineering allowable error (usually 0.001 meters), then dynamically insert additional points based on the curve type. If the corresponding station number does not exist in the station number list in step S5, then merge it into the station number list.

[0119] As a preferred implementation, the discrete point densification method in the above steps adopts a dynamic error control mechanism to ensure that the maximum vertical distance between the smooth curve and the dispersed line string does not exceed the error control value.

[0120] If the curve segment is an arc, the following formula is used to generate the densification points:

[0121] L = 2√(2R·S - S²)

[0122] Where S is the sag distance, which is the maximum error value of the route to be controlled, R is the radius of the arc, and L is the chord distance, which is the distance between the discrete points.

[0123] If the curve segment is a transition curve or a parabola, a recursive bisection subdivision method is used for refinement. The recursive bisection subdivision algorithm is as follows: Obtain the start and end points of the curve, find the bisection point of the curve segment, calculate the perpendicular distance from the bisection point to the line connecting the start and end points. If this distance is greater than the error control value, then this point is used as the refinement point. The same method is used to further subdivide the curve segment between adjacent points and the bisection point until the perpendicular distance from the subdivision point to the line connecting the adjacent points is less than the error control value.

[0124] Step S7: Obtain the spatial coordinates and plane normal vector of the point corresponding to each station: Based on the route horizontal line and longitudinal profile line input in Step S1, and the final station list obtained in Step S6, obtain the spatial coordinates and plane unit normal vector of the point corresponding to each station. The spatial coordinates represent the absolute coordinates of the point in three-dimensional space (including X, Y, and Z coordinates), and the plane unit normal vector represents a unit vector with a length of one meter, perpendicular to the route and pointing to the right side of the route horizontal line. For example... Figure 5 As shown, it includes the following steps:

[0125] Step S71: Plane line analysis: Extract the plane line data corresponding to the current station number, and calculate the plane projection coordinates X, Y of the point corresponding to the station number based on the plane line data.

[0126] Step S72: Longitudinal profile line analysis: Extract the metadata of the longitudinal profile line corresponding to the current station number, and calculate the elevation Z of the point corresponding to the station number based on the metadata of the longitudinal profile line.

[0127] Step S73: Construct the plane unit normal vector for each station number; calculate the first derivative of the point corresponding to the station number based on the data of the plane line element, normalize the first derivative of the point to obtain the tangential unit vector T, the coordinates of T are Tx, Ty, rotate the tangential unit vector T clockwise by 90° to obtain the plane unit normal vector V, the coordinates of V are Ty, -Tx.

[0128] Step S8: Place cross-sections according to the station list and generate a cross-section placement list:

[0129] Based on the station list obtained by S6, each station location is processed sequentially, and the corresponding point in the cross section is placed into three-dimensional space.

[0130] like Figure 6 As shown, it includes the following steps:

[0131] Step S81: Traverse the station list and obtain the three-dimensional spatial coordinates P of the point corresponding to the current station, denoted as px, py, pz, and the plane unit normal vector V, denoted as vx, vy.

[0132] Step S82: Traverse the points in the cross-section and obtain the relative coordinates dx and dy of each point to the cross-section reference point. Calculate the X coordinate of the cross-section at the current station number: X = px + vxdx, the Y coordinate of the cross-section at the current station number: Y = py + vydx, and the Z coordinate of the cross-section at the current station number: Z = pz + dy. Obtain the three-dimensional coordinates X, Y, and Z of the cross-section points.

[0133] Step S83: Process the three-dimensional coordinate space of all cross-section points at the current station number to obtain cross-section placement data and generate a list of point name sequences for the current component, denoted as P0, P1, P2....Pn;

[0134] Step S84: Repeat steps S81 to S83 to process the cross-section placement data at all station numbers, and finally generate a cross-section placement list denoted as D0, D1, D2...Dm.

[0135] Step S9: Generate a closed mesh surface based on the spatial points corresponding to each component of the cross section: Based on the cross section data constructed in S4, generate a three-dimensional closed mesh surface for each component by placing each component in the cross section data according to the cross section placement list obtained in S8.

[0136] like Figure 7 and Figure 8 As shown, the specific steps include:

[0137] Step S91: Obtain a sequence list of vertex names of a component to be processed from the cross-sectional data, P0, P1, P2, ..., Pn.

[0138] Step S92: Obtain the cross-section placement list D0, D1, D2...Dm from S8.

[0139] Step S93: Set the index marker i, initially 0, ending at m-1. Obtain the cross-section placement list corresponding to the points Di_P0, Di_P1, Di_P2...Di_Pn of the component at index i.

[0140] Step S94: Obtain the points Di+1_P0, Di+1_P1, Di+1_P2...Di+1_Pn of the component corresponding to the cross-section placement list at index i+1.

[0141] Step S95: Based on the points corresponding to the components at Di and Di+1, construct the outer surface of the current component between these two sections. The specific steps are as follows:

[0142] Step S951: Obtain a set of adjacent points of the component; denoted as Pj and Pj+1, where j is initially 0 and terminates at n-1.

[0143] Step S952: Form a quadrilateral spatial grid by taking the four points corresponding to S951 in the adjacent cross sections obtained in S93 and S94; construct a quadrilateral spatial grid with Di_Pj, Di_Pj+1, Di+1_Pj+1, and Di+1_Pj as vertices. This grid is the transition space grid surface between the cross section line segment formed by point Pj-Pj+1 and the Di-Di+1 section.

[0144] Step S953: Repeat steps S941-S942 until all the edges that make up the component, except for Pn-P0, are constructed as transition mesh surfaces between Di-Di+1 sections.

[0145] Step S954: Process the last set of edges Pn and P0 according to steps S951~S952 to form the outer shell surface of the component between adjacent sections.

[0146] Step S96: Repeat steps S93-S95 to obtain the transition mesh surface between all cross sections of the current component, forming the longitudinal tensile shell of the current component.

[0147] Step S97: Obtain the starting transverse space grid and the ending transverse space grid of the component, which are used to close the openings of the current grid surface in the transverse direction at the starting and ending points; the starting cross-sectional grid is composed of points D0_P0, D0_P1, D0_P2...D0_Pn, and the ending cross-sectional grid is composed of points Dm_P0, Dm_P1, D0_P2...Dm_Pn.

[0148] Step S98: Combine the longitudinally stretched shell of the component obtained in S96 with the starting transverse spatial grid and the ending transverse spatial grid obtained in S97 to form a closed mesh surface. This closed mesh surface is the closed mesh surface formed by the current component based on the two-dimensional route plane line, longitudinal profile line and cross profile graphic.

[0149] Step S99: Repeat steps S91-S98 until a three-dimensional closed mesh surface of all components in the cross section is constructed.

[0150] This embodiment also provides a computer device applicable to the following situation: including a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement a method for creating a long-distance closed mesh surface model as proposed in the above embodiment.

[0151] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0152] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a method for creating a long-distance closed mesh surface model as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0153] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A method of creating a long distance closed mesh surface model, characterized by, The method comprises the following steps: linear engineering-based route design results, i.e., route plane lines and route longitudinal section lines, are discretized according to an error control method to obtain the position of a reference line in a three-dimensional space; a cross-section graph with reference points is analyzed, cross-section component data containing component names and component points are constructed, and the relative coordinates of each point with respect to a reference point are calculated, the reference point being an intersection point of a spatial curve determined by the route plane lines and the longitudinal section lines and the cross-section graph; constraint relationships of each point in the cross-section graph are established based on the reference points, the constraint types including horizontal constraints, vertical constraints or slope constraints, and labels are configured for each constraint; an initial stake number list is generated according to a preset segment interval, error detection is performed on the curve segments of the route plane lines and the longitudinal section lines, if the deviation of the discretized line string from the original curve exceeds a threshold value, encryption points are dynamically inserted based on the curve type, the encryption points are merged into the initial stake number list to form a final stake number list; three-dimensional space coordinates and plane unit normal vectors corresponding to each stake number in the final stake number list are calculated, the corresponding points in the cross-section are mapped to the three-dimensional space according to the relative coordinates and the plane unit normal vectors, and a cross-section placement list is generated; based on the cross-section placement list and the cross-section component data, adjacent points of the same component between adjacent cross-sections are extracted, a quadrilateral mesh between the adjacent cross-sections is constructed, a transition mesh surface is generated by splicing, and then the start and end point lateral meshes are combined with the transition mesh surface to form a closed mesh surface model.

2. The method of claim 1, wherein, The analysis of the cross-section graph with reference points, the construction of cross-section component data containing component names and component points, and the calculation of the relative coordinates of each point with respect to a reference point comprise: constructing cross-section component data, including component names and the names of points constituting the components; constructing point data corresponding to the components, for each point in the component, calculating the difference between the absolute coordinates of the point and the absolute coordinates of the reference point to obtain the relative coordinates of the cross-section point.

3. The method of claim 1, wherein, The calculation of the three-dimensional space coordinates and the plane unit normal vectors corresponding to each stake number in the final stake number list, the mapping of the cross-section points to the three-dimensional space according to the relative coordinates and the plane unit normal vectors, and the generation of the cross-section placement list comprise: obtaining the three-dimensional space coordinates P of the point corresponding to the stake number position, denoted as (px, py, pz), and the plane unit normal vector V, denoted as (vx, vy); obtaining the space coordinates of each point in the cross-section at the stake number position in turn, denoting the relative coordinates of the current processing point and the cross-section reference point as (dx, dy), the absolute coordinates of the current cross-section point in the three-dimensional space as (px+vxdx, py+vydx, pz+dy), and the point name, obtaining the point name order list constituting the current component, denoted as (P0, P1, P2...Pn); finally generating a cross-section placement list, denoted as (D0, D1, D2...Dm).

4. The method of claim 3, wherein, The construction of a quadrilateral mesh between adjacent cross-sections and the generation of a transition mesh surface by splicing based on the cross-section placement list and the cross-section component data comprise: For two adjacent cross sections in the cross section placement list, a group of adjacent points constituting a first cross section is extracted in sequence based on the point name order list corresponding to the cross section, and two adjacent points on a second cross section corresponding to the group of adjacent points are obtained to form a quadrilateral space grid; the above operation is sequentially extracted until all points in the point name order list are completed, and all generated quadrilateral space grids are spliced in sequence to generate a transition space grid surface between adjacent cross sections of the corresponding component.

5. The method of claim 4, wherein, The combination of the start and end point lateral grid with the transition grid surface to form a closed grid surface model comprises: For all adjacent cross sections in the cross section list, the transition space grid surface corresponding to each component is generated one by one, and a longitudinal stretching shell of the component is spliced; The start and end point lateral space grids of the component are combined with the longitudinal stretching shell to form a closed closed grid surface as a closed grid surface formed by the two-dimensional route plane line, the longitudinal section line and the cross section graph of the current component.

6. The method according to any one of claims 1 to 5, wherein, The initial stake number list generated according to the preset segmentation interval, the error detection of the curve segment of the route plane line and the longitudinal section line, if the deviation of the discrete line string and the original curve exceeds the threshold value, the encryption point is dynamically inserted based on the curve type, and the stake number after merging the encryption point forms the final stake number list comprises: According to the preset segmentation interval, the stake number corresponding to the discrete reference point is obtained; The start point stake number and the end point stake number of each segment of the route plane line and the longitudinal section line are extracted respectively, and the stake number corresponding to the discrete reference point is used to form an initial stake number list; For the curve segment whose deviation between the discrete line string and the smooth curve of the source three-dimensional model exceeds the maximum route error value, an encryption point is generated and merged into the initial stake number list to form a final stake number list.

7. The method of claim 1, wherein, The dynamic insertion of the encryption point based on the curve type comprises: If the curve segment is a circular arc, the encryption point is generated by the following formula: L=2√(2R·S-S²) Where S is the maximum route error value, R is the radius of the circular arc, and L is the chord distance between the encryption points; If the curve segment is a clothoid or a parabola, the encryption is performed by recursive bisection subdivision.

8. A computer readable storage medium storing a computer program, characterized in that, The program is executed by the processor to realize the steps of the method of any one of claims 1-7.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program comprises instructions that, when executed by the processor, cause the electronic device to perform the method of any one of claims 1-8. The processor executes the program to realize the steps of the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Method for three-dimensionally optimizing road routes on basis of multilayer constraint systems

    CN107729663A

  • Swept surface high-precision reconstruction method and pipeline part curved surface reconstruction method

    CN118762145A