Wall distance recognition method, device, storage medium and processor in CAD

By reading layer information in CAD software and automatically identifying intersection objects, the problem of cumbersome and inaccurate wall distance measurement operations in CAD software is solved, and more efficient and accurate wall distance measurement is achieved, simplifying the acceptance process.

CN118427950BActive Publication Date: 2024-12-06SICHUAN SURVEYING & MAPPING PROD QUALITY SUPERVISION & INSPECTION STATION OF THE MINIST OF NATURAL RESOURCES SICHUAN SURVEYING & MAPPING PROD QUALITY SUPERVISION & INSPECTION STATION
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202410883167.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-12-06
Estimated Expiration
2044-07-03

AI Technical Summary

Technical Problem

The existing CAD software is cumbersome to measure wall distance during building acceptance, which is prone to finger touch deviations and inaccurate identification, and does not conform to the actual situation on site, resulting in high errors and work complexity.

Method used

By reading the layer information of the CAD drawing, picking points 1 and 2 form the first line segment, intersecting with the target wall, querying intersection points, building an intersection object set, selecting the intersection object with the minimum or maximum distance, and automatically calculating the wall distance. , supports a variety of measurement needs, such as the distance between the outer and inner walls.

Benefits of technology

It simplifies distance labeling and measurement operations, reduces finger touch deviation, improves measurement accuracy and work efficiency, reduces artificial errors, and adapts to different measurement needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118427950B_ABST
    Figure CN118427950B_ABST
Patent Text Reader

Abstract

The invention discloses a wall distance recognition method, device, storage medium and processor in CAD. The method comprises the following steps: reading layer information of a CAD drawing to be recognized; picking up point 1 and point 2 respectively, wherein a first line segment is formed between point 1 and point 2, and the first line segment intersects with a target wall; querying all straight lines intersecting with the first line segment in the layer information, extracting all intersections and calculating the first distance between the intersection and point 1, and constructing a first intersection object set; removing repeated intersections with equal first distances in the first intersection object set, and obtaining a second intersection object set; selecting intersection objects P1, P2, P3 and P4 with the smallest, largest, second smallest and second largest first distances in the second intersection object set in turn, and constructing a third intersection object set; if the third intersection object set only contains P1 and P2, drawing a first perpendicular line perpendicular to the straight line where P2 is located with P1 as the endpoint, judging whether the foot of the first perpendicular line is on the straight line where P2 is located, and if so, taking the length of the first perpendicular line as the wall distance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of CAD secondary development, and in particular to a wall distance recognition method, device, storage medium and processor in CAD. Background Art

[0002] With the widespread application of computer-aided design (CAD) technology, CAD drawings have been widely used in fields such as architecture, engineering, and manufacturing. Building acceptance refers to the process in which relevant departments, units, or individuals conduct a comprehensive inspection and evaluation of the quality, function, safety, etc. of a building project in accordance with relevant national and local laws, standards, and specifications after the completion of the construction, and determine whether it meets the design requirements and usage functions. Building acceptance is an important link in ensuring the quality and safety of construction projects, and is a prerequisite for construction projects to enter the use stage. Among them, the dimensional review of the distance between building walls is a very important part of the acceptance process, and the acceptance steps are summarized as follows:

[0003] The acceptance personnel use a computer or other equipment to open the relevant CAD drawings on site, view and identify the distances between the target walls on the design drawings through the CAD software, and then use professional measuring tools (such as tape measures, laser rangefinders, total stations, etc.) to measure the actual distance dimensions of the building walls. Finally, the actual dimensions measured on site are compared with the design dimensions identified on the CAD drawings one by one, the dimensional deviations are recorded, the causes of the deviations are analyzed, and it is determined whether they are within the allowable error range.

