A method and system for automatic text box layout in architectural engineering drawings

By calculating the area of ​​overlapping text boxes and iteratively adjusting their positions, automatic layout of architectural engineering drawings was achieved, solving the problem of low drawing efficiency caused by overlapping text boxes and improving drawing efficiency and accuracy.

CN116090037BActive Publication Date: 2026-05-26INST OF COMPUTING TECH CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INST OF COMPUTING TECH CHINESE ACAD OF SCI
Filing Date
2022-10-31
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In existing architectural drawing software, text boxes frequently overlap, resulting in tedious and time-consuming manual adjustments with low accuracy, high labor costs, and low typesetting efficiency.

Method used

By using automated methods, the overlapping area of ​​text boxes is calculated, and the position of the text boxes is iteratively adjusted to make the overlapping area zero or minimal, thus achieving automatic text box layout.

Benefits of technology

It greatly saves drafters' time and energy, improves the efficiency of engineering drawing, and reduces human error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116090037B_ABST
    Figure CN116090037B_ABST
Patent Text Reader

Abstract

This invention provides a method for automatically formatting text boxes in architectural drawings, comprising: Step 1, acquiring all text boxes to be automatically formatted and their coordinate information; Step 2, calculating the total area of ​​the overlapping region of all text boxes based on the coordinate information of the text boxes; Step 3, when the total area of ​​the overlapping region of all text boxes is not 0, determining the text box with the largest overlapping area with other text boxes; Step 4, moving the text box up, down, left, and right by a preset distance, selecting the movement action that minimizes the overlapping area with other text boxes after the movement, and executing the movement action; Step 5, repeating steps 2 to 4 until a predetermined number of repetitions is reached.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of architectural engineering image drawing, and more specifically, to a method and system for automatic layout of text boxes in architectural engineering drawings. Background Technology

[0002] In the current field of architectural engineering drawing, drawing software (such as AutoCAD) is generally used to create architectural engineering drawings. However, when using drawing software to create architectural engineering drawings, overlapping occurs between a large number of text annotation boxes, affecting the use by subsequent construction workers. This means that the completed engineering drawings usually require professional drafters to manually adjust each overlapping text box to minimize or eliminate overlap. However, due to the large number of overlapping text boxes, the adjustment process is tedious, complicated, time-consuming, and labor-intensive. Furthermore, manual adjustment has low precision and is prone to human error, resulting in high labor costs and low typesetting efficiency. Summary of the Invention

[0003] Therefore, to address the aforementioned problems, this invention provides an automatic text box layout method and system for architectural engineering drawings. Using this method, when the overlapping area of ​​all text boxes in the drawing is 0, the layout drawing is automatically output. When the overlapping area between text boxes in the drawing is not 0, the system globally searches for the text box with the largest overlapping area and designs n single-movement actions for the text box. That is, it moves one of the two overlapping text boxes with the largest overlapping areas a certain distance in any direction (up, down, left, right). The system then finds and executes the action that minimizes the overlapping area with the remaining text boxes. By iterating through the above steps N times, the system ensures that the overlapping area between all text boxes is 0 or minimized. Therefore, drafters only need to provide the corresponding format file of the architectural engineering drawing (such as a JSON file) or embed this technology into engineering drawing software (such as AutoCAD software) to achieve automatic text box layout. This greatly saves drafters' time and effort and improves the efficiency of engineering drawing.

[0004] The automatic text box layout method for architectural engineering drawings of the present invention includes:

[0005] Step 1: Obtain all text boxes that need to be automatically formatted and their coordinate information;

[0006] Step 2: Calculate the total area of ​​the overlapping region of all text boxes based on the coordinate information of the text boxes;

[0007] Step 3: When the total area of ​​the overlapping area of ​​all text boxes is not 0, determine the text box with the largest overlapping area with other text boxes.

[0008] Step 4: Move the text box up, down, left, and right by a preset distance, select the movement action that minimizes the area of ​​overlap with other text boxes after the movement, and execute the movement action.

[0009] Step 5: Repeat steps 2 to 4 until the predetermined number of repetitions is reached.

