Disclosure of Invention
First, the technical problem to be solved
Based on the method, the invention provides an automatic shaft network identification and application method of a building and structure CAD drawing, and aims to solve the technical problems of poor applicability and inaccurate information extraction of a shaft network extraction method in the prior art.
(II) technical scheme
In order to solve the technical problems, the invention provides an automatic shaft network identification method of a CAD drawing of a building and a structure, which comprises the following steps:
S1, initializing a drawing
S11, determining a range of the shaft net to be extracted according to a CAD drawing of the building and the structure;
S12, frying all the image blocks in the range of the shaft net to be extracted into a basic object;
s2, drawing element reading
Reading a basic object in a range of an axis network to be extracted;
S3, drawing element analysis is carried out, and an axial network object is initially extracted
The method comprises the steps of analyzing scale objects in the range of an axis network to be extracted, finding all scale objects which are connected end to end and form a maximum surrounding area together, finding a line segment which coincides with a size boundary line forming the maximum surrounding area, finding all circle objects connected with the line segment in the range of the axis network to be extracted, analyzing the circle objects, and if the circle objects simultaneously meet the following three conditions:
the condition 1 is that the round object contains a text object;
condition 2, having a line segment connected to the edge of the circular object;
Finding a line segment which transversely or longitudinally coincides with the line segment connected with the round object according to the line segment, wherein the line segment is set as an auxiliary line of the axial net, and the auxiliary line is a longest transverse line or a longest vertical line in the range of the axial net needing to be extracted;
The circle object and the line segment connected with the edge of the circle object are initial extraction axis net objects; S4, finding out missing shaft net objects
According to the initial extraction shaft net object obtained by analysis in the step S3, the following information including the size of the shaft net circle, the layer of the shaft net text, the layer of the shaft net line section and the layer of the shaft net auxiliary line can be obtained;
And then searching reversely by utilizing the information to find out the missing axial network objects, wherein the missing axial network objects and the initial extraction axial network objects obtained in the step S4 form all axial network objects together.
Preferably, the building and structure CAD drawing in step S11 is specifically a plan view of a standard building floor of the project, and the plan view of the standard building floor of the project is a file in dwg format.
Preferably, in step S11, determining the range in which the axial network needs to be extracted includes two ways:
Cutting the standard layer plan into files containing only a single frame through the range determined by each frame in the standard layer plan;
and secondly, manually framing a single frame in the standard layer plan, and determining the range of the axis net to be extracted.
Preferably, the basic object in step S12 comprises a circle, a straight line, a multi-line segment, a polygon, a text, and a dimension line.
Preferably, when the range of the shaft network needs to be extracted in the step S12 and the block definition with the attribute is included, the attribute text needs to be restored, and the following steps are included in the step S12 and before the step S2:
s13, zeroing the Z coordinates of all objects in the range of the axis network needing to be extracted.
Preferably, before the step S1, the method further comprises the steps of checking whether the plan view of the project building standard layer can be normally opened and normally displayed by using AutoCAD software, and when the plan view of the project building standard layer is a file which is drawn by non-original CAD software and is in dwg format, converting the file into a native file.
The automatic identification method of the shaft network of the building and structure CAD drawing preferably further comprises the steps of S5, according to the fact that all shaft network objects are obtained in the step S4, extracting intersection points of the shaft networks in all different directions in an area surrounded by all the shaft network objects, wherein the intersection points comprise coordinate information of the intersection points and information of two shaft networks forming the intersection points, taking the intersection point closest to the left lower corner of the area surrounded by the largest area among all the intersection points as a datum point, calculating relative coordinate information from all the intersection points to the datum point, completing extraction of the shaft network information, and taking the extracted shaft network information as a main shaft network of the project building.
Preferably, the automatic shaft network identification method of the CAD drawing of the building and structure further comprises S6, storing shaft network information
And (5) saving the extracted shaft network information in the step (S5) as a txt file, saving the txt file in a cloud database, and finishing the storage of the shaft network information.
Preferably, the relative coordinate information in the step S5 refers to the distance from the intersection point to the reference point and the angle information, and the angle information refers to the included angle information between the connecting line of each intersection point and the reference point and the positive direction of the X coordinate axis.
The invention also discloses an application method of the shaft network of the building and structure CAD drawing, which comprises the following steps of completing modeling according to the building drawing or the structure drawing in the BIM modeling process, converting the shaft network data of each modeling object in the building drawing or the structure drawing into the shaft network offset of the project building obtained by the method, and automatically realizing the space positioning of each building model by combining elevation data.
(III) beneficial effects
Compared with the prior art, the automatic shaft network identification and application method for the CAD drawing of the building and structure has the advantages that:
the automatic identification method of the shaft network of the building and structure CAD drawing can assist in rapid filtration of shaft network information in the drawing identification process of a building drawing structure diagram, can accurately extract shaft network information, can apply the extracted shaft network information to BIM modeling, helps to solve the problem of automatic global positioning of a single modeling object in a project building in the BIM modeling process, and improves the automation degree and efficiency of BIM modeling. And the projection relationship of the elevation view is established through the axis network information and the elevation view.
Detailed Description
In order that the above objects, features and advantages of the invention will be readily understood, a more particular description of the invention will be rendered by reference to the appended drawings. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. The invention may be embodied in many other forms than described herein and similarly modified by those skilled in the art without departing from the spirit or scope of the invention, which is therefore not limited to the specific embodiments disclosed below.
The automatic shaft network identification method of the CAD drawing of the building and structure of the invention is further described below with reference to figures 1-6.
Referring to fig. 6, the invention discloses an automatic shaft network identification method of a building and structure CAD drawing, which comprises the following steps:
S1, initializing a drawing
S11, determining the range of the shaft net to be extracted according to the CAD drawing of the building and the structure.
S12, frying all the image blocks in the range where the axial net needs to be extracted into a basic object.
S13, zeroing the Z coordinates of all objects in the range of the axis network needing to be extracted.
S2, drawing element reading
The basic object within the range of the extraction axis network is read.
S3, drawing element analysis is carried out, and an axial network object is initially extracted
And analyzing the scale objects in the range of the shaft network to find all the scale objects which are connected end to end and form a maximum surrounding area together. Finding out a line segment which coincides with a size boundary line forming the maximum surrounding area, finding out all circle objects connected with the line segment in the range of the axis net to be extracted, analyzing the circle objects, and if the circle objects simultaneously meet the following three conditions:
the condition 1 is that the round object contains a text object.
Condition 2, there is a line segment connected to the edge of the circular object.
And 3, finding a line segment which transversely or longitudinally coincides with the line segment connected with the round object according to the line segment, wherein the line segment is set as an auxiliary line of the axial net, and the auxiliary line is the longest transverse line or vertical line in the range of the axial net needing to be extracted.
The circle object and the line segment connected with the edge of the circle object are initial extraction axis net objects.
S4, finding out missing shaft net objects
According to the initial extraction shaft net object obtained by analysis in the step S3, the following information including the size of the shaft net circle, the layer of the shaft net text, the layer of the shaft net line section and the layer of the shaft net auxiliary line can be obtained.
And then searching reversely by utilizing the information to find out the missing axial network objects, wherein the missing axial network objects and the initial extraction axial network objects obtained in the step S4 form all axial network objects together.
According to the specific embodiment of the invention, the building and structure CAD drawing in the step S11 is specifically a plan view of a project building standard layer, and the plan view of the project building standard layer is a file in dwg format.
In the above embodiment, a plan view of a standard floor of the building as shown in fig. 1 is selected.
Fig. 2 is a diagram showing a preliminary extracted shaft-net object obtained by analyzing fig. 1 by using the automatic shaft-net recognition method of the building and structure CAD drawing of the present invention.
Fig. 3 is a diagram showing the analysis of fig. 1 to find missing axis net objects by using the automatic identification method of the axis net of the building and structure CAD drawing of the present invention.
Fig. 4 is a diagram showing all the shaft net objects obtained by analyzing fig. 1 by the automatic shaft net identification method of the building and structure CAD drawing of the present invention.
Fig. 5 is an effect diagram after removing the resolved objects such as the axis net and the scale in fig. 1, and the diagram removes the information such as the axis net and the scale, and can be used as a basic drawing for identifying other components, which removes interference factors in the identifying process of other components, thereby being beneficial to improving the identifying precision and reducing the identifying difficulty of other components.
According to a specific embodiment of the present invention, in step S11, determining the range in which the shaft network needs to be extracted includes two ways:
in one approach, the standard floor plan is cut into files containing only a single frame through the range defined by each frame in the standard floor plan.
And secondly, manually framing a single frame in the standard layer plan, and determining the range of the axis net to be extracted.
It should be noted that:
(1) In step S12, all the tiles within the range where the axial net needs to be extracted are fried into the base object, which means that the tiles are decomposed by applying the decomposition command of Auto-CAD. The basic objects comprise a circle object, a straight line object, a multi-line segment object, a polygon object, a character object, a scale object and the like.
(2) In step S2, all objects in the range of the axis network need to be extracted are classified according to types, wherein the objects comprise a circle object, a straight line object, a multi-line segment object, a polygon object, a character object and a scale object. The scale object is a size, which is composed of a size boundary line, a size start-stop symbol, and a size number.
(3) In step S4, the reverse search refers to searching other axial net objects in the range of needing to extract the axial net according to the information such as the size of the axial net circle, the layer of the axial net text, the layer of the axial net line section, the layer of the axial net auxiliary line and the like in the initial axial net object, and the missing axial net object is found in the mode. For example, by searching for other circles in the layer of the axial circles, which have the same size as the axial circles, the circles are missing axial objects. Of course, missing axis net objects can be found through the layers of the axis net auxiliary line, the axis net line section and the axis net text respectively.
When the provided CAD drawing of the building and the structure is more standard (the standard refers to that the shaft net text is in the same layer, the shaft net circle, the shaft net auxiliary line, the shaft net line section and the like are respectively in the same layer or are in the same layer together), the missing shaft net characteristics can be quickly and accurately found through the mode. If the quality of the provided CAD drawing of the building and structure is lower, after the step of reverse search, the result of the reverse search needs to be manually checked, and the accuracy of the object is ensured by manually eliminating wrong selection or manually adding missing options. However, whether a step of manual verification is added or not, the automatic shaft network identification method for the CAD drawing of the building and structure still has higher efficiency compared with the existing manual mould turning operation mode.
According to an embodiment of the present invention, the basic object in step S12 includes a circle, a straight line, a multi-line segment, a polygon, a text, and a dimension line.
According to the embodiment of the present invention, when the tile definition with the attribute is included in the range of the shaft net in step S12, the attribute text needs to be restored.
According to the specific embodiment of the invention, the method further comprises the step of checking whether the plan of the project building standard layer can be normally opened and normally displayed by using AutoCAD software before the step S1. When the plan of the project building standard layer is a file which is drawn by non-original CAD software and is in dwg format, the file is converted into a primary file.
S5, according to the step S4, all the shaft net objects are obtained, and intersection points of the shaft nets in all different directions are extracted from the area surrounded by all the shaft net objects, wherein the intersection points comprise coordinate information of the intersection points and information of two shaft nets forming the intersection points. And taking the intersection point closest to the lower left corner of the maximum surrounding area among all the intersection points as a datum point. And calculating the relative coordinate information from all the intersection points to the datum points, and finishing the extraction of the axis network information, wherein the extracted axis network information is used as a main axis network of the project building.
In the implementation, if there is a supplementary shaft network in other drawings, it may be added to the main shaft network in step S5.
According to the specific embodiment of the invention, the automatic shaft network identification method of the building and structure CAD drawing further comprises the following steps:
S6, storing shaft network information
And (5) saving the extracted shaft network information in the step (S5) as a txt file, saving the txt file in a cloud database, and finishing the storage of the shaft network information.
In this embodiment, the range of the axial network to be extracted is determined by the plan view of the standard floor of the building in the project, and the range is used for extracting the information of the axial network of the building. Because the building standard layer corresponding to the plan of the project building standard layer is beneficial to extracting the information of the main shaft network, the accuracy of extracting the shaft network is improved.
According to the specific embodiment of the invention, the relative coordinate information in the step S5 refers to the distance from the intersection point to the reference point and the angle information, and the angle information refers to the included angle information between the connecting line of each intersection point and the reference point and the positive direction of the X coordinate axis. The relative coordinate expression mode is not a conventional expression mode in Auto-CAD software drawing, namely, the position of the intersection point of the shaft network is accurately determined through parameters of the distance and the included angle of the intersection point of the shaft network relative to the reference point.
Of course, in the implementation, other relative coordinate expression modes can be adopted, and the position of the intersection point of the axis network can also be accurately determined, for example, the increment parameters of the X axis and the Y axis of the intersection point of the axis network relative to the datum point.
The invention also discloses an application method of the shaft network of the building and structure CAD drawing, which comprises the following steps of completing modeling according to the building drawing or the structure drawing in the BIM modeling process, shifting and converting to the shaft network of the project building obtained in the implementation mode according to the shaft network data of each modeling object in the building drawing or the structure drawing, and automatically realizing the space positioning of each building model by combining elevation data.
In summary, the automatic shaft network identification method of the CAD drawing of the building and structure can assist in rapid filtering of shaft network information in the drawing identification process of the building drawing structure diagram, and can accurately extract the shaft network information.
The axis network information extracted by the axis network automatic identification method of the building and structure CAD drawing is applied to BIM modeling, so that the problem of automatic global positioning of a single modeling object in a project building in the BIM modeling process is solved, and the automation degree and efficiency of BIM modeling are improved.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.