[0004] At present, most acceptance personnel bring portable devices such as tablet computers to the site to open relevant CAD drawings, and then use the touch screen to slide and view and mark the distance. This operation method has the following shortcomings: 1. Touch deviation: There may be a large deviation between the finger touch point and the actual target recognition point, especially on drawings with complex lines. In this case, it is difficult for the recognition point obtained by finger touch to accurately focus on the target recognition point, resulting in the acceptance personnel needing to make multiple adjustments and operations to select the correct point. 2. Cumbersome selection: The current mainstream CAD software is cumbersome to select recognition points when marking or measuring distances. Especially when measuring the distance between two parallel wall lines, CAD software usually requires operators to select two points perpendicular to each other on the two wall lines for measurement. This operation requires high precision and multiple adjustments, which increases the workload and operation complexity. 3. It does not conform to the actual situation on site: When there are no points perpendicular to each other on two parallel wall lines, the marking or measuring tools provided by the CAD software will automatically generate an extension line of one of the lines and find a vertical point on the extension line for measurement. However, this approach does not conform to the actual situation on site, because the actual wall is obviously impossible to be extended arbitrarily. Such measurement results are often inaccurate and cannot truly reflect the wall distance on site, causing errors and inconvenience to the acceptance work. Summary of the invention

[0005] In order to solve the above-mentioned deficiencies in the prior art, the present invention provides a method, device, storage medium and processor for identifying wall distance in CAD, specifically including:

[0006] The wall distance recognition method in CAD includes the following steps:

[0007] Read the layer information of the CAD drawing to be identified;

[0008] Picking up point 1 and point 2 on the CAD drawing to be identified respectively, wherein a first line segment is formed between point 1 and point 2, and the first line segment intersects with a target wall; the target wall includes at least one group of walls parallel to each other;

[0009] Searching the layer information for all straight lines intersecting the first line segment, extracting all intersection points, calculating a first distance between the intersection points and point 1, and constructing a first intersection point object set;

[0010] Removing duplicate intersections with the same first distance from the first intersection object set to obtain a second intersection object set;

[0011] Select the intersection objects P1, P2, P3 and P4 with the smallest, largest, second smallest and second largest first distances in sequence from the second intersection object set to construct a third intersection object set;

[0012] If the third intersection object set only includes P1 and P2, then draw a first perpendicular line segment perpendicular to the straight line where P2 is located with P1 as the endpoint, and determine whether the foot of the first perpendicular line segment is on the line segment where P2 is located. If so, the length of the first perpendicular line segment is used as the wall distance. If not, the minimum distance between P1 and the endpoints of the line segment where P2 is located is used as the wall distance.

[0013] In some preferred embodiments, if the third intersection object set includes P1, P2, P3 and P4, a second vertical line segment perpendicular to the straight line where P4 is located is drawn with P1 as the endpoint, and it is determined whether the foot of the second vertical line segment is on the line segment where P4 is located. If so, the length of the second vertical line segment is taken as the wall distance and the outer wall distance. If not, the minimum distance between P1 and the endpoints of the line segment where P4 is located is taken as the outer wall distance.

[0014] In some preferred embodiments, if the third intersection object set includes P1, P2, P3 and P4, a third vertical line segment perpendicular to the line segment where P3 is located is drawn with P1 as the endpoint, and it is determined whether the foot of the third vertical line segment is on the line segment where P3 is located. If so, the length of the third vertical line segment is used as the wall distance, which is the distance from the outer wall to the inner wall. If not, the minimum distance between P1 and the endpoints of the line segment where P3 is located is used as the distance from the outer wall to the inner wall.

[0015] In some preferred embodiments, if the third intersection object set includes P1, P2, P3 and P4, a fourth perpendicular line segment is made with P2 as the endpoint and perpendicular to the line segment where P3 is located, and it is determined whether the foot of the fourth perpendicular line segment is on the line segment where P3 is located. If so, the length of the fourth perpendicular line segment is taken as the wall distance and the inner wall distance. If not, the minimum distance between P2 and the endpoints of the line segment where P3 is located is taken as the inner wall distance.

