Size number automatic avoidance method and system

Through the automatic reset, grouping, sorting and moving processing, the problem of poor reading effect and inefficiency caused by overlapping dimension marks is solved, and fast processing and efficient design is achieved.

CN119203280AActive Publication Date: 2024-12-27CHINA MACHINERY INT ENG DESIGN & RES INST

Patent Information

Application Number
CN202411149220.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-12-27
Estimated Expiration
2044-08-21

AI Technical Summary

Technical Problem

In architectural engineering design, dimension markings are prone to overlap, resulting in poor reading effects and manual movement, which is inefficient. The existing three-dimensional modeling software has failed to effectively deal with these problems.

Method used

Provides an automatic avoidance method of size numbers, including resetting selected dimension numbers to the intermediate position, grouping, sorting, and moving according to the width and overlap of the dimension numbers, by judging the distance and dimensions from the coordinate origin. The direction of lines is classified and moved to avoid overlap.

Benefits of technology

It realizes rapid processing of size and number overlap, saves design time, improves design efficiency, and reduces the number of traversals through direction classification, improving traversal efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119203280A_ABST
    Figure CN119203280A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for automatically avoiding size digits, and the method comprises the steps: resetting the size digits of size marks at the middle positions of the sizes; grouping the size marks according to the spacing; sorting the size marks in each group according to the distances between the size marks and the origin of coordinates; and moving the size digits of each group of sorted size marks according to the width or overlapping condition of the size digits. The problems that the image reading effect is influenced by size number overlapping and the manual moving efficiency is low are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of architectural drawings, and in particular to a method and system for automatically avoiding dimension numbers. Background Art

[0002] In the field of architectural engineering design, two-dimensional engineering drawings are the only legal deliverables for drawing review and delivery. Therefore, two-dimensional engineering drawings need to be detailed with building dimensions, elevations, text descriptions and other information. Dimensions are used to clarify the size and position of the building as a whole and in parts, providing a basis for construction and architectural design. The components of dimensions are: dimension lines, dimension limits, dimension start and end symbols, and dimension numbers. Figure 1 As shown in the figure. Since the architectural construction drawing design needs to express a lot of detailed information, the spacing between some dimension annotations is small, the dimension numbers overlap each other, and the reading effect is poor. In the process of automatic drawing based on 3D models, the generated plane construction drawings contain a large number of dimension annotations. Some of these annotations will overlap. If they are not avoided, the clear expression of the drawing will be affected. When adjusting these dimension annotations, designers need to manually move the overlapping dimension numbers, which leads to a lot of repetitive work and low efficiency. Existing 3D modeling software does not process these dimension annotations, so it is urgent to develop dimension overlap processing technology.

[0003] In the prior art, the processing of dimension marking is generally only for the X direction or the Y direction, and the position of the dimension marking in other directions cannot be adjusted; or the adjustment is for the dimension marking, not the dimension number. Summary of the invention

[0004] 1. Technical issues to be resolved

[0005] Based on the above problems, the present invention provides a method for automatically avoiding dimension numbers, which solves the problem that the overlapping of dimension numbers affects the reading effect and the manual movement is inefficient.

[0006] (II) Technical solution

[0007] Based on the above technical problems, the present invention provides a method for automatically avoiding size numbers, comprising the following steps:

[0008] S1. Reposition the dimension number of the selected dimension mark to the middle position of the dimension;

[0009] S2, grouping the reset dimensioning according to the spacing;

[0010] S3, sorting the dimension annotations in each group according to the distance from the coordinate origin;

[0011] S4. Move the dimension numbers of each group of sorted dimension annotations according to the width or overlap of the dimension numbers:

[0012] S41. Traverse the grouped array to obtain the i-th array;

[0013] S42. Determine whether the quantity in the current array is empty. If not, traverse the N dimension labels in the i-th array to obtain the j-th dimension label in the array, where j ∈ [0, N - 1], and proceed to step S43. If so, end;

[0014] S43. Calculate the width Wgap between the two dimension limits of the current dimension label, and calculate the width Wj of the dimension number of the current dimension label;

