CN113626907B - Automatic building drawing identification method based on boundary scanning algorithm - Google Patents

Automatic building drawing identification method based on boundary scanning algorithm Download PDF

Info

Publication number
CN113626907B
CN113626907B CN202110781596.3A CN202110781596A CN113626907B CN 113626907 B CN113626907 B CN 113626907B CN 202110781596 A CN202110781596 A CN 202110781596A CN 113626907 B CN113626907 B CN 113626907B
Authority
CN
China
Prior art keywords
area
boundary
indoor
algorithm
steps
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.)
Active
Application number
CN202110781596.3A
Other languages
Chinese (zh)
Other versions
CN113626907A (en
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.)
Wuhan University WHU
Original Assignee
Wuhan University WHU
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 Wuhan University WHU filed Critical Wuhan University WHU
Priority to CN202110781596.3A priority Critical patent/CN113626907B/en
Publication of CN113626907A publication Critical patent/CN113626907A/en
Application granted granted Critical
Publication of CN113626907B publication Critical patent/CN113626907B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Civil Engineering (AREA)
  • Structural Engineering (AREA)
  • Computational Mathematics (AREA)
  • Architecture (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a building drawing automatic identification method based on a boundary scanning algorithm, which is characterized by comprising the following steps: after a drawing layer in a drawing is regulated to a standard drawing layer, dividing the drawing in the standard drawing layer into an indoor area and a public area; identifying the spatial characteristics of the indoor area by adopting a boundary scanning algorithm, and identifying the spatial characteristics of the public area by adopting a central axis algorithm; and respectively persistence of the spatial characteristics of the indoor area and the spatial characteristics of the public area obtained by recognition to XML. The method carries out informatization processing on the drawing, and has the characteristics of strong interactivity, high execution efficiency, low error rate, low repair cost, simple use and the like.

Description

Automatic building drawing identification method based on boundary scanning algorithm
Technical Field
The invention relates to the technical field of object identification in building drawings, in particular to an automatic building drawing identification method based on a boundary scanning algorithm.
Background
Drawing identification is an important ring of electrical loop automation analysis design. At present, drawing identification of civil residential buildings mainly depends on manual identification of engineers in various design houses, and related drawings such as electrical professions and the like are drawn by means of AutoCAD software. However, in order to implement the automatic analysis of the electrical circuit, the designer needs to re-interpret the design information from the drawing, perform complex and repetitive calculations based on the re-interpreted design information, and store the interpretation result in the database, which is extremely inefficient. Because the styles of the design courts are different, the drawing has poor readability; the system is not matched with a management system aiming at drawing information, so that the informatization degree is low; the statistics of the key information mainly depends on graph reading and manual calculation, and has low efficiency and high error rate; on the premise of the existing national standard, partial simple and repeated work is not automated, and a designer often needs to carry out a large amount of simple and repeated labor, so that a large amount of manpower resources are wasted, and the efficiency is low; the requirements on the degree of specialization of the electrical engineers are high, the cost for cultivating a highly reliable electrical engineer is high, and the personnel cost of a design house is increased. Therefore, it is needed to propose an automatic recognition scheme for the building drawing with high recognition efficiency and low error rate.
Disclosure of Invention
The embodiment of the invention provides a building drawing automatic identification method based on a boundary scanning algorithm, which is used for improving the identification precision and the identification efficiency of drawings.
In one aspect, a method for automatically identifying a building drawing based on a boundary scan algorithm is provided, which comprises the following steps:
after a drawing layer in a drawing is regulated to a standard drawing layer, dividing the drawing in the standard drawing layer into an indoor area and a public area;
identifying the spatial characteristics of the indoor area by adopting a boundary scanning algorithm, and identifying the spatial characteristics of the public area by adopting a central axis algorithm;
and respectively persistence of the spatial characteristics of the indoor area and the spatial characteristics of the public area obtained by recognition to XML.
In some embodiments, dividing the drawing in the standard layer into an indoor area and a public area includes the steps of:
determining a room boundary according to the block information of the door in the drawing;
the drawing is divided into an indoor area and a public area based on the room boundary and the wall body.
In some embodiments, determining a room boundary from tile information of a door in a drawing includes the steps of:
replacing a door block in the drawing with a line segment to form a closed area;
two points are selected from the two nearer areas on two sides of each door respectively to generate a room boundary;
the tracebound algorithm is performed through an interface provided by AutoCAD to optimize the room boundaries.
In some embodiments, determining a room boundary from tile information of a door in a drawing includes the steps of:
a ray detection algorithm is performed by an interface provided by AutoCAD to optimize the room boundaries.
In some embodiments, identifying spatial features of the indoor area using a boundary scan algorithm includes the steps of:
detecting the thickness of a wall body, and dividing the wall body into a thin wall and a thick wall according to the thickness so as to acquire wall body information;
furniture and/or electric appliance identification is carried out through an AutoCAD window command so as to acquire indoor facility information;
generating an indoor area structure topological graph according to the relationship between the room and the door;
and taking the wall information, the indoor facility information and the indoor area structure topological graph as spatial characteristics of the indoor area.
In some embodiments, dividing the identified indoor area into a plurality of rectangular areas includes the steps of:
extending and intersecting the boundary line of the identified indoor area and acquiring all intersection points;
and determining a point quaternion which meets the condition of a quadrangle and does not pass through any object in the room from the intersection point, and selecting the point quaternion corresponding to the quadrangle with the largest area as a region division result.
In some embodiments, persisting the identified spatial features of the indoor region and the spatial features of the public region to XML, comprising the steps of:
serializing the objects in the data structure into XML, and deserializing the data of XSD into the object and member attributes in C#;
and after the identified spatial characteristics of the indoor area are stored in the object in the C#, serializing the object into XML (extensive markup language) and performing persistent storage.
In some embodiments, the spatial features of the common region are identified by using a central axis algorithm, including the steps of:
acquiring identification information of a public area according to the position relation between the public area and an indoor area and character identification and identification equipment information in the public area;
acquiring an effective area in the public area by using a redundant cutting algorithm, and acquiring a central axis of the effective area;
and taking the identification information, the effective area and the central axis of the effective area as the spatial characteristics of the public area.
In some embodiments, persisting the identified spatial features of the indoor region and the spatial features of the public region to XML, comprising the steps of:
adding public icArea nodes into the XSD, and de-serializing the data of the XSD into object and member attributes in C#;
and after the identified objects in the spatial feature C# of the public area are identified, serializing the objects into XML (extensive markup language) and performing persistent storage.
In some embodiments, the step of organizing the layers in the drawing to the standard layer includes:
constructing an R-Tree index and establishing a minimum limit box for each primitive in the drawing;
merging the intersected minimum limiting boxes, and dividing subgraphs according to the merged minimum limiting boxes;
and according to the subgraph, the primitives in the drawing are regulated to a standard layer.
The embodiment of the invention provides a new solution for the technology of automatically analyzing and identifying the building drawing in actual production, and the spatial characteristics of the indoor area are identified by distinguishing the indoor area from the public area and respectively adopting a boundary scanning algorithm and the spatial characteristics of the public area are identified by adopting a central axis algorithm. Considering the different characteristics of the indoor area and the public area, namely the indoor area can be regarded as being divided into regular rooms by the wall body and the door, and the public area can be regarded as a large area and is irregular, the indoor area and the public area are distinguished, and different algorithms are adopted for identification: for an indoor area, identifying a wall body by using a boundary scanning algorithm to obtain a structural topological graph of the indoor area; for the public area, the wall is less and is not divided into the regular areas, so that the regular areas need to be divided by a central axis algorithm. By adopting the two algorithms, the automatic identification of the building drawing is realized, and the user can complete the identification of the building drawing by only carrying out simple layer regulation instructions and furniture and electric appliance confirmation instructions, so that a foundation is laid for the subsequent automatic wiring and other applications, a designer is liberated from the complex drawing identification process, and the working efficiency is greatly improved. Meanwhile, the robustness of the system is improved, the error and leakage phenomenon in the traditional manual image recognition is greatly reduced, the error recognition rate of the system is reduced, and errors can be recognized and modified in time
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for automatically identifying a building drawing based on a boundary scanning algorithm according to an embodiment of the present invention;
FIG. 2 is a flowchart of determining a room boundary according to tile information of a door in a drawing according to an embodiment of the present invention;
FIG. 3 is a flowchart of detecting wall thickness to obtain wall information according to an embodiment of the present invention;
fig. 4 is a flowchart of a furniture identification algorithm according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, the embodiment of the invention provides an automatic recognition method for a building drawing based on a boundary scanning algorithm, so as to improve the recognition accuracy and recognition efficiency of the drawing. The method comprises the following steps:
s100, after a drawing layer in a drawing is regulated to a standard drawing layer, dividing the drawing in the standard drawing layer into an indoor area and a public area;
s200, identifying the spatial characteristics of the indoor area by adopting a boundary scanning algorithm, and identifying the spatial characteristics of the public area by adopting a central axis algorithm;
and S300, respectively persistence of the spatial characteristics of the indoor area and the spatial characteristics of the public area which are obtained through recognition to XML.
In step S100, the user opens the drawing through AutoCAD software, and can normalize the drawing by inputting a layer normalization command, and normalize the primitive into the standard layer.
It will be appreciated that a user may operate using the interactive interface with the addition of an add-in AutoCAD in a layer structured scene and a manually validated furniture (furniture information included in the spatial characteristics of the indoor area) scene, respectively. The system provides the interface of the user-defined drawing structure by adding the interactive interface in the AutoCAD in the form of the plug-in, and can provide different interactive interfaces for different scenes, such as a scene of layer regularity and a scene of manually confirming furniture, and the system adds the interactive interface in the AutoCAD for user interaction, so that the interactive performance of the system is improved.
It can be understood that the data-structured task is to guide the user to transfer the primitives of the same type to the preset layer of the program, so as to help the program to classify and identify the primitives later. The user may merge the layers through the graphical interface of the software and move the primitives between the layers. Through layer regularity and different algorithms for different partitions, the robustness of the system can be improved, and meanwhile, the system can identify drawings of different styles.
It will be appreciated that by persisting the identified spatial features to XML, subsequent automation operations (e.g., automatically routing electrical lines, etc.) may be facilitated. Meanwhile, based on the characteristic of drawing informatization, the whole framework of the building facility can be considered from a macroscopic angle, and a stable data base is provided for subsequent construction, supervision, inspection and the like.
In the embodiment, a new solution is provided for the technology of automatically analyzing and identifying the building drawing in actual production, and the spatial characteristics of the indoor area are identified by distinguishing the indoor area from the public area and respectively adopting a boundary scanning algorithm and the spatial characteristics of the public area are identified by adopting a central axis algorithm. Considering the different characteristics of the indoor area and the public area, namely the indoor area can be regarded as being divided into regular rooms by the wall body and the door, and the public area can be regarded as a large area and is irregular, the indoor area and the public area are distinguished, and different algorithms are adopted for identification: for an indoor area, identifying a wall body by using a boundary scanning algorithm to obtain a structural topological graph of the indoor area; for the public area, the wall is less and is not divided into the regular areas, so that the regular areas need to be divided by a central axis algorithm. By adopting the two algorithms, the automatic identification of the building drawing is realized, and the user can complete the identification of the building drawing by only carrying out simple layer regulation instructions and furniture and electric appliance confirmation instructions, so that a foundation is laid for the subsequent automatic wiring and other applications, a designer is liberated from the complex drawing identification process, and the working efficiency is greatly improved. Meanwhile, the robustness of the system is improved, the error and leakage phenomenon in the traditional manual image recognition is greatly reduced, the error recognition rate of the system is reduced, and errors can be recognized and modified in time.
In some embodiments, S100 comprises the steps of:
s110, determining a room boundary according to the block information of the door in the drawing;
and S120, dividing the drawing into an indoor area and a public area based on the room boundary and the wall body.
In this embodiment, the position and the size of the door determine the boundary of the room, and then the relative position relationship between the boundary of the room and the wall body divides the area.
In some embodiments, S110 comprises the steps of:
s111, replacing a door block in a drawing with a line segment to form a closed area;
s112, respectively selecting two points in the two side near areas of each door to generate a room boundary;
and S113, executing a tracebound algorithm through an interface provided by the AutoCAD to optimize the room boundary.
It will be appreciated that the replacement of the door tiles in the drawing with line segments to form the enclosed area is to pick points to access the general location of the room by means of the door information.
Preferably, S110 includes the steps of:
and S114, executing a ray detection algorithm through an interface provided by the AutoCAD to optimize the room boundary.
It can be understood that by means of the interface provided by AutoCAD, the efficiency of boundary scan can be further improved by executing the tracebound algorithm with low time consumption first, and if the ray detection algorithm with high time consumption is not executed successfully.
Preferably, an R-Tree index is established on the drawing, a spatial index is established for all the primitives on the drawing, and the plane is divided into different parts, so that the range can be continuously reduced during searching, and the efficiency of the ray detection algorithm is improved.
As shown in fig. 2, in a specific embodiment, the acquisition of the indoor area may be performed based on steps 1-a to 1-I:
step S110-a: replacing a door block in the drawing with a line segment to help form a closed area;
step S110-b: selecting a point at the position, which is closer to the two sides of the door, for generating a room boundary, and simultaneously obtaining the relation between the room and the door, so as to prepare for generating the topology of the internal structure of the whole building later;
step S110-c: using a boundary scanning algorithm based on ray detection, taking the midpoint of the selection gate in the step S110-b as a starting point, continuously rotating to construct rays around, and detecting and intersecting with other graphic elements;
step S110-d: judging whether the new intersection point is on the current boundary straight line, if so, executing the step S110-e, and if not, executing the step S110-g;
step S110-e: judging whether the new intersection point is on the boundary line segment scanned out at the beginning, if so, forming a closed boundary, returning a result, and if not, executing the step S110-f;
step S110-f: fixing the starting point, rotating the ray by a certain angle anticlockwise, and returning to the step S110-c;
step S110-g: linearly moving the ray for a small distance along the current boundary, and detecting the ray again;
step S110-h: judging whether the intersection point exists between the ray and other graphic elements at the moment, if so, executing the step S110-i, and if not, indicating that the boundary is not closed, and ending;
step S110-i: judging whether the new intersection point is on the current boundary straight line, if so, executing the step S110-f, and if not, executing the step S110-j;
step S110-j: moving the starting point for a certain distance along the ray, modifying the direction of the ray to be the intersection point of the current starting point and the previous round, and executing the step S110-f;
step S110-k: an R-Tree index is established on a drawing, a spatial index is established for all the primitives on the drawing, and a plane is divided into different parts, so that the range can be continuously reduced during searching, and the efficiency of a ray detection algorithm is improved;
step S110-I: by means of an interface provided by AutoCAD, the efficiency of boundary scanning is further improved by executing the TraceBoundary algorithm with low time consumption first and executing the ray detection algorithm with high time consumption if the algorithm is unsuccessful.
In some embodiments, S200 comprises the steps of:
s210, detecting the thickness of a wall body, and dividing the wall body into a thin wall and a thick wall according to the thickness so as to acquire wall body information;
s220, furniture and/or electric appliance identification is carried out through an AutoCAD window command so as to acquire indoor facility information;
s230, generating an indoor area structure topological graph according to the relationship between the room and the door;
and S240, taking the wall information, the indoor facility information and the indoor area structure topological graph as spatial characteristics of the indoor area.
In this embodiment, the boundary scanning algorithm is adopted to scan the wall body to obtain the wall body information, so that the subsequent program can conveniently design by using the identification result of the system, the usability of the identification result of the system is increased, and the thickness of the wall body needs to be considered, for example, an electric switch is designed.
Further, the name of the room can be determined by automatically acquiring the text labels in the building drawing and then according to the containing relation between the room and the text labels in the building drawing.
It should be noted that, the room name may also be a part of the spatial characteristics of the indoor area, and after determining the room name, it is convenient for other programs to use the recognition result of the system, so as to increase the availability of the recognition result of the system.
Further, as shown in fig. 3, S210 may be implemented by the following program algorithm:
step S210-a: horizontally moving a vertical straight line from left to right, and scanning the image paper;
step S210-b: inputting a ray detection command, and performing ray detection by a system to obtain an intersection point of the ray and the wall body and a line (wall) where the intersection point is located;
step S210-c: recording for each wall what number of cycles is detected a thin or thick wall;
step S210-d: judging whether the detection of the direction (i.e. the direction of linear movement: horizontal or vertical) is finished, if yes, executing step S210-e, and if not, executing step S210-g;
step S210-e: judging whether the wall body needs to be broken or not according to the recording result in the step S210-c, and setting the thickness;
step S210-f: judging whether the detection is finished in two directions (namely, the horizontal direction and the vertical direction), if so, ending the flow, and if not, executing the step S210-g;
step S210-g: vertically moving a horizontal straight line from top to bottom, scanning the image paper, and executing the step 2-b;
step S210-h: and moving the straight line with a certain step length for scanning the whole drawing, and executing the step S210-b.
In some embodiments, S210 includes the steps of: dividing the identified indoor area into a plurality of rectangular areas;
the method comprises the following steps: extending and intersecting the boundary line of the identified indoor area and acquiring all intersection points; and determining a point quaternion which meets the condition of a quadrangle and does not pass through any object in the room from the intersection point, and selecting the point quaternion corresponding to the quadrangle with the largest area as a regional division result, namely, a region which is required to be divided as large as possible and is a rectangular region.
It can be understood that, all the optional vertexes and the intersecting points of the auxiliary lines are arranged in sequence, the set of points is traversed, four vertexes which can form a quadrangle meeting the conditions are stored, meanwhile, the quadrangle cannot pass through objects in a room, the four vertexes which can form the quadrangle meeting the conditions (namely, the quadrangle cannot pass through objects in the room) are continuously cut according to the requirements until the last remaining polygons also meet the requirements, when a plurality of groups of quadrangle groups of points meeting the conditions appear, in order to ensure that two symmetrical patterns have stable and consistent division results (namely, two piled areas in a building drawing are consistent after being divided, the division results are consistent), and among all the results meeting the conditions, the subareas with the largest area are selected as the division results of the current step.
As shown in fig. 4, the furniture may be identified in S220 using a similarity identification algorithm, including the steps of:
step S220-a: the user selects a group of primitives;
step S220-b: carrying out statistical analysis on the primitives;
step S220-c: counting the types and the numbers of the selected primitives;
step S220-d: counting the common points of the selected primitives, such as layers and colors, which can be used for subsequent screening and reference, so that the efficiency is improved;
step S220-e: selecting a certain primitive as a reference based on the selected primitive number relation and the counted total primitive number relation;
step S220-f: judging the set relation between the reference primitive and other primitives selected;
step S220-g: if the selected primitive contains an ellipse (circular arc) and a straight line, judging the relation between the center of the ellipse and the straight line, the distance from the center to the straight line, whether the center is on the straight line, whether the circular arc has an intersection point with the straight line, and the like;
step S220-h: if the selected graphic element contains straight lines and straight lines, judging whether the straight lines are parallel, the distance between the straight lines is equal to the distance between the straight lines, the number of intersecting points is equal to the number of starting points or the number of ending points, the straight lines are vertical, and the like;
step S220-i: if the selected primitive contains an ellipse (circular arc) and a polygon, judging whether the circular arc is tangent to the polygon, whether the relationship exists between the circular arc and the polygon, the number of intersection points, whether the center points coincide or not, and the like;
step S220-j: if the selected primitive contains a polygon and a straight line, judging whether the number of intersection points of the polygon and the straight line is vertical or parallel or not;
step S220-k: establishing a hash table, storing a number group or l ist (storing two primitives), corresponding to a Boolean variable and corresponding to a certain relation between the two primitives;
step S220-I: screening based on statistical characteristics;
step S220-m: selecting the primitives with a certain basic feature (such as a certain layer and a certain color) respectively;
step S220-n: firstly traversing reference primitives, and storing the relation (such as angle and other information) between the screened reference primitives and the selected reference primitives;
step S220-o: traversing, and selecting a group of primitives meeting the conditions according to the hash table;
step S220-p: and carrying out merging substitution based on the correlation.
In some embodiments, S300 comprises the steps of:
s310, serializing the object in the data structure into XML, and inversely serializing the data of the XSD into the object and the member attribute in C#;
s320, after the spatial characteristics of the indoor area obtained through recognition are stored in the object in the C#, the object is serialized into XML and is stored in a lasting mode.
The embodiment provides a method for storing spatial characteristic information of an indoor area in a lasting mode.
In some embodiments, the identifying spatial features of the common area in S200 using a central axis algorithm includes the steps of:
s250, acquiring identification information of a public area according to the position relation between the public area and an indoor area and character identification and identification equipment information in the public area;
s260, acquiring an effective area in the public area by using a redundant cutting algorithm, and acquiring a central axis of the effective area;
and S270, taking the identification information, the effective area and the central axis of the effective area as the spatial characteristics of the public area.
Preferably, a cross-shaped extension line is constructed at the middle point of each block, the middle point of the gate of the common area is taken as a starting point and an ending point, and a straight-line extension line perpendicular to the gate of the common area is constructed through all the starting points and the ending points, so that the central axis of each area is finally obtained.
In some embodiments, S300 comprises the steps of:
s330, adding public icArea nodes into the XSD, and inversely sequencing the data of the XSD into object and member attributes in C#;
and S340, after the identified object in the spatial feature C# of the public area is identified, serializing the object into XML and performing persistence storage.
The embodiment provides a method for storing spatial feature information of a public area in a persistent mode.
In some embodiments, the step of S100 of organizing the layers in the drawing to the standard layer includes the steps of:
s100-a, constructing an R-Tree index and establishing a minimum limit box for each graphic element in a drawing;
s100-b, merging the intersected minimum limiting boxes and dividing subgraphs according to the merged minimum limiting boxes;
and S100-c, according to the subgraph, regulating the graphic elements in the drawing to a standard graphic layer.
The minimum bounding boxes that intersect are merged until there is no bounding box that intersects, and the division subgraph is made with the merged minimum bounding box at this time.
It will be appreciated that, since a drawing may contain a plurality of building plane drawings, the minimum bounding boxes that intersect need to be combined, and sub-graphs are divided according to the combined minimum bounding boxes, each sub-graph is one building plane drawing, and the subsequent operations are performed on each sub-graph that is divided.
In a specific embodiment, a design drawing of a residential building is taken as an implementation scene, in the scene, a designer realizes data and layer normalization through an interface interaction mode, each graphic element is normalized into a standard layer, the types of furniture are respectively determined, the whole drawing is finally identified, and the identification result is stored in XML in a lasting mode. The implementation steps are all completed in AutoCAD, and are as follows:
step 1: the user opens the building drawing by using AutoCAD, inputs a drawing layer regulation command, regulates the data of the building drawing and regulates the graphic elements into a standard drawing layer;
preferably, in step 1, the data normalization is to guide the user to transfer the same type of primitives to a preset layer of the program to help the program to complete the classification and identification of the primitives; the user is assisted to complete the combination of the layers and the movement of the primitives among the layers through the graphical interface of the system;
step 2: the user inputs a furniture confirmation command in a command window of the AutoCAD, determines the type of furniture, and matches each furniture in the building drawing with the existing furniture types of the software database, so that the type of each furniture and electric appliance in the building drawing is determined, and other software can conveniently use the building drawing information obtained after identification (such as the lamp is arranged by using the building drawing information obtained after identification, and the types of the furniture and the electric appliance need to be known);
step 3: inputting a region identification command in an AutoCAD command window so as to identify a standard layer drawing and logically divide the standard layer drawing into an indoor region and a public region;
preferably, in step 3, the specific embodiment of dividing the drawing into an indoor area and a public area includes the following substeps:
substep 3.1: replacing a door block in the drawing with a line segment to help form a closed area, so that the approximate position of a room is obtained by selecting points by means of the information of the door;
substep 3.2: two points are selected from the two nearer areas of each door respectively and are used for generating a room boundary;
substep 3.3: building R-Tree indexes on all the primitives of the building drawing, and accelerating subsequent processing;
substep 3.4: the method comprises the steps that a tracebound method is automatically called and executed in software, a three-dimensional point coordinate is transmitted into the method, a Boolean value indicating whether island detection is needed or not is returned to a multi-section line object, and a room boundary is preliminarily obtained through the method;
substep 3.5: the method uses a selected point as a starting point, continuously rotates around to construct rays for detection, processes collision points to form an original boundary, and further acquires the boundary of a room by the method.
Step 4: analyzing the indoor apartment to obtain indoor space characteristics, and storing the indoor space characteristics in a special data structure in an informatization manner, so that the indoor space characteristics are convenient for computer processing;
preferably, in step 4, the specific embodiment of analyzing the indoor apartment to obtain indoor spatial characteristics and saving the same to a specific data structure comprises the following substeps:
substep 4.1: generating a topological graph of the internal structure of the whole building according to the relationship between the room and the door obtained in the step 3;
substep 4.2: the software automatically acquires the text labels in the building drawing, and then determines the room names according to the containing relation between the rooms in the building drawing and the text labels;
substep 4.3: storing the information of the furniture information in the room and the thickness wall body in a data structure according to the topological graph of the internal structure of the building;
substep 4.4: objects in the data structure are serialized into XML for persistent storage.
Step 5: analyzing the public area to obtain basic space boundaries and characteristics, including space continuity characteristics, fireproof partitions arranged according to fireproof specifications and the like;
preferably, in step 5, the specific embodiment of analyzing the common region to obtain the basic spatial boundary and features comprises the sub-steps of:
substep 5.1: judging the position relation between a public area and identification areas such as households, elevators and the like in the drawing, and acquiring identification characters in the areas and/or identification devices (such as elevators) in the areas so as to facilitate the follow-up identification of each area;
substep 5.2: and taking the middle point of the gate of the public area as a starting point and an end point, cutting the redundant area, wherein other areas are redundant areas except for the minimum rule areas containing all the starting points and the end points to be analyzed, and dividing the minimum rule areas from the starting points to the end points by adopting a redundant cutting algorithm, wherein the obtained minimum rule areas are the effective areas.
The implementation of the redundant cutting algorithm is mainly completed by two functions: the function of the first function is to obtain the intersection point of one side of the area and a line segment by extending any boundary of the area, and then find out all the intersection points; the function of the second function is to add an intersection point to the vertices of the polygon each time it is found, and construct two new polygons to return to the first function. And then judging whether a certain polygon comprises all key points in the first function, if so, discarding the polygon without the key points, and recursively calling the first function by taking the polygon with the key points as a variable. If the two polygons do not contain all key points, analyzing the next edge until all edges are finally analyzed, and returning the rest of the last polygon, wherein the polygon is the boundary of the minimum rule area;
substep 5.3: a cross extension line is constructed at the end point of each area, and then a linear extension line perpendicular to the door at the position is constructed through all the starting points and the end points, so that the central axis of each area is obtained.
Step 6: the spatial characteristics of the common area are informatized, including the effective area obtained in the step 5 and the central axis of each effective area, and are added into a data structure (the data structure in the step 4).
Preferably, in step 6, the specific implementation of drawing informatization includes the following substeps:
substep 6.1: adding corresponding nodes in the XSD;
substep 6.2: the data of the XSD are inversely sequenced into objects;
substep 6.3: storing identification information (comprising the relationship between the room and the door obtained in the step 2, the topological graph of the internal structure of the building, the effective areas obtained by dividing the public area in the step 5, the central axis of each effective area and the like) on the building drawing into objects;
substep 6.4: the object is serialized into XML for persistent storage.
The beneficial effects of the embodiment of the invention include:
the system sets different interaction interfaces aiming at different scenes, provides interfaces of user-defined drawing structures, and improves the interactivity of the system. The boundary scanning algorithm is utilized to automate the graph recognition process, a user can complete the recognition of the building drawing only by completing simple layer regularity and furniture confirmation, a foundation is laid for the subsequent automatic wiring and other applications, a designer is liberated from the complex graph recognition process, and the working efficiency is greatly improved. And after drawing recognition, an XML file related to the building drawing is automatically generated, the recognition information is durable, and the subsequent automatic operation (such as automatic wiring electric circuits and the like) is facilitated. Meanwhile, based on the characteristic of drawing informatization, the whole framework of the building facility can be considered from a macroscopic angle, and a stable data base is provided for subsequent construction, supervision, inspection and the like. The automation of the graph recognition process greatly reduces the error phenomenon in the traditional manual graph recognition, and timely recognition errors can be timely and simply modified. Because the design styles of different design houses are different, the manual drawing recognition difficulty is high, and the system can recognize drawings of different styles through the layer regularity and the robustness of the system.
In the description of the present invention, it should be noted that the azimuth or positional relationship indicated by the terms "upper", "lower", etc. are based on the azimuth or positional relationship shown in the drawings, and are merely for convenience of describing the present invention and simplifying the description, and are not indicative or implying that the apparatus or element in question must have a specific azimuth, be constructed and operated in a specific azimuth, and thus should not be construed as limiting the present invention. Unless specifically stated or limited otherwise, the terms "mounted," "connected," and "coupled" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
It should be noted that in the present invention, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (7)

1. The automatic identification method for the building drawing based on the boundary scanning algorithm is characterized by comprising the following steps of:
after a drawing layer in a drawing is regulated to a standard drawing layer, dividing the drawing in the standard drawing layer into an indoor area and a public area;
identifying the spatial characteristics of the indoor area by adopting a boundary scanning algorithm, and identifying the spatial characteristics of the public area by adopting a central axis algorithm;
respectively persistence of the spatial features of the indoor area and the spatial features of the public area obtained by recognition to XML;
dividing the drawing in the standard layer into an indoor area and a public area, wherein the method comprises the following steps:
determining a room boundary according to the block information of the door in the drawing;
dividing a drawing into an indoor area and a public area based on a room boundary and a wall body;
determining a room boundary according to the block information of the door in the drawing, comprising the following steps:
replacing a door block in the drawing with a line segment to form a closed area;
two points are selected from the two nearer areas on two sides of each door respectively to generate a room boundary;
executing a tracebound algorithm through an interface provided by AutoCAD to optimize the room boundary;
determining a room boundary according to the block information of the door in the drawing, comprising the following steps:
a ray detection algorithm is performed by an interface provided by AutoCAD to optimize the room boundaries.
2. The automatic recognition method of the building drawing based on the boundary scan algorithm according to claim 1, wherein,
identifying spatial features of the indoor area by adopting a boundary scanning algorithm, comprising the following steps:
detecting the thickness of a wall body, and dividing the wall body into a thin wall and a thick wall according to the thickness so as to acquire wall body information;
furniture and/or electric appliance identification is carried out through an AutoCAD window command so as to acquire indoor facility information;
generating an indoor area structure topological graph according to the relationship between the room and the door;
and taking the wall information, the indoor facility information and the indoor area structure topological graph as spatial characteristics of the indoor area.
3. The automatic recognition method for the building drawing based on the boundary scan algorithm according to claim 2, wherein,
dividing the identified indoor area into a plurality of rectangular areas, comprising the steps of:
extending and intersecting the boundary line of the identified indoor area and acquiring all intersection points;
and determining a point quaternion which meets the condition of a quadrangle and does not pass through any object in the room from the intersection point, and selecting the point quaternion corresponding to the quadrangle with the largest area as a region division result.
4. The automatic recognition method for the building drawing based on the boundary scan algorithm according to claim 2, wherein,
persisting the identified spatial features of the indoor area and the spatial features of the public area to XML, comprising the steps of:
serializing the objects in the data structure into XML, and deserializing the data of XSD into the object and member attributes in C#;
and after the identified spatial characteristics of the indoor area are stored in the object in the C#, serializing the object into XML (extensive markup language) and performing persistent storage.
5. The automatic recognition method for the building drawing based on the boundary scan algorithm according to claim 2, wherein,
identifying the spatial characteristics of the common area by adopting a central axis algorithm, comprising the following steps:
acquiring identification information of a public area according to the position relation between the public area and an indoor area and character identification and identification equipment information in the public area;
acquiring an effective area in the public area by using a redundant cutting algorithm, and acquiring a central axis of the effective area;
and taking the identification information, the effective area and the central axis of the effective area as the spatial characteristics of the public area.
6. The automatic recognition method of the building drawing based on the boundary scan algorithm of claim 4, wherein,
persisting the identified spatial features of the indoor area and the spatial features of the public area to XML, comprising the steps of:
adding a PublicArea node in the XSD, and inversely sequencing the data of the XSD into the object and member attributes in C#;
and after the identified objects in the spatial feature C# of the public area are identified, serializing the objects into XML (extensive markup language) and performing persistent storage.
7. The automatic recognition method of the building drawing based on the boundary scan algorithm according to claim 1, wherein,
the method for regulating the layers in the drawing to the standard layers comprises the following steps:
constructing an R-Tree index and establishing a minimum limit box for each primitive in the drawing;
merging the intersected minimum limiting boxes, and dividing subgraphs according to the merged minimum limiting boxes;
and according to the subgraph, the primitives in the drawing are regulated to a standard layer.
CN202110781596.3A 2021-07-08 2021-07-08 Automatic building drawing identification method based on boundary scanning algorithm Active CN113626907B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110781596.3A CN113626907B (en) 2021-07-08 2021-07-08 Automatic building drawing identification method based on boundary scanning algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110781596.3A CN113626907B (en) 2021-07-08 2021-07-08 Automatic building drawing identification method based on boundary scanning algorithm

Publications (2)

Publication Number Publication Date
CN113626907A CN113626907A (en) 2021-11-09
CN113626907B true CN113626907B (en) 2023-07-21

Family

ID=78379353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110781596.3A Active CN113626907B (en) 2021-07-08 2021-07-08 Automatic building drawing identification method based on boundary scanning algorithm

Country Status (1)

Country Link
CN (1) CN113626907B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224706A (en) * 2014-06-30 2016-01-06 上海神机软件有限公司 Based on engineering drawing management system and method, row's modular system and method for workspace

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224706A (en) * 2014-06-30 2016-01-06 上海神机软件有限公司 Based on engineering drawing management system and method, row's modular system and method for workspace

Also Published As

Publication number Publication date
CN113626907A (en) 2021-11-09

Similar Documents

Publication Publication Date Title
CN101673410B (en) Vector building drawing based method for reconstructing three-dimensional model
US5278946A (en) Method of presenting multimedia data in a desired form by comparing and replacing a user template model with analogous portions of a system
US4845651A (en) Geometric modelling system
US7492364B2 (en) System and method for creating and updating a three-dimensional model and creating a related neutral file format
CN109974703B (en) Method, system and device for constructing indoor navigation network
CN110941871B (en) Automatic labeling method and system based on room information in Revit three-dimensional model
CN109711018A (en) A kind of Size Dwelling Design method of 2 d-to-3 d
CN107679276B (en) Generation method and device of power system tide wiring diagram and electronic equipment
CN113436319B (en) Special-shaped arrangement matrix construction method and system of urban indoor three-dimensional semantic model
CN111241646B (en) Layout method of power grid equipment and computer readable storage medium
CN111744199B (en) Image processing method and device, computer readable storage medium and electronic equipment
US20160364890A1 (en) Method and apparatus for providing a presumptive drafting solution
CN113297662B (en) Automatic household attribution identification method based on scanning lines
CN113626907B (en) Automatic building drawing identification method based on boundary scanning algorithm
Ying et al. A two‐stage recursive ray tracing algorithm to automatically identify external building objects in building information models
CN113868816A (en) Method, system, equipment and terminal for constructing indoor path topology
CN110162731B (en) Method for displaying IFC model component space information on Web
CN110176076B (en) Method for carrying out spatial operation on BIM (building information modeling) model based on IFC (information processing center) format
CN113063427A (en) Indoor high-precision map production method, device, equipment and storage medium
Tamke et al. From point clouds to definitions of architectural space
CN113761628B (en) Building street facade transformation parameterized design generation method
CN114444185A (en) In-situ labeling identification method and device and electronic equipment
CN114677505A (en) Automatic room segmentation method based on wall constraint
Daum et al. Boundary representation-based implementation of spatial BIM queries
Ermolenko Algorithm-aided Information Design: Hybrid Design approach on the edge of Associative Methodologies in AEC

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
GR01 Patent grant
GR01 Patent grant