Method for automatically drawing flow chart connecting line

By dragging the tiles on the flowchart and automatically drawing connections according to their relative positions, the problem of time-consuming manual drawing connections is solved, and efficient flowchart editing, automatic adjustment of connections and deleting tiles is achieved, improving the function of Overall drawing efficiency.

CN119295602AInactive Publication Date: 2025-01-10SHENZHEN ANGUAN TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411822979.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-01-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In flowchart editing software, manually drawing the connection between two tiles is time-consuming and inefficient, especially when the number of tiles is large, an automated method is needed to improve the efficiency of drawing connections.

Method used

By setting rules, drag the tiles on the flowchart and automatically draw connections according to their relative positions, including judging that the tiles fall into a specific area and adjusting the connections, and automatically adjusting the surrounding connections when deleting the tiles.

Benefits of technology

It realizes automatic drawing connection without manual intervention, improves flow chart drawing efficiency, and reduces the complexity and time consumption of manual operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295602A_ABST
    Figure CN119295602A_ABST
Patent Text Reader

Abstract

The invention discloses a method for automatically drawing connection lines of a flow chart, which comprises the following steps of: performing a block dragging operation on the flow chart on a screen, determining the relative positions of dragged blocks and each block on the flow chart, automatically connecting the lines, and automatically drawing and adjusting the connection lines of the blocks in a condition area according to whether the dragged blocks fall into the condition block area or not. Automatically drawing and adjusting connecting lines of the blocks in the circulation area according to whether the dragged blocks fall into the circulation block area or not, and automatically adjusting connecting lines among the peripheral blocks when the blocks are deleted. Therefore, the flow chart does not need to be dragged specially, a large amount of time for dragging, position adjustment and alignment is saved, and the working efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer drawing, and is a method for automatically drawing lines between flowchart blocks, a flowchart software editing system function and a storage medium. Background Art

[0002] In today's various flowchart editing software and some software that express processes and ideas, drawing lines between two blocks is a very troublesome task. When the number of blocks increases, you have to drag and drop them one by one to generate lines, and each line needs to adjust the starting and ending positions, which is very tiring for the eyes and leads to extremely low work efficiency.

[0003] Therefore, setting rules for drawing connections, allowing the computer to draw connections automatically, and avoiding manual drawing work is a fundamental way to improve efficiency. Summary of the invention

[0004] The present invention sets rules. In the process of drawing a flowchart, the position of the dragged block is controlled by dragging the mouse. According to the relative position of the block and other blocks on the flowchart, the connection lines between the blocks and other blocks are automatically drawn, thereby avoiding the need for manual drawing of the connection lines.

[0005] A method for automatically drawing flow chart connections is provided, which determines the relative position of the dragged block and each block on the flow chart and automatically connects the blocks by dragging a block on the flow chart on the screen, automatically draws and adjusts the connection lines of conditional area blocks according to whether the dragged block falls into the conditional area, automatically draws and adjusts the connection lines of loop area blocks according to whether the dragged block falls into the loop area, and automatically adjusts the connection lines between surrounding blocks when deleting a block.

[0006] According to a method for automatically drawing flowchart connections, a block dragging operation is performed on the flowchart on the screen. The method is: use an input device or a finger to touch the screen and hold down a block to drag. This block is generated by pressing a button on the interface. The background of the dragged block is the currently edited flowchart, which is an empty flowchart or a flowchart that already has other blocks.

[0007] There are several situations in which flowcharts are automatically drawn:

[0008] S001 determines the relative position of the dragged block and each block on the flowchart and automatically connects the blocks according to a method for automatically drawing lines on a flowchart. The dragged block determines the distance between each block on the flowchart and itself in turn, finds the block closest to itself, and determines which side of the nearest block the dragged block is on according to the four areas divided by the diagonal line of the nearest block. The horizontal or vertical direction on the nearest block is connected with a dotted line to the upper / lower / left / right position of the dragged block in this direction after the mouse is released, and the dragged block is placed at this position. If there is already a block connected to the nearest block in this direction, the original connection is interrupted, and the dragged block is inserted between the two and connected to them respectively.