[0015] S44. Determine the size of j. If j = 0, proceed to step S45; if 0 < j < N - 1, proceed to step S46; if j = N - 1, proceed to step S47; if j > N - 1, then i = i + 1, and return to step S42;

[0016] S45. Determine whether the current dimension label overlaps with the dimension labels of other groups, or whether Wj is greater than Wgap. If so, move the dimension number of the current dimension label to the left by a distance D2. Otherwise, set j = j + 1 and return to step S43;

[0017] S46. Determine whether the current dimension label overlaps with the previous dimension label, or whether Wj is greater than Wgap. If so, move the dimension number of the current dimension label downward by a distance D3. Otherwise, set j = j + 1 and return to step S43;

[0018] S47. Determine whether the current dimension label overlaps with the previous dimension label, or whether Wj is greater than Wgap. If so, move the dimension number of the current dimension label to the right by a distance D4. Otherwise, set j = j + 1 and return to step S43.

[0019] Further, in S2, before the grouping, it further includes: classifying the reset dimension labels according to the direction of the dimension line.

[0020] Further, the classifying the reset dimension labels according to the direction of the dimension line includes: obtaining the head and tail coordinates of the dimension line of the current dimension label to obtain the direction vector Vi of the dimension line, and calculating the included angle θ between Vi and the positive X-axis vector Vx;

[0021] If θ is equal to 0° or 180°, it is classified as an X-direction dimension label, that is, a dimension label parallel to the X-axis, and is included in the classification array vTypeX;

[0022] If θ is equal to 90° or 270°, it is classified as a Y-direction dimension label, that is, a dimension label parallel to the Y-axis, and is included in the classification array vTypeY;

[0023] If θ is greater than 0° and less than 90°, or θ is greater than 180° and less than 270°, it is classified as XY dimensioning, that is, dimensioning in the first and third quadrants, and is included in the classification array vTypeXY;

[0024] If θ is greater than 90° and less than 180° or θ is greater than 270° and less than 360°, it is classified as YX dimensioning, that is, dimensioning in the second and fourth quadrants, and is included in the classification array vTypeYX.

[0025] Furthermore, S2 includes: determining whether the current dimension annotation and the previous dimension annotation meet the same group requirement; if so, the two dimension annotations are determined to be in the same group; otherwise, they are not in the same group until all dimension annotations are traversed to form a group array; the same group requirement is that the rear dimension limit of the previous dimension coincides with the front dimension limit of the current dimension or is less than the set distance D1, and the dimension lines are parallel.

[0026] Furthermore, D2 and D4 are the sum of 0.5 times the width between the two dimension limits of the current dimension marking and the width of the current dimension number, and D3 is the height of the current dimension number plus 200 mm.

[0027] Further, D1 is set to a larger value between 1.0-1.5 times the width of the current size number and 300 mm.

[0028] The present invention also discloses a size number automatic avoidance system, comprising:

[0029] at least one processor; and at least one memory in communication with the processor, wherein:

[0030] The memory stores program instructions that can be executed by the processor, and the processor can execute the method by calling the program instructions.

[0031] The present invention also discloses a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions enable the computer to execute the method.

[0032] (III) Beneficial effects

[0033] The above technical solution of the present invention has the following advantages:

[0034] (1) The present invention automatically resets, groups, sorts and moves the dimension numbers of dimension annotations, so that the user only needs to select any dimension annotation to be processed, and the dimension annotations with overlapping dimension numbers can be quickly processed, thereby avoiding the repetitive work of manually moving dimension numbers, saving design time and improving design efficiency;

[0035] (2) The present invention also reduces the number of traversals and improves the traversal efficiency by classifying according to the direction of the dimension line. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present invention in any way. In the accompanying drawings:

[0037] Figure 1 A schematic diagram of the dimensions of the present invention;

[0038] Figure 2 A schematic diagram of a flow chart of a method for automatically avoiding size numbers according to an embodiment of the present invention;

[0039] Figure 3 A classification diagram of an embodiment of the present invention;

[0040] Figure 4 It is a schematic diagram of dimension marking after sorting and before moving processing according to an embodiment of the present invention;