[0016] In some preferred embodiments, if the third intersection object set includes P1, P2, P3 and P4, a fifth vertical line segment perpendicular to the straight line where P4 is located is drawn with P2 as the endpoint, and it is determined whether the foot of the fifth vertical line segment is on the line segment where P4 is located. If so, the length of the fifth vertical line segment is used as the wall distance, which is the distance from the inner wall to the outer wall. If not, the minimum distance between P2 and the endpoints of the line segment where P4 is located is used as the distance from the inner wall to the outer wall.

[0017] In some preferred embodiments, if the third intersection object set contains any of the following elements, the process ends:

[0018] The third intersection object set only includes P1 and P2;

[0019] The third intersection object set includes P1, P2, P3 and P4.

[0020] The present invention also provides a device, which is used to implement the wall distance recognition method in the above CAD.

[0021] The present invention also provides a storage medium, which includes a stored program, wherein the program executes the above-mentioned wall distance recognition method in CAD when running.

[0022] The present invention also provides a processor, which is used to run a program, wherein the program executes the above-mentioned wall distance recognition method in CAD when running.

[0023] Beneficial Effects

[0024] 1. The present invention simplifies the operational process of distance marking and measurement in CAD software. By intelligently identifying and selecting intersection objects, users do not need to select mutually perpendicular points on two wall lines for measurement, which greatly reduces the complexity of the operation. Especially when dealing with drawings with complicated lines, users only need to select two points on the drawings, and the system can automatically complete the subsequent intersection recognition and distance calculation, which significantly reduces the deviation between the finger touch point and the target recognition point and improves the accuracy of the measurement.

[0025] 2. The present invention covers various measurement requirements such as the distance between outer walls, the distance from outer walls to inner walls, the distance between inner walls, and the distance from inner walls to outer walls. By selecting different intersection objects in the intersection object set, users can flexibly respond to different measurement requirements and provide comprehensive dimension review support.

[0026] 3. The present invention improves the efficiency of acceptance work through automated and intelligent identification and measurement. Acceptance personnel can quickly complete the measurement and verification of wall distances without multiple adjustments and manual operations, which significantly shortens the acceptance time, improves overall work efficiency, and reduces human errors caused by manual operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic flow chart of a method for identifying wall distance in CAD provided in a preferred embodiment of the present invention;

[0028] Figure 2 This is a schematic diagram of picking up point 1 and point 2 on the CAD drawing to be identified to form a first line segment in a preferred embodiment of the present invention;

[0029] Figure 3 A schematic diagram of obtaining a second intersection object set in a preferred embodiment of the present invention;

[0030] Figure 4 A schematic diagram of obtaining a third intersection object set in a preferred embodiment of the present invention;

[0031] Figure 5 Schematic diagram of obtaining the wall distance in a preferred embodiment of the present invention Figure 1 ;

[0032] Figure 6 Schematic diagram of obtaining the wall distance in another preferred embodiment of the present invention Figure 2 ;

[0033] Figure 7 Schematic diagram of obtaining the outer wall distance in a preferred embodiment of the present invention Figure 1 ;

[0034] Figure 8 Schematic diagram of obtaining the outer wall distance in another preferred embodiment of the present invention Figure 2 ;

[0035] Fig. 9 Schematic diagram of obtaining the distance from the outer wall to the inner wall in a preferred embodiment of the present invention Figure 1 ;

[0036] Fig.10 Schematic diagram of obtaining the distance from the outer wall to the inner wall in another preferred embodiment of the present invention Figure 2 ;

[0037] Fig.11 Schematic diagram of obtaining the inner wall distance in a preferred embodiment of the present invention Figure 1 ;

[0038] Fig.12 Schematic diagram of obtaining the inner wall distance in another preferred embodiment of the present invention Figure 2 ;

[0039] Fig.13 Schematic diagram of obtaining the distance from the inner wall to the outer wall in a preferred embodiment of the present invention Figure 1 ;

[0040] Fig.14 Schematic diagram of obtaining the distance from the inner wall to the outer wall in another preferred embodiment of the present invention Figure 2 . DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention is further described below in conjunction with the accompanying drawings. In the description of the present invention, it should be understood that the terms "upper", "lower", "front", "back", "left", "right", "top", "bottom", "inside", "outside" and the like indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention.