[0009] S002, according to a method for automatically drawing connections in a flowchart, automatically draws and adjusts the connection lines of conditional area blocks according to whether the dragged block falls into the conditional block area. The conditional block has a block rectangular area and is divided into two true and false branch line areas. When the dragged block is dragged into one of the true and false branch areas, it searches for the nearest block in the area, and uses the method of S001 to determine the block position and connect the lines. If the dragged block is the last block of one of the true and false branches of the condition, it also connects itself to the subsequent blocks.

[0010] S003, according to a method for automatically drawing connections in a flowchart, automatically draws and adjusts the connections of the blocks in the loop area according to whether the dragged block falls into the loop block area. The loop block has a block rectangular area, in which the blocks of the branch lines with true conditions are stored. When the dragged block is dragged into the area, the block nearest to itself is found in the area, and the block position is determined and connected using the method of S001. If the dragged block does not fall into the loop block, the position is determined and connected according to the method of S001.

[0011] S004 According to a method for automatically drawing lines in a flowchart, when a block is deleted, the lines between the surrounding blocks are automatically adjusted. When a block needs to be deleted, if only one side of the block is connected to other blocks, the line is removed and the block is deleted; if there are lines on the upper and lower sides or the left and right sides, the blocks on the upper and lower sides or the left and right sides are connected together and the block is deleted; if the block has more than 3 lines, the blocks on the upper and lower sides or the left and right sides are connected, the single lines that are not paired are disconnected, and the block is deleted. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It shows that dragging the tile closest to the right side of tile 2 (the area is shown divided diagonally) interrupts the connection between tile 2 and tile 4 and automatically connects them separately.

[0013] Figure 2 It shows that when the dragged tile falls into the conditional tile, the false branch is automatically inserted between tile 2 and tile 3.

[0014] Figure 3 It shows that dragging a tile and dropping it into a loop tile automatically draws the connection lines of the loop area tile.

[0015] Figure 4 It shows that the connection lines between surrounding tiles are automatically adjusted when the dragged tile is deleted. DETAILED DESCRIPTION

[0016] The present invention is an operation performed on a computer and its screen using a mouse, the input method is the mouse or screen touch, and the implementation method is software implementation.

[0017] The specific implementation method is mainly to draw a flowchart by dragging blocks. During the drawing process, the blocks to be dragged into the flowchart are calculated relative to the existing blocks in the flowchart to automatically arrange the positions and draw lines. The automatic drawing method is as follows:

[0018] S001 When a new block is dragged into the flowchart by holding down the mouse button, find the block closest to the dragged shape. When the mouse button is released, the dragged block is placed at a certain distance above / below / left / right of the nearest block according to the relative position, and the dragged block and the nearest block are automatically connected to draw a horizontal or vertical line. If the original nearest block already has other blocks connected to it in this direction, insert the dragged block between the nearest block and the connected block, draw the connection lines between the dragged block, the nearest block and the connected block, and adjust the relevant blocks and surrounding blocks to move a certain distance to the periphery in turn. Figure 1 shown.

[0019] S002 automatically draws and adjusts the connection lines of conditional area blocks according to whether the dragged block falls into the conditional area. The conditional block has a rectangular area of ​​blocks and is divided into two areas where the true and false branches are located. When the dragged block is dragged into one of the true and false branch areas, it searches for the nearest block in the area and uses the method of S001 to determine the block position and connect the lines. If the dragged block is the last block of one of the true and false branches of the condition, it also needs to connect itself with the subsequent blocks. Figure 2 shown.

[0020] S003 automatically draws and adjusts the connection lines of the loop area blocks according to whether the dragged block falls into the loop area. The loop block has a block rectangular area, which stores the blocks of branch lines with true conditions. When the dragged block is dragged into the area, it searches for the nearest block in the area and uses the method of S001 to determine the block position and connect the lines. If the dragged block does not fall into the loop block, it determines its position and connects the lines according to the method of S001. Figure 3 shown.

