CN114756928A - Wall identification method, computer equipment and readable storage medium - Google Patents

Wall identification method, computer equipment and readable storage medium Download PDF

Info

Publication number
CN114756928A
CN114756928A CN202210291833.2A CN202210291833A CN114756928A CN 114756928 A CN114756928 A CN 114756928A CN 202210291833 A CN202210291833 A CN 202210291833A CN 114756928 A CN114756928 A CN 114756928A
Authority
CN
China
Prior art keywords
wall
line
original
wall body
lines
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210291833.2A
Other languages
Chinese (zh)
Inventor
曾开发
吴彦鲲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Chenxi Information Technology Group Co ltd
Original Assignee
Fujian Chenxi Information Technology Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Chenxi Information Technology Group Co ltd filed Critical Fujian Chenxi Information Technology Group Co ltd
Priority to CN202210291833.2A priority Critical patent/CN114756928A/en
Publication of CN114756928A publication Critical patent/CN114756928A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/13Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads

Abstract

The application relates to the technical field of building design, in particular to a wall body identification method, computer equipment and a readable storage medium. The method of the present application comprises the steps of: acquiring required wall name labels, wall lines and door and window lines from a drawing; identifying all wall line groups consisting of two wall lines from the wall lines and generating an original wall body; dividing the door and window lines into a plurality of rectangular image blocks, wherein each door and window line in each image block at least has an intersection point which is intersected with other door and window lines in the image block, and the image block is a minimum rectangular area containing all the door and window lines in the image block; generating a supplementary wall connected with the original wall according to each image block; connecting or deleting the wall to obtain an identification wall; and acquiring the corresponding relation between the wall name label and the identified wall. The scheme can rapidly and efficiently identify the wall from the construction drawing by an automatic means, so that a manual processing mode is eliminated, and the working flow is simplified to improve the working efficiency.

Description