[0010] According to an embodiment of the present invention, an automatic text box layout method for architectural engineering drawings is provided, wherein the preset distance is the height and / or width and / or its proportion and / or the pixel value in the drawing of the text box.

[0011] According to an embodiment of the present invention, the method for automatically formatting text boxes in architectural drawings obtains information about the text boxes, including the coordinates of the upper left and lower right corners of the text boxes. The formula for calculating the overlapping area of ​​all text boxes in step 2 is as follows:

[0012]

[0013] Where S is the total area of ​​the overlapping region of the n text boxes. Let represent the area of ​​the overlapping region between the t-th and i-th text boxes, where (x t y t (x') is the coordinate of the top-left corner of the t-th text box. t y' t (x) is the coordinate of the bottom right corner of the t-th text box; i y i (x′) is the coordinate of the top-left corner of the i-th text box. i y′ i Let be the coordinates of the bottom right corner of the i-th text box, and

[0014]

[0015] And among them,

[0016] left = max(x) t x i )

[0017] right=min(x′ t , x′ i )

[0018] up = min(y) t y i )

[0019] bottom = max(y′) t y′ i )

[0020] `left` takes the maximum x-coordinate of the top-left corner of the two overlapping text boxes.

[0021] The `right` parameter takes the minimum x-coordinate of the bottom right corner of the two overlapping text boxes.

[0022] The 'up' parameter takes the minimum y-coordinate of the top-left corner of each of the two overlapping text boxes.

[0023] The bottom value is the maximum value of the y-coordinate of the bottom right corner of the two overlapping text boxes.

[0024] An automatic text box layout method for architectural engineering drawings according to an embodiment of the present invention, wherein,

[0025] In step 3, if S obtained in step 2 is not 0, then iterate through... The value of, and determine When the value is at its maximum, one of the two overlapping text boxes is the text box being manipulated.

[0026] According to an embodiment of the present invention, in the method for automatically formatting text boxes in architectural drawings, step 4 involves moving the text box a certain distance up, down, left, and right, selecting the movement action that minimizes the overlap area with other text boxes after the movement, and executing the movement action. The number of movement actions for the manipulated text box t is m, and the overlap area of ​​text box t after the j-th movement action out of the m movement actions is...

[0027]

[0028] s j This represents the total overlap area between text box t and other text boxes after the j-th action is performed, where m is the number of defined actions, and j = 1, 2, ..., m.

[0029] According to an embodiment of the present invention, in the method for automatic text box layout of architectural drawings, the preset distance in step 4 is the width w of the text box t being operated on. t and height h t Furthermore, the movement actions of the manipulated text box t include the following eight types:

[0030] 1) Horizontally shift left by one box width w t The coordinates of the top left corner of the text box (x) t -w t y t The coordinates of the bottom right corner of the text box (x) t y' t );

[0031] 2) Shift the horizontal position to the right by one box width w t The coordinates of the top left corner of the text box (x' t yt The coordinates of the bottom right corner of the text box (x') t +w t y' t );

[0032] 3) Move vertically upwards by one frame height h t The coordinates of the top left corner of the text box (x) t y t +h t The coordinates of the bottom right corner of the text box (x') t y t );

[0033] 4) Move vertically downwards by one frame height h t The coordinates of the top left corner of the text box (x) t y' t The coordinates of the bottom right corner of the text box (x') t y' t -h t );

[0034] 5) Move horizontally to the left by half the width w of the frame. t / 2: The coordinates of the top left corner of the text box (x t -w t / 2,y t The coordinates of the bottom right corner of the text box (x') t -w t / 2,y' t );

[0035] 6) Move horizontally to the right by half the width w of the frame. t / 2: The coordinates of the top left corner of the text box (x t +w t / 2,y t The coordinates of the bottom right corner of the text box (x') t +w t / 2,y' t );

[0036] 7) Move vertically upwards by half the height h of the frame. t / 2: The coordinates of the top left corner of the text box (x t y t +h t / 2), the coordinates of the bottom right corner of the text box (x' t y' t +h t / 2);

