An automatic pipeline interruption method for a mobile terminal to draw a pipeline axis view
By sorting and automatically interrupting pipelines and graphic elements on the mobile terminal, the cumbersome operation and compatibility problems of drawing software in the prior art when inserting tiles are solved, and efficient and accurate pipeline drawing is achieved.
Patent Information
- Application Number
- CN202410927351.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2044-07-11
AI Technical Summary
When drawing pipeline diagrams manually, existing computer-aided drawing software requires tedious operations and is prone to errors, especially when inserting tiles such as valves and pipe fittings, and it is difficult to be compatible with different software and tiles formats, resulting in inefficient drawing and poor quality.
It provides a method for automatic pipeline interruption for mobile terminals. By sorting pipelines and graphic elements, it automatically determines whether the pipeline needs to be interrupted according to the priority and rules set by the user, and generates symbols or labels at the interruption to maintain connectivity and alignment.
It simplifies the manual drawing process, improves the drawing efficiency and quality, reduces human operation deviations and errors, is suitable for different application scenarios and user needs, and supports the identification and display of a variety of pipeline shapes and attributes.
Smart Images

Figure CN118940443B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a pipeline automatic interruption algorithm for manually drawing a pipeline shaft view on a mobile terminal. Background Art
[0002] In fields such as petroleum, chemical industry, and construction, pipeline diagrams are commonly used drawings for representing information such as the structure, layout, connections, and flow directions of pipeline systems. Pipeline diagrams usually consist of elements such as pipelines, valves, pipe fittings, and instruments, among which pipelines are the main elements for indicating the orientation and length of the pipelines. In computer-aided design (CAD) software, drawing pipeline diagrams requires using specific tools and commands to draw accurate pipelines according to a certain scale and specifications. However, during the process of computer-aided drawing, some problems often occur, such as: (1) When inserting drawing blocks such as valves and pipe fittings on a pipeline, it is necessary to manually interrupt the intersecting pipelines and reconnect the two interrupted ends to maintain the connectivity and alignment of the pipelines. This process requires repeated selection, input, modification, and confirmation, which is very cumbersome, time-consuming, and error-prone. (2) When it is necessary to modify the orientation, length, position, etc. of a pipeline, it is necessary to manually adjust the pipeline and its relationship with other elements to maintain the integrity and consistency of the pipeline diagram. This process also requires repeated operations, inspections, and corrections, which is very complex, laborious, and prone to causing confusion and non-standardization of the drawings.
[0003] To solve the above problems, some computer-aided design (CAD) software provides some functions, such as: (1) Quick interruption: It can create an interval between two specified points on an object, thereby interrupting the object into two objects. (2) Batch interruption: It can perform the operation of quick interruption on multiple objects simultaneously. (3) Automatic interruption: When inserting a drawing block, it can automatically interrupt the objects intersecting with the drawing block and reconnect the two interrupted ends. These functions can greatly improve the efficiency and quality of drawing pipeline diagrams and reduce human errors and modifications. However, these functions also have some limitations, such as: (1) Quick interruption and batch interruption require the user to manually specify the interruption position and method and cannot automatically adapt according to the shape and size of the drawing block. (2) Automatic interruption requires the user to use specific software and drawing block libraries and cannot be compatible with different software and drawing block formats. Summary of the Invention
[0004] To solve the above problems, the present invention provides a pipeline automatic interruption method for drawing a pipeline shaft view on a mobile terminal, which can automatically determine whether a pipeline needs to be interrupted according to user settings and graphic features, generate corresponding symbols or markings at the interruption points, and maintain the connectivity and alignment of the pipelines.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] An automatic pipeline interruption method for a mobile terminal to draw a pipeline axis view, the main steps are as follows:
[0007] Step 1. Traverse all graphic elements to find all pipelines and other graphics (such as valves, flanges, etc.). Sort all pipelines and graphics and process them in descending order according to the priority set by the user. The priority judgment indicators are the layer, color, thickness of the pipeline, or the order of drawing the pipeline. Different priorities can be flexibly set according to the user's needs and preferences to achieve different interruption effects. For example, if the layer and the order of drawing are used as the sorting rules, the smaller the layer, the higher the priority, and for the same layer, the pipeline drawn first has a higher priority.
[0008] Step 2. For each pipeline, check whether it intersects or overlaps with other graphics. If so, record the position and range of the intersection or overlap.
[0009] Step 3. Determine the rules and methods for pipeline interruption according to the user's settings, such as:
[0010] (a) Whether to interrupt when the pipeline passes through a flange;
[0011] (b) Whether to interrupt when the pipeline intersects with other pipelines;
[0012] (c) Whether to generate symbols or annotations after the pipeline is interrupted, and the style and content of the symbols or annotations.
[0013] Step 4. According to the rules and methods in the third step, for each pipeline, perform interruption processing at the intersection or overlap part and generate symbols or annotations.
[0014] Step 5. Redraw the processed pipelines and other graphics on the canvas to complete the automatic pipeline interruption. During this process, the attributes of the original pipelines can be kept unchanged to avoid graphic distortion or information loss caused by interruption.
[0015] In the above step 2, the process of judging whether two line segments (or pipelines) intersect and finding the intersection point is as follows. Suppose there are two line segments PL1 and PL2, and their endpoints are P i1 (x i1 ,y i1 ), P j1 (x j1 ,y j1 ), P i2 (x i2 ,y i2 ) and P j2 (x j2 ,y j2 ). We can use vectors and parametric equations to describe these two line segments:
[0016] PL1 = P j1 -P i1 =(x j1 -x i1 , y j1 -y i1 )
[0017] PL2 = P j2 -P i2 =(x j2 -x i2 , y j2 -y i2 )
[0018] Then any point P on line segment PL1 t can be expressed as:
[0019] P t =(x i1 +t(x j1 -x i1 ), y i1 +t(y j1 -y i1 ), t ∈ [0, 1]
[0020] Any point P on line segment PL1 u can be expressed as:
[0021] P u =(x i2 +u(x j2 -x i2 ), y i2 +u(y j2 -y i2 ), u ∈ [0, 1]
[0022] Determining whether two pipelines PL1 and PL2 intersect can be transformed into whether P t = P u while t ∈ [0, 1] and u ∈ [0, 1]. If not, it means the pipelines are parallel or intersect at the extended line.
[0023] The beneficial effects of the present invention are:
[0024] (1) The method of the present invention can automatically determine which pipelines need to be interrupted, as well as the positions and ways of interruption, according to the components such as valves and pipe fittings inserted by the user in the drawing software or when there are intersections between the pipelines drawn before and after, based on the priorities and rules set by the user. It can effectively simplify the processing of pipeline interruption in manual drawing, improve the efficiency and quality of drawing. It can also be extended and optimized according to different application scenarios and user requirements. For example: (a) It can increase the recognition and display of pipeline shapes and attributes, such as circles, squares, dotted lines, solid lines, etc.; (b) It can increase the customization and management of pipeline symbols or markings, such as colors, sizes, fonts, positions, etc.; (c) It can increase the selection and adjustment of pipeline interruption rules and ways, such as priorities, conditions, exceptions, etc.
[0025] (2) There are mainly two differences between this method and the interruption command of AutoCAD drawing software: First, this interruption method automatically judges according to the set rules, without cumbersome operation steps, and is more suitable for chemical inspection personnel to draw on-site with a mobile terminal; Second, when a component interrupts a pipeline, the component can move freely along the pipeline, and the system realizes automatic interruption.
[0026] (3) The method of the present invention improves the efficiency and quality of manually drawing pipeline diagrams on a mobile terminal, and reduces the deviation and error of manual operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:
[0028] Figure 1 is a schematic flow diagram of the present invention;
[0029] Figure 2 is a schematic diagram of pipelines intersecting without interruption;
[0030] Figure 3 is a schematic diagram of a pipeline interruption method in Embodiment 1;
[0031] Figure 4 is a schematic diagram of another pipeline interruption method in Embodiment 1. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0032] The present invention will be further described below in conjunction with the drawings and embodiments. For the sake of clarity, many practical details will be described together in the following description.
[0033] As Figure 1 shown, a pipeline automatic interruption method for a mobile terminal to draw a pipeline isometric view, the method includes the following steps:
[0034] Step 1: Sort all pipelines and process them in descending order according to the priority set by the user. The priority can be attributes such as the layer, color, thickness of the pipeline, or the order defined by the user;
[0035] Define pipeline: PL1(P i1 ,P j1 ,L1,S1),P i1 and P j1 are the two endpoints of the pipeline, and P i1 (x i1 ,y i1 ) defines the coordinates of this point, L1 is the layer where the pipeline is located, and S1 is the sequence number of the pipeline after sorting.
[0036] Step 2: For each pipeline, check its intersection with all other pipelines. If there is an intersection, calculate the coordinates of the intersection point and record them;
[0037] First, describe these two line segments using vectors and parametric equations:
[0038] PL1 = P j1 - P i1 = (x j1 - x i1 ,y j1 - y i1 )
[0039] PL2 = P j2 - P i2 = (x j2 - x i2 ,y j2 - y i2 )
[0040] Then, any point P t on the line segment PL1 can be expressed as:
[0041] P t = (x i1 + t(x j1 - x i1 ),y i1 + t(y j1 - y i1 ,t ∈ [0,1]
[0042] Any point P u on the line segment PL1 can be expressed as:
[0043] P u = (x i2 + u(x j2 - x i2 ),y i2 + u(yj2 -y i2 ), u ∈ [0, 1]
[0044] Determining whether two pipelines PL1 and PL2 intersect can be transformed into whether P satisfies both t ∈ [0, 1] and u ∈ [0, 1] t = P u . If not, it means the pipelines are parallel or intersect on the extension line.
[0045] Step 3: For each intersection point, determine the priorities of the two pipelines to which it belongs. If the pipeline with the higher priority is above the pipeline with the lower priority, there is no need to interrupt; if the pipeline with the higher priority is below the pipeline with the lower priority, the pipeline with the lower priority needs to be interrupted, and a certain gap should be left on both sides of the intersection point. In this example, the layer and the drawing sequence are used as the sorting rules. The smaller the layer, the higher the priority. For pipelines on the same layer, the pipeline drawn first has a higher priority. The smaller the value of the priority function pr(), the higher the priority.
[0046] Suppose the intersection point P t belongs to pipelines PL1 and PL2 respectively. If PL1.L1 = PL2.L2, then let
[0047] pr(PL1) = PL1.S1, pr(PL2) = PL2.S2
[0048] Otherwise, let pr(PL1) = PL1.L1, pr(PL2) = PL2.L2;
[0049] Step 4: For each pipeline that needs to be interrupted, according to the position of the intersection point and the gap, split the original pipeline into multiple short pipelines and keep the original attributes unchanged;
[0050] Step 5: Recombine all the processed short pipelines into a new graphic set and output it to the mobile terminal.
[0051] Embodiment 1
[0052] The following is a specific embodiment:
[0053] A pipeline automatic interruption method for drawing a pipeline axonometric view on a mobile terminal. First, set the pipeline interruption priority, set the interruption interval of the pipeline to 5 mm, and the interruption method is to interrupt when the pipelines intersect.
[0054] Step 1: As Figure 2 shown, the user draws two pipelines PL1 and PL2 on the drawing successively. The pipeline attributes are shown in Table 1, where the S value represents the drawing sequence of the pipeline, S1 represents that PL1 is drawn first, and S2 represents that PL2 is drawn first.
[0055] Table 1 Pipeline Attributes
[0056] Pipeline x-axis coordinate y-axis coordinate L S S PL (3.66,3.06) (12.08,5.84) 1 1 2 PL (7.8,0.7) (7.8,7.14) 1 2 1
[0057] Step 2: Determine whether PL1 and PL2 intersect. If they intersect, calculate the coordinates of the intersection point and record them. The specific calculation process is as follows:
[0058] First, we need to determine the equations of each line segment. For the line segment PL1 with endpoints (3.66, 3.06) and (12.08, 5.84), write the parametric equations:
[0059]
[0060] For the line segment PL2 with endpoints (7.8, 0.7) and (7.8, 7.14), write the parametric equations:
[0061]
[0062] Simultaneously solve the equations of the two line segments:
[0063]
[0064] It is obtained that t ≈ 0.49 and u ≈ 0.58, which satisfy t ∈ [0, 1] and u ∈ [0, 1]. Then it is determined that PL1 and PL2 intersect, and the intersection point coordinates are (7.8, 4.41).
[0065] Step 3: For each intersection point, determine the priorities of the two pipelines to which it belongs. The L values of the two pipelines PL and PL2 are the same, that is, they are on the same layer. S1 and S2 respectively represent two different drawing orders, where S1 represents that PL1 is drawn first. According to the breaking rule, PL1 is broken, and the breaking illustration is as Figure 3 shown; S2 represents that PL2 is drawn first. According to the breaking rule, PL2 is broken, and the breaking illustration is as Figure 4 shown.
[0066] Step 4: For each pipeline that needs to be broken, according to the positions of the intersection point and the gap, divide the original pipeline into multiple short pipelines and keep the original attributes unchanged;
[0067] Step 5: Re - combine all the processed short pipelines into a new graphic set and output it to the mobile terminal. It can be seen that the present invention realizes the automatic breaking of pipelines in the drawing of the pipeline axonometric view, without the cumbersome operations similar to autoCAD, greatly facilitating the hand - drawn drawing on the mobile terminal and improving the work efficiency.
[0068] The method of the present invention analyzes the data of two pipelines, detects an intersection point, determines the pipeline to be interrupted and the interruption position. According to the interruption parameters, the pipeline to be interrupted is interrupted to generate a broken line or a notch, and the pipeline data after interruption is output. The pipeline data after interruption is displayed in a graphical manner on the drawing interface.
[0069] The above are only the embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the scope of the claims of the present invention.
Claims
1. An automatic pipeline interruption method for a mobile terminal to draw a pipeline shaft view, characterized in that: Chemical inspection personnel manually draw on a handheld mobile terminal at the scene. According to user settings and image features, it automatically determines whether a pipeline needs to be interrupted. When a component interrupts a pipeline, the component can move freely along the pipeline. The system realizes automatic interruption and generates corresponding symbols or markings at the interruption point, reducing human operation errors and deviations. The method includes the following steps: Step 1: Sort all pipelines and process them in descending order according to the priority set by the user; Define pipeline: PL1(P i1 ,P j1 ,L1,S1), P i1 and P j1 are the two endpoints of the pipeline, P i1 (x i1 ,y i1 ) is defined as the coordinate of this point, L1 is the layer where the pipeline is located, and S1 is the serial number of the pipeline after sorting; The priority judgment indicators include: the layer, color, thickness of the pipeline, or the order of drawing the pipeline. Different priorities can be set according to user needs and preferences to achieve different interruption effects. Step 2: For each pipeline, check its intersection with all other pipelines. If there is an intersection, calculate the coordinates of the intersection point and record them. Step 3: For each intersection point, judge the priorities of the two pipelines to which it belongs, and determine the rules and methods for pipeline interruption, including any of the following situations: (a) Whether to interrupt when the pipeline passes through a flange. (b) Whether to interrupt when the pipeline intersects with other pipelines. (c) Whether to generate symbols or markings after the pipeline is interrupted, and the styles and contents of the symbols or markings. Step 4: For each pipeline that needs to be interrupted, divide the original pipeline into multiple short pipelines according to the positions of the intersection points and gaps, and keep the original attributes unchanged. If the high-priority pipeline is above the low-priority pipeline, there is no need to interrupt. If the high-priority pipeline is below the low-priority pipeline, the low-priority pipeline needs to be interrupted, and a certain gap is left on both sides of the intersection point. Step 5: Recombine all the processed short pipelines into a new graphic set for output and redraw them on the canvas, keeping the attributes of the original pipelines unchanged to avoid graphic distortion or information loss caused by interruption.
2. According to the method for automatically interrupting pipelines for drawing a pipeline isometric view on a mobile terminal described in claim 1, in step 2, the process of judging whether two pipelines intersect and finding the intersection point is as follows: First, describe these two line segments using vectors and parametric equations: PL1 = P j1 -P i1 =(x j1 -x i1 ,y j1 -y i1 ) PL2 = P j2 -P i2 =(x j2 -x i2 ,y j2 -y i2 ) Then any point P on the line segment PL1 t can be expressed as: P t =(x i1 +t(x j1 -x i1 ),y i1 +t(y j1 -y i1 ),t∈[0,1] Any point P on the line segment PL1 u can be expressed as: P u =(x i2 +u(x j2 -x i2 ),y i2 +u(y j2 -y i2 ),u∈[0,1] Determining whether two pipelines PL1 and PL2 intersect can be transformed into whether P satisfies both t ∈ [0, 1] and u ∈ [0, 1] t = P u . If not satisfied, it means the pipelines are parallel or intersect on the extension line.
Citation Information
Patent Citations
Automatic disconnection method for wire connection of CAD electrical drawing
CN113886932A