[0042] like Figure 1 As shown, this embodiment provides a method for identifying wall distance in CAD, comprising the steps of:

[0043] S1. Read the layer information of the CAD drawing to be identified. The layer refers to a collection of graphic objects (lines, shapes, texts, symbols, etc.) that are preset when drawing with computer-aided design (CAD) software and contain at least one set of parameters. Each layer has a unique name for identifying and distinguishing different layers. The layer name is usually descriptive to a certain extent so as to clearly indicate the content or purpose of the layer. Commonly used names in this field include "wall", "electrical", "water supply and drainage", etc. The color, line type, line width and visibility of each layer can be set independently to facilitate designers to manage complex drawing content more efficiently and to view, edit and print conveniently. In the present invention, by reading the layer information, the line range of concern (such as "wall") can be quickly selected to exclude other irrelevant lines.

[0044] It should be understood that the method of the present invention is preferably used as a third-party plug-in of CAD software to provide additional functions. Therefore, when reading layer information, the programming interface (API) provided by the CAD software can be used to access and read the layer information. The calling methods mainly include dynamic link libraries (DLLs), ActiveX controls, and .NET plug-ins. Since this part of the content is not the focus of the present invention, it will not be repeated here. Those skilled in the art can choose the specific method for reading layer information according to the existing technology.

[0045] S2, such as Figure 2 As shown, point 1 and point 2 are picked up on the CAD drawing to be identified, and a first line segment is formed between point 1 and point 2, and the first line segment intersects with the target wall. Point 1 and point 2 are located at any position within the target identification area, and the selected position needs to ensure that the constructed line segment intersects with the target wall. The target wall includes at least one group of walls parallel to each other.

[0046] S3. Query the layer information for all straight lines intersecting the first line segment, extract all intersection points, calculate the first distance between the intersection points and point 1, and construct a first intersection point object set.

[0047] S4, removing the repeated intersections with the same first distance in the first intersection object set, and obtaining a second intersection object set, such as Figure 3 shown.

[0048] Those skilled in the art will know that when drawing architectural drawings, due to the drafting staff's misoperation and the limitations of the software composition, a line or wall is often drawn repeatedly. That is, from the displayed effect, there is only one line there, but in fact there may be multiple lines repeated there. In the CAD system, all lines are independent and unique. Therefore, in the subsequent distance calculation step, each repeated line is identified and calculated once, resulting in a waste of computing resources. For this reason, the above-mentioned deduplication step is required.

[0049] S5, such as Figure 4 As shown, the intersection objects P1, P2, P3 and P4 with the smallest, largest, second smallest and second largest first distances are selected in turn in the second intersection object set to construct a third intersection object set. It should be noted that when measuring the wall distance, the technicians in this field have four measurement requirements, namely the distance between the outer sides of the wall (outer wall distance), the distance between the outer side of the wall and the inner side of another wall (outer wall to inner wall distance), the distance between the inner sides of the wall (inner wall distance) and the distance between the inner side of the wall and the outer side of another wall (inner wall to outer wall distance). The intersection object selection in this step is based on these four requirements.

[0050] S6. If the third intersection point object set only includes P1 and P2, it means that there are only two intersecting straight lines. In this case, two endpoints are generally selected inside the wall. Then, take P1 as the endpoint to draw a first perpendicular line segment perpendicular to the straight line where P2 is located, and determine whether the foot of the first perpendicular line segment is on the line segment where P2 is located. If so, Figure 5 As shown, the length of the first vertical line segment is taken as the wall distance. If not, Figure 6 As shown, the minimum distance between the endpoints of the line segment where P1 and P2 are located is taken as the wall distance.

[0051] For two wall segments that do not have a perpendicular line to each other, if the distance measurement tool built into the CAD software is used, one of the wall segments will be automatically extended, and then the foot of the perpendicular will be found and the distance will be calculated. However, such an operation is obviously inconsistent with the actual situation on site, because the actual wall cannot be extended arbitrarily. Therefore, the present invention selects the distance between the end point closest to P1 on the line segment where P2 is located as the wall distance.