[0041] Figure 5 This is a schematic diagram of dimension marking after movement processing according to an embodiment of the present invention;

[0042] Figure 6 The figure is a flow chart of the mobile processing according to the embodiment of the present invention. DETAILED DESCRIPTION

[0043] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0044] A method for automatically avoiding size numbers of the present invention, such as Figure 2 As shown, the following steps are included:

[0045] S1. Reposition the dimension number of the selected dimension mark to the middle position of the dimension;

[0046] Reset the dimension number of the dimension selected by the user so that the dimension number is located in the middle of the dimension.

[0047] S2, classifying the reset dimensioning according to the direction of the dimension line and grouping them according to the spacing;

[0048] The reset dimension annotations are grouped according to the spacing, including: traversing the dimension annotations of the current category, judging whether the current dimension annotation and the previous dimension annotation meet the same group requirement, if so, the two dimension annotations are judged to be in the same group, otherwise, they are not in the same group, until all dimension annotations are traversed to form a grouping array vGroup; wherein, the same group requirement of the dimension annotation is that the rear dimension limit of the previous dimension coincides with the front dimension limit of the current dimension or is less than the set distance D1, and the dimension lines are parallel. D1 is set to the larger value between 1.0-1.5 times the width of the current dimension number and 300mm.

[0049] Before grouping, the reset dimension annotations need to be classified according to the direction of the dimension line; including: obtaining the first and last coordinates of the dimension line of the current dimension annotation, obtaining the direction vector Vi of the dimension line, calculating the angle θ between Vi and the positive vector Vx of the X-axis, if θ is equal to 0° or 180°, it is classified as an X-direction dimension annotation, that is, a dimension annotation parallel to the X-axis, and included in the classification array vTypeX; if θ is equal to 90° or 270°, it is classified as a Y-direction dimension annotation, that is, a dimension annotation parallel to the Y-axis, and included in the classification array vTypeY ; If θ is greater than 0° and less than 90° or θ is greater than 180° and less than 270°, it is classified as XY dimensioning, that is, the dimensioning in the first and third quadrants, and is included in the classification array vTypeXY; if θ is greater than 90° and less than 180° or θ is greater than 270° and less than 360°, it is classified as YX dimensioning, that is, the dimensioning in the second and fourth quadrants, and is included in the classification array vTypeYX; thus forming four classification arrays vTypeX, vTypeY, vTypeXY, and vTypeYX, such as Figure 3 shown.

[0050] For similar dimension numbers, overlap is more likely to occur. By classifying them according to the direction of the dimension line, the number of traversals in subsequent steps is reduced, thereby improving traversal efficiency.

[0051] It is also possible to directly traverse all dimension annotations without classifying by the direction of the dimension line.

[0052] S3, sorting the dimension annotations in each group according to the distance from the coordinate origin;

[0053] Sort each group array vGroup according to the distance from the coordinate origin, such as Figure 4 As shown, it is convenient for subsequent overlap judgment and overlap processing.

[0054] S4, move the dimension numbers of each group of sorted dimension labels according to the width or overlap of the dimension numbers; after the movement processing, Figure 5 As shown, the mobile processing method is as follows Figure 6As shown below, specifically including:

[0055] S41. Traverse the grouped array to obtain the i-th array vGroup[i];

[0056] S42. Determine whether the quantity in the current array is empty. If not, traverse the N dimension annotations in the i-th array vGroup[i] to obtain the j-th dimension annotation in this array, where j ∈ [0, N - 1], and enter step S43. If so, end;

[0057] S43. Calculate the width Wgap between the two dimension limits of the current dimension annotation, and calculate the width Wj of the dimension number of the current dimension annotation;

[0058] S44. Judge the size of j. If j = 0, enter step S45; if 0 < j < N - 1, enter step S46; if j = N - 1, enter step S47; if j > N - 1, then i = i + 1, and return to step S42;

[0059] Since S42 has excluded the current array being empty, then N > 0, and j ∈ [0, N - 1]. In S44, when j is equal to 0, j represents the first dimension annotation in the sorted array; when j is greater than 0 and less than N - 1, j represents the dimension annotation in the middle position of the sorted array; when j is equal to N - 1, j represents the last dimension annotation in the sorted array; when j is greater than N - 1, it means that the dimension annotations of this array have been traversed, and enter the next array.

