Two-dimensional and three-dimensional data pipeline modeling method and system
By using bilinear interpolation and a three-dimensional centerline coordinate correction formula, combined with cubic Bernstein basis functions and rotation, translation, and scaling functions, the problems of data consistency and design change risks in traditional pipeline modeling are solved, achieving efficient and accurate two-dimensional and three-dimensional pipeline modeling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LISHUI URBAN CONSTR SURVEYING & MAPPING CENT CO LTD
- Filing Date
- 2026-01-23
- Publication Date
- 2026-05-05
AI Technical Summary
Traditional pipeline modeling methods suffer from data consistency and uniformity issues when converting 2D pipelines to 3D. The reconstructed model is prone to anomalies, and manual inspection of drawings is risky and costly when design changes are made.
By employing elevation formulas based on bilinear interpolation and three-dimensional centerline coordinate correction formulas, combined with cubic Bernstein basis functions and cubic Bézier curve formulas, smooth curves are constructed. Pipeline connections are then performed using rotation, translation, and scaling functions, providing continuous and smooth terrain estimation and pipeline connections, and reducing abnormal reconstruction results.
It improves the matching degree between pipeline models and actual terrain, reduces unreasonable stepped terrain and pipeline bends, reduces the need for manual inspection, and improves the accuracy and efficiency of modeling.
Smart Images