[0052] In some other preferred embodiments, a method for measuring the distance between the outer sides of the walls is also provided, which specifically includes:

[0053] S7. If the third intersection point object set includes P1, P2, P3 and P4, draw a second perpendicular line segment with P1 as the endpoint and perpendicular to the line where P4 is located, and determine whether the foot of the second perpendicular line segment is on the line segment where P4 is located. If so, Figure 7 As shown, the length of the second vertical line segment is taken as the wall distance and the outer wall distance. If not, as Figure 8 As shown, the minimum distance between the endpoints of the line segment where P1 and P4 are located is taken as the outer wall distance.

[0054] In some other preferred embodiments, a method for measuring the distance between the outer sides of the walls is also provided, which specifically includes:

[0055] If the third intersection point object set includes P1, P2, P3 and P4, draw a third perpendicular line segment with P1 as the endpoint and perpendicular to the line segment where P3 is located, and determine whether the foot of the third perpendicular line segment is on the line segment where P3 is located. If so, Fig. 9 As shown, the length of the third vertical line segment is taken as the wall distance as the distance from the outer wall to the inner wall. If not, as Fig.10 As shown, the minimum distance between the endpoints of the line segment where P1 and P3 are located is taken as the distance from the outer wall to the inner wall.

[0056] In some other preferred embodiments, a method for measuring the distance between the outer sides of the walls is also provided, which specifically includes:

[0057] If the third intersection object set includes P1, P2, P3 and P4, a fourth perpendicular line segment is drawn with P2 as the endpoint and perpendicular to the line segment where P3 is located, and it is determined whether the foot of the fourth perpendicular line segment is on the line segment where P3 is located. If so, Fig.11 As shown, the length of the fourth vertical line segment is taken as the wall distance and the inner wall distance. If not, as Fig.12 As shown, the minimum distance between the endpoints of the line segment where P2 and P3 are located is taken as the inner wall distance.

[0058] In some other preferred embodiments, a method for measuring the distance between the outer sides of the walls is also provided, which specifically includes:

[0059] If the third intersection point object set includes P1, P2, P3 and P4, draw a fifth perpendicular line segment with P2 as the endpoint and perpendicular to the line where P4 is located, and determine whether the foot of the fifth perpendicular line segment is on the line segment where P4 is located. If so, Fig.13 As shown, the length of the fifth vertical line segment is taken as the wall distance as the distance from the inner wall to the outer wall. If not, as Fig.14 As shown, the minimum distance between the endpoints of the line segment where P2 and P4 are located is taken as the distance from the inner wall to the outer wall.

[0060] In other preferred embodiments, it is considered that the user may make a mistake in selecting a point, resulting in the absence of a line segment intersecting the target wall, or the wall where the intersection of the intersecting line segments is located is intersecting or perpendicular. At this time, if the end condition of the process is not limited, there will be a program error or even fall into an infinite loop calculation. Therefore, this embodiment considers setting the termination condition of the process, which specifically includes:

[0061] If the third intersection object set contains any of the following elements, the process ends:

[0062] 1. The third intersection object set only includes P1 and P2;

[0063] 2. The third intersection object set includes P1, P2, P3 and P4.

[0064] That is, any intersection point set other than the two conditions specified by the present invention is excluded from the process to prevent errors and save computing resources. The technical considerations for such a setting are as follows: 1. The elements in the intersection point object set cannot be an odd number, because an odd number of elements represents an odd number of walls, and the wall thickness cannot be directly determined at this time, so it is not very meaningful in practical applications. 2. There must be an even number of points, that is, the above-mentioned situation of 2 elements and 4 elements.