[0037] 8) Move vertically downwards by half the height h of the frame. t / 2: The coordinates of the top left corner of the text box (x t y t -ht / 2),

[0038] The bottom right corner coordinates (x') of the text box t y' t -h t / 2).

[0039] According to an embodiment of the present invention, an automatic text box layout method for architectural engineering drawings is provided, wherein in step 3, when the total area of ​​the overlapping area of ​​all text boxes is 0, the layout image is automatically output.

[0040] According to an embodiment of the present invention, an automatic text box layout method for architectural engineering drawings includes step 5, repeating steps 2 to 4 until the predetermined number of repetitions is 500.

[0041] Another aspect of the present invention provides an automatic layout system for non-overlapping text boxes in architectural engineering drawings, comprising: an interface module for acquiring drawings to be analyzed; and an analysis module for analyzing the drawings using the method described above.

[0042] Another aspect of the present invention provides a storage medium storing a computer program that, when executed by a processor, can be used to implement the method described in any of the preceding claims.

[0043] Another aspect of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, can be used to implement the method described in any of the above-mentioned embodiments.

[0044] The technical solutions of the embodiments of the present invention may include the following beneficial effects:

[0045] With the method and system of this invention, engineering drawing personnel only need to provide the engineering drawing in a corresponding predetermined format (e.g., JSON format) or embed the technology into the corresponding drawing software (e.g., AutoCAD software) to achieve automatic layout of text boxes with no overlap or minimal overlap, greatly saving the time and effort of drawing personnel.

[0046] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0048] Figure 1 These are AutoCAD architectural drawings according to embodiments of the present invention;

[0049] Figure 2 This is a flowchart of an automatic typesetting method according to an embodiment of the present invention;

[0050] Figure 3 This is a schematic diagram illustrating the calculation of the overlapping area of ​​text boxes according to an embodiment of the present invention.

[0051] Figure 4 This is a schematic diagram illustrating the operation of performing eight defined actions on the text box with the largest overlapping area according to an embodiment of the present invention.

[0052] Figure 5 This is a diagram illustrating the effect of a method according to an embodiment of the present invention. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this invention clearer, the invention is further described in detail below through specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0054] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of the invention. However, those skilled in the art will recognize that the technical solutions of the invention can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of the invention.

[0055] As described in the background section, existing architectural engineering drawings typically use manual layout and adjustment of repetitive text boxes, which is inefficient. To address this, the present invention proposes an automatic text box layout method and system for architectural engineering drawings. Through the method of the present invention, it is possible to achieve zero or minimal overlap of text boxes in the entire engineering drawing, making it convenient for drafters to adjust the text boxes.

[0056] The following explanation uses JSON format electronic engineering drawings as an example. Figure 1 This is an example of an AutoCAD architectural drawing according to an embodiment of the present invention. In this drawing, the portion shown within the bold solid-line rounded rectangle is an overlapping text box. Using the method of the present invention, the text boxes in the drawing can be automatically adjusted globally to achieve automatic layout of text boxes with no overlap or minimal overlap.

[0057] Figure 2This is a flowchart of an automatic typesetting method according to an embodiment of the present invention, specifically, in conjunction with... Figure 2 An automatic layout method for text boxes in architectural drawings according to an embodiment of the present invention includes:

[0058] Step 1: After obtaining the engineering drawing, first parse the JSON format drawing file to obtain all (e.g., n, where n is an integer greater than 1) text boxes and their coordinate information. According to one embodiment of the present invention, the obtained text box information includes the coordinates of the upper left and lower right corners of the text box, as well as the height and width of the text box.

[0059] Step 2: Calculate the total area of ​​the overlapping region of all text boxes in the engineering drawing.

[0060] See Figure 3 This is a schematic diagram illustrating the calculation of the overlapping area of ​​text boxes according to an embodiment of the present invention. The calculation process of this step is described below using the calculation of the overlapping area of ​​two text boxes (the t-th text box and the i-th text box) as an example.

[0061] exist Figure 3 The text boxes t(box) are shown overlapping each other. t ) and text box i (box i ), where (x t y t (x') is the coordinate of the top-left corner of the t-th text box. t y' t (x) is the coordinate of the bottom right corner of the t-th text box; i y i (x′) is the coordinate of the top-left corner of the i-th text box. i y′ i () represents the coordinates of the bottom right corner of the i-th text box.

[0062] Preferably, the calculation is performed using the following formula:

[0063] left = max(x) t x i )

[0064] right=min(x′ t , x′ i )

[0065] up = min(y) t y i )

[0066] bottom = max(y′) t y′ i )

[0067] The meanings of the above formulas are as follows:

[0068] left is the maximum value of the abscissa of the upper left corner in two overlapping text boxes,

[0069] right is the minimum value of the abscissa of the lower right corner in two overlapping text boxes,

[0070] up is the minimum value of the ordinate of the upper left corner in two overlapping text boxes,

[0071] bottom is the maximum value of the ordinate of the lower right corner in two overlapping text boxes,

[0072] In Figure 3 's example, left = x i right = x' t up = y i bottom = y' t

[0073] represents the area of the overlapping region between the t-th text box and the i-th text box (i.e., the area of the shaded region in the figure), which can be calculated according to the following formula:

[0074]

[0075] As can be seen from the above formula 1, when left < right and up > down, there is an overlap between the two text boxes. Among them, (right - left) represents the length of the overlapping region, (up - down) is the width of the overlapping region, and the area of the overlapping region is (right - left) * (up - down);

[0076] In other cases, there is no overlap between the above two text boxes, and the area of the overlapping region is 0.

[0077] Furthermore, using the above formula 1, calculate the overlapping areas of the text boxes pairwise respectively, and accumulate them to obtain the total area S of the overlapping regions of the n text boxes in the figure

[0078]

[0079] Step 3, when the total area of the overlapping regions of all text boxes is not 0, traverse 's value, and determine the two text boxes when the value is the largest, and thus determine a text box with the largest overlapping area with other text boxes. According to an embodiment of the present invention, take text box t as the text box with the largest overlapping area with other text boxes.

[0080] Step 4: Move the text box t up, down, left, and right a predetermined distance, select the movement action that minimizes the area of ​​overlap with other text boxes after the movement, and then execute the action, that is, modify the coordinate information of the text box t.

[0081] According to one embodiment of the present invention, the number of times the text box t is moved up, down, left, and right a predetermined distance is m.

[0082] After each move, the total overlapping area s of the text box t and other text boxes after that move (the j-th move) is calculated using the following formula 3. j The specific formula is shown in Equation 3 below.

[0083]

[0084] Where i≠t, s j This indicates the text box that is manipulated after the j-th action is performed. t ) and other text boxes i The sum of the areas of the overlapping regions of ), where m is the number of defined movement actions, and is a positive integer greater than 0.

[0085] After performing the movement calculations for each of the above m actions, determine the total area s of the overlapping region. j The minimum value is determined by finding the action among m defined actions that minimizes the overlap area between the text box t and other text boxes, and then executing that action. The specific formula is shown below.

[0086] stmin(s1, s2, ..., s m )

[0087] According to another embodiment of the invention, the distance moved each time is set to the width or height of the text box being moved. Figure 4 This is a schematic diagram illustrating eight movement actions performed on the text box with the largest overlapping area according to an embodiment of the present invention.

[0088] Through numerous experiments, the inventors discovered that by first moving the text box up, down, left, and right by one box's height or width, and then moving it by half its height or width in any of these directions—a total of eight actions—all possible text box movements can be covered, and the result can be quickly obtained that minimizes the overlap between the manipulated text box and other boxes. For example... Figure 4 As shown, in this embodiment, the text box with the largest overlapping area is moved up, down, left, and right a total of 8 times. t The coordinates of the top left corner before the movement are (x... t y tThe coordinates of the lower right corner are (x') t y' t Perform the following 8 movement actions on the text box respectively:

[0089] 1) Horizontally shift left by one box width w t The coordinates of the top-left corner of the moved text box (x) t -w t y t The coordinates of the bottom right corner of the text box (x) t y' t )

