A three-dimensional pipeline modeling method and device
By building the topological network of the pipeline and refining it into quadrilateral surface sheets, and building a smooth transition curve with the curve formula, the problem of gaps at the connections in three-dimensional pipeline modeling is solved, and the aesthetics and application reliability of the model are improved.
Patent Information
- Application Number
- CN202411657868.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-20
AI Technical Summary
The existing three-dimensional pipeline modeling technology is prone to gaps at pipeline connections, which affects the aesthetics of the model and the accuracy of application, and the problems are more prominent in multi-pass nodes.
By building a topological network of detection points, traverse the pipeline segment represented by each edge, create an initial cylinder and refine it into a quadrilateral panel, form a continuous quadrilateral mesh, render it into a three-dimensional image, and design targeted modeling steps according to the characteristics of the dual-pass and multi-pass nodes, and use curve formulas to build a smooth transition curve to avoid gaps.
It significantly reduces the gap problem of pipeline models at the connections, improves the visual aesthetics and practicality of the model, and enhances the reliability of the model in applications such as spatial analysis and collision detection.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of modeling technology, and in particular to a three-dimensional pipeline modeling method and device. Background Art
[0002] Underground pipelines carry multiple functions such as water supply, drainage, gas, electricity, and communications. The scientificity and efficiency of their planning, construction, and management are directly related to the safe operation of the city, the quality of life of residents, and the potential for sustainable development.
[0003] The existing 3D pipeline modeling technology often has obvious gaps at the joints of cylindrical pipelines constructed segment by segment. These gaps not only affect the overall aesthetics of the pipeline model, but more importantly, they may mislead key applications such as subsequent spatial analysis and collision detection. For example, when planning construction, if the gaps in the pipeline model are mistaken for gaps in the actual pipeline, it may lead to incorrect formulation of the construction plan, which in turn may cause safety risks. This gap problem is particularly prominent at multi-pass nodes, where pipelines intersect or branch. Multi-pass junctions usually involve the intersection or connection of multiple pipelines, and their structures and spatial relationships are relatively complex. Due to the accumulation of measurement errors, the gaps at these junctions are often more obvious and difficult to eliminate by simple geometric adjustments. This not only increases the difficulty of model correction, but also reduces the reliability of the model in practical applications.
[0004] Therefore, how to solve the gap problem that occurs at the joints of cylindrical pipelines constructed section by section in the prior art has become a difficult problem that needs to be solved urgently. Summary of the invention
[0005] In an embodiment of the present application, a three-dimensional pipeline modeling method is provided to solve the problem of gaps occurring at the connection of cylindrical pipelines constructed section by section in the prior art.
[0006] In a first aspect, an embodiment of the present application provides a three-dimensional pipeline modeling method, the method comprising: constructing a topological network of detection points according to the connection relationship between the detection points and the node type of the detection points; traversing each edge in the topological network, each edge represents a section of the pipeline, and creating an initial cylinder for each section of the pipeline; refining the initial cylinder into quadrilateral patches, assigning four vertices to each quadrilateral patch to form a continuous quadrilateral mesh, and rendering the generated quadrilateral mesh as a three-dimensional image; modeling the target pipeline according to the three-dimensional image in two cases; when the target pipeline is a double-pass node, executing the first modeling step; wherein the double-pass node is two sections of the pipeline intersecting at the center of a common pipe diameter; when the target pipeline is a multi-pass node, executing the second modeling step; the first modeling step includes: defining five control points, calculating any point on the smooth transition curve according to the curve formula, and constructing a pipeline model of the double-pass node according to the smooth transition curve; the curve formula is: ;in, is a point on the smooth transition curve, is the curve progress parameter, , is the index of the control point, is the number of combinations, is the factorial, is the position vector of the control point.
[0007] In a possible implementation, before constructing a topological network of detection points based on the connection relationship between detection points and the node type of detection points, it includes: obtaining a geophysical report of the target pipeline; the geophysical report includes information on the detection point number, connection point number, center coordinates of the detection point, pipeline center elevation and pipeline diameter; according to the detection point number and connection point number in the geophysical report, parsing the connection relationship between the detection points, and classifying the detection points according to the connection relationship to obtain the node type of the detection point.
[0008] In a possible implementation, the method of creating an initial cylinder for each pipeline segment includes: calculating the position of each starting point on the circumference formed by one end of the initial cylinder around the central coordinates of the detection point according to the central coordinates of the detection point and the pipeline diameter; translating a set distance along the axis of the initial cylinder to obtain the position of each end point at the other end of the initial cylinder corresponding to each starting point; wherein the set distance is the length of the initial cylinder.
[0009] In a possible implementation, calculating the position of each starting point on the circumference formed by one end of the initial cylinder around the central coordinate of the detection point includes: determining the angle between the line connecting each starting point and the central coordinate of the detection point and the reference axis; the angle is determined as follows: ;in, is the angle, is the index of the starting point, , N is the total number of starting points; calculate the first value of each angle under the cosine function and the second value under the sine function; multiply the first value by the first unit vector and by the radius of the initial cylinder, and multiply the second value by the second unit vector and by the radius of the initial cylinder to obtain two offsets; wherein the first unit vector and the second unit vector are unit vectors perpendicular to the unit direction vector of the initial cylinder; add the two offsets and the center coordinates of the detection point to obtain the position of each starting point; the unit direction vector of the initial cylinder is determined by calculating the vector difference between the center coordinates of the detection points at both ends of each pipeline segment, and dividing the vector difference by the length of the vector difference to obtain the unit direction vector of the initial cylinder.
[0010] In a possible implementation, the position of each end point corresponding to each starting point at the other end of the initial cylinder is obtained by translating the set distance along the axis of the initial cylinder as follows: ;in, is the position of the i-th endpoint, is the position of the i-th starting point, is the unit direction vector of the initial cylinder, and are the center coordinates of the detection points at both ends of the initial cylinder, To set the distance.
[0011] In a possible implementation, four vertices are assigned to each quadrilateral face, including: the vertices of each quadrilateral face are: the current starting point, the point adjacent to the current starting point, the current end point and the point adjacent to the current end point; the point adjacent to the current starting point is the starting point of the previous quadrilateral face, and the point adjacent to the current end point is the end point of the previous quadrilateral face; the line between the current starting point and the current end point is continuous with the edges of the adjacent quadrilateral face.
[0012] In a possible implementation, the definition of five control points includes: determining the radius of two pipeline sections, with the common pipe diameter center as the starting point and the pipeline direction pointing to the other end of each pipeline section; the first control point is located on the axis of the first pipeline section and is four times the radius of the first pipeline section from the common pipe diameter center; the fifth control point is located on the axis of the second pipeline section and is four times the radius of the second pipeline section from the common pipe diameter center; the third control point is the common pipe diameter center; the position of the second control point is determined based on the third control point, the first control point and the control parameters; the position of the fourth control point is determined based on the third control point, the fifth control point and the control parameters.
[0013] In one possible implementation, according to the formula Determine the second control point; where, is the second control point, is the third control point, is the first control point, is the control parameter; according to the formula Determine the fourth control point; wherein, is the fourth control point, is the third control point, is the fifth control point, is the control parameter.
[0014] In a possible implementation, the second modeling step includes: executing the first modeling step for every two adjacent pipelines with a common diameter center to generate a smooth transition curve starting from the common diameter center; using the curve progress parameter to discretize the first quarter of each smooth transition curve to obtain the discretized smooth transition curve; when processing two adjacent pipelines with a common diameter center, for each curve progress parameter, find two corresponding discrete points on the two smooth transition curves; regard the two discrete points as two points on a virtual circle; wherein the virtual circle is defined by the line connecting the two discrete points as the diameter; taking a preset number of points along the circumference of the virtual circle to ensure that the distances between adjacent points are equal, and combining these points into a point set; using the least squares method to perform plane fitting on the point set to obtain the best fitting plane surface, project all points in the point set onto the best fitting plane; use the polar coordinate system method to fit the projected points on the best fitting plane; according to the polar coordinate representation obtained by fitting, uniformly resample the point set in angular order, divide the entire polar coordinate system into equal parts with the same number as the preset number, take a representative point in each equal part as the new pipeline point, and combine the new pipeline points into a new point set; merge pipelines based on the new point set to generate a merged pipeline; after the pipelines are merged, remove other target pipeline areas outside the generated merged pipeline to obtain the initial remaining area; for the point set of the initial remaining area, use a triangulation algorithm based on the convex hull to generate a triangular mesh surface; remove the triangles on the triangular mesh surface where all three points are from the same section of the pipeline to obtain the final remaining area; combine the merged pipeline with the final remaining area to construct a pipeline model with multiple pass nodes.
[0015] In a second aspect, an embodiment of the present application provides a three-dimensional pipeline modeling device, the device comprising: a construction module, for constructing a topological network of detection points according to the connection relationship between the detection points and the node type of the detection points; a traversal module, for traversing each edge in the topological network, each edge representing a section of the pipeline, and creating an initial cylinder for each section of the pipeline; a rendering module, for refining the initial cylinder into quadrilateral facets, assigning four vertices to each quadrilateral facet to form a continuous quadrilateral mesh, and rendering the generated quadrilateral mesh as a three-dimensional image; a modeling module, for modeling the target pipeline according to the three-dimensional image in two cases; when the target pipeline is a double-pass node, executing the first modeling step; wherein the double-pass node is two sections of the pipeline intersecting at the center of the common pipe diameter; when the target pipeline is a multi-pass node, executing the second modeling step; the first modeling step includes: defining five control points, calculating any point on the smooth transition curve according to the curve formula, and constructing a pipeline model of the double-pass node according to the smooth transition curve; the curve formula is: ;in, is a point on the smooth transition curve, is the curve progress parameter, , is the index of the control point, is the number of combinations, is the factorial, is the position vector of the control point.
[0016] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects:
[0017] The embodiment of the present application provides a modeling method for a three-dimensional pipeline, which can generate a topological network by capturing the connection relationship and node type between the detection points. After each pipeline segment is initialized as an initial cylinder, it is further refined into a quadrilateral patch and four vertices are assigned to form a continuous quadrilateral mesh. This refinement process significantly enhances the smoothness and detail expression of the initial cylindrical surface, making the final three-dimensional image more realistic and delicate. Targeted modeling steps are designed for the double-pass and multi-pass nodes of the target pipeline. For the double-pass node, by defining five control points and using the curve formula to construct a smooth transition curve, a pipeline model in which two segments of pipelines intersect at the center of the common diameter can be accurately constructed, effectively avoiding the gap problem at the connection. For the multi-pass node, the second modeling step is performed to ensure the accurate connection and overall coordination of each pipeline at the intersection. In the modeling of the double-pass node, the curve formula used can generate a natural and smooth pipeline connection part, which greatly improves the visual aesthetics and practicality of the model. The gap problem at the connection of the cylindrical pipeline constructed by section in the prior art is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments of the present application or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 A flowchart of a three-dimensional pipeline modeling method provided in an embodiment of the present application;
[0020] Figure 2 A specific flow chart for calculating the position of each starting point on the circumference formed by one end of the initial cylinder around the central coordinates of the detection point provided in an embodiment of the present application;
[0021] Figure 3 A specific flow chart of the second modeling step provided in the embodiment of the present application;
[0022] Figure 4 A schematic diagram of a topological network provided in an embodiment of the present application;
[0023] Figure 5 A schematic diagram of an initial cylinder provided in an embodiment of the present application;
[0024] Figure 6 A schematic diagram of thinning an initial cylinder provided in an embodiment of the present application into quadrilateral facets and rendering the generated quadrilateral mesh into a three-dimensional image;
[0025] Figure 7 A schematic diagram of a conventional cylindrical connection provided in an embodiment of the present application;
[0026] Figure 8 A schematic diagram of the curvature of the Bezier curve corresponding to the control parameters provided in the embodiment of the present application;
[0027] Fig. 9 A schematic diagram of a pipeline model for constructing a double-pass node according to a smooth transition curve provided in an embodiment of the present application;
[0028] Fig.10 A schematic diagram of a smooth transition curve with a common pipe diameter center as a starting point generated by executing the first modeling step for every two adjacent pipelines with a common pipe diameter center provided in an embodiment of the present application;
[0029] Fig.11 A schematic diagram of a generated merge pipeline provided in an embodiment of the present application;
[0030] Fig.12 A schematic diagram of a pipeline model for constructing a multi-pass node by combining a merged pipeline with a final remaining area provided in an embodiment of the present application;
[0031] Fig.13 A schematic diagram showing a comparison between the two-way node modeling results provided in the embodiment of the present application and the traditional method and under different control parameters;
[0032] Fig.14 A schematic diagram of the three-way and four-way node modeling results and the corresponding network model provided in the embodiments of the present application;
[0033] Fig.15 A comparison diagram of modeling results using a traditional cylindrical modeling method and a smooth transition curve modeling method provided in an embodiment of the present application;
[0034] Fig.16 A schematic diagram of a three-dimensional pipeline modeling device provided in an embodiment of the present application;
[0035] Fig.17 A schematic diagram of a three-dimensional pipeline modeling server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0037] The following describes some of the techniques involved in the embodiments of the present application to facilitate understanding, and they should be considered as merely exemplary. Therefore, it should be appreciated by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, some descriptions of well-known functions and structures are omitted in the following description.
[0038] The present application embodiment provides a three-dimensional pipeline modeling method, such as Figure 1 As shown, the method includes steps S101 to S106. Among them, Figure 1 This is only an execution order shown in the embodiment of the present application, and does not represent the only execution order of a three-dimensional pipeline modeling method. In the case that the final result can be achieved, Figure 1 The steps shown may be performed in parallel or reversed.
[0039] S101: constructing a topological network of detection points according to the connection relationship between the detection points and the node types of the detection points.
[0040] Before building the topological network of the detection points according to the connection relationship between the detection points and the node types of the detection points, it includes:
[0041] Obtain a geophysical prospecting report of the target pipeline; the geophysical prospecting report includes the detection point number, connection point number, center coordinates of the detection point, pipeline center elevation and pipeline diameter information. According to the detection point number and connection point number in the geophysical prospecting report, parse the connection relationship between the detection points, and classify the detection points according to the connection relationship to obtain the node type of the detection point.
[0042] Specifically, the geophysical prospecting report obtained by this application is an RTK geophysical prospecting report. The RTK geophysical prospecting report is a two-dimensional data table that records the spatial position and attribute information of the pipeline in detail. The key data in this report include detailed information such as the detection point number, the connection point number, the center coordinates of the detection point, that is, the x-coordinate and y-coordinate of the detection point, the center elevation of the pipeline, the pipeline diameter, and the material of the pipeline. These data are organized in a unique way, in which the detection point number and the connection point number of a certain row will be swapped in another row to provide the coordinates of the connection point number and the elevation information of the pipeline, thereby forming a connection relationship between the detection points. The coordinate system in the report usually uses the local local coordinate system, but in order to facilitate subsequent processing and analysis, it can be converted into the EPSG4547 geodetic coordinate system, and the x-coordinate and y-coordinate are decentralized.
[0043] Table 1 shows part of the RTK geophysical survey report of a sewage treatment pipeline in a certain place after processing. The topological relationship between the data, that is, the connection relationship between the detection points, is retained.
[0044] Table 1
[0045]
[0046] Figure 4 A schematic diagram of a topological network provided in an embodiment of the present application. Figure 4 A topological network of detection points is constructed based on the connection relationship between detection points and the node types of detection points obtained in Table 1. The topological network has detection points as nodes and the connection relationship between them as edges. Figure 4 The middle pipeline covers a total of 13 detection points, which are numbered from WS1 to WS13. Among these detection points, WS1, WS3 and WS6 play the role of double-way nodes, that is, they are connected to two pipelines respectively. WS2 and WS7 are three-way nodes, connecting three pipelines. WS4 and WS8 are more special, they are four-way nodes, each connected to four pipelines. As for the rest of the detection points, they are all single-way nodes, connected to only one pipeline.
[0047] S102: traverse each edge in the topological network, each edge represents a section of pipeline, and create an initial cylinder for each section of pipeline.
[0048] Figure 5 Schematic diagram of the initial cylinder provided in the embodiment of the present application. Figure 5 As shown, the center coordinates of the detection points at both ends of the pipeline are C0 (x0, y0, h0) and C1 (x1, y1, h1), and the diameter of the pipeline is 2r (where r represents the radius of the pipeline).
[0049] An initial cylinder is created for each pipeline segment, including: calculating the position of each starting point on the circumference formed by one end of the initial cylinder around the central coordinate of the detection point according to the central coordinate of the detection point and the pipeline diameter. The position of each end point corresponding to each starting point at the other end of the initial cylinder is obtained by translating a set distance along the axis of the initial cylinder. The set distance is the length of the initial cylinder.
[0050] Specifically, it is necessary to determine the N starting points at one end of the initial cylinder. These starting points will be evenly distributed around the center coordinates of the detection point at one end of the initial cylinder to form a circumference. These starting points are translated along the axis of the pipeline by a set distance, which is equal to the length of the initial cylinder. Through this step, the N end points at the other end of the pipeline can be obtained. These end points correspond to the starting points one by one, and together constitute a quadrilateral mesh on the surface of the cylinder.
[0051] The unit direction vector of the initial cylinder is determined by calculating the vector difference between the center coordinates of the detection points at both ends of each pipeline segment, and dividing the vector difference by the length of the vector difference to obtain the unit direction vector of the initial cylinder. The unit direction vector of the initial cylinder is calculated as follows: .in represents the length of the vector, and are the center coordinates of the detection points at both ends of the initial cylinder, is the vector difference between the center coordinates of the detection points at both ends of each pipeline segment, To set the distance, that is, the length of the initial cylinder, it can also be understood as the length of the vector difference. is the unit direction vector of the starting cylinder.
[0052] Figure 2 A specific flow chart for calculating the position of each starting point on the circumference formed by one end of the initial cylinder around the central coordinates of the detection point provided in the embodiment of the present application. Figure 2 As shown, it includes steps S201 to S204.
[0053] S201: Determine the angle between the line connecting each starting point and the center coordinates of the detection point and the reference axis.
[0054] The angle is determined as follows: .in, is the angle, is the index of the starting point, , N is the total number of starting points.
[0055] S202: Calculate a first value of each included angle under a cosine function and a second value of each included angle under a sine function.
[0056] S203: multiplying the first value by the first unit vector and by the radius of the initial cylinder, and multiplying the second value by the second unit vector and by the radius of the initial cylinder to obtain two offsets, wherein the first unit vector and the second unit vector are unit vectors that are perpendicular to the unit direction vector of the initial cylinder.
[0057] S204: Add the two offsets and the center coordinates of the detection point to obtain the position of each starting point.
[0058] Specifically, the position of each starting point is calculated as follows: .in, For the The location of the starting point, is the center coordinate of the detection point at one end of the initial cylinder, r is the radius of the initial cylinder, is the angle between the line connecting each starting point and the center coordinate of the detection point and the reference axis, , is the first value of each angle under the cosine function, is the second value of each angle under the sine function, is the first unit vector, is the second unit vector, , is the unit direction vector of the initial cylinder Unit vectors that are perpendicular to each other. It should be noted that the reference axis can be any straight line that is perpendicular to the unit direction vector of the initial cylinder.
[0059] The method of translating a set distance along the axis of the initial cylinder to obtain the position of each end point corresponding to each starting point at the other end of the initial cylinder is as follows: .in, is the position of the i-th endpoint, is the position of the i-th starting point, is the unit direction vector of the initial cylinder, and are the center coordinates of the detection points at both ends of the initial cylinder, To set the distance.
[0060] S103: Thinning the initial cylinder into quadrilateral patches, assigning four vertices to each quadrilateral patch to form a continuous quadrilateral mesh, and rendering the generated quadrilateral mesh into a three-dimensional image.
[0061] Assign four vertices to each quadrilateral patch, including: the vertices of each quadrilateral patch are: the current starting point, the point adjacent to the current starting point, the current end point, and the point adjacent to the current end point. The point adjacent to the current starting point is the starting point of the previous quadrilateral patch, and the point adjacent to the current end point is the end point of the previous quadrilateral patch. The line between the current starting point and the current end point is continuous with the edge of the adjacent quadrilateral patch.
[0062] Specifically, each quadrilateral patch consists of four vertices Current starting point is the starting position of the quadrilateral patch on the circumference of one end of the initial cylinder. The points adjacent to the current starting point The next point of the quadrilateral patch on the circumference of one end of the initial cylinder that is adjacent to the current starting point. The point on the other end of the initial cylinder that corresponds to the current starting point after the quadrilateral facet is translated along the axis of the initial cylinder. is the next point of the quadrilateral patch on the other side of the initial cylinder next to the current end point. The adjacent quadrilateral patches are continuous on the pipeline surface. Specifically, the points adjacent to the current end point of the current quadrilateral patch are The current starting point of the next quad patch This continuity ensures that the quad mesh fits snugly to the surface of the pipeline, forming a complete representation of the geometry.
[0063] Figure 6 The schematic diagram of the embodiment of the present application is to refine the initial cylinder into quadrilateral facets and render the generated quadrilateral mesh into a three-dimensional image. Figure 6 As shown in the figure, the surface of the initial cylinder can be rendered as a three-dimensional image composed of multiple quadrilateral patches through the quadrilateral mesh representation method. In this example, the cylindrical pipeline is composed of 12 quadrilateral meshes, each of which clearly shows the positions of its four vertices and the connection relationship between them. This representation method not only makes the surface of the cylindrical pipeline more delicate and smooth, but also helps with subsequent three-dimensional modeling and rendering.
[0064] S104: Modeling the target pipeline according to the three-dimensional image in two situations.
[0065] S105: When the target pipeline is a double-pass node, the first modeling step is performed, wherein the double-pass node is where two sections of pipelines intersect at the center of a common pipe diameter.
[0066] Figure 7 This is a schematic diagram of a conventional cylindrical connection provided in an embodiment of the present application. Figure 7 As shown in the figure, in the process of modeling the target pipeline based on the 3D image, due to the existence of measurement errors and the possible actual turning of the pipe diameter at the detection point, if each section of the pipeline is simply replaced by a perfect cylinder, then at the multi-pass node or detection point, there will be obvious broken connection problems between the pipelines. This problem will seriously affect the accuracy and effect of modeling.
[0067] In order to solve the above problems, this application adopts different modeling strategies according to the specific situation of the target pipeline. When the target pipeline is a double-pass node, that is, when the two sections of the pipeline intersect at the common center of the pipe diameter, we perform the first modeling step. This step specifically considers the continuity of the pipeline at the intersection, ensuring that the two sections of the pipeline can smoothly transition at the intersection and avoiding the problem of broken connection.
[0068] The first modeling step includes: defining five control points, calculating any point on the smooth transition curve according to the curve formula, and constructing a pipeline model of a double-pass node according to the smooth transition curve.
[0069] Specifically, five control points are defined, including the following steps.
[0070] Determine the radius of the two pipeline sections and the pipeline direction starting from the center of the common pipe diameter pointing to the other end of each pipeline section.
[0071] Specifically, when determining that the two segments intersect at the center of the common pipe diameter When determining the direction of the pipeline, it is necessary to specify the radius of each pipeline segment. , and from the common diameter center The direction of the pipeline pointing to the other end of the two pipeline segments and The two direction vectors and Represents the intersection of two pipelines. The five control points are .
[0072] The first control point is located on the axis of the first section of the pipeline and is at a distance from the center of the common pipe diameter by the length of four radii of the first section of the pipeline.
[0073] According to the formula Determine the position of the first control point. is the first control point, is the common pipe diameter center, is the radius of the first tube segment, From the center of the common pipe diameter The extension trend points to the other end of the first pipeline segment.
[0074] The fifth control point is located on the axis of the second pipeline section and is at a distance from the center of the common pipe diameter by the length of four radii of the second pipeline section.
[0075] According to the formula Determine the position of the fifth control point. is the fifth control point, is the common pipe diameter center, is the radius of the second tube section, From the center of the common pipe diameter The extension trend points to the other end of the second pipeline section.
[0076] The third control point is the common pipe diameter center.
[0077] The position of the second control point is determined according to the third control point, the first control point and the control parameter.
[0078] According to the formula Determine the second control point. is the second control point, is the third control point, is the first control point, is the control parameter. The control parameter is used to control the curvature of the smooth transition curve.
[0079] The position of the fourth control point is determined according to the third control point and the fifth control point and the control parameter.
[0080] According to the formula Determine the fourth control point. is the fourth control point, is the third control point, is the fifth control point, is the control parameter.
[0081] The curve formula is: .in, is a point on the smooth transition curve, is the curve progress parameter, , is the index of the control point, is the number of combinations, is the factorial, is the position vector of the control point.
[0082] Figure 8Schematic diagram of the curvature of the Bezier curve corresponding to the control parameters provided in the embodiment of the present application. The smooth transition curve of the present application is a Bezier curve. Figure 8 As shown, with the control parameters As the value increases, the curvature of the curve increases and it gets closer to the control point. The control polygon formed by the control points. According to the definition of the control points, it can be known that these control points are all located on the axis of their respective pipelines. It can be clearly seen from the figure that the Bezier curve has endpoint interpolation, that is, the endpoints of the curve coincide with the endpoints of the control polygon. In addition, the direction of the first-order derivative of the Bezier curve at the endpoint is consistent with the direction of the corresponding endpoint of the control polygon. Specifically, the starting point of the curve is tangent to the first segment of the Bezier polygon, that is, the control polygon, and the end point is tangent to the last segment. The control polygon is a polygon formed by connecting the control points in sequence. These properties are crucial for the subsequent construction of cylindrical pipelines along the Bezier curve, that is, the smooth transition curve. They ensure that the cylindrical pipeline can achieve at least first-order continuity at the endpoints, which is crucial to the overall performance and stability of the pipeline system. Therefore, by reasonably selecting and adjusting the control parameters As well as the position of the control points, Bezier curves can be used to design a pipeline system that meets specific requirements, has smooth transitions and good continuity.
[0083] Fig. 9 The schematic diagram of the pipeline model of the dual-pass node constructed according to the smooth transition curve provided in the embodiment of the present application. Fig. 9 As shown, the curve in the figure is a smooth transition curve.
[0084] S106: When the target pipeline is a multi-pass node, execute the second modeling step.
[0085] Figure 3 This is a specific flow chart of the second modeling step provided in the embodiment of the present application. Figure 3 As shown, it includes steps S301 to S313.
[0086] S301: For every two adjacent pipelines having a common pipe diameter center, a first modeling step is performed to generate a smooth transition curve starting from the common pipe diameter center.
[0087] Fig.10A schematic diagram of a smooth transition curve with a common diameter center as the starting point generated by executing the first modeling step for each two adjacent pipelines with a common diameter center provided in an embodiment of the present application. For the specific case of a three-way node, since it involves the intersection of three pipelines, it is necessary to combine these three pipelines in pairs and model them separately. In this way, a total of 6 smooth transition curves need to be established to fully reflect the pipeline connection at the three-way node. In Figure 10, 6 smooth transition curves shown in black can be seen, and there are 2 smooth transition curves with each common diameter center as the starting point.
[0088] S302: discretizing the first quarter of each smooth transition curve using the curve progress parameter to obtain a discretized smooth transition curve.
[0089] Specifically, the curve progress parameter is set as , which means only focusing on and extracting the first quarter of each smooth transition curve. This processing strategy is designed to avoid possible overlap problems and ensure that the obtained discrete points can fully represent the characteristics of the curve while reducing unnecessary data redundancy. Each smooth transition curve is converted into a set of discrete points that accurately capture the shape and direction of the first quarter of the curve.
[0090] S303: When processing two adjacent pipelines having a common pipe diameter center, for each curve progress parameter, find two corresponding discrete points on two smooth transition curves.
[0091] Specifically, for each curve progress parameter, a corresponding discrete point will be located on the two smooth transition curves. These two discrete points are located on two adjacent pipelines with a common diameter center. They are obtained through discretization processing and can accurately reflect the shape and direction of the pipeline.
[0092] S304: The two discrete points are regarded as two points on a virtual circle, wherein the virtual circle is defined by a line connecting the two discrete points as a diameter.
[0093] Specifically, two corresponding discrete points found on the smooth transition curves of two adjacent pipelines are regarded as two endpoints on a virtual circle. This virtual circle is defined by taking the two discrete points as the endpoints of the diameter, that is, the line between the two discrete points is the diameter of the virtual circle.
[0094] S305: Take a preset number of points along the circumference of the virtual circle, ensure that the distances between adjacent points are equal, and combine these points into a point set.
[0095] Specifically, after the virtual circle has been defined based on two discrete points, it is necessary to evenly take a preset number of points along the circumference of the virtual circle. In the present application, the preset number can be 50, of course, it can also be other values, and the present application is not limited to this value. The circumference of the virtual circle can be calculated, and then the circumference can be divided into a corresponding number of arc segments according to the preset number. The length of each arc segment is the distance between adjacent points. Starting from any point of the virtual circle, along the clockwise or counterclockwise direction of the circumference, take a point at the midpoint of each arc segment or other positions selected as needed. In this way, a point set containing a preset number of points is obtained, and these points are evenly distributed on the circumference of the virtual circle, and the distance between adjacent points is equal.
[0096] S306: Use the least square method to perform plane fitting on the point set to obtain the best fitting plane, and project all points in the point set onto the best fitting plane.
[0097] Specifically, after obtaining a set of points uniformly distributed along the circumference of the virtual circle, the least squares method is used to fit the plane to this point set. The least squares method is a mathematical optimization technique that is used to find the best function match for the data so that the sum of square errors of the data is minimized. When fitting a plane, it is assumed that there is a plane that can fit as close as possible and reflect the distribution characteristics of all points in the point set. Specifically, the equation of the plane is set to Ax+By+Cz+D=0. Among them, A, B, C, and D are the plane parameters to be determined, and try to minimize the sum of square distances from all points in the point set to the plane by adjusting these parameters. To achieve this goal, matrix operations and least squares solutions in linear algebra can be used to solve the plane parameters. Once these parameters are obtained, the equation of the best fitting plane is determined. All points in the point set are projected onto this best fitting plane. The projection process is to calculate the perpendicular distance of each point to the plane and move the point in the opposite direction of the distance until it falls on the plane. In this way, a projected point set is obtained, and these points are all located on the best fitting plane.
[0098] S307: Fitting the projection points on the best fitting plane using a polar coordinate system method.
[0099] S308: According to the polar coordinate representation obtained by fitting, the point set is uniformly resampled in angular order, the entire polar coordinate system is divided into equal parts equal to the preset number, a representative point is taken in each equal part as a new pipeline point, and the new pipeline points are combined into a new point set.
[0100] Specifically, the starting angle and the ending angle of the polar coordinate system can be determined, as well as the preset number of sectors, that is, equal parts of the preset number. The angle range of each sector is calculated, and a representative point is selected within the range. This representative point can be the midpoint of the sector, the boundary point, or a point obtained by interpolation or averaging. Once a representative point is selected in each sector, a new set of points is obtained, which are evenly distributed along the circumference of the polar coordinate system.
[0101] S309: Merge pipelines based on the new point set to generate a merged pipeline.
[0102] This merging process involves merging the point sets at the curve progress parameters of multiple pipelines that originally started from the same pipe diameter center, that is, the same starting point. By integrating these point sets, a merged pipeline is generated.
[0103] Fig.11 A schematic diagram of the generated merged pipeline provided in the embodiment of the present application. Due to the previous steps, the merged pipeline no longer maintains a perfect cylindrical shape.
[0104] S310: After the pipelines are merged, other target pipeline regions outside the generated merged pipeline are removed to obtain an initial remaining region.
[0105] S311: For the point set in the initial remaining area, a triangulated mesh surface is generated using a convex hull-based triangulation algorithm.
[0106] S312: Remove the triangles whose three points in the triangular mesh surface are all from the same pipeline section to obtain the final remaining area.
[0107] Specifically, the initial remaining area is obtained by removing the area occupied by the generated merged pipeline. This initial remaining area contains the point set that is not covered by the merged pipeline. In order to model the point set of this initial remaining area, a convex hull-based triangulation algorithm, that is, a convex hull-based triangulation algorithm, is adopted. This algorithm can use the convex hull characteristics of the point set to generate a triangular mesh surface covering these points. Since the required pipeline model should be internally connected rather than completely closed, the generated triangular mesh surface must be further processed. Specifically, after running the triangulation algorithm, the triangles whose three points are all from the same section of the pipeline are removed. This ensures that the final triangular mesh surface not only meets the geometric characteristics of the pipeline model, but also satisfies the internal connectivity properties, thereby obtaining the final remaining area.
[0108] S313: Combining the merged pipeline with the final remaining area to construct a pipeline model of multi-pass nodes.
[0109] Fig.12A schematic diagram of a pipeline model for constructing a multi-pass node by combining a merged pipeline with a final remaining area provided in an embodiment of the present application. Fig.12 As shown in the figure, the merged pipeline and the final remaining area are cleverly combined to form a complete pipeline model with multiple nodes. This model not only has clear geometric shapes and connection relationships, but also can accurately reflect the pipeline layout in actual situations.
[0110] Fig.13 A schematic diagram showing a comparison between the two-way node modeling results provided in the embodiment of the present application and the traditional method and under different control parameters. Fig.13 (a) in the figure is a schematic diagram of traditional cylindrical modeling. The green part represents the cylindrical pipeline on the straight line segment. The traditional method causes obvious gaps or overlaps of cylindrical pipelines at the intersection, which is determined by their geometric shape and intersection method. Although this modeling method is simple, it may not be flexible enough when dealing with intersections or turns, resulting in continuity problems. Fig.13 (b) in the figure is a schematic diagram of modeling using a smooth transition curve when the control parameter value is 0.5. The blue part is the pipeline modeled when the control parameter value is 0.5. Smooth transition curve modeling allows pipelines to have higher flexibility at intersections or turns, thereby achieving better continuity. Compared with traditional cylindrical modeling, the pipeline modeled in this application can achieve first-order continuity at the splicing point, which means that the tangent direction of the pipeline is continuous at the splicing point. When the control parameter value is 0.5, the curvature of the smooth transition curve at the turn is moderate, neither too sharp nor too flat. Fig.13 (c) in the figure is a schematic diagram of modeling using a smooth transition curve when the control parameter value is 0.7. The blue part is the pipeline modeled when the control parameter value is 0.7. Compared with the control parameter value of 0.5, when the control parameter increases to 0.7, the curvature of the smooth transition curve at the turn also increases. This change makes the pipeline smoother at the turn, further improving the continuity and aesthetics of the pipeline. Fig.13 (d) in the figure is a schematic diagram of modeling with a smooth transition curve when the control parameter value is 0.9. The blue part represents the pipeline modeled with a control parameter value of 0.9. When the control parameter value increases to 0.9, the curvature of the smooth transition curve reaches the maximum at the turn, and the pipeline is almost close to the shape of a perfectly modeled pipeline. This modeling method is very useful in scenes that require high continuity and smoothness. Fig.13 By comparing the traditional cylindrical modeling and the modeling results based on different control parameter values, the flexibility and continuity advantages of this application in dealing with pipeline intersections or turns are demonstrated. As the radius increases, the curvature of the smooth transition curve at the turn gradually increases, and the pipeline becomes smoother and more continuous.
[0111] Fig.14A schematic diagram of the three-way and four-way node modeling results and the corresponding network model provided in the embodiments of the present application. Fig.14 (a) in the figure is a schematic diagram of three-way pipeline modeling. Fig.14 (b) is a schematic diagram of the network model corresponding to the three-way pipeline. Fig.14 (c) in the figure is a schematic diagram of the four-way pipeline modeling. Fig.14 (d) is a schematic diagram of the network model corresponding to the four-way pipeline. It can be seen from the figure that the joints (indicated by orange) use triangular meshes to simulate the pipeline surface. This meshing method can flexibly adapt to complex geometric shapes and ensure the accuracy of the model. At the same time, the transitional merged pipeline (indicated by blue) uses quadrilateral meshes to represent the pipeline surface. This mesh can improve rendering and computing efficiency while maintaining model accuracy.
[0112] Fig.15 A comparison chart of modeling results using a traditional cylindrical modeling method and a smooth transition curve modeling method provided in an embodiment of the present application. Fig.15 (a) is a schematic diagram of the modeling results using the traditional cylindrical modeling method. Fig.15 (b) in FIG. 1 is a schematic diagram of the modeling result using the smooth transition curve modeling method. It should be noted that both the traditional cylindrical modeling method and the smooth transition curve modeling method use the data in Table 1. The traditional cylindrical modeling method is a classic and commonly used method that assumes that the pipeline is a perfect cylinder, and then connects these cylinders according to the topological network data to form a pipeline network. Although this method is simple and direct, it cannot accurately capture and represent the true shape and connection relationship of the pipeline when dealing with complex topological structures and visually connected pipeline networks. In contrast, the smooth transition curve modeling method proposed in this application can better cope with these challenges. Not only the geometric shape and topological structure of the pipeline are considered, but also more visual and geometric constraints are introduced to ensure that the established pipeline network model is more visually coherent and realistic. As can be seen from the figure, the pipeline network model established by the method of the present application is handled more naturally and smoothly in the complex topological structure, and the connection between the pipelines is also tighter and more coordinated. Therefore, the method proposed in this application performs well in establishing a pipeline network model with a complex topological structure, and has higher visual coherence and authenticity than the traditional cylindrical modeling method. This is of great significance for the design, simulation and analysis of pipeline networks, and can provide users with more accurate and intuitive pipeline network models.
[0113] The present application embodiment also provides a three-dimensional pipeline modeling device 1600, such as Fig.16 As shown, the device includes: a construction module 1601, a traversal module 1602, a rendering module 1603 and a modeling module 1604.
[0114] The construction module 1601 is used to construct a topological network of detection points according to the connection relationship between the detection points and the node types of the detection points.
[0115] The traversal module 1602 is used to traverse each edge in the topological network, each edge represents a section of pipeline, and create an initial cylinder for each section of pipeline.
[0116] The rendering module 1603 is used to refine the initial cylinder into quadrilateral patches, assign four vertices to each quadrilateral patch to form a continuous quadrilateral mesh, and render the generated quadrilateral mesh into a three-dimensional image.
[0117] The modeling module 1604 is used to model the target pipeline according to the three-dimensional image in two cases. When the target pipeline is a two-way node, the first modeling step is performed. Among them, the two-way node is two sections of the pipeline intersecting at the center of the common pipe diameter. When the target pipeline is a multi-way node, the second modeling step is performed. The first modeling step includes: defining five control points, calculating any point on the smooth transition curve according to the curve formula, and constructing a pipeline model of the two-way node according to the smooth transition curve. The curve formula is: .in, is a point on the smooth transition curve, is the curve progress parameter, , is the index of the control point, is the number of combinations, is the factorial, is the position vector of the control point.
[0118] Some modules in the apparatus described in the present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0119] The devices or modules described in the above application embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described in various modules according to their functions. When implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware. Of course, the module that implements a certain function can also be implemented by combining multiple sub-modules or sub-units.
[0120] The methods, devices or modules described in this application can be implemented in the form of computer-readable program codes. The controller can be implemented in any appropriate manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program codes (such as software or firmware) that can be executed by the (micro)processor, logic gates, switches, application-specific integrated circuits (English: Application Specific Integrated Circuit, referred to as: ASIC), programmable logic controllers and embedded microcontrollers. Examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in the form of pure computer-readable program codes, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included in it for implementing various functions can also be regarded as structures within the hardware component. Or even, the means for realizing various functions may be regarded as both a software module for realizing the method and a structure within a hardware component.
[0121] like Fig.17 As shown, an embodiment of the present application also provides a three-dimensional pipeline modeling server, including a memory 1701 and a processor 1702; the memory 1701 is used to store computer executable instructions; the processor 1702 is used to execute computer executable instructions to implement a three-dimensional pipeline modeling method described above in an embodiment of the present application.
[0122] The embodiment of the present application further provides a computer-readable storage medium, which stores executable instructions. When a computer executes the executable instructions, the three-dimensional pipeline modeling method described above in the embodiment of the present application can be implemented.
[0123] It can be seen from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary hardware. Based on this understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, or it can be reflected in the implementation process of data migration. The computer software product can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the method described in the embodiment of the present application.
[0124] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. All or part of this application can be used in many general or special computer system environments or configurations.
[0125] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit the present application. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the present application.
Claims
1. A three-dimensional pipeline modeling method, characterized in that: include: Construct a topological network of detection points based on the connection relationship between detection points and the node types of detection points; Traverse each edge in the topological network, each edge represents a pipeline segment, and create an initial cylinder for each pipeline segment; Thinning the initial cylinder into quadrilateral patches, assigning four vertices to each quadrilateral patch to form a continuous quadrilateral mesh, and rendering the generated quadrilateral mesh into a three-dimensional image; There are two cases where the target pipeline is modeled based on the three-dimensional image; When the target pipeline is a double-pass node, the first modeling step is performed; wherein the double-pass node is a node where two sections of pipelines intersect at the center of a common pipe diameter; When the target pipeline is a multi-pass node, performing a second modeling step; The first modeling step includes: defining five control points, calculating any point on the smooth transition curve according to the curve formula, and constructing a pipeline model of a double-pass node according to the smooth transition curve; The curve formula is: ;in, is a point on the smooth transition curve, is the curve progress parameter, , is the index of the control point, is the number of combinations, is the factorial, is the position vector of the control point; The second modeling step includes: executing the first modeling step for every two adjacent pipelines with a common diameter center to generate a smooth transition curve with the common diameter center as the starting point; using the curve progress parameter to discretize the first quarter of each smooth transition curve to obtain the discretized smooth transition curve; when processing two adjacent pipelines with a common diameter center, for each curve progress parameter, find two corresponding discrete points on the two smooth transition curves; regard the two discrete points as two points on a virtual circle; wherein the virtual circle is defined by the line connecting the two discrete points as the diameter; taking a preset number of points along the circumference of the virtual circle to ensure that the distances between adjacent points are equal, and combining these points into a point set; using the least squares method to perform plane fitting on the point set to obtain the best fitting plane, and placing the point set in the plane. All points are projected onto the best fitting plane; the projected points on the best fitting plane are fitted using the polar coordinate system method; according to the polar coordinate representation obtained by fitting, the point set is uniformly resampled in angular order, the entire polar coordinate system is divided into equal parts with the same number as the preset number, a representative point is taken in each equal part as a new pipeline point, and the new pipeline points are combined into a new point set; based on the new point set, pipelines are merged to generate a merged pipeline; after the pipelines are merged, other target pipeline areas outside the generated merged pipeline are removed to obtain the initial remaining area; for the point set of the initial remaining area, a triangulation algorithm based on the convex hull is used to generate a triangular mesh surface; the triangles on the triangular mesh surface where three points are from the same section of the pipeline are removed to obtain the final remaining area; the merged pipeline and the final remaining area are combined to construct a pipeline model with multi-pass nodes.
2. The three-dimensional pipeline modeling method according to claim 1, characterized in that: Before constructing the topological network of the detection points according to the connection relationship between the detection points and the node types of the detection points, the method includes: Obtaining a geophysical prospecting report of the target pipeline; the geophysical prospecting report includes information on the detection point number, the connection point number, the center coordinates of the detection point, the center elevation of the pipeline, and the diameter of the pipeline; According to the detection point number and connection point number in the geophysical prospecting report, the connection relationship between the detection points is analyzed, and the detection points are classified according to the connection relationship to obtain the node type of the detection point.
3. The three-dimensional pipeline modeling method according to claim 1, characterized in that: The above method creates an initial cylinder for each pipeline segment, including: According to the center coordinates of the detection point and the pipeline diameter, the position of each starting point on the circumference formed by one end of the initial cylinder around the center coordinates of the detection point is calculated; The initial cylinder is translated along the axis of the initial cylinder by a set distance to obtain the position of each end point at the other end of the initial cylinder corresponding to each starting point; wherein the set distance is the length of the initial cylinder.
4. The three-dimensional pipeline modeling method according to claim 3, characterized in that: The step of calculating the position of each starting point on a circle formed by one end of the initial cylinder around the central coordinate of the detection point comprises: Determine the angle between the line connecting each starting point and the center coordinates of the detection point and the reference axis; The angle is determined as follows: ;in, is the angle, is the index of the starting point, , N is the total number of starting points; Calculate a first value of each included angle under the cosine function and a second value under the sine function; The first value is multiplied by the first unit vector and by the radius of the initial cylinder, and the second value is multiplied by the second unit vector and by the radius of the initial cylinder to obtain two offsets; wherein the first unit vector and the second unit vector are unit vectors that are perpendicular to the unit direction vector of the initial cylinder; Add the two offsets and the center coordinates of the probed point to get the position of each starting point; The unit direction vector of the initial cylinder is determined by calculating the vector difference between the center coordinates of the detection points at both ends of each pipeline segment, and dividing the vector difference by the length of the vector difference to obtain the unit direction vector of the initial cylinder.
5. The three-dimensional pipeline modeling method according to claim 3, characterized in that: The method of translating a set distance along the axis of the initial cylinder to obtain the position of each end point corresponding to each starting point at the other end of the initial cylinder is: ;in, is the position of the i-th endpoint, is the position of the i-th starting point, is the unit direction vector of the initial cylinder, and are the center coordinates of the detection points at both ends of the initial cylinder, To set the distance.
6. The three-dimensional pipeline modeling method according to claim 1, characterized in that: The method of allocating four vertices to each quadrilateral patch includes: The vertices of each quadrilateral patch are: the current starting point, the point adjacent to the current starting point, the current end point, and the point adjacent to the current end point; The point adjacent to the current starting point is the starting point of the previous quadrilateral patch, and the point adjacent to the current end point is the end point of the previous quadrilateral patch; The line between the current start point and the current end point is continuous with the edge of the adjacent quadrilateral patch.
7. The three-dimensional pipeline modeling method according to claim 1, characterized in that: The five control points are defined as follows: Determine the radius of the two pipeline sections, and the pipeline direction starting from the center of the common pipe diameter and pointing to the other end of each pipeline section; The first control point is located on the axis of the first section of the pipeline and is the length of the radius of four first section pipes from the center of the common pipe diameter; The fifth control point is located on the axis of the second pipeline section and is four radii of the second pipeline section from the center of the common pipe diameter; The third control point is the common pipe diameter center; The position of the second control point is determined according to the third control point, the first control point and the control parameter; The position of the fourth control point is determined according to the third control point and the fifth control point and the control parameter.
8. The three-dimensional pipeline modeling method according to claim 7, characterized in that: According to the formula Determine the second control point; where, is the second control point, is the third control point, is the first control point, To control the parameters; According to the formula Determine the fourth control point; wherein, is the fourth control point, is the third control point, is the fifth control point, is the control parameter.
9. A three-dimensional pipeline modeling device, characterized in that: include: A construction module, used to construct a topological network of detection points according to the connection relationship between the detection points and the node types of the detection points; The traversal module is used to traverse each edge in the topological network. Each edge represents a pipeline segment and creates an initial cylinder for each pipeline segment. A rendering module, for thinning the initial cylinder into quadrilateral patches, assigning four vertices to each quadrilateral patch to form a continuous quadrilateral mesh, and rendering the generated quadrilateral mesh into a three-dimensional image; The modeling module is used to model the target pipeline according to the three-dimensional image in two cases; when the target pipeline is a double-pass node, the first modeling step is executed; wherein the double-pass node is two sections of pipelines intersecting at the center of a common pipe diameter; when the target pipeline is a multi-pass node, the second modeling step is executed; the first modeling step includes: defining five control points, calculating any point on the smooth transition curve according to the curve formula, and constructing a pipeline model of the double-pass node according to the smooth transition curve; the curve formula is: ;in, is a point on the smooth transition curve, is the curve progress parameter, , is the index of the control point, is the number of combinations, is the factorial, is the position vector of the control point; the second modeling step includes: executing the first modeling step for every two adjacent pipelines with a common diameter center to generate a smooth transition curve with the common diameter center as the starting point; using the curve progress parameter to discretize the first quarter of each smooth transition curve to obtain the discretized smooth transition curve; when processing two adjacent pipelines with a common diameter center, for each curve progress parameter, find two corresponding discrete points on the two smooth transition curves; regard these two discrete points as two points on a virtual circle; wherein the virtual circle is defined by the line connecting the two discrete points as the diameter; taking a preset number of points along the circumference of the virtual circle to ensure that the distances between adjacent points are equal, and combining these points into a point set; using the least squares method to perform plane fitting on the point set to obtain the best fitting plane , project all points in the point set onto the best fitting plane; use the polar coordinate system method to fit the projected points on the best fitting plane; according to the polar coordinate representation obtained by fitting, uniformly resample the point set in angular order, divide the entire polar coordinate system into equal parts with the same number as the preset number, take a representative point in each equal part as the new pipeline point, and combine the new pipeline points into a new point set; merge pipelines based on the new point set to generate a merged pipeline; after the pipelines are merged, remove other target pipeline areas outside the generated merged pipeline to obtain the initial remaining area; for the point set of the initial remaining area, use a triangulation algorithm based on the convex hull to generate a triangular mesh surface; remove the triangles on the triangular mesh surface where all three points are from the same section of the pipeline to obtain the final remaining area; combine the merged pipeline with the final remaining area to construct a pipeline model with multiple pass nodes.
Citation Information
Patent Citations
Method for building three-dimensional pipeline model in parametric manner
CN106055794A
Topology-aware type onboard building roof point cloud modeling method
CN107025685A