[0060] S45. Judge whether there is an overlap between the current dimension annotation and the dimension annotations of other groups, or whether Wj is greater than Wgap. If so, move the dimension number of the current dimension annotation to the left by a distance D2. Otherwise, do not process the dimension number of the current dimension annotation, let j = j + 1, and return to step S43;

[0061] When j represents the first dimension annotation in the sorted array, it is necessary to judge whether there is an overlap with the dimension annotations of other groups. If there is an overlap with the dimension annotations of other groups or Wj is greater than the width Wgap between the two dimension limits of the current dimension annotation, as long as one of them is satisfied, that is, there is an overlap with the dimension annotations of other groups, or the number of the current dimension annotation exceeds the dimension limit, then the dimension number of the current dimension annotation needs to be moved. Since it is the first dimension annotation, move the dimension number to the left by a distance D2. The moving distance D2 is adjusted according to the current dimension annotation, and is set to the sum of 0.5 times the width between the two dimension limits of the current dimension annotation and the width of the current dimension number.

[0062] S46, determine whether the current dimension mark overlaps with the previous dimension mark, or whether Wj is greater than Wgap, if so, the dimension number of the current dimension mark moves downward by a distance D3, otherwise the dimension number of the current dimension mark is not processed, set j=j+1, and return to step S43;

[0063] When j represents the dimension mark in the middle position of the sorted array, if it overlaps with the previous dimension mark or Wj is greater than the width Wgap between the two dimension limits of the current dimension mark, if either of the two is satisfied, the dimension number of the current dimension mark needs to be moved. Since it is the middle dimension mark, the dimension number is moved downward by a distance of D3. The moving distance D3 is adjusted according to the current dimension mark and is set to the height of the current dimension number plus 200mm.

[0064] S47, determine whether the current dimension mark overlaps with the previous dimension mark, or whether Wj is greater than Wgap, if so, the dimension number of the current dimension mark moves to the right by a distance D4, otherwise, the dimension number of the current dimension mark is not processed, set j=j+1, and return to step S43;

[0065] When j represents the last dimension annotation in the sorted array, if it overlaps with the previous dimension annotation or Wj is greater than the width Wgap between the two dimension boundaries, if either of the two is satisfied, the dimension number of the current dimension annotation needs to be moved. Since it is the last dimension annotation, the dimension number is moved D4 to the right. The moving distance D4 is adjusted according to the current dimension annotation and is set to the sum of 0.5 times the width between the two dimension boundaries of the current dimension annotation and the width of the current dimension number.

[0066] Through the movement processing of S45-S47, there is no overlap in the size numbers, such as Figure 5 shown.

[0067] Finally, it should be noted that the above method can be converted into software program instructions, which can be implemented by using a system including a processor and a memory, or by computer instructions stored in a non-transitory computer-readable storage medium. The above integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above software functional unit is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0068] In summary, the above-mentioned method and system for automatically avoiding size numbers have the following beneficial effects:

[0069] (1) The present invention automatically resets, groups, sorts and moves the dimension numbers of dimension annotations, so that the user only needs to select any dimension annotation to be processed, and the dimension annotations with overlapping dimension numbers can be quickly processed, thereby avoiding the repetitive work of manually moving dimension numbers, saving design time and improving design efficiency;

[0070] (2) The present invention also reduces the number of traversals and improves the traversal efficiency by classifying according to the direction of the dimension line.

[0071] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the embodiments of the present invention are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations shall fall within the scope defined by the appended claims.

Claims