[0090] 2) Shift the horizontal position to the right by one box width w t The coordinates of the top-left corner of the moved text box (x') t y t The coordinates of the bottom right corner of the text box (x') t +w t y' t )

[0091] 3) Move vertically upwards by one frame height h t The coordinates of the top-left corner of the moved text box (x) t y t +h t The coordinates of the bottom right corner of the text box (x') t y t )

[0092] 4) Move vertically downwards by one frame height h t The coordinates of the top-left corner of the moved text box (x) t y' t The coordinates of the bottom right corner of the text box (x') t y' t -h t )

[0093] 5) Move horizontally to the left by half the width w of the frame. t / 2: The coordinates of the top-left corner of the moved text box (x t -w t / 2,y t The coordinates of the bottom right corner of the text box (x') t -w t / 2,y' t )

[0094] 6) Move horizontally to the right by half the width w of the frame. t / 2: The coordinates of the top-left corner of the moved text box (x t +w t / 2,y t The coordinates of the bottom right corner of the text box (x') t+w t / 2,y' t )

[0095] 7) Move vertically upwards by half the height h of the frame. t / 2: The coordinates of the top-left corner of the moved text box (x t y t +h t / 2), the coordinates of the bottom right corner of the text box (x' t y' t +h t / 2)

[0096] 8) Move vertically downwards by half the height h of the frame. t / 2: The coordinates of the top-left corner of the moved text box (x t y t -h t / 2), the coordinates of the bottom right corner of the text box (x' t y' t -h t / 2)

[0097] After each move, the total area of ​​the overlapping area between the text box t and other text boxes after the move is calculated using Equation 3. That is, S1, S2...S8 are calculated using Equation 3 respectively. In this embodiment, m = 8.

[0098] After performing the movement calculations for the eight actions described above, determine the total overlapping area s. j The minimum value, i.e., the minimum value among S1, S2...S8 above, is determined by finding the action among the eight defined actions that minimizes the overlap area between the text box being operated on and other text boxes, and then executing that action. At this point, the area of ​​the overlap between the text box and other text boxes is minimized, as shown below.

[0099] stmin(s1,s2,…,s8)

[0100] Preferably, if, during the above 8 movement operations, the area of ​​the overlapping region calculated after a certain movement is 0, then the remaining movement calculations are terminated, and the action is performed, that is, the coordinate information of the text box is modified.

[0101] According to other embodiments of the present invention, the text box can be moved any set distance in any direction (up, down, left, right). This distance can be, for example, a proportion of the width (moving left and right) or height (moving up and down) of the text box, such as one-third of the width, one-quarter of the width, one-fifth of the height, one-sixth of the height, etc.; or it can be moved by a set number of pixels, and the number and order of each movement in each direction can be arbitrary; then, the movement method that minimizes the total overlap area with other text boxes can be determined from multiple combinations of movement distance, direction, and number of movements.

[0102] Step 5: Repeat steps 2 to 4 until the predetermined number of repetitions is reached. Output the arranged image to obtain the arrangement with the smallest overlapping area. The inventors tested the algorithm on a test dataset and found that it converges within 500 iterations.

[0103] Figure 5 This is a diagram illustrating the effect of a method according to an embodiment of the present invention. Through the above method flow, an original architectural drawing with overlapping text boxes can be automatically adjusted into a drawing with no overlapping or minimal overlapping text boxes.

[0104] It should be noted that although the steps are described in a specific order above, it does not mean that the steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently, or even in a different order, as long as the required function can be achieved.

[0105] This invention can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the invention.

[0106] Computer-readable storage media can be tangible devices that hold and store instructions for use by an instruction execution device. Computer-readable storage media can be, for example, including but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof.