Wall identification method, computer equipment and readable storage medium
Technical Field
The application relates to the technical field of building design, in particular to a wall body identification method, computer equipment and a readable storage medium.
Background
In the field of building, it is very common to design construction drawings with design software such as CAD. At the stages of engineering budget, construction and the like, technicians analyze drawing information to perform works such as computation, inspection and the like, so that different legends need to be identified in a design drawing, and subsequent operations such as computation and the like are performed according to the legends. In practical application, because the design drawing adopts a overlooking angle, when the design drawing contains wall information and an embedded door or window is arranged on a wall, the position in the drawing can only reflect the specification information of the door or window, and can not reflect part of wall information above the actual door or above and below the window. The part of wall information is particularly important in subsequent operations such as calculation, computer modeling, construction and the like, and the traditional processing mode usually needs manual checking and calculation on the wall in the design drawing to obtain complete wall data information. Through manual identification calculation, not only is the efficiency low but also errors are very easy to occur. With the development of information technology, more and more people expect to get rid of manual processing modes and quickly identify complete wall data in drawings by using the computing power of a computer so as to improve the working efficiency and the life quality.
Disclosure of Invention
One of the objectives of the present invention is to overcome the above disadvantages and to provide a method for identifying a wall from a design drawing accurately and quickly by computer-aided automation.
In order to solve the technical problem, the invention provides a wall body identification method, which comprises the following steps:
acquiring required pixel elements from a drawing; the picture element comprises a wall name label, a wall line and a door and window line;
identifying all wall line groups consisting of two wall lines from the wall lines;
generating an original wall body according to the wall line group;
dividing the door and window lines into a plurality of rectangular picture blocks; each door and window line in the block at least has one intersection point which is intersected with other door and window lines in the block; the block is a minimum rectangular area containing all door and window lines in the block;
generating a supplementary wall connected with the original wall according to each image block;
connecting or deleting the wall to obtain an identification wall;
and acquiring the corresponding relation between the wall name label and the identification wall.
Further, the identifying all the wall line groups composed of two wall lines from the wall lines includes the following steps:
step 201, judging whether a first wall line and a second wall line meeting the conditions exist in the unprocessed wall lines, if so, executing step 202, otherwise, executing step 299; the satisfying conditions are as follows: the first wall line and the second wall line are parallel to each other, the projections of the first wall line and the second wall line are intersected, the distance is within the thickness threshold range, and the distance is the minimum;
step 202, determining whether the first wall line and the second wall line are completely projected, if yes, executing step 203, otherwise executing step 204; the complete projection means that the end points of the first wall line can be projected to the end points of the second wall line;
step 203, marking the first wall line and the second wall line as processed, taking the wall line group formed by the first wall line and the second wall line as the identified wall line group, and skipping to the step 201 to continue execution;
step 204, dividing the first wall line and/or the second wall line into a plurality of line segments according to the projection point of the first wall line end point projected to the second wall line and the projection point of the second wall line end point projected to the first wall line;
step 205, judging whether unprocessed line segments exist, if so, taking the unprocessed line segments as current processed line segments, and executing step 206, otherwise, executing step 208; one end point of the unprocessed line segment is a projection point, and the other end point of the unprocessed line segment is an end point of the first wall line or the second wall line;
step 206, judging whether a corresponding wall line which is parallel to the current processing section, has a projection intersecting with the current processing section and has a distance within a thickness threshold range and a minimum distance exists in the unprocessed wall lines, if so, executing step 207, otherwise, executing step 205;
step 207, marking the current processing line segment and the corresponding wall line as processed, taking the wall line group formed by the current processing line segment and the corresponding wall line as the identified wall line group, and skipping to step 205 to continue execution;
step 208, marking the first wall line and the second wall line as processed, taking the part of the first wall line and the second wall line, which is cut off the processed line segments, as the identified wall line group, and skipping to the step 201 to continue execution;
and step 299, identifying the wall line group is finished.
Further, the generating a supplementary wall connected to the original wall according to each of the image blocks includes the following steps:
step 501, judging whether unprocessed image blocks exist, if yes, executing step 502, otherwise, executing step 599;
step 502, obtaining an unprocessed image block as a current processing image block;
step 503, calculating an angle set corresponding to the current processing block according to the door and window lines in the current processing block;
step 504, expanding the rectangular region of the image block according to a set threshold value;
step 505, judging whether an original wall body exists in the expanded rectangular area, if so, executing step 506, otherwise, executing step 501;
step 506, calculating wall angles corresponding to all original walls in the expanded rectangular area, and excluding the walls with the wall angles not in the angle set corresponding to the current processing image block; the wall body angle refers to an angle value of a smaller included angle between a wall center line and a transverse axis of a coordinate system, wherein any point on the wall center line is taken as the origin of a rectangular coordinate system;
step 507, grouping the original walls, specifically: if the wall center lines of two original wall bodies are parallel and the vertical distance of the wall center lines is less than or equal to half of the wall thickness of the thicker original wall body, dividing the two original wall bodies into the same group; otherwise, dividing each original wall into a group;
step 508, simplifying the original wall in each group, specifically: if the grouping comprises more than two original walls, firstly keeping the two original walls closest to the current processing image block, and deleting the rest original walls; judging whether the two original walls have intersected wall parts, and only keeping the original wall closest to the current processing image block;
step 509, judging whether an unprocessed packet exists, if so, executing step 510, otherwise, executing step 501;
step 510, obtaining an unprocessed packet as a current processed packet;
step 511, judging whether two original walls exist in the current processing group, if so, executing step 512, otherwise, executing step 513;
step 512, generating a supplementary wall between the two original walls; the wall center line of the supplementary wall body is positioned on an extension line extending from the wall center line of the first original wall body to the direction of the other original wall body; the starting point of the wall center line of the supplementary wall body is the end point of the first original wall body center line close to the other original wall body, and the end point is the projection point of the end point of the other original wall body close to the first original wall body on the extension line of the center line of the first original wall body; the thickness of the supplementary wall body is the same as that of the first original wall body; the first original wall body is an original wall body with the thickness closer to the thickness of the current processing image block; skipping to step 509 to continue execution;
step 513, determining whether the door and window line in the current processing image block includes an arc, if yes, executing step 514, otherwise, executing step 516;
step 514, generating a connecting line from the end point of the arc to the circle center of the arc;
step 515, judging whether a connecting line which can be projected on the section of the original wall body perpendicular to the center line of the wall exists or not, if so, executing step 516, otherwise, executing step 509;
step 516, generating a supplementary wall; the wall center line of the supplementary wall body is on an extension line of the original wall body center line extending to the direction of the current processing block; the starting point of the wall center line of the supplementary wall body is an end point of the original wall body center line, which is closer to the current processing image block, and the end point is a farthest projection point of all points on the current processing image block on the extension line of the original wall body center line; the thickness of the supplementary wall body is the same as that of the original wall body; skipping to step 509 to continue execution;
and 599, finishing the processing of the supplementary wall.
Further, the calculating the angle set corresponding to the current processing image block according to the door and window line in the current processing image block specifically includes:
if the door and window line is a line segment, taking any point on the line segment as the origin of the rectangular coordinate system, calculating the angle value of the line segment with a smaller included angle with the transverse axis of the coordinate system, and adding the angle value and the angle value which is greater than the angle value by 90 degrees into the angle set corresponding to the image block;
if the door and window lines are circular arcs, respectively taking two starting points of the circular arcs as tangent points to generate tangent lines of the circular arcs, taking any point on the tangent lines as the origin of a rectangular coordinate system, calculating an angle value of a smaller included angle between the tangent lines and the transverse axis of the coordinate system, and adding the angle value and an angle value greater than the angle value by 90 degrees into an angle set corresponding to the image block.
Further, the method for obtaining the identification wall after communicating or deleting the wall specifically comprises the following steps:
combining an original wall body or a supplementary wall body which has the same wall thickness, the wall center lines of which are on the same straight line, and the distance between the nearest end points of the two wall center lines is within a set threshold range into a wall body;
deleting original walls or supplementary walls that are completely contained by other walls.
Further, the obtaining of the corresponding relationship between the wall name label and the identification wall specifically includes:
step 701, judging whether unprocessed wall names are marked, if so, executing step 702, otherwise, executing 799;
step 702, selecting an unprocessed wall name label as a currently processed wall name label;
step 703, judging whether the currently processed wall name label contains a line segment, if so, executing step 707, otherwise, executing step 704;
step 704, extending the length of the identified wall body to two sides along the center line of the wall by a set length;
705, judging whether the name label of the currently processed wall is intersected with the expanded identification wall, if so, executing 706, otherwise, executing 701;
step 706, selecting an identification wall body with the wall center line direction the same as the current processing wall body name labeling direction and the closest distance, and establishing the corresponding relation between the current processing wall body name labeling and the identification wall body; jumping to the step 701 to continue execution;
step 707, selecting an identification wall intersected with the line segment, and establishing a corresponding relation between the name label of the currently processed wall and the identification wall; jumping to the step 701 to continue execution;
and 799, ending the process.
Accordingly, the present application also provides a computer device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the wall identification method of any of the preceding claims when executing the computer program.
Accordingly, the present application also provides a computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of the wall identification method according to any one of the preceding claims.
According to the technical scheme, an original wall body is generated by identifying a wall line group consisting of two wall lines from a wall line in a drawing; dividing the door and window lines into a plurality of rectangular image blocks, and generating a supplementary wall body connected with the original wall body according to each image block; and communicating or deleting the wall to obtain the final identification wall. The method can accurately generate the missing wall information above the picture paper or above and below the window, can solve the problems of low efficiency and easy error in identifying and calculating the complete information of the wall in the building drawing by manual method, is suitable for most design drawings on the market, has high identification rate and high identification speed, simplifies the operation process of the user, and improves the working efficiency.
Drawings
Fig. 1 is a flow chart illustrating steps of a wall identification method according to the present invention.
FIG. 2 is a flowchart illustrating the steps of the present invention for identifying all wall wire sets from two wall wires.
FIG. 3 is a schematic view of the present invention showing the first wall line and the second wall line completely projected.
FIG. 4 is a schematic view of the present invention where the first wall line and the second wall line are not fully projected.
FIG. 5 is a diagram of the present invention for generating an original wall from a group of wall lines.
FIG. 6 is a schematic view of a window/door line according to the present invention.
FIG. 7 is a flow chart of the steps of the present invention for generating a supplemental wall connected to an original wall from tiles.
FIG. 8 is a diagram illustrating a first angle corresponding to a calculated image block according to the present invention.
FIG. 9 is a diagram illustrating an angle corresponding to a calculated image block according to the present invention.
FIG. 10 is a schematic diagram of the present invention grouping original walls.
FIG. 11 is a schematic view of the present invention creating a supplemental wall between two original walls.
FIG. 12 is a schematic view of the present invention for creating a supplemental wall.
Fig. 13 is a schematic diagram of the present invention for creating a complementary wall.
FIG. 14 is a flowchart illustrating steps of obtaining a correspondence between a wall name label and an identified wall according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
As shown in fig. 1, the method for identifying a wall according to the present invention includes the following steps:
step 1, acquiring required pixel elements from a drawing; the primitive elements comprise wall name labels, wall lines and door and window lines.
It should be noted that, in a design drawing in the technical field of building design, different legend elements are usually designed in different layers, for example, a wall layer only includes information related to a wall, including name labeling information of the wall, a pull line, a wall line, and the like, and for example, a steel bar layer only includes information related to steel bars, and a beam element also has a separate layer. In the scheme, only the wall is identified, so that only the layer and the door and window line of the wall in the drawing need to be designed, and other legend elements are not needed. Wherein, the map layer of the wall comprises wall name labels and wall lines.
And 2, identifying all wall line groups consisting of two wall lines from the wall lines. Since the wall line in the design drawing corresponds to one surface of the wall body, it is first necessary to find out two wall lines that may form one wall body from all the wall lines, as shown in fig. 2, which is a flow chart of the steps of the present invention to identify all the wall line groups formed by two wall lines from the wall lines, including the following steps:
step 201, judging whether a first wall line and a second wall line meeting the conditions exist in the unprocessed wall lines, if so, executing step 202, otherwise, executing step 299; the first wall line and the second wall line are parallel to each other, the projections of the first wall line and the second wall line are intersected, the distance is within the thickness threshold range, and the distance is the minimum. It should be noted that, the scheme of this application is only directed at two walls that the wall is parallel to each other, and does not include other irregular structure walls, such as arc wall. In addition, the first wall line and the second wall line described in the present application may be projected to intersect, which means that a small segment of line segment may be found on the first wall line, and both endpoints of the line segment may be projected to the second wall line, otherwise, a small segment of line segment may also be found on the second wall line, and both endpoints of the line segment may be projected to the first wall line. In particular embodiments, the threshold range of wall thickness is generally set according to building codes. Meanwhile, if one wall line exists which can be parallel to a plurality of other wall lines and the projection intersects with the wall lines, and the distance is within the thickness threshold range, the wall line with the minimum distance is taken, wherein the distance between the parallel lines refers to the length of a common vertical line segment between the two.
Step 202, determining whether the first wall line and the second wall line are completely projected, if yes, executing step 203, otherwise executing step 204; the complete projection means that the end points of the first wall line can be projected onto the end points of the second wall line.
Step 203, if the first wall line and the second wall line are completely projected, the first wall line and the second wall line are the most perfectly matched wall lines, the first wall line and the second wall line are marked as processed, the wall line group formed by the first wall line and the second wall line is used as the identified wall line group, and the step 201 is skipped to be continuously executed;
step 204, dividing the first wall line and/or the second wall line into a plurality of line segments according to the projection point of the first wall line end point on the second wall line and the projection point of the second wall line end point on the first wall line;
step 205, judging whether unprocessed line segments exist, if so, taking the unprocessed line segments as current processed line segments, and executing step 206, otherwise, executing step 208; one end point of the unprocessed line segment is a projection point, and the other end point of the unprocessed line segment is an end point of the first wall line or the second wall line;
step 206, judging whether a corresponding wall line which is parallel to the current processing line, has a projection intersecting with the current processing line, has a distance within a thickness threshold range and has a minimum distance exists in the unprocessed wall lines, if so, executing step 207, otherwise, executing step 205;
step 207, marking the current processing line segment and the corresponding wall line as processed, taking the wall line group formed by the current processing line segment and the corresponding wall line as the identified wall line group, and skipping to step 205 to continue execution;
step 208, marking the first wall line and the second wall line as processed, taking the part of the first wall line and the second wall line, which is cut off the processed line segments, as the identified wall line group, and skipping to the step 201 to continue execution;
and step 299, identifying the wall line group is finished. After the steps are completed, all the two wall surface line combinations which can form a wall body can be found out from the wall surface lines.
In an embodiment, as shown in fig. 3, the first wall line and the second wall line are completely projected, wherein an end point a of the first wall line may be projected onto an end point C of the second wall line, and an end point B of the first wall line may be projected onto an end point D of the second wall line, and a wall line group formed by the first wall line and the second wall line is taken as the identified wall line group.
In another specific embodiment, as shown in fig. 4, it is a schematic diagram that the first wall line and the second wall line are not completely projected, in the diagram, a projection point of an end point a of the first wall line AB on the second wall line CD is F, a projection point of an end point D of the second wall line CD on the first wall line AB is E, at this time, the first wall line AB is divided into line segments AE and EB, the second wall line CD is divided into line segments CF and FD, and the line segments EB and CF are unprocessed line segments described in the step. And regarding the line segment EB, if a corresponding wall line GH which is parallel to the EB, has a projection intersection, has a distance within a thickness threshold range and has a minimum distance exists in the unprocessed wall lines, the current processed line segment EB and the corresponding wall line GH are marked as processed, and the wall line group formed by the processed line segment EB and the corresponding wall line GH is used as the identified wall line group. For the segment CF, since there is no corresponding wall line which is parallel to the CF, has a projection intersecting with the CF, has a distance within a thickness threshold range, and has a minimum distance, among unprocessed wall lines, the first wall line AB and the second wall line CD are identified as processed, and the remaining part AE of the first wall line after the processed segment EB is cut off and the second wall line CD are taken as an identified wall line group.
And 3, generating an original wall body according to the wall line group. Specifically, two end points of the first wall line are projected onto the second wall line respectively, and the obtained projection point is on the second wall line or the extension line thereof. And taking the maximum rectangular area consisting of the end points or projection points of the first wall line and the second wall line as the original wall body. As shown in fig. 5, the original wall body generated by the set of wall lines consisting of the first wall line AB and the second wall line CD is a rectangular area GCFB.
And 4, dividing all the door and window lines into a plurality of rectangular image blocks according to the connection condition of the door and window lines, wherein each door and window line in each image block at least has one intersection point intersected with other door and window lines in the image block, namely, no independent door and window line intersected with other door and window lines exists in the image block. The rectangular picture block is a minimum rectangular area containing all door and window lines in the picture block. As shown in fig. 6, wherein the solid lines represent intersecting hatch lines and the peripheral dashed boxes represent the tile area extents.
And 5, generating a supplementary wall body connected with the original wall body according to each image block. As shown in fig. 7, it is a flowchart of the steps of generating a supplementary wall connected to an original wall according to blocks, and the method includes the following steps:
step 501, judging whether unprocessed image blocks exist, if yes, executing step 502, otherwise, executing step 599;
step 502, acquiring an unprocessed image block as a current processing image block;
step 503, calculating an angle set corresponding to the current processing block according to the door and window line in the current processing block, specifically:
if the door and window line is a line segment, taking any point on the line segment as the origin of the rectangular coordinate system, calculating the angle value of the line segment with a smaller included angle with the transverse axis of the coordinate system, and adding the angle value and the angle value which is greater than the angle value by 90 degrees into the angle set corresponding to the image block. As shown in fig. 8, a line segment AB in the graph is a door and window line, any point on the line segment is taken as the origin of the rectangular coordinate system, the angle value of the smaller included angle between the line segment and the horizontal axis of the coordinate system is 26.7 degrees, and 26.7 degrees and 116.7 degrees are added to the angle set corresponding to the block.
If the door and window lines are arcs, respectively taking two starting points of the arcs as tangent points to generate tangent lines of the arcs, taking any point on the tangent lines as the origin of a rectangular coordinate system, calculating the angle value of the tangent line with a smaller included angle with the transverse shaft of the coordinate system, and adding the angle value and the angle value which is greater than the angle value by 90 degrees into an angle set corresponding to the image block. As shown in fig. 9, a circular arc line AB in the figure is a door and window line, any point of the arc line AB on a tangent line AO of which a is a tangent point is taken as an origin of a rectangular coordinate system, and an angle value of a smaller included angle between the tangent line and a horizontal axis of the coordinate system is 40.8 degrees, and then 40.8 degrees and 130.8 degrees are added to an angle set corresponding to the block. In a similar way, an angle value of a smaller included angle between the tangent line and the transverse axis of the coordinate system is calculated by taking any point on the tangent line taking the B as the tangent point as the origin of the rectangular coordinate system, and the angle value which is greater than the angle value by 90 degrees are added into the angle set corresponding to the image block.
And step 504, expanding the rectangular region of the image block according to a set threshold value. In a preferred embodiment, the expansion threshold can be set to 50mm, that is, the rectangular area frame of the block is expanded by 50mm upward, downward, leftward, rightward, leftward, and rightward.
Step 505, judging whether an original wall body exists in the expanded rectangular area, if so, executing step 506, otherwise, executing step 501;
step 506, calculating wall angles corresponding to all original walls in the expanded rectangular area, and excluding the walls with the wall angles not in the angle set corresponding to the current processing image block; the wall body angle refers to an angle value of a point arbitrarily selected on a wall center line as the origin of a rectangular coordinate system, and the wall center line and a transverse axis of the coordinate system form a smaller included angle. For example, if the calculated wall angle is 45 degrees and there is no angle value of 45 degrees in the angle set corresponding to the current processing tile, the wall is excluded.
Step 507, grouping the original walls, specifically: if the wall center lines of two original wall bodies are parallel and the vertical distance of the wall center lines is less than or equal to half of the wall thickness of the thicker original wall body, dividing the two original wall bodies into the same group; otherwise, each original wall is divided into a group separately. As shown in fig. 10, the original wall ABCD and the original wall EFGH have their wall center lines parallel to each other, and the perpendicular distance between the center lines is less than half of the strength and thickness of the thicker original wall ABCD, so that the original wall ABCD and the original wall EFGH are grouped into the same group.
Step 508, simplifying the original wall in each group, specifically: if the grouping comprises more than two original walls, firstly keeping the two original walls closest to the current processing image block, and deleting the rest original walls; the distance between the original wall and the current processing block is the minimum distance between a point on the original wall and a point on the door and window line in the current processing block. And judging whether the two original walls have intersected wall parts, which is the condition that the two original walls do not exist in practice, and only keeping one original wall closest to the current processing image block.
Step 509, judging whether an unprocessed packet exists, if so, executing step 510, otherwise, executing step 501;
step 510, obtaining an unprocessed packet as a current processed packet;
step 511, judging whether two original walls exist in the current processing group, if so, executing step 512, otherwise, executing step 513;
step 512, generating a supplementary wall between the two original walls; the wall center line of the supplementary wall body is positioned on an extension line extending from the wall center line of the first original wall body to the direction of the other original wall body; the starting point of the wall center line of the supplementary wall body is the end point of the first original wall body center line close to the other original wall body, and the end point is the projection point of the end point of the other original wall body close to the first original wall body on the extension line of the center line of the first original wall body; the thickness of the supplementary wall body is the same as that of the first original wall body; the first original wall body is an original wall body with the thickness closer to the thickness of the current processing image block; jump to step 509 to continue execution. The thickness of the current processing block refers to the maximum distance between two projection points after all points on all door and window lines in the block are projected on a straight line perpendicular to the center line of the original wall. As shown in fig. 11, the first original wall ABCD is an original wall having a thickness closer to the thickness of the currently processed tile, two end points of the wall centerline of the first original wall are O1 and O2, and end points of the wall centerline of the other original wall are O3 and O4, so that the wall centerline of the supplementary wall is on an extension line extending from the wall centerline of the first original wall to the direction of the other original wall; the starting point of the wall center line of the supplementary wall body is an endpoint O2 of the first original wall body center line close to the other original wall body, and the endpoint is a projection point O4 of an endpoint O3 of the other original wall body close to the first original wall body on the extension line of the first original wall body center line; the thickness of the supplementary wall DCFE is the same as that of the first original wall ABCD.
Step 513, determining whether the door and window line in the current processing image block includes an arc, if yes, executing step 514, otherwise, executing step 516;
step 514, generating a connecting line from the end point of the arc to the center of the arc;
step 515, judging whether a connecting line which can be projected on the section of the original wall body perpendicular to the center line of the wall exists or not, if so, executing step 516, otherwise, executing step 509;
step 516, generating a supplementary wall; the wall center line of the supplementary wall body is on an extension line of the original wall body center line extending to the direction of the current processing block; the starting point of the wall center line of the supplementary wall body is an end point of the original wall body center line close to the current processing image block, and the end point is the farthest projection point of all points on the current processing image block on the extension line of the original wall body center line; the thickness of the supplementary wall body is the same as that of the original wall body; jumping to step 509 to continue execution;
in a specific embodiment, the door and window lines in the processing blocks include circular arcs, as shown in fig. 12, the endpoints of the circular arcs are S1 and S2, and a connection line from the endpoint of the circular arc to the center O of the circular arc is generated, at this time, it is determined that all points on the connection line between the endpoint of the circular arc S1 and the circular point O can be projected on the cross section AB of the original wall body perpendicular to the center line of the wall, and then the center line of the wall for generating the supplemental wall EFBA is on the extension line of the center line of the ABCD wall of the original wall body extending toward the direction of the current processing block; the starting point of the wall center line of the supplement wall body EFBA is an end point O1 of the original wall body ABCD wall center line, which is closer to the current processing block, and the end point is a furthest projection point O3 of all points on the current processing block on the extension line of the original wall body ABCD wall center line; the thickness of the supplementary wall EFBA is the same as that of the original wall ABCD.
In another embodiment, in which the fenestration lines in the processing block do not include circular arcs, as shown in fig. 13, the wall centerline of the generated complementary wall EFBA is on an extension of the original wall ABCD wall centerline toward the direction of the processing block; the starting point of the wall center line of the supplement wall body EFBA is an end point O1 of the original wall body ABCD wall center line, which is closer to the current processing block, and the end point is a furthest projection point O3 of all points on the current processing block on the extension line of the original wall body center line; the thickness of the supplementary wall EFBA is the same as that of the original wall ABCD.
And step 599, finishing the processing of the supplementary wall.
And 6, communicating or deleting the wall to obtain an identification wall, which specifically comprises the following steps: and combining the original wall bodies or the supplementary wall bodies which have the same wall thickness, have the same wall center line on the same straight line, and have the distance between the nearest end points of the two wall center lines within the range of the set threshold value into the same wall body, and then deleting the original wall bodies or the supplementary wall bodies which are completely contained by other wall bodies.
And 7, acquiring the corresponding relation between the wall name label and the identified wall. After all the wall bodies are identified, the wall body name labels are associated with the wall bodies, so that the wall body names and other wall body parameter specifications can be obtained. As shown in fig. 14, it is a flowchart of the step of obtaining the corresponding relationship between the wall name label and the identified wall according to the present invention, and specifically includes:
step 701, judging whether unprocessed wall names are marked, if so, executing step 702, otherwise, executing 799;
step 702, selecting an unprocessed wall name label as a currently processed wall name label;
step 703, judging whether the currently processed wall name label contains a line segment, if so, executing step 707, otherwise, executing step 704;
step 704, extending the length of the identified wall body to two sides along the center line of the wall by a set length;
705, judging whether the name label of the currently processed wall is intersected with the expanded identification wall, if so, executing 706, otherwise, executing 701;
step 706, selecting an identification wall body with the wall center line direction the same as the marking direction of the currently processed wall body name and the closest distance, and establishing the corresponding relation between the name marking of the currently processed wall body and the identification wall body; skipping to step 701 to continue execution;
707, selecting an identification wall intersected with the line segment, and establishing a corresponding relation between the name label of the currently processed wall and the identification wall; jumping to the step 701 to continue execution;
and 799, ending the processing.
According to the technical scheme, an original wall body is generated by identifying a wall line group consisting of two wall lines from a wall line in a drawing; dividing the door and window line into a plurality of rectangular blocks, and generating a supplementary wall connected with the original wall according to each block; and communicating or deleting the wall to obtain the final identification wall. The method can accurately generate the missing wall information above the picture paper or above and below the window, can solve the problems of low efficiency and easy error in identifying and calculating the complete information of the wall in the building drawing by manual method, is suitable for most design drawings on the market, has high identification rate and high identification speed, simplifies the operation process of the user, and improves the working efficiency.
Example two
The present embodiment also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of multiple servers) capable of executing a program, and the like. The computer device of the embodiment at least includes but is not limited to: a memory, a processor communicatively coupled to each other via a system bus. In some embodiments, the storage may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device, or may be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card, or the like equipped on the computer device. The processor may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data Processing chip for controlling the overall operation of the computer device. Specifically, in this embodiment, the processor is configured to run a computer program stored on the memory, and when the processor executes the computer program, the processor implements the steps of any one of the wall identification methods described above.
EXAMPLE III
The present embodiment also provides a computer readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card type memory, (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App, etc., having stored thereon a computer program, wherein the program when executed by a processor implements the steps of the wall identification method according to any one of the above.
The above embodiments are merely illustrative of the technical solutions of the present invention, and the present invention is not limited to the above embodiments, and any modifications or alterations according to the principles of the present invention should be within the protection scope of the present invention.

Claims (8)

1. A wall body identification method is characterized by comprising the following steps:
acquiring required pixel elements from a drawing; the picture element comprises a wall name label, a wall line and a door and window line;
identifying all wall line groups consisting of two wall lines from the wall lines;
generating an original wall body according to the wall line group;
dividing the door and window lines into a plurality of rectangular picture blocks; each door and window line in the block at least has one intersection point which is intersected with other door and window lines in the block; the block is a minimum rectangular area containing all door and window lines in the block;
generating a supplementary wall connected with the original wall according to each image block;
connecting or deleting the wall to obtain an identification wall;
and acquiring the corresponding relation between the wall name label and the identified wall.
2. The method for identifying a wall according to claim 1, wherein the step of identifying all the wall line groups consisting of two wall lines from the wall lines comprises the following steps:
step 201, judging whether a first wall line and a second wall line meeting the conditions exist in the unprocessed wall lines, if so, executing step 202, otherwise, executing step 299; the satisfying conditions are as follows: the first wall line and the second wall line are parallel to each other, the projections of the first wall line and the second wall line are intersected, the distance is within the thickness threshold range, and the distance is the minimum;
step 202, judging whether the first wall line and the second wall line are completely projected, if so, executing step 203, otherwise, executing step 204; the complete projection means that the end points of the first wall line can be projected onto the end points of the second wall line;
step 203, marking the first wall line and the second wall line as processed, taking the wall line group formed by the first wall line and the second wall line as the identified wall line group, and skipping to the step 201 to continue execution;
step 204, dividing the first wall line and/or the second wall line into a plurality of line segments according to the projection point of the first wall line end point on the second wall line and the projection point of the second wall line end point on the first wall line;
step 205, judging whether unprocessed line segments exist, if so, taking the unprocessed line segments as current processed line segments, and executing step 206, otherwise, executing step 208; one end point of the unprocessed line segment is a projection point, and the other end point of the unprocessed line segment is an end point of the first wall line or the second wall line;
step 206, judging whether a corresponding wall line which is parallel to the current processing line, has a projection intersecting with the current processing line, has a distance within a thickness threshold range and has a minimum distance exists in the unprocessed wall lines, if so, executing step 207, otherwise, executing step 205;
step 207, marking the current processing line segment and the corresponding wall line as processed, taking the wall line group formed by the current processing line segment and the corresponding wall line as the identified wall line group, and skipping to step 205 to continue execution;
step 208, marking the first wall line and the second wall line as processed, taking the part of the first wall line and the second wall line, which is cut off the processed line segments, as the identified wall line group, and skipping to the step 201 to continue execution;
and step 299, identifying the wall line group is finished.
3. The method for identifying a wall body according to claim 1, wherein the step of generating a supplementary wall body connected with the original wall body according to each picture block comprises the following steps:
step 501, judging whether unprocessed image blocks exist, if yes, executing step 502, otherwise, executing step 599;
step 502, obtaining an unprocessed image block as a current processing image block;
step 503, calculating an angle set corresponding to the current processing image block according to the door and window lines in the current processing image block;
step 504, expanding the rectangular region of the image block according to a set threshold value;
step 505, judging whether an original wall body exists in the expanded rectangular area, if so, executing step 506, otherwise, executing step 501;
step 506, calculating wall angles corresponding to all original walls in the expanded rectangular area, and excluding the walls with the wall angles not in the angle set corresponding to the current processing image block; the wall body angle refers to an angle value of a smaller included angle between a wall center line and a transverse axis of a coordinate system, wherein any point on the wall center line is taken as the origin of a rectangular coordinate system;
step 507, grouping the original walls, specifically: if the wall center lines of two original wall bodies are parallel and the vertical distance of the wall center lines is less than or equal to half of the wall thickness of the thicker original wall body, dividing the two original wall bodies into the same group; otherwise, dividing each original wall into a group;
step 508, simplifying the original wall in each group, specifically: if the grouping comprises more than two original walls, firstly keeping the two original walls closest to the current processing image block, and deleting the rest original walls; judging whether the two original walls have intersected wall parts, and only keeping the original wall closest to the current processing image block;
step 509, judging whether an unprocessed packet exists, if so, executing step 510, otherwise, executing step 501;
step 510, acquiring an unprocessed packet as a current processing packet;
step 511, judging whether two original walls exist in the current processing group, if so, executing step 512, otherwise, executing step 513;
step 512, generating a supplementary wall between the two original walls; the wall center line of the supplementary wall body is positioned on an extension line extending from the wall center line of the first original wall body to the direction of the other original wall body; the starting point of the wall center line of the supplementary wall body is the end point of the first original wall body center line close to the other original wall body, and the end point is the projection point of the end point of the other original wall body close to the first original wall body on the extension line of the center line of the first original wall body; the thickness of the supplementary wall body is the same as that of the first original wall body; the first original wall body is an original wall body with the thickness closer to the thickness of the current processing image block; skipping to step 509 to continue execution;
step 513, determining whether the door and window line in the current processing image block includes an arc, if yes, executing step 514, otherwise, executing step 516;
step 514, generating a connecting line from the end point of the arc to the circle center of the arc;
step 515, judging whether a connecting line which can be projected on the section of the original wall body, which is perpendicular to the center line of the wall, exists, if so, executing step 516, otherwise, executing step 509;
step 516, generating a supplementary wall; the wall center line of the supplementary wall body is on an extension line of the original wall body center line extending to the direction of the current processing block; the starting point of the wall center line of the supplementary wall body is an end point of the original wall body center line, which is closer to the current processing image block, and the end point is a farthest projection point of all points on the current processing image block on the extension line of the original wall body center line; the thickness of the supplementary wall body is the same as that of the original wall body; skipping to step 509 to continue execution;
and step 599, finishing the processing of the supplementary wall.
4. The method for identifying the wall body according to claim 3, wherein the calculating of the angle set corresponding to the current processing image block according to the door and window lines in the current processing image block specifically comprises:
if the door and window line is a line segment, taking any point on the line segment as the origin of the rectangular coordinate system, calculating the angle value of the line segment with a smaller included angle with the transverse axis of the coordinate system, and adding the angle value and the angle value which is greater than the angle value by 90 degrees into the angle set corresponding to the image block;
if the door and window lines are arcs, respectively taking two starting points of the arcs as tangent points to generate tangent lines of the arcs, taking any point on the tangent lines as the origin of a rectangular coordinate system, calculating the angle value of the tangent line with a smaller included angle with the transverse shaft of the coordinate system, and adding the angle value and the angle value which is greater than the angle value by 90 degrees into an angle set corresponding to the image block.
5. The wall body identification method according to claim 1, wherein the identification wall body is obtained after the wall body is communicated or deleted, and specifically comprises the following steps:
combining the original wall body or the supplementary wall body which has the same wall thickness, the central lines of the walls are on the same straight line, and the distance between the nearest end points of the central lines of the two walls is within a set threshold range into a wall body;
deleting original walls or supplementary walls that are completely contained by other walls.
6. The wall identification method according to claim 1, wherein the obtaining of the correspondence between the wall name label and the identified wall specifically comprises:
step 701, judging whether unprocessed wall names are marked, if so, executing step 702, otherwise, executing 799;
step 702, selecting an unprocessed wall name label as a currently processed wall name label;
step 703, judging whether the currently processed wall name label contains a line segment, if so, executing step 707, otherwise, executing step 704;
step 704, extending the length of the identified wall body to two sides along the center line of the wall by a set length;
705, judging whether the name label of the currently processed wall is intersected with the expanded identification wall, if so, executing 706, otherwise, executing 701;
step 706, selecting an identification wall body with the wall center line direction the same as the marking direction of the currently processed wall body name and the closest distance, and establishing the corresponding relation between the name marking of the currently processed wall body and the identification wall body; skipping to step 701 to continue execution;
step 707, selecting an identification wall intersected with the line segment, and establishing a corresponding relation between the name label of the currently processed wall and the identification wall; skipping to step 701 to continue execution;
and 799, ending the process.
7. A computer device, the computer device comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the wall identification method according to any one of claims 1 to 6 when executing the computer program.
8. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of the wall identification method according to any one of claims 1 to 6.
CN202210291833.2A 2022-03-23 2022-03-23 Wall identification method, computer equipment and readable storage medium Pending CN114756928A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210291833.2A CN114756928A (en) 2022-03-23 2022-03-23 Wall identification method, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210291833.2A CN114756928A (en) 2022-03-23 2022-03-23 Wall identification method, computer equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN114756928A true CN114756928A (en) 2022-07-15

Family

ID=82327402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210291833.2A Pending CN114756928A (en) 2022-03-23 2022-03-23 Wall identification method, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114756928A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115063829A (en) * 2022-08-15 2022-09-16 万翼科技有限公司 Non-closed region identification method, device, equipment and storage medium
CN115131656A (en) * 2022-09-01 2022-09-30 深圳鹏行智能研究有限公司 Space identification method and device, electronic equipment and computer readable storage medium
CN116188629A (en) * 2022-12-12 2023-05-30 贝壳找房(北京)科技有限公司 Method, electronic equipment and medium for generating decoration drawing reference

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115063829A (en) * 2022-08-15 2022-09-16 万翼科技有限公司 Non-closed region identification method, device, equipment and storage medium
CN115063829B (en) * 2022-08-15 2023-01-10 万翼科技有限公司 Non-closed region identification method, device, equipment and storage medium
CN115131656A (en) * 2022-09-01 2022-09-30 深圳鹏行智能研究有限公司 Space identification method and device, electronic equipment and computer readable storage medium
CN116188629A (en) * 2022-12-12 2023-05-30 贝壳找房(北京)科技有限公司 Method, electronic equipment and medium for generating decoration drawing reference
CN116188629B (en) * 2022-12-12 2024-02-27 贝壳找房(北京)科技有限公司 Method, electronic equipment and medium for generating decoration drawing reference

Similar Documents

Publication Publication Date Title
CN114756928A (en) Wall identification method, computer equipment and readable storage medium
CN107564077B (en) method and device for drawing road network
CN114528632A (en) Beam identification method, computer device and readable storage medium
TWI514322B (en) System and method for checking borderlines of drawing
CN114565703A (en) Method, device and equipment for adjusting centralized labeling and readable storage medium
KR20150070386A (en) Method for optimized polygon reduction of computer graphics
CN106651944B (en) Method and device for calculating horizontal inscribed rectangle of any connected domain based on stroke coding
CN112861238A (en) Method, device and equipment for generating road contour line and readable storage medium
CN113051639B (en) Stirrup and lacing wire identification method, computer equipment and readable storage medium
CN106293545B (en) Printing layer cutting method and electronic device thereof
CN112966330A (en) Wall surface generation method of crossed wall body, computer equipment and readable storage medium
CN116343251A (en) Building drawing identification method and system based on AI building identification chart
CN112990092A (en) Legend identification method, computer device and readable storage medium
CN114444185A (en) In-situ labeling identification method and device and electronic equipment
CN111488648B (en) Automatic drawing method, system, equipment and storage medium for ship structure diagram
CN115810132A (en) Crack orientation identification method, device, equipment and storage medium
CN114969893A (en) Ceiling keel design method based on internal and external corner identification and storage medium
CN115623211A (en) Matrix scanning method and device
CN112288759B (en) Boundary extraction method, device, equipment and storage medium
CN113919027A (en) Component adjustment method and device in BIM (building information modeling) model, computer equipment and storage medium
CN111882534A (en) Method and device for identifying line type and readable storage medium
CN113268798B (en) Method for generating steel bar in column section, computer device and readable storage medium
CN111783180A (en) Drawing splitting method and related device
CN111210526A (en) GPU geometric primitive initial mark management method in plane clipping
CN117633973A (en) CAD file identification method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination