Method for processing pipeline corner in three-dimensional oil and gas pipeline network visualization and related device
By constructing a local coordinate system from sampling points in the visualization of 3D oil and gas pipeline networks, determining the coordinates of tangent arcs and mapping them to the original coordinates, smoothing of pipeline corners in 3D space is achieved, solving the machining problems caused by sharp corners.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- RICHFIT INFORMATION TECH
- Filing Date
- 2024-12-25
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technologies cannot handle sharp corners of oil and gas pipeline networks in 3D visualization, leading to frequent start-ups and shutdowns of machining equipment. Existing 2D planar processing methods are not applicable to 3D space.
Three sample points are taken at the corner of the pipe to construct a local coordinate system. The mapping relationship between the local coordinate system and the original coordinate system is determined. The tangent arc is determined by the included angle and the center coordinates of the circle. It is then mapped to the original coordinates for rendering to obtain a smooth corner.
In the visualization of 3D oil and gas pipeline networks, sharp corners are processed into smooth corners, which solves the problem of smooth transition of pipeline corners in 3D visualization and avoids frequent start-up and shutdown of mechanical processing equipment.
Smart Images

Figure CN122287007A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visualization technology for simulation results of oil and gas pipeline networks, and in particular to a method and related apparatus for handling pipeline corners in three-dimensional oil and gas pipeline network visualization. Background Technology
[0002] In 3D visualization of oil and gas pipeline networks, adjacent pipelines are often connected by direct lines, creating sharp corners. However, in reality, adjacent pipelines are not connected by sharp corners. Therefore, the direct connection method in 3D visualization does not accurately reflect the true connection situation of pipelines. Using 3D visualized oil and gas pipeline networks to guide machining operations is problematic. During machining, the sharp corners cause frequent start-ups and shutdowns of machining equipment. Therefore, sharp corners need to be addressed. Currently, cubic spline interpolation and circular arc transition methods are used in 2D planes to handle some sharp corners. Summary of the Invention
[0003] Cubic spline interpolation and circular arc transition methods can handle sharp corners in a two-dimensional plane, but they cannot handle sharp corners in three-dimensional space. Therefore, existing technologies cannot solve the problem of sharp corners in pipeline networks within a three-dimensional visualization space.
[0004] In view of the above problems, the present invention is proposed to provide a method and related apparatus for processing pipeline corners in three-dimensional oil and gas pipeline network visualization to overcome or at least partially solve the above problems.
[0005] This invention provides a method for handling pipeline corners in 3D oil and gas pipeline network visualization, including:
[0006] Take three sampling points at the pipe bend;
[0007] Construct a local coordinate system with one of the sample points as the origin, and determine the mapping relationship between the local coordinate system and the original coordinate system based on the original coordinates of each sample point in the original coordinate system, as well as the local coordinates of each sample point in the local coordinate system.
[0008] Based on the local coordinates of each sample point in the local coordinate system, determine the angle between the rays originating from the origin and the other two sample points as midpoints; based on the angle, determine the local coordinates of the center of the circle tangent to the two rays.
[0009] Based on the included angle and the local coordinates of the center of the circle, determine the local coordinates of the arc between the two tangent points;
[0010] Based on the original coordinates of the origin in the local coordinate system, the mapping relationship between the local coordinate system and the original coordinate system, the local coordinates of the arc are converted into the original coordinates. The arc is then rendered based on the original coordinates of the arc to obtain the smooth turn of the selected pipe.
[0011] A further optional implementation involves taking three sampling points at the pipe bend, including:
[0012] Three sampling points are taken cyclically from the two end faces of the pipe bend and the pipe contact surface, and the three sampling points are on the same plane.
[0013] A further optional implementation involves constructing a local coordinate system with one of the sample points as the origin, and determining the mapping relationship between the local coordinate system and the original coordinate system based on the original coordinates of each sample point in the original coordinate system, as well as determining the local coordinates of each sample point in the local coordinate system, including:
[0014] Using one of the sample points as the vector origin, determine the horizontal axis vector and the vertical axis vector based on the original coordinates of the three sample points in the original coordinate system; construct a local coordinate system with the vector origin as the origin based on the horizontal axis vector and the vertical axis.
[0015] The mapping relationship between the local coordinate system and the original coordinate system is determined based on the original coordinates of the origin in the original coordinate system, the horizontal axis vector, and the vertical axis vector.
[0016] The mapping relationship between the local coordinate system and the original coordinate system is used to map the original coordinates of the three sample points in the original coordinate system to the local coordinates in the local coordinate system.
[0017] A further optional implementation, determining the local coordinates of the center of the circle tangent to the two rays based on the included angle, includes:
[0018] Determine the local coordinates of the point of tangency of the circle tangent to the two rays based on the equations of the curve and the line.
[0019] Based on the included angle value and the local coordinates of the tangent point, determine the local coordinates of the center of the tangent circle.
[0020] A further optional implementation involves determining the local coordinates of the arc between the two tangent points based on the included angle and the local coordinates of the center of the circle, including:
[0021] The angle of the arc between the two tangent points is determined based on the included angle value.
[0022] Divide the arc into several sub-arcs and determine the angles of the sub-arcs;
[0023] The local coordinates of the sub-arc are determined based on the local coordinates of the center of the circle and the angle of the sub-arc.
[0024] The local coordinates of the arc are determined based on the local coordinates of the sub-arc.
[0025] In a further optional implementation, the process for determining the included angle value is as follows:
[0026] The first vector and the second vector are determined based on the local coordinates of the three sample points; the angle value of the included angle is determined based on the first vector and the second vector.
[0027] A further optional implementation involves converting the local coordinates of the arc into its original coordinates based on the original coordinates of the origin in the local coordinate system, the mapping relationship between the local coordinate system and the original coordinate system, including:
[0028] Multiply the local x-coordinate of the arc by the x-axis vector to obtain the x-product;
[0029] Multiply the local ordinate of the arc by the ordinate vector to obtain the ordinate product;
[0030] The original coordinates of the arc are obtained from the horizontal product, the vertical product, and the original coordinates of the origin.
[0031] Further optional implementation methods,
[0032] The mapping relationship between the local coordinate system and the original coordinate system is shown below:
[0033] (X, Y, Z) = xi + yj + D;
[0034] Where (X, Y, Z) are the original vertical coordinates, x is the local horizontal coordinate, i is the horizontal axis vector, y is the local vertical coordinate, j is the vertical axis vector, and D is the original coordinate of the origin.
[0035] This invention provides an apparatus for handling pipeline corners in three-dimensional oil and gas pipeline network visualization, comprising:
[0036] The sampling module is used to take three sampling points at the pipe bends;
[0037] The local coordinate system construction module is used to construct a local coordinate system with one of the sample points as the origin, and to determine the mapping relationship between the local coordinate system and the original coordinate system based on the original coordinates of each sample point in the original coordinate system, as well as to determine the local coordinates of each sample point in the local coordinate system.
[0038] The center coordinate determination module is used to determine the angle between rays with the origin as the starting point and the other two sample points as the midpoints, based on the local coordinates of each sample point in the local coordinate system; and to determine the local coordinates of the center of the circle tangent to the two rays based on the angle.
[0039] An arc coordinate determination module is used to determine the local coordinates of the arc between two tangent points based on the included angle and the local coordinates of the center of the circle.
[0040] The mapping module is used to convert the local coordinates of the arc into the original coordinates based on the original coordinates of the origin in the local coordinate system, the mapping relationship between the local coordinate system and the original coordinate system, and to render the arc based on the original coordinates of the arc to obtain the smooth corner of the selected pipe.
[0041] This invention provides a computer storage medium storing computer-executable instructions. When these computer-executable instructions are executed by a processor, they implement the aforementioned method for handling pipeline corners in three-dimensional oil and gas pipeline network visualization.
[0042] This invention provides a pipeline corner processing device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-mentioned pipeline corner processing method in three-dimensional oil and gas pipeline network visualization.
[0043] The beneficial effects of the above-described technical solutions provided in the embodiments of the present invention include at least the following:
[0044] This invention takes three sample points at the pipe corner; constructs a local coordinate system with one of the sample points as the origin, and determines the mapping relationship between the local and original coordinate systems based on the original coordinates of each sample point in the original coordinate system, as well as the local coordinates of each sample point in the local coordinate system; converts the sample points on the pipe into local coordinate data for subsequent calculations. Based on the local coordinates of each sample point in the local coordinate system, the angle between rays originating from the origin and the other two sample points as midpoints is determined; the local coordinates of the centers of the circles tangent to the two rays are determined based on the angles; the local coordinates of the arc between the two tangent points are determined based on the angles and the local coordinates of the centers; based on the original coordinates of the origin in the local coordinate system and the mapping relationship between the local and original coordinate systems, the local coordinates of the arc are converted into original coordinates, and the arc is rendered based on its original coordinates to obtain the smooth pipe corner after selection. The local coordinates of the arc are mapped to its original coordinates, and the arc is rendered in the original coordinate system to obtain the arc, which is then used as the smooth pipe corner. This invention transforms sharp corners of pipelines into smooth corners in 3D oil and gas pipeline network visualization, thus solving the problem of smooth transition of pipeline corners in 3D visualization of oil and gas pipeline networks.
[0045] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0046] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0047] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0048] Figure 1 This is a flowchart of the pipeline corner processing method in the three-dimensional oil and gas pipeline network visualization of Embodiment 1 of the present invention;
[0049] Figure 2 This is a flowchart illustrating the pipeline corner processing method in the three-dimensional oil and gas pipeline network visualization of Embodiment 1 of the present invention.
[0050] Figure 3 This is a schematic diagram of the local coordinate system, included angles, and arcs in Embodiment 2 of the present invention;
[0051] Figure 4 This is a schematic diagram of the pipeline bends before processing in the three-dimensional oil and gas pipeline network visualization in Embodiment 2 of the present invention;
[0052] Figure 5 This is a schematic diagram of the pipeline corner processing in the three-dimensional oil and gas pipeline network visualization of Embodiment 2 of the present invention;
[0053] Figure 6 This is a schematic diagram of the pipeline corner processing device in the visualization of the oil and gas pipeline network in Embodiment 2 of the present invention. Detailed Implementation
[0054] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0055] To address the problems existing in the prior art, embodiments of the present invention provide a method and related equipment for handling pipe corners in three-dimensional visualization.
[0056] Example 1
[0057] Embodiment 1 of the present invention provides a method for handling pipeline corners in three-dimensional oil and gas pipeline network visualization, the process of which is as follows: Figure 1 As shown, it includes the following steps:
[0058] Step S101: Take three sample points at the pipe bend.
[0059] In this embodiment, three sampling points are taken at the pipe bend. Specifically, three sampling points are taken cyclically on the two end faces of the pipe bend and the pipe contact surface, and the three sampling points are on the same plane.
[0060] Step S102: Construct a local coordinate system with one of the sample points as the origin, and determine the mapping relationship between the local coordinate system and the original coordinate system based on the original coordinates of each sample point in the original coordinate system, and determine the local coordinates of each sample point in the local coordinate system.
[0061] In this embodiment, a local coordinate system is constructed with one of the sample points as the origin. Based on the original coordinates of each sample point in the original coordinate system, the mapping relationship between the local and original coordinate systems is determined, as well as the local coordinates of each sample point in the local coordinate system. Specifically, with one sample point as the vector starting point, the horizontal and vertical axis vectors are determined based on the original coordinates of the three sample points in the original coordinate system. A local coordinate system is constructed with the vector starting point as the origin based on the horizontal and vertical axis vectors. The mapping relationship between the local and original coordinate systems is determined based on the original coordinates of the origin in the original coordinate system, the horizontal axis vector, and the vertical axis vector. The original coordinates of the three sample points in the original coordinate system are mapped to local coordinates in the local coordinate system using the mapping relationship between the local and original coordinate systems.
[0062] Step S103: Based on the local coordinates of each sample point in the local coordinate system, determine the angle between the rays with the origin as the starting point and the other two sample points as the midpoints; based on the angle, determine the local coordinates of the center of the circle tangent to the two rays.
[0063] In this embodiment, based on the local coordinates of each sample point in the local coordinate system, the angle between the rays originating from the origin and the other two sample points as midpoints is determined; the local coordinates of the center of the circle tangent to the two rays are then determined based on the angle. Specifically, based on the local coordinates of the three sample points in the local coordinate system, the angle between the rays originating from the origin and the other two sample points as midpoints is constructed; the local coordinates of the tangent point of the circle tangent to the two rays are determined based on the curve equation and the straight line equation; and the local coordinates of the center of the tangent circle are determined based on the angle value and the local coordinates of the tangent point.
[0064] In this step, the angle value of the included angle is determined as follows: the first vector and the second vector are determined based on the local coordinates of the three sample points; the angle value of the included angle is determined based on the first vector and the second vector.
[0065] Step S104: Determine the local coordinates of the arc between the two tangent points based on the included angle and the local coordinates of the center of the circle.
[0066] In this embodiment, the local coordinates of the arc between two tangent points are determined based on the included angle and the local coordinates of the center. Specifically, the angle of the arc between the two tangent points is determined based on the included angle value; the arc is divided into several sub-arcs, and the angles of the sub-arcs are determined; the local coordinates of the sub-arcs are determined based on the local coordinates of the center and the angles of the sub-arcs; and the local coordinates of the arc are determined based on the local coordinates of the sub-arcs.
[0067] Step S105: Based on the original coordinates of the origin in the local coordinate system, the mapping relationship between the local coordinate system and the original coordinate system, the local coordinates of the arc are converted into the original coordinates. The arc is then rendered based on the original coordinates of the arc to obtain the smooth corner of the selected pipe.
[0068] In this embodiment, based on the original coordinates of the origin in the local coordinate system, and the mapping relationship between the local coordinate system and the original coordinate system, the local coordinates of the arc are converted into original coordinates. The arc is then rendered based on these original coordinates to obtain the smoothed pipe turn after selection. Specifically, the local abscissa of the arc is multiplied by the abscissa vector to obtain an abscissa product; the local ordinate of the arc is multiplied by the ordinate vector to obtain an ordinate product; the original coordinates of the arc are obtained based on the abscissa product, the ordinate product, and the original coordinates of the origin. The arc is then rendered based on these original coordinates to obtain the smoothed pipe turn after selection.
[0069] The mapping relationship between the local coordinate system and the original coordinate system is (X, Y, Z) = xi + yj + D, where (X, Y, Z) is the original vertical coordinate, x is the local horizontal coordinate, i is the horizontal axis vector, y is the local vertical coordinate, j is the vertical axis vector, and D is the original coordinate of the origin.
[0070] In this embodiment, three sample points are taken at the pipe corner. A local coordinate system is constructed with one of the sample points as the origin. Based on the original coordinates of each sample point in the original coordinate system, the mapping relationship between the local coordinate system and the original coordinate system is determined, as well as the local coordinates of each sample point in the local coordinate system. The sample points taken on the pipe are converted into local coordinate data for subsequent calculations. Based on the local coordinates of each sample point in the local coordinate system, the angle between the rays with the origin as the starting point and the other two sample points as the midpoints is determined. Based on the angle, the local coordinates of the center of the circle tangent to the two rays are determined. Based on the angle and the local coordinates of the center, the local coordinates of the arc between the two tangent points are determined. Based on the original coordinates of the origin in the local coordinate system and the mapping relationship between the local coordinate system and the original coordinate system, the local coordinates of the arc are converted into original coordinates. The arc is rendered based on the original coordinates of the arc to obtain the smooth pipe corner after the detour. The local coordinates of the arc are mapped to the original coordinates of the arc, and the arc is rendered in the original coordinate system to obtain the arc. The arc is used as the smooth pipe corner. In this embodiment, sharp corners of pipelines are processed and transformed into smooth corners in the visualization of 3D oil and gas pipeline networks, thus solving the problem of smooth transition of pipeline corners in 3D visualization of oil and gas pipeline networks.
[0071] Example 2
[0072] Embodiment 2 of the present invention provides a method for handling pipeline corners in three-dimensional oil and gas pipeline network visualization, the specific process of which is as follows: Figure 2 As shown, it includes the following steps:
[0073] Step S201: Take three sample points cyclically on the two end faces of the pipe bend and the pipe contact surface, with the three sample points on the same plane.
[0074] In this embodiment, three sampling points are cyclically taken from the two end faces of the pipe bend and the pipe contact surface, with the three sampling points on a single plane. Specifically, in an oil and gas pipeline network, for any intersecting oil and gas pipelines, the bend of the intersecting pipelines is taken, and based on a single plane, three sampling points are cyclically taken from the two end faces of the pipe and the pipe contact surface.
[0075] Step S202: Using one of the sample points as the starting point of the vector, determine the horizontal axis vector and the vertical axis vector based on the original coordinates of the three sample points in the original coordinate system.
[0076] In this embodiment, one of the sample points is used as the starting point of the vector, and the horizontal and vertical axis vectors are determined based on the original coordinates of the three sample points in the original coordinate system. Specifically, the three sample points are named A, B, and C. The original coordinates of points A, B, and C in the original coordinate system are (X... A Y A Z A ), (X B YB Z B ), (X C Y C Z C Using point B as the starting point of the vector, the horizontal and vertical vectors are obtained based on the original coordinates of points A, B, and C.
[0077] Where, the horizontal axis vector i utilizes The horizontal axis vector i is obtained by calculating the original coordinates of points A and B; the vertical axis vector j is obtained by using the formula... The ordinate vector j is obtained by calculating the original coordinates of points B and C.
[0078] Step S203: Construct a local coordinate system with the origin of the vector as the starting point of the coordinate system based on the horizontal axis vector and the vertical axis.
[0079] In this embodiment, a local coordinate system is constructed with the origin of the vector as the starting point. Specifically, with point B as the origin of the local coordinate system, the horizontal axis of the local coordinate system is constructed based on point B and the horizontal axis vector, and the vertical axis of the local coordinate system is constructed based on point B and the vertical axis vector, thus constructing a local coordinate system as shown in Figure 3. Figure 3 The coordinates of point B are the origin coordinates of the local coordinate system, and the coordinates of point A are on the horizontal axis X of the local coordinate system. The two red arrows represent the horizontal axis vector i and the vertical axis vector j.
[0080] Step S204: Determine the mapping relationship between the local coordinate system and the original coordinate system based on the original coordinates of the origin in the original coordinate system, the horizontal axis vector, and the vertical axis vector.
[0081] In this embodiment, the mapping relationship between the local coordinate system and the original coordinate system is determined based on the original coordinates of the origin in the original coordinate system, the horizontal axis vector, and the vertical axis vector. Specifically, the mapping relationship between the local coordinate system and the original coordinate system is constructed based on the original coordinates of the origin in the original coordinate system, the horizontal axis vector, and the vertical axis vector. The expression for the mapping relationship is (X, Y, Z) = xi + yj + D, where (X, Y, Z) are the original coordinates, (x, y) are the local coordinates, i is the horizontal axis vector, j is the vertical axis vector, and D is the original coordinates of the origin in the original coordinate system.
[0082] Step S205: Using the mapping relationship between the local coordinate system and the original coordinate system, map the original coordinates of the three sample points in the original coordinate system to the local coordinates in the local coordinate system.
[0083] In this embodiment, the mapping relationship between the local coordinate system and the original coordinate system is used to map the original coordinates of the three sample points in the original coordinate system to their local coordinates in the local coordinate system. Specifically, the transformation expression (X, Y, Z) = xi + yj + D is used to map the original coordinates (X, Y, Z) of points A, B, and C to their local coordinates.A Y A Z A ), (X B Y B Z B ), (X C Y C Z C Convert the coordinates (x, y) of points A, B, and C to their local coordinates. A y A ), (x B y B (x) C y C ).
[0084] Step S206: Based on the local coordinates of the three sample points in the local coordinate system, construct the angle between the rays with the origin of the three coordinate points as the starting point and the other two sample points as the midpoints; determine the local coordinates of the tangent point of the circle tangent to the two rays based on the curve equation and the line equation; determine the local coordinates of the center of the tangent circle based on the angle value and the local coordinates of the tangent point.
[0085] In this embodiment, based on the local coordinates of the three sample points in the local coordinate system, the angle between rays is constructed with the origin of the three coordinate points as the starting point and the other two sample points as the midpoints. The local coordinates of the tangent points of the circles tangent to the two rays are determined based on the curve equation and the straight line equation. The local coordinates of the center of the tangent circle are determined based on the angle value and the local coordinates of the tangent points. Specifically, with point B as the starting point and points A and B as the midpoints of the rays, the following is constructed: Figure 3 Angle ABC is shown, and the included angle of angle ABC is α; determine the local coordinates (x, y) of the tangent point E based on the curve equation and the direction of the line. E The local coordinates of the center F are (x, 0), and (x, y). F y F According to geometric principles, the local x-coordinate of point E is x. E The local x-coordinate equal to the center F of the circle F ,use The formula can calculate the local ordinate of the origin F. The local coordinates of the center point F are:
[0086] The process of determining the included angle of angle ABC in this step is as follows: In the local coordinate system, based on the local coordinates of point A and the local coordinates of point B, determine the vector in the local coordinate system. In the local coordinate system, based on the local coordinates of point B and point C, determine the coordinates in the local coordinate system. Based on the vectors in the local coordinate system and use The formula is used to calculate the included angle of angle ABC.
[0087] Step S207: Determine the angle of the arc between the two tangent points based on the included angle value; divide the arc into several equal sub-arcs and determine the angle of each sub-arc; determine the local coordinates of each sub-arc based on the local coordinates of the center and the angle of the sub-arc; determine the local coordinates of the arc based on the local coordinates of the sub-arcs. Specifically, divide the arc corresponding to the included angle into several equal sub-arcs as follows: Figure 3 The shown segments result in several sub-arcs. During the process of dividing the arc into equal parts, the accuracy required to represent the arc points using sub-arcs is satisfied. The angle of each sub-arc segment is β, as shown in Figure 3. The value of β is... This is expressed as follows: where α is the included angle value, and n represents the number of equal divisions of the arc; based on the local coordinates of the center of the circle, using... The local coordinates of the arc are calculated; where (x k ,y k Let x be the local coordinate of the arc. F The x-coordinate of the center F is represented by y. F Let F represent the local ordinate of the center F, k represent the number of segments of the sub-arc, and n represent the number of equal divisions of the arc.
[0088] Step S208: Multiply the local x-coordinate of the arc by the x-axis vector to obtain the x-product; multiply the local y-coordinate of the arc by the y-axis vector to obtain the y-product; obtain the original coordinates of the arc based on the x-product, y-product, and the original coordinates of the origin. Render the arc based on its original coordinates to obtain the smoothed corner of the selected pipe.
[0089] In this example, the local x-coordinate of the arc is multiplied by the x-axis vector to obtain the x-product; the local y-coordinate of the arc is multiplied by the y-axis vector to obtain the y-product; the original coordinates of the arc are obtained from the x-product, y-product, and the original coordinates of the origin. The arc is then rendered based on its original coordinates to obtain a smooth corner for the selected pipe. Specifically, the local coordinates (x-coordinate, y ... k ,y k ) using (X k Y k Z k )=x k i+y k The j+D formula is used to convert the coordinates to obtain the original coordinates (X) of the arc. k Y k Z k ); where x k Let y be the local x-coordinate of the arc. k Let be the local ordinate of the arc, i be the x-axis vector, j be the y-axis vector, and D be the original coordinates of the origin B. The original coordinates of the arc (X...) k Yk Z k The smooth corners of the pipeline are obtained by rendering in the original coordinate system.
[0090] In this implementation, the state of the pipeline before the corners are processed in the 3D oil and gas pipeline network visualization is as follows: Figure 4 As shown, in Figure 4 As can be seen, the pipeline bend is a sharp angle. The state of the pipeline bend in the 3D oil and gas pipeline network visualization after processing, using the method in this embodiment, is as follows: Figure 5 As shown, in Figure 5 As can be seen, the pipe bend becomes a smooth bend.
[0091] This invention provides a device for handling pipeline corners in three-dimensional oil and gas pipeline network visualization. The structure of the device is as follows: Figure 6 As shown, it includes: a sampling module 601, a local coordinate system construction module 602, a circle center coordinate determination module 603, an arc coordinate determination module 604, and a mapping module 605.
[0092] Sampling module 601 is used to take three sampling points at the pipe bend.
[0093] The local coordinate system construction module 602 is used to construct a local coordinate system with one of the sample points as the origin, and to determine the mapping relationship between the local coordinate system and the original coordinate system based on the original coordinates of each sample point in the original coordinate system, as well as to determine the local coordinates of each sample point in the local coordinate system.
[0094] The center coordinate determination module 603 is used to determine the angle between rays with the origin as the starting point and the other two sample points as the midpoints based on the local coordinates of each sample point in the local coordinate system; and to determine the local coordinates of the center of the circle tangent to the two rays based on the angle.
[0095] The arc coordinate determination module 604 is used to determine the local coordinates of the arc between two tangent points based on the included angle and the local coordinates of the center of the circle.
[0096] The mapping module 605 is used to convert the local coordinates of the arc into the original coordinates based on the original coordinates of the origin in the local coordinate system, the mapping relationship between the local coordinate system and the original coordinate system, and to render the arc based on the original coordinates of the arc to obtain the smooth corner of the selected pipe.
[0097] This invention provides a computer storage medium storing computer-executable instructions. When these computer-executable instructions are executed by a processor, they implement the aforementioned method for handling pipeline corners in 3D oil and gas pipeline network visualization.
[0098] This invention provides a pipeline corner processing device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-mentioned pipeline corner processing method in three-dimensional oil and gas pipeline network visualization.
[0099] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0100] Unless otherwise specifically stated, terms such as processing, calculation, operation, determination, display, etc., may refer to the actions and / or processes of one or more processing or computing systems or similar devices that represent the manipulation and conversion of data representing physical (e.g., electronic) quantities within the registers or memory of the processing system into other data similarly representing physical quantities within the memory, registers, or other such information storage, transmission, or display devices of the processing system. Information and signals can be represented using any of a variety of different techniques and methods. For example, data, instructions, commands, information, signals, bits, symbols, and chips mentioned throughout the above description can be represented by voltage, current, electromagnetic waves, magnetic fields or particles, light fields or particles, or any combination thereof.
[0101] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process may be rearranged without departing from the scope of this disclosure. The appended method claims provide elements of various steps in an exemplary order and are not intended to limit the scope to the specific order or hierarchy described.
[0102] In the detailed description above, various features are combined together in a single embodiment to simplify this disclosure. This approach to disclosure should not be construed as reflecting an intention that embodiments of the claimed subject matter require more features than are explicitly stated in each claim. Rather, as reflected in the appended claims, the invention is presented with fewer features than all of the features in a single disclosed embodiment. Therefore, the appended claims are hereby explicitly incorporated into the detailed description, with each claim representing a separate preferred embodiment of the invention.
[0103] Those skilled in the art will also understand that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments herein can be implemented as electronic hardware, computer software, or a combination thereof. To clearly illustrate the interchangeability between hardware and software, the various illustrative components, blocks, modules, circuits, and steps described above are generally described in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. Those skilled in the art can implement the described functionality in alternative ways for each specific application; however, such implementation decisions should not be construed as departing from the scope of this disclosure.
[0104] The steps of the methods or algorithms described in conjunction with the embodiments herein can be directly embodied in hardware, software modules executed by a processor, or a combination thereof. The software modules can reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium well known in the art. An exemplary storage medium is connected to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. The ASIC can reside in a user terminal. Alternatively, the processor and storage medium can exist as discrete components in the user terminal.
[0105] For software implementation, the techniques described in this application can be implemented using modules (e.g., procedures, functions, etc.) that perform the functions described in this application. This software code can be stored in memory units and executed by a processor. The memory units can be implemented within the processor or outside the processor; in the latter case, they are communicatively coupled to the processor via various means, as is well known in the art.
[0106] The foregoing description includes examples of one or more embodiments. It is certainly impossible to describe all possible combinations of components or methods in order to describe the above embodiments, but those skilled in the art will recognize that further combinations and arrangements of the various embodiments are possible. Therefore, the embodiments described herein are intended to cover all such changes, modifications, and variations that fall within the scope of the appended claims. Furthermore, the term "comprising" as used in the specification or claims is interpreted in a manner similar to the term "including," as interpreted when used as a conjunction in the claims. Additionally, the use of any term "or" in the specification of the claims is intended to mean "non-exclusive or."
Claims
1. A method for handling pipeline corners in three-dimensional oil and gas pipeline network visualization, characterized in that, include: Take three sampling points at the pipe bend; Construct a local coordinate system with one of the sample points as the origin, and determine the mapping relationship between the local coordinate system and the original coordinate system based on the original coordinates of each sample point in the original coordinate system, as well as the local coordinates of each sample point in the local coordinate system. Based on the local coordinates of each sample point in the local coordinate system, determine the angle between the rays originating from the origin and the other two sample points as midpoints; based on the angle, determine the local coordinates of the center of the circle tangent to the two rays. Based on the included angle and the local coordinates of the center of the circle, determine the local coordinates of the arc between the two tangent points; Based on the original coordinates of the origin in the local coordinate system, the mapping relationship between the local coordinate system and the original coordinate system, the local coordinates of the arc are converted into the original coordinates. The arc is then rendered based on the original coordinates of the arc to obtain the smooth turn of the selected pipe.
2. The method as described in claim 1, characterized in that, Take three sampling points at the pipe bend, including: Three sampling points are taken cyclically from the two end faces of the pipe bend and the pipe contact surface, and the three sampling points are on a plane.
3. The method as described in claim 2, characterized in that, Construct a local coordinate system with one of the sample points as the origin, and determine the mapping relationship between the local coordinate system and the original coordinate system based on the original coordinates of each sample point in the original coordinate system, as well as determine the local coordinates of each sample point in the local coordinate system, including: Using one of the sample points as the vector origin, determine the horizontal axis vector and the vertical axis vector based on the original coordinates of the three sample points in the original coordinate system; construct a local coordinate system with the vector origin as the origin based on the horizontal axis vector and the vertical axis. The mapping relationship between the local coordinate system and the original coordinate system is determined based on the original coordinates of the origin in the original coordinate system, the horizontal axis vector, and the vertical axis vector. The mapping relationship between the local coordinate system and the original coordinate system is used to map the original coordinates of the three sample points in the original coordinate system to the local coordinates in the local coordinate system.
4. The method as described in claim 3, characterized in that, Determining the local coordinates of the center of the circle tangent to the two rays based on the included angle includes: Determine the local coordinates of the point of tangency of the circle tangent to the two rays based on the equations of the curve and the line. Based on the included angle value and the local coordinates of the tangent point, determine the local coordinates of the center of the tangent circle.
5. The method as described in claim 4, characterized in that, Based on the included angle and the local coordinates of the center of the circle, the local coordinates of the arc between the two tangent points are determined, including: The angle of the arc between the two tangent points is determined based on the included angle value. Divide the arc into several sub-arcs and determine the angles of the sub-arcs; The local coordinates of the sub-arc are determined based on the local coordinates of the center of the circle and the angle of the sub-arc. The local coordinates of the arc are determined based on the local coordinates of the sub-arc.
6. The method as described in claim 5, characterized in that, The process for determining the included angle value is as follows: The first vector and the second vector are determined based on the local coordinates of the three sample points; the angle value of the included angle is determined based on the first vector and the second vector.
7. The method as described in claim 5, characterized in that, Based on the mapping relationship between the original coordinates of the origin in the local coordinate system, the local coordinate system, and the original coordinate system, the local coordinates of the arc are converted into the original coordinates, including: Multiply the local x-coordinate of the arc by the x-axis vector to obtain the x-product; Multiply the local ordinate of the arc by the ordinate vector to obtain the ordinate product; The original coordinates of the arc are obtained from the horizontal product, the vertical product, and the original coordinates of the origin.
8. The method as described in claim 7, characterized in that, The mapping relationship between the local coordinate system and the original coordinate system is shown below: (X, Y, Z) = xi + yj + D; Where (X, Y, Z) are the original vertical coordinates, x is the local horizontal coordinate, i is the horizontal axis vector, y is the local vertical coordinate, j is the vertical axis vector, and D is the original coordinate of the origin.
9. A method and apparatus for handling pipeline corners in three-dimensional oil and gas pipeline network visualization, characterized in that, include: The sampling module is used to take three sampling points at the pipe bends; The local coordinate system construction module is used to construct a local coordinate system with one of the sample points as the origin, and to determine the mapping relationship between the local coordinate system and the original coordinate system based on the original coordinates of each sample point in the original coordinate system, as well as to determine the local coordinates of each sample point in the local coordinate system. The center coordinate determination module is used to determine the angle between rays with the origin as the starting point and the other two sample points as the midpoints, based on the local coordinates of each sample point in the local coordinate system; and to determine the local coordinates of the center of the circle tangent to the two rays based on the angle. An arc coordinate determination module is used to determine the local coordinates of the arc between two tangent points based on the included angle and the local coordinates of the center of the circle. The mapping module is used to convert the local coordinates of the arc into the original coordinates based on the original coordinates of the origin in the local coordinate system, the mapping relationship between the local coordinate system and the original coordinate system, and to render the arc based on the original coordinates of the arc to obtain the smooth corner of the selected pipe.
10. A computer storage medium, characterized in that, The computer storage medium stores computer-executable instructions, which, when executed by a processor, implement the pipeline corner processing method in the three-dimensional oil and gas pipeline network visualization as described in any one of claims 1-9.
11. A pipe corner treatment device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the pipeline corner processing method in three-dimensional oil and gas pipeline network visualization as described in any one of claims 1-9.