[0065] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A wall distance recognition method in CAD, characterized in that: Includes steps: Read the layer information of the CAD drawing to be identified; Picking up point 1 and point 2 on the CAD drawing to be identified respectively, wherein a first line segment is formed between point 1 and point 2, and the first line segment intersects with a target wall; the target wall includes at least one group of walls parallel to each other; Searching the layer information for all straight lines intersecting the first line segment, extracting all intersection points, calculating a first distance between the intersection points and point 1, and constructing a first intersection point object set; Removing duplicate intersections with the same first distance from the first intersection object set to obtain a second intersection object set; Select the intersection objects P1, P2, P3 and P4 with the smallest, largest, second smallest and second largest first distances in sequence from the second intersection object set to construct a third intersection object set; If the third intersection object set only includes P1 and P2, then draw a first perpendicular line segment perpendicular to the straight line where P2 is located with P1 as the endpoint, and determine whether the foot of the first perpendicular line segment is on the line segment where P2 is located. If so, the length of the first perpendicular line segment is used as the wall distance. If not, the minimum distance between P1 and the endpoints of the line segment where P2 is located is used as the wall distance.

2. The method for identifying wall distance in CAD according to claim 1, characterized in that: Also includes the steps: If the third intersection object set includes P1, P2, P3 and P4, draw a second perpendicular line segment perpendicular to the straight line where P4 is located with P1 as the endpoint, and determine whether the foot of the second perpendicular line segment is on the line segment where P4 is located. If so, the length of the second perpendicular line segment is used as the wall distance and the outer wall distance. If not, the minimum distance between P1 and the endpoints of the line segment where P4 is located is used as the outer wall distance.

3. The wall distance recognition method in CAD according to claim 1, characterized in that: Also includes the steps: If the third intersection object set includes P1, P2, P3 and P4, draw a third vertical line segment perpendicular to the line segment where P3 is located with P1 as the endpoint, and determine whether the foot of the third vertical line segment is on the line segment where P3 is located. If so, the length of the third vertical line segment is used as the wall distance, which is the distance from the outer wall to the inner wall. If not, the minimum distance between P1 and the endpoints of the line segment where P3 is located is used as the distance from the outer wall to the inner wall.

4. The method for identifying wall distance in CAD according to claim 1, characterized in that: Also includes the steps: If the third intersection object set includes P1, P2, P3 and P4, draw a fourth perpendicular line segment perpendicular to the line segment where P3 is located with P2 as the endpoint, and determine whether the foot of the fourth perpendicular line segment is on the line segment where P3 is located. If so, the length of the fourth perpendicular line segment is used as the wall distance and the inner wall distance. If not, the minimum distance between P2 and the endpoints of the line segment where P3 is located is used as the inner wall distance.

5. The method for identifying wall distance in CAD according to claim 1, characterized in that: Also includes the steps: If the third intersection object set includes P1, P2, P3 and P4, draw a fifth perpendicular line segment perpendicular to the straight line where P4 is located with P2 as the endpoint, and determine whether the foot of the fifth perpendicular line segment is on the line segment where P4 is located. If so, the length of the fifth perpendicular line segment is used as the wall distance as the distance from the inner wall to the outer wall. If not, the minimum distance between P2 and the endpoints of the line segment where P4 is located is used as the distance from the inner wall to the outer wall.

6. The method for identifying wall distance in CAD according to claim 1, characterized in that: Also includes the steps: If the third intersection object set contains any of the following elements, the process ends: The third intersection object set only includes P1 and P2; The third intersection object set includes P1, P2, P3 and P4.

7. A device, characterized in that: The device is used to implement the method according to any one of claims 1 to 6.

8. A storage medium, characterized in that: The storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 6 when executed.

9. A processor, characterized in that: The processor is used to run a program, wherein the program executes the method according to any one of claims 1 to 6 when running.

Citation Information

Patent Citations

  • Full-automatic intelligent integrated formwork arranging system and method for construction engineering fabricated formworks

    CN105205198A

  • Center line and thickness extraction method and finite element grid automatic generation method

    CN111539064A

  • Airborne laser point cloud overlapping degree detection method and system

    CN111754535A

  • Method for identifying depth space of bedroom space in building major

    CN114494719A

  • Method for extracting feature point from side contour description data of automobile and method for classifying category

    JP2001282875A