A method and system for modeling a three-dimensional pipeline
By extracting pipeline morphological feature sequences and generating semantic topology maps, combined with a 3D reconstruction engine and structural verification, the problem of insufficient topology recognition in pipeline modeling in existing technologies is solved, enabling accurate modeling and automated correction of complex pipeline networks, and generating highly consistent 3D pipeline models.
Patent Information
- Application Number
- CN202611337585.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-27
AI Technical Summary
Existing 3D pipeline modeling methods lack accurate identification and representation of pipeline network topology when dealing with complex connection scenarios such as dense pipeline intersections and bends with diameter changes. This leads to geometric misalignment and topological errors at connection nodes, and spatial conflicts and dimensional inconsistencies after independent segment fitting, making it difficult to meet the requirements of automation and consistency.
By extracting the morphological feature sequence of the pipeline for semantic parsing, a semantic topology map is generated. A 3D reconstruction engine is then called for parametric fitting, and structural constraint consistency verification is performed to eliminate axis misalignment at pipeline intersections and length inconsistencies in connecting segments, thus constructing a spatially consistent 3D pipeline model.
It achieves accurate topological identification and representation of complex pipeline networks, automatically corrects geometric and dimensional problems in the model, generates usable 3D pipeline models without human intervention, and ensures the geometric consistency and continuity of the model.
Smart Images