[0021] S004 When a block needs to be deleted, if only one side of the block is connected to other blocks, remove the connection and delete the block; if there are lines on the top and bottom or left and right sides, connect the top and bottom or left and right blocks together and delete the block; if the block has more than 3 lines, connect the top and bottom or left and right opposite blocks, disconnect the unpaired single lines, and delete the block. Figure 4 shown.

Claims

1. A method for automatically drawing flow chart connections, characterized in that: By dragging blocks on the flowchart on the screen, the relative position of the dragged blocks and the blocks on the flowchart is determined and automatically connected. The connection lines of the conditional area blocks are automatically drawn and adjusted according to whether the dragged blocks fall into the conditional area. The connection lines of the loop area blocks are automatically drawn and adjusted according to whether the dragged blocks fall into the loop area. When deleting blocks, the connection lines between the surrounding blocks are automatically adjusted.

2. The method according to claim 1, characterized in that The operation of dragging a block on the flowchart on the screen includes: using an input device or a finger to touch the screen and hold down a block to drag it, and this block is generated by pressing a button on the interface, and the background of the dragged block is the currently edited flowchart, which is an empty flowchart or a flowchart that already has other blocks.

3. The method according to claim 1, characterized in that The determining of the relative position of the dragged block and each block on the flowchart and automatically connecting the lines comprises: the dragged block sequentially determines the distance between each block on the flowchart and itself, finds the block closest to itself, and determines which side of the dragged block is on the nearest block according to the four areas divided by the diagonal line of the nearest block, connects the horizontal or vertical direction on the nearest block with a dotted line to the upper / lower / left / right position of the dragged block in this direction after the mouse is released, and places the dragged block at this position; if there is already a block connected to the nearest block in this direction, the original connection is interrupted, and the dragged block is inserted between the two and connected with lines respectively.

4. The method according to claim 1, characterized in that: The method of automatically drawing and adjusting the connection line of the conditional area block according to whether the dragged block falls into the conditional area includes: the conditional block has a block rectangular area and is divided into two true and false branch line areas. When the dragged block is dragged into one of the true and false branch areas, the block closest to itself is found in the area, and the 4 areas divided by the diagonal line of the nearest block are determined on which side of the nearest block the dragged block is, and the horizontal or vertical direction on the nearest block is connected with a dotted line to the upper / lower / left / right position of the dragged block after the mouse is released in this direction. If the dragged block is the last block of one of the true and false branches of the condition, it is also necessary to connect itself with the subsequent blocks.

5. The method according to claim 1, characterized in that The method of automatically drawing and adjusting the connection lines of the blocks in the cycle area according to whether the dragged block falls into the cycle block area includes: the cycle block has a block rectangular area, and the blocks of the branch lines with true conditions are stored in the area. When the dragged block is dragged into the area, the block closest to itself is found in the area, and the four areas divided by the diagonal line of the nearest block are determined to determine which side of the nearest block the dragged block is on, and the horizontal or vertical direction on the nearest block is connected with a dotted line to the upper / lower / left / right position of the dragged block after the mouse is released in this direction; if the dragged block does not fall into the cycle block, the block closest to itself is found outside the cycle block, and the four areas divided by the diagonal line of the nearest block are determined to determine which side of the nearest block the dragged block is on, and the horizontal or vertical direction on the nearest block is connected with a dotted line to the upper / lower / left / right position of the dragged block after the mouse is released in this direction.

6. The method according to claim 1, characterized in that The automatic adjustment of the connection lines between the surrounding blocks when deleting a block includes: when a block needs to be deleted, if only one side of the block is connected to other blocks, the connection line is removed and the block is deleted; if there are lines on the upper and lower sides or the left and right sides, the blocks on the upper and lower sides or the left and right sides are connected together and the block is deleted; if the block has more than three connection lines, the blocks on the upper and lower sides or the left and right sides are connected, the single lines that are not paired are disconnected, and the block is deleted.

Citation Information

Patent Citations

  • Flow modeling method

    CN101650798A

  • Flow chart construction method based on branch circulation

    CN112181381A

  • Lightweight flow chart drawing system based on Canvas

    CN112381909A