Figure CN121982204A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pipeline data management technology, and in particular to a two- or three-dimensional data pipeline modeling method and system. Background Technology
[0002] Currently, traditional pipeline data includes both 2D and 3D pipeline data. Traditional pipeline modeling methods mainly rely on software such as BIM. However, these modeling methods require specific modeling parameters, and the conversion of some 2D pipelines to 3D presents issues of data consistency and uniformity. In particular, during pipeline remodeling, abnormal reconstruction results are prone to occur, including but not limited to abnormal pipeline angles, abnormal terrain estimations, abnormal pipeline deformations, and sharp bends. These problems often require separate matching and resolution by human resources, resulting in high data modeling costs. Furthermore, in traditional modeling methods, if there is any design change to the pipeline, engineers need to manually check all relevant drawings, documents, and tables for modification, which is prone to omissions and carries significant risks. Summary of the Invention
[0003] One objective of this invention is to provide a method and system for modeling two-dimensional and three-dimensional pipelines. The method and system provide an elevation formula based on bilinear interpolation and a three-dimensional centerline coordinate correction formula for converting two-dimensional pipelines to three-dimensional pipelines. The three-dimensional centerline coordinate correction formula includes the depth parameters and pipeline radius in the real-world scenario. Therefore, the elevation formula and three-dimensional centerline coordinate formula based on bilinear interpolation can provide continuous and smooth terrain estimation, reducing illogical stepped terrain. This allows the two-dimensional pipeline to three-dimensional pipeline modeling of this invention to adapt to various complex terrains, ensuring that the pipeline model matches the actual terrain.
[0004] Another objective of this invention is to provide a two-dimensional and three-dimensional data pipeline modeling method and system. The method and system construct a vector angle formula based on two-dimensional pipelines and a pipeline curvature calculation formula to quantify the degree of pipeline bending. This enables the invention to accurately identify different angle information for constructing multi-channel pipelines, reduce illogical pipeline connections, and provide smoothness control for pipeline bending sections based on the pipeline curvature calculation formula. This reduces unnatural turns in the three-dimensional pipeline reconstruction process, making the three-dimensional pipeline construction method conform to the natural characteristics of pipelines.
[0005] Another objective of this invention is to provide a two-dimensional and three-dimensional data pipeline modeling method and system. The method and system utilize cubic Bernstein basis functions and cubic Bézier curve formulas to construct smooth curves between discrete pipeline points. Since both the cubic Bernstein basis functions and cubic Bézier curve formulas are second-differentiable, the pipeline connection lines maintain continuity and smoothness during reconstruction. Furthermore, based on the cubic Bernstein basis functions, the local continuous deformation of the pipeline can be controlled, enabling precise three-dimensional modeling of special types of pipelines.
[0006] Another objective of this invention is to provide a two-dimensional and three-dimensional pipeline modeling method and system. The method and system provide a pipeline docking joint formula including a planar normal vector rotation alignment formula for the pipe segment end face, a translation vector formula based on the connector center point, and a pipe diameter scaling factor formula. The pipeline docking joint formula provides physically interpretable pipeline modeling. Therefore, the multi-pipeline modeling in this invention is physically reasonable and interpretable. In subsequent pipeline modeling management, modeling replacement can be directly performed based on physical parameters without the need for complex manual checks and adjustments.
[0007] To achieve at least one of the above-mentioned objectives, the present invention further provides a two- or three-dimensional data pipeline modeling method, the method comprising:
[0008] Obtain pipeline path parameters and attribute parameters, and obtain terrain parameters of the pipeline location. Calculate the three-dimensional centerline coordinate correction formula of the pipeline based on the pipeline path parameters, attribute parameters, and terrain parameters.
[0009] The coordinate values of the three center points connected at the bend of the pipeline are obtained according to the three-dimensional center line coordinate correction formula, and two marker vectors are constructed based on the coordinates of the three connected center points. The curvature and included angle of the pipeline are calculated based on the marker vectors.
[0010] Obtain the three-dimensional centerline coordinates of the location of local deformation in the pipeline, and use the cubic Bernstein function to control the local deformation at the corresponding location of the pipeline so that the modeled pipeline maintains a local deformation similar to that of the real pipeline.
[0011] Obtain the three-dimensional centerline coordinates of the pipeline connector location, and use a joint docking function, including rotation, translation and scaling functions, to model the docking of different pipelines at the connector location.
[0012] According to a preferred embodiment of the present invention, the method for calculating the three-dimensional centerline coordinate correction formula includes: pre-griding the pipeline area to obtain the coordinates of the grid points, and using bilinear interpolation to construct the elevation formula corresponding to the horizontal plane coordinates.
[0013] ;
[0014] in This represents the elevation value calculated through interpolation at any horizontal coordinate (x, y). This represents the normalized interpolation parameters along the x-axis. This represents the normalized interpolation parameters along the y-axis. , , and These represent the elevation values of the four adjacent grid points at the top left, top right, bottom left, and bottom right of the horizontal coordinate (x, y), respectively.
[0015] According to another preferred embodiment of the present invention, the method for calculating the three-dimensional centerline coordinate correction formula includes: obtaining the coordinate value (x, y, y) at the corresponding pipeline center point i based on the pipeline path parameters. i ,y i ), obtain the center point i (x) of the pipeline. i ,y i The pipeline depth attribute value d i And obtain the center point i (x) of the pipeline. i ,y i Pipeline radius r i The coordinates of the three-dimensional centerline are calculated using the following formula:
[0016] ;
[0017] in This indicates the location at the center point i of the corresponding pipeline (x i ,y i The elevation value of ).
[0018] According to another preferred embodiment of the present invention, the pipeline angle calculation method includes: obtaining the coordinates of the center point of the center position of the pipeline bend according to the three-dimensional centerline coordinate formula, and simultaneously obtaining the coordinates of two center points of the pipeline bend and the connection end of the straight pipeline according to the three-dimensional centerline coordinate formula, and connecting the three center point coordinates end to end along the pipeline extension direction to construct two marker vectors. and ,in This indicates the coordinates of the center point of one of the connection ends in the bend of the pipeline. This indicates the coordinates of the center point of the bend in the pipeline. This indicates the coordinates of the center point of another connection end of the pipeline bend, further based on the marked vector. and The included angle of the corresponding pipeline bend is calculated using the inverse cosine function.
[0019] According to another preferred embodiment of the present invention, the pipeline curvature calculation method includes: calculating the coordinate values of three points on the curved portion of the pipeline. , and The curvature of the pipeline is calculated using the following formula:
[0020] ;
[0021] in This represents the included angle of the pipeline at the center point i of the corresponding bend. This represents the curvature value of the pipeline surface at the center point i of the corresponding curved section.
[0022] According to another preferred embodiment of the present invention, the method for controlling local deformation of a pipeline is as follows: obtaining grid point indices to represent grid point positions, and calculating cubic Bernstein basis functions under different local coordinates based on the grid point indices. , and Where u, v, and w represent the normalized coordinates of the original point P in the x, y, and z axes, respectively, and l, m, and n represent the grid indices in the x, y, and z axes, respectively. The local deformation control of the pipeline is calculated using the following formula:
[0023] ;
[0024] in The coordinates of the control point corresponding to the (l,m,n) grid position.
[0025] According to another preferred embodiment of the present invention, the calculation method of the rotation, translation, and scaling functions respectively includes: calculating the rotational alignment of the pipeline and the connector using the following rotation function:
[0026] ;
[0027] Where R represents an orthogonal three-dimensional rotation matrix, I represents a 3×3 identity matrix, K represents the cross product matrix of the rotation axis vectors k, and θ represents the rotation angle;
[0028] The following translation function is used to calculate the translation alignment of pipelines and connectors:
[0029] ;
[0030] Where t represents the translation vector that moves the center point of the source plane to the center point of the target plane, and c t c represents the coordinates of the center point of the target connector plane. s R represents the coordinates of the center point of the source plane on the pipeline end face, and R represents the rotation matrix;
[0031] The following scaling function is used to calculate the scaling and docking of pipelines and connectors:
[0032] ;
[0033] Wherein, the r t The radius r of the connecting pipe section is indicated by the number of pipes connected to the fitting. s The radius of the pipe end segment is represented by s, which is the scaling factor. The physical connection model of the pipeline is performed based on the above rotation, translation and scaling functions.
[0034] According to another preferred embodiment of the present invention, the method includes: constructing an implicit function of the pipeline for a precise physical description of the pipeline surface location, wherein the implicit function of the pipeline is:
[0035] ;
[0036] Where F(q) represents the distance function value from any point x in space to the pipeline surface, q represents the coordinates of any point in three-dimensional space, t represents the parameterized variable of the pipeline centerline with a value range of [0,1], C(t) represents the centerline parameter equation, which is used to give the coordinates of the pipeline centerline under the corresponding parameter t, and r(t) represents the radius function of the pipeline.
[0037] To achieve at least one of the above-mentioned objectives, the present invention further provides a two-dimensional or three-dimensional data pipeline modeling system, wherein the system executes the aforementioned two-dimensional or three-dimensional data pipeline modeling system.
[0038] The present invention further provides a computer-readable storage medium storing a computer program, which is executed by a processor to implement the above-described two-dimensional data pipeline modeling method.
[0039] Beneficial effects of this invention:
[0040] 1. This invention utilizes the elevation formula of bilinear interpolation and the three-dimensional centerline coordinate correction formula that includes deep burial parameters and pipeline radius to achieve continuous and smooth terrain estimation, thereby effectively improving the adaptability of pipeline modeling in complex terrain.
[0041] 2. The present invention utilizes a cubic Bernstein function to control the local deformation of the corresponding position of the pipeline, so that the pipeline modeling of the present invention conforms to the real pipeline state and improves the three-dimensional modeling effect.
[0042] 3. This invention utilizes rotation, translation, and scaling functions to construct a joint docking function, which makes pipeline modeling highly physically interpretable. Attached Figure Description
[0043] Figure 1 The diagram shown is a flowchart of a two- or three-dimensional data pipeline modeling method according to the present invention. Detailed Implementation
[0044] The following description is intended to disclose the present invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art. The basic principles of the invention defined in the following description can be applied to other embodiments, modifications, improvements, equivalents, and other technical solutions that do not depart from the spirit and scope of the invention.
[0045] It is understood that the term "a" should be understood as "at least one" or "one or more," that is, in one embodiment, the number of an element can be one, while in another embodiment, the number of the element can be multiple, and the term "a" should not be understood as a limitation on the number.
[0046] Please combine Figure 1 This invention discloses a two-dimensional and three-dimensional data pipeline modeling method and system, the method mainly includes the following steps:
[0047] S01. Obtain pipeline path parameters and attribute parameters, and obtain terrain parameters of the pipeline location. Calculate the three-dimensional centerline coordinate correction formula of the pipeline based on the pipeline path parameters, attribute parameters, and terrain parameters.
[0048] S02. Obtain the coordinate values of the three center points of the connection at the bend of the pipeline according to the three-dimensional center line coordinate correction formula, and construct two marker vectors according to the coordinates of the three center points of the connection. Calculate the pipeline curvature and included angle according to the marker vectors.
[0049] S03. Obtain the three-dimensional centerline coordinates of the location of local deformation in the pipeline, and use the cubic Bernstein function to control the local deformation of the corresponding location of the pipeline so that the modeled pipeline maintains a local deformation similar to that of the real pipeline.
[0050] S04. Obtain the three-dimensional centerline coordinates of the pipeline connector location, and use a joint docking function including rotation, translation and scaling functions to model the docking of different pipelines at the connector location.
[0051] Specifically, the pipeline path described in this invention can be a two-dimensional path or a three-dimensional path. The corresponding three-dimensional centerline coordinate formula for the pipeline in this invention is a mapped coordinate value generated based on the actual pipeline path. Because the pipeline layout itself is based on the state of on-site buildings and underground objects, there is no standard equation for the corresponding three-dimensional centerline coordinate formula. However, part of the technical solution of this invention is based on the traditional three-dimensional centerline coordinate formula for pipelines, with correction including terrain interpolation. This ensures that the corrected three-dimensional centerline coordinate formula for pipelines conforms to the actual terrain estimation. Furthermore, this invention uses bilinear interpolation to smoothly estimate the terrain, thus preventing unreasonable stepped terrain from appearing during the modeling process. The specific method includes the following steps:
[0052] First, a gridded map needs to be constructed for the area where the pipeline is located. This gridded map can be a 3D grid map with cubic partitioning, including but not limited to octree maps, so that each grid has a corresponding location domain index. Since map gridding uses existing technology, this invention does not improve upon it, and therefore will not elaborate on it further.
[0053] It should be noted that the pipeline attribute parameters described in this invention include, but are not limited to, the pipeline radius and pipeline length at the corresponding location, and the pipeline path can be the pipeline extension distance, extension direction, etc.
[0054] After constructing the gridded map, the present invention further calculates the three-dimensional centerline coordinate correction formula: The pipeline area is pre-gridded to obtain grid point coordinates, and the elevation formula corresponding to the horizontal plane coordinates is constructed using bilinear interpolation.
[0055] ;
[0056] in This represents the elevation value calculated through interpolation at any horizontal coordinate (x, y). This represents the normalized interpolation parameters along the x-axis. This represents the normalized interpolation parameters along the y-axis. , , and These represent the elevation values of the top-left, top-right, bottom-left, and bottom-right four adjacent grid points at the horizontal coordinate (x, y). The two linear interpolation functions described above effectively avoid sharp changes in pipeline elevation during modeling, and the elevation calculation can be controlled using only any four adjacent points, making the algorithm simple and efficient.
[0057] The calculation method for the three-dimensional centerline coordinate correction formula includes: obtaining the coordinate value (x, y) at the corresponding pipeline center point i based on the pipeline path parameters. i ,y i), obtain the center point i (x) of the pipeline. i ,y i The pipeline depth attribute value d i And obtain the center point i (x) of the pipeline. i ,y i Pipeline radius r i The coordinates of the three-dimensional centerline are calculated using the following formula:
[0058] ;
[0059] in This indicates the location at the center point i of the corresponding pipeline (x i ,y i The elevation value of the pipeline. In this invention, the above method can better match the corresponding terrain during the process of converting two-dimensional pipelines into three-dimensional pipelines, and the control of the deep burial parameters makes the modeled pipelines more in line with the actual construction requirements.
[0060] It should be noted that the pipeline angle calculation method described in this invention includes: obtaining the coordinates of the center point of the pipeline bend according to the three-dimensional centerline coordinate formula, and simultaneously obtaining the coordinates of two center points of the pipeline bend and the connection end of the straight pipeline according to the three-dimensional centerline coordinate formula; and connecting the three center point coordinates end to end along the pipeline extension direction to construct two marker vectors. and ,in This indicates the coordinates of the center point of one of the connection ends in the bend of the pipeline. This indicates the coordinates of the center point of the bend in the pipeline. This indicates the coordinates of the center point of another connection end of the pipeline bend, further based on the marked vector. and The included angle of the corresponding pipeline bend is calculated using the inverse cosine function. It should be noted that the calculation of the included angle of the corresponding pipeline bend in this invention provides a parameter basis for identifying different pipeline channels and connectors, such as T-junctions and T-junctions, and the rationality of the pipeline bend can be verified based on the included angle of the pipeline bend.
[0061] Furthermore, the pipeline curvature calculation method described in this invention includes: calculating the coordinate values of three points on the curved portion of the pipeline. , and The curvature of the pipeline is calculated using the following formula:
[0062] ;
[0063] in This represents the included angle of the pipeline at the center point i of the corresponding bend. This represents the curvature value of the pipeline surface at the center point i of the corresponding curved section.
[0064] It is worth mentioning that, in one preferred embodiment of the present invention, the method for controlling local deformation of pipelines is as follows: obtaining grid point indices to represent grid point positions, and calculating cubic Bernstein basis functions under different local coordinates based on the grid point indices. , and Where u, v, and w represent the normalized coordinates of the original point P in the x, y, and z axes, respectively, and l, m, and n represent the grid indices in the x, y, and z axes, respectively. The local deformation control of the pipeline is calculated using the following formula:
[0065] ;
[0066] in The coordinates of the control point corresponding to the (l,m,n) grid position.
[0067] In one preferred embodiment of the present invention, the present invention provides a physically interpretable pipeline joint docking function, wherein the pipeline joint docking function can be decomposed into rotation, translation, and scaling functions, wherein the calculation methods of the rotation, translation, and scaling functions respectively include: calculating the rotational alignment of the pipeline and the connector using the following rotation function:
[0068] ;
[0069] Where R represents an orthogonal three-dimensional rotation matrix, I represents a 3×3 identity matrix, K represents the cross product matrix of the rotation axis vectors k, and θ represents the rotation angle;
[0070] The following translation function is used to calculate the translation alignment of pipelines and connectors:
[0071] ;
[0072] Where t represents the translation vector that moves the center point of the source plane to the center point of the target plane, and c t c represents the coordinates of the center point of the target connector plane. s R represents the coordinates of the center point of the source plane on the pipeline end face, and R represents the rotation matrix;
[0073] The following scaling function is used to calculate the scaling and docking of pipelines and connectors:
[0074] ;
[0075] Wherein, the r t The radius r of the connecting pipe section is indicated by the number of pipes connected to the fitting. sThe radius of the pipe end segment is represented by s, which is the scaling factor. The physical connection model of the pipeline is performed based on the above rotation, translation and scaling functions.
[0076] Based on the rotation, translation, and scaling functions, the following pipeline joint docking function is constructed: ,in This represents the coordinates of the pipeline center point after docking, while P represents the coordinates of the pipeline center point before docking.
[0077] In one preferred embodiment of the present invention, the present invention also provides implicit functions for the pipeline, used for a precise physical description of the pipeline surface position, wherein the implicit functions of the pipeline are:
[0078] ;
[0079] Where F(q) represents the distance function value from any point x in space to the pipeline surface, q represents the coordinates of any point in three-dimensional space, t represents the parameterized variable of the pipeline centerline with a value range of [0,1], C(t) represents the centerline parameter equation, used to give the coordinates of the pipeline centerline under the corresponding parameter t, and r(t) represents the radius function of the pipeline. It should be noted that the implicit function of the pipeline in this invention can provide an accurate description of the pipeline surface, especially for the position description inside and outside the pipeline, which facilitates the implementation of differentiated rendering modeling of the inside and outside of the pipeline.
[0080] The processes described in the flowcharts above, as disclosed in the embodiments of this invention, can be implemented as computer software programs. Embodiments of this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), the methods of this application are not limited to the aforementioned functions. It should be noted that the computer-readable medium described above can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wire segments, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless segments, wire segments, optical fibers, RF, etc., or any suitable combination thereof.
[0081] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0082] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are merely examples and do not limit the present invention. The purpose of the present invention has been fully and effectively achieved. The functions and structural principles of the present invention have been shown and explained in the embodiments. Without departing from the stated principles, the implementation of the present invention may have any variations or modifications.
Claims
1. A two- or three-dimensional data pipeline modeling method, characterized in that, The method includes: Obtain pipeline path parameters and attribute parameters, and obtain terrain parameters of the pipeline location. Calculate the three-dimensional centerline coordinate correction formula of the pipeline based on the pipeline path parameters, attribute parameters, and terrain parameters. The coordinate values of the three center points of the connection at the bend of the pipeline are obtained according to the three-dimensional center line coordinate correction formula, and two marker vectors are constructed according to the coordinates of the three center points of the connection. The curvature and included angle of the pipeline are calculated according to the marker vectors. Obtain the three-dimensional centerline coordinates of the location of local deformation in the pipeline, and use the cubic Bernstein function to control the local deformation at the corresponding location of the pipeline so that the modeled pipeline maintains a local deformation similar to that of the real pipeline. Obtain the three-dimensional centerline coordinates of the pipeline connector location, and use a joint docking function, including rotation, translation and scaling functions, to model the docking of different pipelines at the connector location.
2. The two-dimensional / three-dimensional data pipeline modeling method according to claim 1, characterized in that, The calculation method for the three-dimensional centerline coordinate correction formula includes: pre-griding the pipeline area to obtain the coordinates of the grid points, and using bilinear interpolation to construct the elevation formula for the corresponding horizontal coordinates. ; in This represents the elevation value calculated by interpolation at any horizontal coordinate (x, y). This represents the normalized interpolation parameters along the x-axis. This represents the normalized interpolation parameters along the y-axis. , , and These represent the elevation values of the four adjacent grid points at the top left, top right, bottom left, and bottom right of the horizontal coordinate (x, y), respectively.
3. The two-dimensional / three-dimensional data pipeline modeling method according to claim 2, characterized in that, The calculation method for the three-dimensional centerline coordinate correction formula includes: obtaining the coordinate value (x, y) at the corresponding pipeline center point i based on the pipeline path parameters. i ,y i ), obtain the center point i (x) of the pipeline. i ,y i The pipeline depth attribute value d i And obtain the center point i (x) of the pipeline. i ,y i Pipeline radius r i The coordinates of the three-dimensional centerline are calculated using the following formula: ; in This indicates the location at the center point i of the corresponding pipeline (x i ,y i The elevation value of ).
4. The two-dimensional / three-dimensional data pipeline modeling method according to claim 1, characterized in that, The pipeline angle calculation method includes: obtaining the coordinates of the center point of the pipeline bend according to the three-dimensional centerline coordinate formula, and simultaneously obtaining the coordinates of two center points of the pipeline bend and the connection end of the straight pipeline according to the three-dimensional centerline coordinate formula; and connecting the three center point coordinates end to end along the pipeline extension direction to construct two marker vectors. and ,in This indicates the coordinates of the center point of one of the connection ends in the bend of the pipeline. This indicates the coordinates of the center point of the bend in the pipeline. This indicates the coordinates of the center point of another connection end of the pipeline bend, further based on the marked vector. and The included angle of the corresponding pipeline bend is calculated using the inverse cosine function.
5. The two-dimensional / three-dimensional data pipeline modeling method according to claim 4, characterized in that, The pipeline curvature calculation method includes: based on the coordinate values of three points on the curved section of the pipeline... , and The curvature of the pipeline is calculated using the following formula: ; in This represents the included angle of the pipeline at the center point i of the corresponding bend. This represents the curvature value of the pipeline surface at the center point i of the corresponding curved section.
6. The two-dimensional / three-dimensional data pipeline modeling method according to claim 1, characterized in that, The method for controlling local deformation of pipelines is as follows: Obtain the grid point index to represent the grid point position, and calculate the cubic Bernstein basis functions under different local coordinates based on the grid point index. , and Where u, v, and w represent the normalized coordinates of the original point P in the x, y, and z axes, respectively, and l, m, and n represent the grid indices in the x, y, and z axes, respectively. The local deformation control of the pipeline is calculated using the following formula: ; in The coordinates of the control point corresponding to the (l,m,n) grid position.
7. The two-dimensional / three-dimensional data pipeline modeling method according to claim 1, characterized in that, The calculation methods for the rotation, translation, and scaling functions respectively include: calculating the rotational alignment of pipelines and connectors using the following rotation functions: ; Where R represents an orthogonal three-dimensional rotation matrix, I represents a 3×3 identity matrix, K represents the cross product matrix of the rotation axis vectors k, and θ represents the rotation angle; The following translation function is used to calculate the translation alignment of pipelines and connectors: ; Where t represents the translation vector that moves the center point of the source plane to the center point of the target plane, and c t c represents the coordinates of the center point of the target connector plane. s R represents the coordinates of the center point of the source plane on the pipeline end face, and R represents the rotation matrix; The following scaling function is used to calculate the scaling and docking of pipelines and connectors: ; Wherein, the r t The radius r of the connecting pipe section is indicated by the number of pipes connected to the fitting. s The radius of the pipe end segment is represented by s, which is the scaling factor. The physical connection model of the pipeline is performed based on the above rotation, translation and scaling functions.
8. The two-dimensional / three-dimensional data pipeline modeling method according to claim 1, characterized in that, The method includes: constructing implicit functions for the pipeline, used for a precise physical description of the pipeline surface location, wherein the implicit functions of the pipeline are: ; Where F(q) represents the distance function value from any point x in space to the pipeline surface, q represents the coordinates of any point in three-dimensional space, t represents the parameterized variable of the pipeline centerline with a value range of [0,1], C(t) represents the centerline parameter equation, which is used to give the coordinates of the pipeline centerline under the corresponding parameter t, and r(t) represents the radius function of the pipeline.
9. A two- or three-dimensional data pipeline modeling system, characterized in that, The system executes a two- or three-dimensional data pipeline modeling system as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement a two- or three-dimensional data pipeline modeling method according to any one of claims 1-8.