Figure CN123181716A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D modeling technology, specifically to a 3D pipeline modeling method and system. Background Technology
[0002] In the field of 3D pipeline modeling, acquiring point cloud data of a target area using methods such as laser scanning and reconstructing the geometric model of the pipeline is a common practice in existing technologies. These techniques typically involve directly segmenting the point cloud, fitting surfaces, or fitting cylinders to reconstruct the direction and cross-sectional shape of a single pipeline. However, in scenarios with dense pipeline intersections and complex connections such as numerous bends and diameter changes, existing methods often rely on independent geometric fitting strategies, treating each pipeline segment as an isolated object and lacking the ability to coherently analyze the connection structure and overall morphology between pipeline segments. This leads to geometric misalignments, topological errors, or structural contradictions in the generated model at connection nodes, such as adjacent pipelines not sharing a common axis at intersections or mismatches between the length of the connecting segment and the diameters of the two ends. Because the modeling process lacks a comprehensive verification mechanism for spatial conflicts and structural rules between pipelines, significant manual model correction is still required later, making it difficult to meet the requirements of engineering applications in terms of automation and model consistency. The problem this invention aims to solve is how to accurately identify and represent the topological structure of the pipeline network during the automated construction of 3D pipeline models based on point cloud data. Another problem to be solved is how to eliminate spatial conflicts and size contradictions at the pipe segment connection ends caused by independent segment fitting after the multi-pipeline fitting parameters are generated. Summary of the Invention
[0003] The purpose of this invention is to provide a three-dimensional pipeline modeling method and system, which can accurately analyze the morphological changes and connection relationships of pipelines in point cloud data-driven three-dimensional reconstruction, automatically correct structural conflicts between multiple pipelines, and generate a spatially consistent three-dimensional pipeline model.
[0004] To achieve the above objectives, the present invention provides the following technical solution: The present invention provides a method for modeling three-dimensional pipelines, comprising: acquiring original point cloud data of multiple pipelines in a target area; extracting morphological feature sequences of each pipeline from the original point cloud data; performing semantic parsing on the morphological feature sequences to generate a semantic topology map of the pipelines in the target area, the semantic topology map containing nodes and connection relationships; calling a preset three-dimensional reconstruction engine to perform pipeline individual parameterized fitting on the semantic topology map to generate a three-dimensional geometric parameter set for each pipeline; performing structural constraint consistency verification on the three-dimensional geometric parameter set to generate a corrected three-dimensional geometric parameter set; and constructing a three-dimensional pipeline model of the target area based on the corrected three-dimensional geometric parameter set.
[0005] When extracting the morphological feature sequence, the original point cloud data is denoised and filtered to generate clean point cloud data. The local curvature value and normal vector direction of each point in the clean point cloud data are calculated to generate a curvature distribution map and a normal vector distribution map. The curvature distribution map and the normal vector distribution map are superimposed according to spatial coordinates to extract the axis orientation point set and cross-sectional contour point set of each pipeline. The axis orientation point set is smoothed and interpolated to generate an axis point sequence, and the cross-sectional contour point set is simultaneously elliptical fitted to generate a contour parameter sequence. The axis point sequence and the contour parameter sequence are time-aligned and combined to form the morphological feature sequence. By fusing curvature and normal vectors in multi-dimensional point cloud analysis, the axial extension features and cross-sectional change features of the pipeline can be separated from the original scan data with high precision, so that the morphological feature sequence can comprehensively express the three-dimensional orientation and shape information of the pipeline.
[0006] During semantic parsing, the rate of change of axis curvature and the rate of change of cross-sectional radius are extracted from the morphological feature sequence. Spatial locations where the rate of change of axis curvature is greater than a predetermined curvature threshold are marked as elbow nodes, and spatial locations where the rate of change of cross-sectional radius is greater than a predetermined radius threshold are marked as diameter change nodes. Areas where the axis orientation points of multiple pipelines overlap spatially are marked as intersection nodes. Spatial coordinate encoding is performed on the elbow nodes, diameter change nodes, and intersection nodes to generate corresponding node identifiers. Based on the geometric orientation of the connection relationships in the morphological feature sequence, the connecting pipeline segment between two nodes is extracted, and the connecting pipeline segment is bound to the node identifiers at both ends to generate the semantic topology graph. This process automatically identifies and encodes key structural nodes in the pipeline network, transforming discrete point cloud features into a structured semantic graph with topological connections, effectively improving the accuracy of understanding the spatial architecture of complex pipeline networks and the relevance of subsequent modeling.
[0007] When using the 3D reconstruction engine to perform parameterized fitting of individual pipelines, the node identifier sequence and connection relationship sequence of the target pipeline are extracted from the semantic topology map, and the spatial coordinate data and connection angle data of each node are read. Based on the connection relationship sequence, the target pipeline is divided into multiple segments, each segment corresponding to a pipeline segment between two adjacent nodes. For each segment, the local axis point coordinates and local contour radius values are extracted, and a Bezier curve fitting algorithm is used to generate the segmental axis equation. The least squares method is used to fit and generate the segmental contour function. The segmental axis equation and the segmental contour function are parameterized and combined to generate the geometric parameter expression of the current segment. The geometric parameter expressions of all segments are concatenated according to the connection relationship sequence to generate the 3D geometric parameter set of the target pipeline. Preferably, when processing each segment, the connection angle data of the nodes at both ends of the current segment is extracted. This connection angle data includes axial deviation angles and radial deviation angles. The axial and radial deviation angles are input into the control point calculation unit of the Bézier curve fitting algorithm to generate control point coordinate correction values. These correction values are then used to correct the segment axis equation using angle constraints, generating a corrected segment axis equation. Thus, not only is accurate approximation of the pipeline axis and contour achieved within a single segment, but the geometric continuity of the segmented pipe sections at the connection interface is also ensured through node angle constraints, enabling the generated parameter set to achieve a smooth transition without abrupt bends.
[0008] During structural constraint consistency verification, the coordinates of the intersection points of all pipeline axes and the lengths of connecting pipeline segments are extracted from the three-dimensional geometric parameter set. Spatial distance comparison is performed on the intersection point coordinates to identify abnormal intersection point pairs where the deviation between the coordinates exceeds a first deviation threshold. Simultaneously, the continuity of the connecting pipeline segment lengths is verified to identify abnormal length segments where the deviation between the length of the connecting pipeline segment and the sum of the diameters of two adjacent pipelines exceeds a second deviation threshold. Based on the abnormal intersection point pairs, the coordinates of the intersection points of adjacent pipeline axes are corrected using a weighted average to generate corrected intersection point coordinates. Based on the abnormal length segments, the lengths of the connecting pipeline segments are truncated or extended to generate corrected pipeline segment lengths. The corrected intersection point coordinates and corrected pipeline segment lengths replace the original corresponding parameters to generate the corrected three-dimensional geometric parameter set. This step performs global consistency verification and adaptive correction for spatial position deviations and length inconsistencies that may arise during point cloud extraction and fitting, eliminating pipeline intersection misalignments and spacing anomalies at the source, ensuring the overall structural logic of the model is reliable.
[0009] When constructing a 3D pipeline model, a scene coordinate system for the target region is established, and the axis equation and contour function of each pipeline in the corrected 3D geometric parameter set are mapped to the scene coordinate system. For each pipeline, the contour function is swept along the axis equation to generate a triangular mesh surface model for the current pipeline. The normal vector consistency of adjacent triangle vertices in the triangular mesh surface model is calculated to generate smoothed triangle vertex normal vector distribution data. Based on the smoothed triangle vertex normal vector distribution data, the lighting rendering parameters of the triangular mesh surface model are configured to generate rendering voxel data for the current pipeline. The rendering voxel data of all pipelines are assembled in the scene coordinate system to generate the 3D pipeline model. During the sweeping operation, the axis equation is sampled using equal parameters to generate multiple axis segment sampling points, obtaining spatial coordinate values and tangent direction vectors. The contour function is sampled using equal angles to generate multiple contour ring points, obtaining radius and angle values. Using each axis segment sampling point as the center, the contour ring points are spatially rotated and translated according to the tangent direction vector to generate the contour point cloud at the current sampling point. Points with the same angle index in the contour point clouds of two adjacent axis segment sampling points are connected to form axial triangular patches, and points with adjacent angle indices are connected to form circumferential triangular patches. All axial and circumferential triangular patches are merged to generate the triangular mesh surface model. In the normal vector consistency calculation, the face normal vectors of all adjacent triangles are obtained by traversing each vertex. A weighted average is calculated using the product of the area of the adjacent triangles and the inverse of the distance from the current vertex to the center of that triangle, generating candidate normal vectors and performing normalization processing to obtain the smoothed normal vector of the current vertex, thus forming the smoothed triangle vertex normal vector distribution data. By using point-by-point sweeping and adaptive normal smoothing, the reconstructed pipeline surface model has a regular mesh with no visual seams. While ensuring geometric accuracy, it also has good lighting rendering performance, intuitively presenting the true three-dimensional shape of the pipeline.
[0010] The present invention also provides a three-dimensional pipeline modeling system, including a processor and a memory, wherein the memory and the processor are connected, the memory is used to store programs, instructions or code, and the processor is used to execute the programs, instructions or code in the memory to implement the three-dimensional pipeline modeling method.
[0011] The technical effects and advantages provided by the present invention in the above technical solution are as follows:
[0012] By extracting the morphological feature sequences of the pipeline and performing semantic parsing, locations of abrupt changes in the curvature of the axis are identified as elbow nodes, locations of abrupt changes in the radius of the cross section are identified as diameter change nodes, and spatially overlapping axis regions are identified as intersection nodes. These nodes are then encoded with spatial coordinates and bound to the connecting pipeline segments. This processing method transforms discrete point cloud geometric information into a semantic representation with a topological structure. This organizes the originally isolated pipeline feature points into a semantic topological graph containing node and connection relationships, avoiding the loss of structural connections between pipe segments when directly fitting the entire surface or individual cylinders. This ensures that the model maintains accurate geometric correspondences at complex connection locations such as elbows, diameter changes, and intersections. When verifying the structural constraint consistency of the fitted 3D geometric parameter set, abnormal intersection point pairs with excessive coordinate deviations and abnormal length segments with excessive deviations between the length of the connecting pipeline segment and the sum of the diameters of two adjacent pipes are identified. Conflicting parameters are corrected by weighted averaging or by truncation and extension adjustments. This verification and correction process based on spatial structure rules addresses the inconsistencies in the parameters of each pipe segment at the connection points after independent segment fitting. It can automatically eliminate axial misalignment at pipeline intersections and length contradictions at connection points, ensuring that the corrected parameter set meets the spatial continuity and dimensional matching requirements of the actual physical pipeline in terms of structure. As a result, the final constructed three-dimensional pipeline model can achieve usable geometric consistency without manual intervention. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0014] Figure 1 This is a flowchart of a 3D pipeline modeling method; Figure 2 This is a flowchart of the pipeline 3D morphological feature extraction method; Figure 3 This is a flowchart of pipeline node identification and semantic topology graph construction; Figure 4 It is a flowchart for generating pipeline 3D geometric parameters based on semantic topology graph; Figure 5 This is a flowchart for correcting the geometric parameters of a three-dimensional pipeline. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0016] See Figure 1 This invention provides a method for modeling three-dimensional pipelines, comprising: acquiring original point cloud data of multiple pipelines in a target area; extracting morphological feature sequences of each pipeline from the original point cloud data; performing semantic parsing on the morphological feature sequences to generate a semantic topology map of the pipelines in the target area, the semantic topology map containing nodes and connection relationships; calling a pre-set three-dimensional reconstruction engine to perform pipeline individual parameterized fitting on the semantic topology map to generate a three-dimensional geometric parameter set for each pipeline; performing structural constraint consistency verification on the three-dimensional geometric parameter set to generate a corrected three-dimensional geometric parameter set; and constructing a three-dimensional pipeline model of the target area based on the corrected three-dimensional geometric parameter set.
[0017] Example 1: In specific implementation, please refer to Figure 2 Laser scanning is performed on the target area to acquire raw point cloud data. A ground-based 3D laser scanner or a vehicle-mounted laser scanning system can be used to perform multi-station scans of the target area containing pipelines, obtaining a 3D point cloud covering all pipelines. During the scanning process, the scanner emits a laser beam and receives the reflected signal, measuring the spatial coordinates of points on the target surface based on the time-of-flight principle or phase difference principle, and recording the echo intensity information. The point cloud data obtained from multi-station scanning is stitched together using targets or feature points to form raw point cloud data that completely covers the target area.
[0018] The original point cloud data is denoised and filtered to generate clean point cloud data. A statistical outlier removal algorithm can be used for denoising and filtering. In this algorithm, for each point in the original point cloud data, the average distance to its k nearest neighbors is calculated. Assuming that the average distance distribution of all points follows a Gaussian distribution, points whose average distance exceeds the threshold corresponding to the global average distance plus n times the standard deviation are identified as noise points and removed. The value of k is set according to the point cloud density; when the point cloud density is approximately 1000 points per square meter, k can be set to 50. The value of n affects the filtering strength; n can be set to 1.0. After noise point removal, the clean point cloud data is obtained.
[0019] Calculate the local curvature value and normal vector direction of each point in the clean-up point cloud data, generating curvature distribution maps and normal vector distribution maps. For each point in the clean-up point cloud data, principal component analysis is used to calculate the local curvature value and normal vector direction. Using the current point as the center, search for a neighborhood point set within a radius r. The radius r is set based on the typical diameter of the pipeline; when the nominal diameter of the target pipeline ranges from 50 mm to 300 mm, the radius r can be set to 150 mm. Construct a covariance matrix for the neighborhood point set; the covariance matrix is a 3×3 symmetric positive semi-definite matrix. Perform eigenvalue decomposition on the covariance matrix to obtain three eigenvalues. , , ,in and the corresponding three feature vectors , , Minimum eigenvalue corresponding feature vector The direction of the normal vector at the current point. The local curvature value is calculated using the following formula:
[0020] in, Indicates the current point The local curvature value, The smallest eigenvalue of the covariance matrix. It is the second smallest eigenvalue of the covariance matrix. This is the largest eigenvalue of the covariance matrix. When point... When located in a flat area, much smaller and , Approaching 0; when point When located in a high curvature region, Relative increase Increase. After calculating for all points, map the local curvature value of each point to the voxel mesh according to spatial coordinates to generate a curvature distribution map, and map the normal vector direction of each point to the voxel mesh according to spatial coordinates to generate a normal vector distribution map.
[0021] The curvature distribution map and normal vector distribution map are superimposed according to spatial coordinates to extract the axis orientation point set and cross-sectional profile point set for each pipeline. In practice, pipeline surface points typically exhibit low curvature along the axis and high curvature along the cross-sectional direction, and the normal vector direction is radially distributed on the pipeline surface. Based on this characteristic, region growing and segmentation are performed on the curvature distribution map and normal vector distribution map. First, local curvature values are selected from the curvature distribution map. Below the preset curvature flatness threshold Seed points, preset curvature flatness threshold The 10th percentile of the cumulative distribution can be determined based on the statistical histogram of pipeline surface curvature. Starting from the seed point, expand outwards to the neighborhood, ensuring that the angle between the normal vector direction and the normal vector direction of the seed point is less than a preset angle threshold. Furthermore, the local curvature value is lower than the preset curvature flatness threshold. Points are grouped into the same pipeline surface area. Preset angle threshold. The angle can be set to 15 degrees. For each segmented pipeline surface region, a cylindrical fitting is performed using the normal vector direction, and discrete points on the central axis of the cylinder are extracted as the axis direction point set of the corresponding pipeline. At the same time, a cross-sectional point cloud is extracted along the direction perpendicular to the central axis, and the cross-sectional point cloud is sampled in an orderly manner to obtain the cross-sectional contour point set.
[0022] A smooth interpolation process is performed on the axis alignment point set to generate an axis point sequence. Starting from one end of the axis alignment point set, the points are sorted according to spatial proximity to form an ordered point sequence. Cubic B-spline interpolation is then applied to this ordered point sequence, inserting new interpolated points at equal intervals between adjacent original axis alignment points. The interpolation interval can be set to be equal to the average sampling interval of the point cloud, which is obtained by calculating the median distance between all adjacent points in the cleaned point cloud data. The resulting interpolation produces a smooth and continuous axis point sequence, where each point contains three-dimensional spatial coordinates and an arc length parameter along the axis alignment.
[0023] Ellipse fitting is performed on the cross-sectional profile point set to generate a profile parameter sequence. For each axis point in the axis point sequence, the cross-sectional profile point set in the normal plane at that axis point is selected, and ellipse fitting is performed using an algebraic ellipse fitting method. The general equation of the ellipse is set as follows: Combined with constraints Ensure the fitted result is an ellipse. Solve the coefficient vector using least squares. Then, the ellipse geometric parameters are extracted from the coefficients, including the two-dimensional coordinates of the ellipse center, the length of the major semi-axis, the length of the minor semi-axis, and the ellipse rotation angle. The ellipse geometric parameters fitted at each cross-sectional position are arranged in the order of the axis point sequence to obtain the contour parameter sequence.
[0024] The axis point sequence and contour parameter sequence are time-aligned and combined into a morphological feature sequence. In practice, the axis point sequence and contour parameter sequence have a one-to-one correspondence. By combining the coordinates of axis points at the same spatial location with the elliptical geometric parameters of the corresponding cross-section into a feature tuple, the feature tuple contains the three-dimensional coordinates of the axis. Length of the major half-axis Length of the short half-axis Ellipse rotation angle All feature tuples are arranged in ascending order of axis arc length parameter to form a morphological feature sequence. The morphological feature sequence describes the complete geometric shape change information of the corresponding pipeline from one end to the other.
[0025] Example 2: In specific implementation, please refer to Figure 3 The rate of change of axial curvature and the rate of change of cross-sectional radius are extracted from the morphological feature sequence. For each feature element in the morphological feature sequence corresponding to the axial point, the axial curvature is calculated along the direction of the axial arc length parameter. The axial curvature is obtained using the three-point circular arc method: taking the current axial point and its two adjacent axial points, the three points determine an arc, and the reciprocal of the arc radius is used as the axial curvature value of the current axial point. The absolute value of the difference between the axial curvature value of the current axial point and the axial curvature value of the previous axial point is used as the rate of change of axial curvature at the current axial point. The cross-sectional radius is obtained by the geometric mean of the semi-major axis length and semi-minor axis length of the current feature element in the morphological feature sequence, and the cross-sectional radius is approximately... The absolute value of the difference between the cross-sectional radius at the current axis point and the cross-sectional radius at the previous axis point is taken as the rate of change of the cross-sectional radius at the current axis point.
[0026] Spatial locations where the rate of change of axis curvature exceeds a predetermined curvature threshold are marked as elbow nodes. The predetermined curvature threshold is set as follows: statistical analysis is performed on the rate of change of axis curvature at all axis points along the entire pipeline, and the average rate of change of axis curvature plus twice the standard deviation is taken as the predetermined curvature threshold. When the rate of change of axis curvature at a certain axis point exceeds the predetermined curvature threshold, the three-dimensional spatial coordinates of that axis point are recorded, and that spatial location is marked as an elbow node. If multiple consecutive adjacent axis points all satisfy the condition that the rate of change of axis curvature exceeds the predetermined curvature threshold, then the axis point where the rate of change of axis curvature reaches its maximum value in the segment formed by the consecutive axis points is designated as an elbow node, and other adjacent points are merged.
[0027] Spatial locations where the rate of change of the cross-sectional radius exceeds a predetermined radius threshold are marked as diameter change nodes. The predetermined radius threshold is set as follows: statistical analysis is performed on the rate of change of the cross-sectional radius at all axial points along the entire pipeline, and the average rate of change of the cross-sectional radius plus three times the standard deviation is taken as the predetermined radius threshold. When the rate of change of the cross-sectional radius at a certain axial point exceeds the predetermined radius threshold, the three-dimensional spatial coordinates of that axial point are recorded, and this spatial location is marked as a diameter change node. The rate of change of the cross-sectional radius reflects the speed at which the pipeline cross-sectional dimensions change along the axial direction; at diameter change locations in the pipeline, the rate of change of the cross-sectional radius increases significantly.
[0028] Regions where the axis orientation points of multiple pipelines in the morphological feature sequence overlap spatially are marked as intersection nodes. Pairwise spatial distance analysis is performed on the axis point sets of all pipelines in the target region. The axes of two different pipelines are discretized into several line segments, and the spatial nearest point distance is calculated for each pair of line segments from the two pipelines. If the spatial nearest point distance is less than a preset overlap distance threshold, the two pipelines are considered to overlap in that region. The preset overlap distance threshold is set based on the maximum pipe diameter in the target region, and can be 1.5 times the maximum pipe diameter. In regions determined to be spatially overlapping, the midpoint of the line connecting the nearest points of two pipeline axes is taken as the spatial location of the intersection node. The three-dimensional spatial coordinates of the intersection node are recorded, and this spatial location is marked as an intersection node. If three or more pipelines overlap in the same region, they are still merged into one intersection node, and the spatial location of the intersection node is taken as the geometric center of the nearest points of all participating overlapping pipeline axes.
[0029] Spatial coordinate encoding is performed on bend nodes, diameter change nodes, and intersection nodes to generate bend node identifiers, diameter change node identifiers, and intersection node identifiers, respectively. Spatial coordinate encoding uses a spatial hash encoding method. The three-dimensional space containing the target area is divided into spatial grids according to a preset grid resolution, which can be set to 0.05 meters. For each bend node, the spatial grid index into which the bend node's three-dimensional spatial coordinates fall is calculated. The spatial grid index value is combined with the node type code to generate the bend node identifier. The bend node identifier format can be "EL-grid index", where "EL" represents the bend node type. For each diameter change node, the spatial grid index into which the diameter change node's three-dimensional spatial coordinates fall is calculated. The spatial grid index value is combined with the node type code to generate the diameter change node identifier. The diameter change node identifier format can be "RD-grid index", where "RD" represents the diameter change node type. For each intersection node, the spatial grid index into which the node's 3D spatial coordinates fall is calculated. This spatial grid index value is then combined with the node type code and the number of pipelines involved in the intersection to generate an intersection node identifier. The identifier format can be "CR-Number of Pipelines-Grid Index", where "CR" represents the intersection node type. Through spatial coordinate encoding, each feature node on each pipeline obtains a unique identifier.
[0030] Based on the geometric orientation of the connections in the morphological feature sequence, the connecting pipeline segment between two nodes is extracted. This connecting pipeline segment is then bound to the node identifiers at both ends to generate a semantic topology graph. In practice, for any pipeline, all marked elbow, diameter change, and intersection node identifiers are arranged according to the order of their corresponding axis points along the arc length parameter, resulting in a node sequence table for that pipeline. In the node sequence table, the geometric orientation between two adjacent nodes is described by the sequence of axis points between them; this sequence of axis points constitutes a connecting pipeline segment. The coordinates of the first and last axis points and the coordinates of the middle axis points of the connecting pipeline segment are extracted, recording the geometric orientation data of the connecting pipeline segment. The connecting pipeline segment is bound to the node identifiers at both ends of the node sequence table; that is, a mapping relationship is established between the connecting pipeline segment and the first and last node identifiers, using the node identifier as the key. After performing the same processing on all pipelines, all connecting pipeline segments and their node binding relationships are obtained. Using the node identifiers as vertices and the connecting pipeline segments as edges, a semantic topology graph is constructed. The semantic topology graph fully expresses the topological connection structure of each pipeline within the target area. Elbow node identifiers, diameter change node identifiers, and intersection node identifiers constitute the node set of the topology graph, and connecting pipeline segments constitute the edge set of the topology graph.
[0031] Example 3: In specific implementation, please refer to Figure 4 The process involves extracting the node identifier sequence and connection sequence of the target pipeline from the semantic topology graph. In the constructed semantic topology graph, each pipeline corresponds to a set of ordered vertices and edges connecting these vertices. The vertex set of the semantic topology graph is traversed to find all node identifiers belonging to the target pipeline. Node identifiers include elbow node identifiers, diameter change node identifiers, and intersection node identifiers. The node identifiers are sorted according to the arc length along the geometric direction of the target pipeline corresponding to their spatial positions, forming a node identifier sequence. Simultaneously, the connection relationships corresponding to each pair of adjacent node identifiers in the node identifier sequence are extracted from the edge set of the semantic topology graph, resulting in a connection relationship sequence. Each connection relationship in the sequence contains the geometric direction data of the corresponding connecting pipeline segment and the node identifiers at both ends of the connecting pipeline segment.
[0032] Read the spatial coordinates and connection angles of each node in the node identifier sequence. For each node identifier in the node identifier sequence, calculate the node's 3D spatial coordinates using the spatial grid index in the node identifier. The spatial grid index is established when the node identifier is generated, and the index value has a definite mapping relationship with the 3D spatial coordinates. After extracting the 3D spatial coordinates, further read the connection angles at each node. The connection angles are obtained according to the node type: if the node is an elbow node, the connection angles are calculated from the angle between the tangent direction vectors of the connecting pipeline segments on both sides of the elbow node at the node; if the node is a diameter change node, the connection angles are the angle between the tangent direction vectors of the axes of the connecting pipeline segments on both sides of the diameter change node at the node; if the node is an intersection node, the connection angles are the set of angles between any two of the pipeline segments involved in the intersection.
[0033] Based on the connection sequence, the target pipeline is divided into multiple segments, each segment corresponding to the pipeline segment between two adjacent nodes in the node identifier sequence. In practice, each pair of adjacent node identifiers is treated as an independent segment according to the order of the node identifier sequence. The segment boundary is the spatial location corresponding to the node identifiers at both ends. Each segment physically corresponds to a continuous pipeline segment in the target pipeline, and the segment does not contain bends, reducers, or intersections. Each segment is assigned a segment index number, which increments sequentially from the starting end of the target pipeline.
[0034] Geometric parameter fitting is performed sequentially on each segment. The local axis point coordinates and local contour radius values are extracted from the morphological feature sequence of the current segment. Based on the spatial coordinate data of the nodes at both ends of the current segment, all feature tuples located between the spatial coordinates of the two nodes are located in the morphological feature sequence of the target pipeline. From the located feature tuples, the 3D coordinates of the axis points contained in each feature tuple are extracted as local axis point coordinates. The lengths of the major and minor semi-axes contained in each feature tuple are also extracted, and the arithmetic mean of the major and minor semi-axe lengths is used as the local contour radius value.
[0035] Based on the coordinates of local axis points, a Bézier curve fitting algorithm is used to generate piecewise axis equations. The Bézier curve fitting algorithm employs a cubic Bézier curve, which consists of four control points. , , , The parametric form of the curve equation is defined as follows: ,in, For curve parameters, In the interval Internal variations. Control points. Set as the spatial coordinate data of the current segment start node, control point Set as the spatial coordinate data of the current segment termination node. Control point. and The fitting error is determined by minimizing the fitting error, which is defined as the relationship between the coordinates of the local axis points and the Bézier curve in the corresponding parameters. The sum of squared Euclidean distances between sampling points. The coordinates of local axis points in the curve parameters. The distribution on the axis uses a chord length parameterization method, which involves arranging the coordinates of local axis points in spatial order and then normalizing the cumulative chord length between adjacent points as the reference value for each point. Parameter values. Control points are obtained by solving a system of linear equations. and The optimal coordinates are obtained, and the piecewise axis equations are generated.
[0036] Based on local contour radius values, a piecewise contour function is generated using the least squares method. The piecewise contour function describes the variation of the contour radius along the arc length of the segmented axis. Using the local contour radius values as the dependent variable and the arc length positions of the corresponding axis points on the segmented axis as the independent variables, a univariate quadratic polynomial fitting model is constructed. The objective function of the least squares method is the sum of squares of the residuals between all local contour radius values and the polynomial prediction values. The estimated values of the polynomial coefficients are obtained by solving the normal equation, thus generating the piecewise contour function.
[0037] The piecewise axis equation and piecewise contour function are parametrically combined to generate the geometric parameter expression for the current segment. The geometric parameter expression uses the curve parameters of the piecewise axis equation. To unify the independent variable, in any parameter At this point, the piecewise axis equation gives the three-dimensional spatial coordinates of the current point, and the piecewise profile function gives the profile radius value at the current point. The geometric parameter expression simultaneously contains the correspondence between the three-dimensional spatial coordinates and the profile radius, fully describing the geometry of the pipeline within the current segment.
[0038] Extract the connection angle data from the two endpoints of the current segment. This data includes axial deviation angle and radial deviation angle. The axial deviation angle is defined as the angle between the tangent vector of the current segment's axis at the starting node and the tangent vector of the previous adjacent segment's axis at the ending node. The radial deviation angle is defined as the angle between the projection vectors of the two tangent vectors onto a plane perpendicular to the overall pipeline orientation. In terms of segmentation order, if the current segment is the starting segment, both the axial and radial deviation angles are set to zero.
[0039] The axial and radial deviation angles are input into the control point calculation unit of the Bézier curve fitting algorithm to generate the control point coordinate corrections in the piecewise axis equation. The control point calculation unit constructs a rotation correction matrix based on the axial and radial deviation angles. Axial deviation angle The corresponding rotation axis is obtained by the cross product of the tangent direction vector of the current segment axis at the starting node and the tangent direction vector of the previous adjacent segment axis at the ending node. The rotation correction matrix controls the points. Rotation angle around the starting node Radial deviation angle The corresponding rotation axis is taken as the tangent direction vector of the current segment axis at the starting node itself, and the rotation correction matrix controls the points. Rotation angle around the tangent direction vector The control point coordinate correction is the control point after two rotations. Coordinates and original control points The vector of differences between coordinates.
[0040] The piecewise axis equation is corrected by applying angle constraints using control point coordinate corrections, resulting in a corrected piecewise axis equation. The control point coordinate corrections are then superimposed onto the original control points. On the coordinates, the corrected control points are obtained. Coordinates, control points Correction methods and control points Symmetrical processing involves using the termination node as a reference and correcting for errors using reverse axial and radial deviation angles. Control points are maintained. and Remain unchanged, use the modified control points. and The cubic Bézier curve is reconstructed to obtain the modified piecewise axis equation. The modified piecewise axis equation satisfies the tangential continuity condition between the two ends of the segment and the adjacent segment.
[0041] The geometric parameter expressions of all segments are concatenated according to the sequence of connections to generate the three-dimensional geometric parameter set of the target pipeline. The geometric parameter expressions corresponding to each segment are combined sequentially according to the order of the connections in the sequence. The spatial coordinates and contour radius values at the connection nodes of adjacent segments remain continuous. The geometric parameter expressions of all segments are stored sequentially in the parameter set, which also records the node identifier interval and connection index for each segment, forming the three-dimensional geometric parameter set of the target pipeline.
[0042] Example 4: In specific implementation, please refer to Figure 5The process involves extracting the coordinates of the axis intersections and the lengths of connecting pipeline segments from a 3D geometric parameter set. For each pipeline in the 3D geometric parameter set, all segmental geometric parameter expressions of the pipeline are traversed. The spatial coordinates of the segment endpoints are read from the axis equation of each segment. The segment endpoints correspond to the locations of node identifiers in the semantic topology graph. The endpoint coordinates corresponding to the node identifiers shared by multiple pipelines are extracted as axis intersection coordinates. For intersection nodes where multiple pipelines intersect, an axis intersection coordinate is generated at the intersection node for each pipeline segment involved in the intersection. The axis intersection coordinates of all pipelines involved in the intersection at that intersection node are extracted. When extracting the lengths of connecting pipeline segments, for each segment in each pipeline, the arc length integral of the segment curve parameters is calculated using the segment axis equation. The arc length integral is obtained by sampling and accumulating the chord length on the segment axis equation with a predetermined step size. The predetermined step size can be set to 0.01 meters, thereby obtaining the length of the connecting pipeline segment corresponding to that segment. Group all extracted axis intersection coordinates by intersection node identifier, and record all extracted connecting pipeline segment lengths by pipeline and segment index.
[0043] Spatial distance comparison is performed on the coordinates of the axis intersections to identify abnormal intersection pairs where the deviation between the coordinates exceeds a first deviation threshold. For each set of axis intersection coordinates corresponding to each intersection node identifier, the Euclidean distance between any two axis intersection coordinates within the set is calculated. The first deviation threshold is obtained by statistically analyzing the distribution of pairwise distances between axis intersection coordinates within all intersection nodes in the target area, and taking the upper quartile of the distance distribution plus 1.5 times the interquartile range as the first deviation threshold. When the Euclidean distance between two axis intersection coordinates within a set exceeds the first deviation threshold, these two axis intersection coordinates are recorded as an abnormal intersection pair. If there are more than two axis intersection coordinates within the same intersection node, each pair is evaluated, and all pairs exceeding the first deviation threshold are marked as abnormal intersection pairs.
[0044] The continuity of connecting pipeline segments is verified to identify abnormally long segments where the deviation between the length of the connecting pipeline segment and the sum of the diameters of the two adjacent pipelines exceeds a second deviation threshold. For each connecting pipeline segment in each pipeline, the cross-sectional contour radius values corresponding to the nodes at both ends of the connecting pipeline segment are obtained. If the nodes at both ends of the connecting pipeline segment are diameter-changing nodes, the contour radius values of the side closest to the connecting pipeline segment are extracted from the segmented contour functions on both sides of the diameter-changing node. The contour radius values at both ends are multiplied by two to obtain the pipe diameter values at both ends, and the pipe diameter values at both ends are added to obtain the sum of the pipe diameters of the two adjacent pipelines. If the node type at both ends of the connecting pipeline segment is an elbow node or an intersection node, the pipe diameter values at both ends are taken as twice the contour radius values of the corresponding pipelines at that node, and added to obtain the sum of the pipe diameters. The deviation value between the length of the connecting pipeline segment and the sum of the pipe diameters is calculated; the deviation value is the absolute value of the length of the connecting pipeline segment minus the sum of the pipe diameters. The second deviation threshold is obtained by statistically analyzing the distribution of deviation values between the sum of the lengths of all connecting pipeline segments and their corresponding pipe diameters, and taking the 95th percentile of this distribution as the second deviation threshold. When the deviation value of the sum of the lengths of a certain connecting pipeline segment and its corresponding pipe diameter exceeds the second deviation threshold, the connecting pipeline segment is identified as an abnormal length segment.
[0045] Based on the abnormal intersection point pairs, a weighted average correction is applied to the coordinates of the intersection points of adjacent pipeline axes to generate corrected axis intersection point coordinates. For each abnormal intersection point pair, the pipe diameter values of the pipelines to which the coordinates of the two axis intersection points in the abnormal intersection point pair belong are extracted. The pipe diameter value is taken as twice the contour radius of the corresponding pipeline at the intersection node. The weighted average correction formula is constructed as follows:
[0046] in, This indicates the corrected coordinates of the intersection points of the axes. This indicates the coordinates of the intersection point of the axes of the first pipeline in the abnormal intersection point pair. This indicates the coordinates of the intersection point of the axes of the second pipeline in the abnormal intersection point pair. This represents the weighting coefficient corresponding to the first pipeline. This represents the weighting coefficient corresponding to the second pipeline. Weighting coefficient It is set to the reciprocal of the square of the pipe diameter of the first pipeline at the intersection node, i.e. , The pipe diameter of the first pipeline at the intersection node; weighting coefficient. It is set to the reciprocal of the square of the pipe diameter of the second pipeline at the intersection node, i.e. , This represents the pipe diameter of the second pipeline at the intersection node. The weighting coefficient reflects the accuracy of the pipeline axis fitting. Pipelines with smaller diameters have higher axis fitting accuracy because their point cloud data is more concentrated in the cross-sectional direction. The corrected axis intersection coordinates calculated according to the correction formula replace the original axis intersection coordinates. If there are multiple abnormal intersection point pairs at the same intersection node, the coordinates of all axis intersection points in the group are weighted and averaged according to the inverse of the square of the pipe diameter to uniformly correct them into a common axis intersection coordinate.
[0047] Based on the abnormal length segments, the length of the connecting pipeline segments is adjusted by truncation or extension to generate a corrected pipeline segment length. For each connecting pipeline segment identified as having an abnormal length, if the length of the connecting pipeline segment is less than the sum of the corresponding pipe diameters, the connecting pipeline segment is extended. The extension adjustment method involves moving the spatial coordinates of the nodes at both ends of the connecting pipeline segment outward along their respective tangent direction vectors. The movement distance is the sum of the pipe diameters minus half of the connecting pipeline segment length, and the spatial coordinate data of the nodes at both ends and the control point coordinates of the segment axis equation are updated. If the length of the connecting pipeline segment is greater than the sum of the corresponding pipe diameters and exceeds the second deviation threshold, the connecting pipeline segment is truncated. The truncation adjustment method involves cutting off the excess portion of the connecting pipeline segment along the axis direction, maintaining the length of the connecting pipeline segment at the sum of the pipe diameters plus the second deviation threshold, adjusting the spatial positions of the nodes at both ends, and updating the segment axis equation. After adjustment, the corrected pipeline segment length is generated, and the spatial coordinates of the nodes at both ends are updated accordingly.
[0048] The corrected axis intersection coordinates and corrected pipeline segment lengths are used to replace the corresponding parameters in the 3D geometric parameter set to generate a corrected 3D geometric parameter set. During the replacement, the corresponding geometric parameter expressions in the 3D geometric parameter set are located according to the pipeline index and segment index. The corrected axis intersection coordinates are updated to the coordinate fields of the corresponding segment endpoints and adjacent segment endpoints, and the corrected pipeline segment lengths are updated to the arc length field of the corresponding segment. At the same time, the control point coordinates in the segment axis equations are recalculated to match the updated endpoint positions and arc lengths. The node coordinates of all pipelines and the lengths of connecting pipeline segments in the updated 3D geometric parameter set satisfy the structural constraint consistency conditions.
[0049] Example 5: In practice, a scene coordinate system is established for the target area, and the axis equations and contour functions of each pipeline in the corrected 3D geometric parameter set are mapped to the scene coordinate system. The scene coordinate system adopts a geodetic coordinate system or an engineering-independent coordinate system, and its origin, coordinate axis directions, and scale factor are consistent with the coordinate system used during the acquisition of the original point cloud data. The 3D geometric parameter set for each pipeline is read line by line from the corrected 3D geometric parameter set. This set contains the geometric parameter expressions for all segments of the pipeline. Each segment's geometric parameter expression consists of a segmental axis equation and a segmental contour function. The segmental axis equation expresses the position of the pipeline axis in the scene in 3D spatial coordinates, and the segmental contour function expresses the change in the pipeline cross-sectional contour radius as a univariate function along the arc length of the axis. The control point coordinates in the segmental axis equation and the polynomial coefficients in the segmental contour function are directly assigned values in the scene coordinate system, completing the mapping of the axis equations and contour functions to the scene coordinate system.
[0050] A triangular mesh surface model is constructed for each pipeline. The modified 3D geometric parameter set contour function is swept along the axis equation to generate the triangular mesh surface model of the current pipeline. Isoparametric sampling is performed on the axis equation to generate multiple axis segment sampling points, each corresponding to a spatial coordinate value and a tangent direction vector. In specific implementation, for each segment contained in the current pipeline, the segment axis equation is extracted from the segment geometric parameter expression. The segment axis equation is expressed in cubic Bézier curve form, with the curve parameter u continuously varying within the interval [0,1]. The sampling step size Δu of the isoparametric sampling is determined based on the segment axis arc length and the desired mesh resolution. The desired mesh resolution can be set to 0.02 meters. The sampling step size Δu is obtained by dividing the segment axis arc length by the desired mesh resolution to obtain the number of sampling points, and then determining the number of sampling points by the reciprocal of the number of sampling points. For each sampling parameter value... At the location, the spatial coordinates of the corresponding axis segment sampling point are calculated from the piecewise axis equation, and the tangent direction vector at the axis segment sampling point is calculated from the first derivative of the piecewise axis equation. The tangent direction vector is then normalized.
[0051] Using each axis segment sampling point as the center, the radius and angle values of the contour ring points are spatially rotated and translated according to the tangent direction vector to generate the contour point cloud at the current sampling point. In specific implementation, the spatial coordinate values of the axis segment sampling points are used as the translation reference to transform the planar coordinates of the contour ring points from the local coordinate system of the cross section to the scene coordinate system. The local coordinate system of the cross section has the axis segment sampling point as the origin, and the tangent direction vector is used as the Z-axis direction of the local coordinate system of the cross section. The X-axis and Y-axis directions of the local coordinate system of the cross section are determined by the cross product of the tangent direction vector and the Z-axis of the scene coordinate system, combined with the Schmidt orthogonalization method. The three-dimensional spatial coordinates of the transformed contour ring points are obtained by multiplying the local coordinates by the translation vector plus the rotation matrix. All the transformed contour ring points constitute the contour point cloud at the current axis segment sampling point.
[0052] All axial and circumferential triangular faces are merged to generate a triangular mesh surface model. During the merging process, duplicate triangle vertices are removed; two triangle vertices are considered the same vertex if the spatial distance between them is less than the position tolerance. The position tolerance can be set to 0.001 meters. Global vertex indices are assigned to all deduplicated triangle vertices, and each axial and circumferential triangular face is represented by three vertex indices, resulting in a triangular mesh surface model organized as a vertex list and a face index list.
[0053] For adjacent triangle vertices in the triangular mesh surface model, perform normal vector consistency calculations to generate smoothed triangle vertex normal vector distribution data. Extract the vertex indices and coordinates of all triangles in the triangular mesh surface model, and establish an adjacency mapping table from vertex to triangle, recording which triangles share each vertex. Traverse each vertex and obtain the face normal vectors of all triangles adjacent to the current vertex. For each triangle adjacent to the current vertex, calculate the triangle's face normal vector. The face normal vector is obtained by the cross product of the triangle's two edge vectors and normalized. The direction of the face normal vector points outward from the pipeline surface and is determined by the contour point cloud generation order and the right-hand rule.
[0054] A weighted average is calculated on the face normal vector, with the weights being the product of the area of the adjacent triangle and the reciprocal of the distance from the current vertex to the center of the adjacent triangle, to generate candidate normal vectors for the current vertex. The weighted average calculation uses the following formula:
[0055] in, This represents the candidate normal vector for the current vertex with vertex index v. Let represent the set of all triangles adjacent to the current vertex. Represents a set A triangle in the middle, Let represent the area of triangle t. The area of a triangle is calculated by taking half the magnitude of the cross product of the two side vectors of the triangle. This represents the distance from the current vertex to the center of triangle t, where the center of triangle t is the arithmetic mean of the coordinates of the three vertices of the triangle. Let represent the face normal vector of triangle t. The numerator of the weight is the area of the triangle. The denominator is the distance. This weighting makes the normal vector of the opposite triangle that has a larger area and is closer to the current vertex contribute more.
[0056] The candidate normal vectors are normalized to generate a smooth normal vector for the current vertex. The normalization process transforms the candidate normal vectors... The modulus is scaled to a unit length, and the normal vector is smoothed. The calculation method is as follows ,in, This represents the Euclidean magnitude of the candidate normal vector. When the magnitude of the candidate normal vector is zero, the normal vector of the triangle with the largest area among the face normal vectors of the adjacent triangles of the current vertex is used as the smoothed normal vector. The smoothed normal vectors of all vertices are assembled according to the vertex index to generate smoothed triangle vertex normal vector distribution data. The smoothed triangle vertex normal vector distribution data is stored in array form, where the array subscript corresponds to the vertex index, and the array element is the three components of the smoothed normal vector of the corresponding vertex.
[0057] Based on the smoothed triangle vertex normal vector distribution data, lighting rendering parameters are configured for the triangular mesh surface model to generate rendering voxel data for the current pipeline. The lighting rendering parameter configuration uses the Von Leigh lighting model, configuring ambient reflectance, diffuse reflectance, and specular reflectance for the triangular mesh surface model of the current pipeline. The ambient reflectance is set to 0.2, the diffuse reflectance to 0.6, the specular reflectance to 0.2, and the specular specular index to 32. The spatial coordinates, smoothed normal vectors, and lighting rendering parameters of each vertex in the triangular mesh surface model are input into the voxelization pipeline. The voxelization pipeline discretizes the triangular mesh surface model into voxel representations, with each voxel recording the color value and normal vector direction at its location, generating rendering voxel data for the current pipeline.
[0058] The rendering voxel data of all pipelines are assembled in the scene coordinate system to generate a 3D pipeline model. In the scene coordinate system, the rendering voxel data of all pipelines are placed in a unified voxel space according to their spatial positions. If the same location in the voxel space is occupied by rendering voxel data from multiple pipelines, the rendering voxel data of the pipeline with the largest diameter at the intersection node is retained. After assembly, a complete 3D pipeline model of the target area is obtained. The 3D pipeline model expresses the 3D geometry, topology, and surface material properties of the pipelines in voxel form.
[0059] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for modeling three-dimensional pipelines, characterized in that, include: Collect raw point cloud data of multiple pipelines in the target area, and extract the morphological feature sequence of each pipeline from the raw point cloud data; Semantic parsing is performed on the morphological feature sequence to generate a semantic topology graph of pipelines in the target region, the semantic topology graph containing nodes and connection relationships; The preset 3D reconstruction engine is invoked to perform pipeline individual parameter fitting on the semantic topology map, generating a 3D geometric parameter set for each pipeline; Perform structural constraint consistency verification on the three-dimensional geometric parameter set to generate a corrected three-dimensional geometric parameter set; A three-dimensional pipeline model of the target region is constructed based on the modified three-dimensional geometric parameter set.
2. The method for modeling three-dimensional pipelines according to claim 1, characterized in that, The original point cloud data of multiple pipelines in the target area is collected, and the morphological feature sequence of each pipeline is extracted from the original point cloud data, including: The target area is laser-scanned to obtain the original point cloud data; The original point cloud data is subjected to noise reduction filtering to generate clean point cloud data; Calculate the local curvature value and normal vector direction of each point in the cleaned point cloud data, and generate a curvature distribution map and a normal vector distribution map; The curvature distribution map and the normal vector distribution map are superimposed according to spatial coordinates to extract the axis orientation point set and cross-sectional profile point set of each pipeline; The set of points along the axis is subjected to smooth interpolation to generate an axis point sequence, and the set of points along the cross-section contour is subjected to ellipse fitting to generate a contour parameter sequence. The axis point sequence and the contour parameter sequence are time-aligned and combined into the morphological feature sequence.
3. The method for modeling three-dimensional pipelines according to claim 1, characterized in that, The semantic parsing of the morphological feature sequence generates a semantic topology graph of the pipelines in the target region. The semantic topology graph includes nodes and connection relationships, including: Extract the rate of change of axis curvature and the rate of change of cross-sectional radius from the morphological feature sequence, and mark the spatial locations where the rate of change of axis curvature is greater than a predetermined curvature threshold as bend nodes; Spatial locations where the rate of change of the cross-sectional radius is greater than a predetermined radius threshold are marked as diameter-changing nodes; The regions in which the axial orientation points of multiple pipelines in the morphological feature sequence overlap in space are marked as intersection nodes; Spatial coordinate encoding is performed on the elbow node, the diameter change node, and the intersection node to generate elbow node identifier, diameter change node identifier, and intersection node identifier, respectively. Based on the geometric direction of the connection relationship in the morphological feature sequence, the connection pipeline segment between two nodes is extracted, and the connection pipeline segment is bound to the identifiers of the two end nodes to generate the semantic topology graph.
4. The method for modeling three-dimensional pipelines according to claim 1, characterized in that, The process involves invoking a pre-defined 3D reconstruction engine to perform pipeline unit parameterization fitting on the semantic topology graph, generating a 3D geometric parameter set for each pipeline, including: Extract the node identifier sequence and connection relationship sequence of the target pipeline from the semantic topology graph; read the spatial coordinate data and connection angle data of each node in the node identifier sequence; Based on the connection sequence, the target pipeline is divided into multiple segments, each segment corresponding to the pipeline segment between two adjacent nodes in the node identifier sequence; Perform the following processing on each segment: Extract the coordinates of local axis points and the local contour radius values from the morphological feature sequence of the current segment; Based on the coordinates of the local axis points, a Bézier curve fitting algorithm is used to generate piecewise axis equations; Based on the local contour radius value, a piecewise contour function is generated by fitting using the least squares method; The segmented axis equation and the segmented contour function are parameterized and combined to generate the geometric parameter expression of the current segment; The geometric parameter expressions of all segments are concatenated according to the sequence of connections to generate the three-dimensional geometric parameter set of the target pipeline.
5. The method for modeling a three-dimensional pipeline according to claim 4, characterized in that, The following processing for each segment also includes: Extract the connection angle data of the two ends of the current segment, the connection angle data including the axial deviation angle and the radial deviation angle; The axial deviation angle and the radial deviation angle are input into the control point calculation unit in the Bézier curve fitting algorithm to generate the control point coordinate correction amount in the piecewise axis equation; The segmented axis equation is corrected by angular constraints using the control point coordinate correction amount, resulting in a corrected segmented axis equation.
6. The method for modeling three-dimensional pipelines according to claim 1, characterized in that, The step of performing structural constraint consistency verification on the three-dimensional geometric parameter set to generate a corrected three-dimensional geometric parameter set includes: Extract the coordinates of the axis intersections of all pipelines and the lengths of the connecting pipeline segments from the set of three-dimensional geometric parameters; Spatial distance comparison is performed on the coordinates of the intersection points of the axes to identify abnormal intersection point pairs where the deviation between the coordinates of the intersection points of the axes is greater than a first deviation threshold; The continuity of the connecting pipeline segment length is checked to identify abnormal length segments where the deviation between the length of the connecting pipeline segment and the sum of the diameters of the two adjacent pipelines is greater than a second deviation threshold. Based on the abnormal intersection point pairs, the coordinates of the axis intersection points of adjacent pipelines are corrected by weighted average to generate corrected axis intersection point coordinates. Based on the abnormal length segment, the length of the connecting pipeline segment is truncated or extended to generate a corrected pipeline segment length; The corrected three-dimensional geometric parameter set is generated by replacing the corresponding parameters in the three-dimensional geometric parameter set with the corrected axis intersection coordinates and the corrected pipeline segment length.
7. The method for modeling three-dimensional pipelines according to claim 1, characterized in that, The step of constructing a three-dimensional pipeline model of the target region based on the corrected three-dimensional geometric parameter set includes: Establish a scene coordinate system for the target area, and map the axis equation and contour function of each pipeline in the corrected three-dimensional geometric parameter set to the scene coordinate system; Perform the following treatment on each pipeline: The contour function in the modified three-dimensional geometric parameter set is swept along the axis equation to generate a triangular mesh surface model of the current pipeline. Perform normal vector consistency calculation on adjacent triangle vertices in the triangular mesh surface model to generate smoothed triangle vertex normal vector distribution data; Based on the smoothed triangle vertex normal vector distribution data, the lighting rendering parameters of the triangular mesh surface model are configured to generate the rendering voxel data of the current pipeline. The rendering voxel data of all pipelines are assembled in the scene coordinate system to generate the 3D pipeline model.
8. The method for modeling a three-dimensional pipeline according to claim 7, characterized in that, The step of sweeping the contour function along the axis equation in the modified three-dimensional geometric parameter set to generate a triangular mesh surface model of the current pipeline includes: The axis equation is sampled with equal parameters to generate multiple axis segment sampling points. Each axis segment sampling point corresponds to a spatial coordinate value and a tangent direction vector. The contour function is sampled at equal angles to generate multiple contour ring points, each contour ring point corresponding to a radius value and an angle value; Taking each of the axis segment sampling points as the center, the radius and angle values of the contour ring points are spatially rotated and translated according to the tangent direction vector to generate the contour point cloud at the current sampling point. Connect the points with the same angle index in the contour point cloud corresponding to the sampling points of two adjacent axial segments to generate axial triangular patches; Connect the points with adjacent angle indices in the contour point cloud corresponding to two adjacent axis segment sampling points to generate a circumferential triangular patch; All the axial and circumferential triangular patches are merged to generate the triangular mesh surface model.
9. A method for modeling three-dimensional pipelines according to claim 7, characterized in that, The step of performing normal vector consistency calculation on adjacent triangle vertices in the triangular mesh surface model to generate smoothed triangle vertex normal vector distribution data includes: Extract the vertex indices and vertex coordinates of all triangles in the triangular mesh surface model; Iterate through each vertex and obtain the face normal vectors of all triangles adjacent to the current vertex; The face normal vector is calculated by weighted averaging, with the weight being the product of the area of the adjacent triangle and the reciprocal of the distance from the current vertex to the center of the adjacent triangle, to generate the candidate normal vector of the current vertex; The candidate normal vectors are normalized to generate a smooth normal vector for the current vertex; The smoothed normal vectors of all vertices are assembled according to the vertex index to generate the smoothed triangle vertex normal vector distribution data.
10. A three-dimensional pipeline modeling system, characterized in that, The system includes a processor and a memory, the memory being connected to the processor. The memory is used to store programs, instructions, or code, and the processor is used to execute the programs, instructions, or code in the memory to implement the three-dimensional pipeline modeling method according to any one of claims 1-9.