[0107] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for automatically formatting text boxes in architectural engineering drawings, comprising: Step 1: Obtain all text boxes that need to be automatically formatted and their coordinate information; the information obtained for each text box includes the coordinates of its top-left and bottom-right corners. Step 2: Calculate the total area of ​​the overlapping region of all text boxes based on the coordinate information of the text boxes; the formula for calculating the total area of ​​the overlapping region of all text boxes is as follows: in Let n be the total area of ​​the overlapping region of the n text boxes. Let represent the area of ​​the overlapping region between the t-th and i-th text boxes, where It is the coordinate of the top-left corner of the t-th text box. It is the coordinate of the bottom right corner of the t-th text box; It is the coordinate of the top left corner of the i-th text box. Let be the coordinates of the bottom right corner of the i-th text box, and And among them, Take the maximum x-coordinate of the top-left corner of the two overlapping text boxes. Take the minimum x-coordinate of the bottom right corner of the two overlapping text boxes. Take the minimum value of the y-coordinate of the top left corner of the two overlapping text boxes. Take the maximum value of the y-coordinate of the bottom right corner of the two overlapping text boxes; Step 3: When the total area of ​​the overlapping area of ​​all text boxes is not 0, determine the text box with the largest overlapping area with other text boxes. Step 4: Move the text box up, down, left, and right by a preset distance, select the movement action that minimizes the area of ​​overlap with other text boxes after the movement, and execute the movement action. Step 5: Repeat steps 2 to 4 until the predetermined number of repetitions is reached.

2. The method for automatically formatting text boxes in architectural drawings according to claim 1, wherein, The preset distance is the height and / or width and / or its proportion and / or the pixel value in the image of the text box.

3. The method for automatically formatting text boxes in architectural drawings according to claim 1, wherein, In step 3, when the result obtained in step 2... When the value is not 0, iterate through. The value of, and determine When the value is at its maximum, one of the two overlapping text boxes is the text box being manipulated.

4. In the automatic text box layout method for architectural engineering drawings according to claim 3, in step 4, the text box is moved a certain distance up, down, left, and right, and the movement action with the smallest overlapping area with other text boxes after the movement is selected and executed. The number of movement actions for the operated text box t is m, and the overlapping area of ​​text box t after the j-th movement action out of the m movement actions is... This represents the total overlap area between text box t and other text boxes after the j-th action is performed, where m is the number of defined actions, j = 1, 2, ..., m.

5. The automatic text box layout method for architectural engineering drawings according to claim 4, wherein the preset distance in step 4 is the width of the text box t being operated on. and height Furthermore, the movement actions of the manipulated text box t include the following eight types: 1) Shift the horizontal position to the left by one box width. The coordinates of the top left corner of the text box The coordinates of the bottom right corner of the text box ; 2) Shift the horizontal position to the right by one box width. The coordinates of the top left corner of the text box The coordinates of the bottom right corner of the text box ; 3) Move vertically upwards by one frame height. The coordinates of the top left corner of the text box The coordinates of the bottom right corner of the text box ; 4) Move vertically downwards by one box height The coordinates of the top left corner of the text box The coordinates of the bottom right corner of the text box ; 5) Move horizontally to the left by half the width of the frame. The coordinates of the top left corner of the text box The coordinates of the bottom right corner of the text box ; 6) Move horizontally to the right by half the width of the frame. The coordinates of the top left corner of the text box The coordinates of the bottom right corner of the text box ; 7) Move vertically upwards by half the height of the frame. The coordinates of the top left corner of the text box The coordinates of the bottom right corner of the text box ; 8) Move vertically downwards by half the height of the frame. The coordinates of the top left corner of the text box The coordinates of the bottom right corner of the text box .

6. The method for automatically formatting text boxes in architectural drawings according to claim 5, wherein, In step 3, when the total area of ​​the overlapping areas of all text boxes is 0, the formatted image is automatically output.

7. The method for automatically formatting text boxes in architectural drawings according to claim 5, wherein, Step 5: Repeat steps 2 to 4 until the predetermined number of repetitions is 500.

8. A non-overlapping automatic text box layout system for architectural engineering drawings, comprising: The interface module is used to obtain the drawing to be analyzed, which includes multiple text boxes; And an analysis module for automatically laying out multiple text boxes of the drawing using the method according to any one of claims 1-7.

9. A storage medium storing a computer program that, when executed by a processor, can be used to implement the method of any one of claims 1-7.

10. An electronic device comprising a processor and a memory, the memory storing a computer program that, when executed by the processor, is capable of implementing the method of any one of claims 1-7.