1. A method for automatically avoiding size numbers, characterized in that: It includes the following steps: S1. Relocate the dimension figure of the selected dimension annotation to the middle position of the dimension; S2. Group the relocated dimension annotations according to the spacing; S3. Sort the dimension annotations in each group according to the distance from the coordinate origin; S4. Perform the movement processing of the dimension figure for the sorted dimension annotations in each group according to the width or overlapping situation of the dimension figure: S41. Traverse the grouped array to obtain the i-th array; S42. Determine whether the quantity in the current array is empty. If not, traverse the N dimension annotations in the i-th array to obtain the j-th dimension annotation in the array, where j ∈ [0, N - 1], and proceed to step S43. If so, end; S43. Calculate the width Wgap between the two dimension boundaries of the current dimension annotation, and calculate the width Wj of the dimension figure of the current dimension annotation; S44. Determine the value of j. If j = 0, proceed to step S45; if 0 < j < N - 1, proceed to step S46; if j = N - 1, proceed to step S47; if j > N - 1, then i = i + 1, and return to step S42; S45. Determine whether there is an overlap between the current dimension annotation and the dimension annotations in other groups, or whether Wj is greater than Wgap. If so, move the dimension figure of the current dimension annotation left by a distance D2. Otherwise, let j = j + 1, and return to step S43; S46. Determine whether there is an overlap between the current dimension annotation and the previous dimension annotation, or whether Wj is greater than Wgap. If so, move the dimension figure of the current dimension annotation down by a distance D3. Otherwise, let j = j + 1, and return to step S43; S47. Determine whether there is an overlap between the current dimension annotation and the previous dimension annotation, or whether Wj is greater than Wgap. If so, move the dimension figure of the current dimension annotation right by a distance D4. Otherwise, let j = j + 1, and return to step S43.

2. The automatic size number avoidance method according to claim 1, characterized in that: In S2, before the grouping, it further includes: classifying the relocated dimension annotations according to the direction of the dimension line.

3. The automatic size number avoidance method according to claim 2, characterized in that: The classifying the relocated dimension annotations according to the direction of the dimension line includes: obtaining the head and tail coordinates of the dimension line of the current dimension annotation to obtain the direction vector Vi of the dimension line, and calculating the included angle θ between Vi and the positive X-axis vector Vx; If θ is equal to 0° or 180°, it is classified as an X-direction dimension annotation, that is, a dimension annotation parallel to the X-axis, and is included in the classification array vTypeX; If θ is equal to 90° or 270°, it is classified as a Y-direction dimension annotation, that is, a dimension annotation parallel to the Y-axis, and is included in the classification array vTypeY; If θ is greater than 0° and less than 90°, or θ is greater than 180° and less than 270°, it is classified as an XY-direction dimension annotation, that is, a dimension annotation in the first and third quadrants, and is included in the classification array vTypeXY; If θ is greater than 90° and less than 180° or θ is greater than 270° and less than 360°, it is classified as a YX-direction dimension annotation, that is, a dimension annotation in the second and fourth quadrants, and is included in the classification array vTypeYX.

4. The automatic size number avoidance method according to claim 1, characterized in that: The S2 includes: determining whether the current dimension annotation and the previous dimension annotation meet the same group requirement; if so, the two dimension annotations are determined to be in the same group; otherwise, they are not in the same group until all dimension annotations are traversed to form a group array; the same group requirement is that the rear dimension limit of the previous dimension coincides with the front dimension limit of the current dimension or is less than a set distance D1, and the dimension lines are parallel.

5. The automatic size number avoidance method according to claim 1, characterized in that: D2 and D4 are the sum of 0.5 times the width between the two dimension limits of the current dimension marking and the width of the current dimension number, and D3 is the height of the current dimension number plus 200 mm.

6. The automatic size number avoidance method according to claim 4, characterized in that: The D1 is set to a larger value between 1.0-1.5 times the width of the current size number and 300 mm.

7. A size number automatic avoidance system, characterized in that: include: at least one processor; and at least one memory in communication with the processor, wherein: The memory stores program instructions executable by the processor, and the processor can execute the method according to any one of claims 1 to 6 by calling the program instructions.

8. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which cause the computer to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Automatic labeling and typesetting method for decoration drawings

    CN110598195A

  • Drawing size mark retrieval method and device, electronic equipment and storage medium

    CN114817604A

  • Method, apparatus, and system for object tracking and sensing using broadcasting

    US20190327124A1

Cited By

  • BIM (Building Information Modeling)-based pressurized air supply system diagram automatic drawing and intelligent labeling method and system

    CN121502896A