CN114048535B - System and method for generating doors and windows in CAD wall layers during map construction - Google Patents

System and method for generating doors and windows in CAD wall layers during map construction Download PDF

Info

Publication number
CN114048535B
CN114048535B CN202111364436.5A CN202111364436A CN114048535B CN 114048535 B CN114048535 B CN 114048535B CN 202111364436 A CN202111364436 A CN 202111364436A CN 114048535 B CN114048535 B CN 114048535B
Authority
CN
China
Prior art keywords
wall
line
door
window
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.)
Active
Application number
CN202111364436.5A
Other languages
Chinese (zh)
Other versions
CN114048535A (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.)
Beijing Fengniao View Technology Co ltd
Original Assignee
Beijing Fengniao View Technology 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 Beijing Fengniao View Technology Co ltd filed Critical Beijing Fengniao View Technology Co ltd
Priority to CN202111364436.5A priority Critical patent/CN114048535B/en
Publication of CN114048535A publication Critical patent/CN114048535A/en
Application granted granted Critical
Publication of CN114048535B publication Critical patent/CN114048535B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Civil Engineering (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Structural Engineering (AREA)
  • General Engineering & Computer Science (AREA)
  • Architecture (AREA)
  • Remote Sensing (AREA)
  • Computational Mathematics (AREA)
  • Computer Graphics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present disclosure relates to a system and method for generating doors and windows in a CAD wall layer when constructing a map. The method comprises the following steps: acquiring a CAD electronic drawing, and confirming whether the acquired CAD electronic drawing can be analyzed; resolving the resolvable CAD electronic drawing to obtain a plurality of CAD layers; screening wall layers containing wall surface elements from the plurality of CAD layers; identifying wall elements based on features of the wall elements in the wall layer; and identifying a door and window line from parallel line segments between two parallel wall end lines and from parallel line segments between the parallel wall end lines and the wall surface line as door and window lines based on the wall surface pair lines and the wall end lines in the wall surface element, thereby generating a door and window in the constructed map based on the identified door and window lines.

Description

System and method for generating doors and windows in CAD wall layers during map construction
Technical Field
The invention relates to the field of map construction, in particular to a system and a method for generating doors and windows in a CAD wall layer during map construction.
Background
Entering the 21 st century, indoor positioning and navigation entered the rapid development period. The positioning and navigation of large buildings such as airports, markets and hospitals are based on indoor maps, and the automatic generation of the indoor maps becomes urgent need, but the existing indoor map modeling has low automation degree, and the main modeling method comprises the following four steps:
The three-dimensional laser scanning is used for acquiring indoor space data, and then the acquired data is manually processed, so that an indoor map is obtained, and the technology requires drawing staff to carry equipment into the room, so that the economic cost is too high; the indoor map is drawn manually by using modeling software, and the method is not suitable for drawing a large-scale indoor map due to low automation degree; the method is characterized in that the image processing and the neural network are used for modeling indoor space information, gray level image conversion, edge detection, morphological corrosion expansion and other operations are needed to be carried out on grid images in the early modeling stage, information of important components is lost, the accuracy is difficult to meet the requirements, a large number of pictures are needed to train the neural network in the mode identification stage, even if important components such as walls, doors and windows can be identified, the identification frame can only frame the components, the edge of the accurately framed components of the identification frame is difficult, and the technology is suitable for a simple indoor map with the walls represented by black thick lines; manually tracing edges on walls, doors and windows by using CAD building plan views through a mapping software ArcGIS is a main method for manufacturing indoor maps at present, and mapping staff can redraw in the mapping software while recognizing the images, so that a great deal of manpower is required, and usually, the map of one floor needs to be drawn for a plurality of hours.
Since the 21 st century, CAD electronic drawings have been widely used in many fields such as construction, design, and manufacturing, and AutoCAD is the most typical example. For the building field, more than 90% of indoor map drawings are stored in the form of CAD drawing files, but a process of 'translation' or 'recognition' is needed from an electronic file to a specific model in the professional field. The prior translation work is completed manually: drawing staff can recognize the drawing and redraw in drawing software at the same time, and edit the drawing. If the drawing software can automatically complete the translation work, the production efficiency is definitely greatly improved.
CAD electronic drawing files are used for exporting SVG base drawing pictures through AutoCAD software, a buzzing cloud enterprise user uses drawing application to import the SVG base drawing, the actual size of the base drawing is guaranteed through calibration, the enterprise user draws edges on the base drawing, corresponding shapes are drawn again, and a corresponding file fmap is generated. However, the map drawing efficiency is low, secondary drawing is required for the existing graph, and the redrawing efficiency is low when the CAD graph is more complicated, so that the user experience is affected.
Therefore, an automatic conversion system is expected to be obtained, so that part of components in CAD electronic files can be automatically converted, automatic calculation of engineering files is completed, accuracy and recognition efficiency of graphic element recognition are improved to a large extent, automatic conversion from CAD files to FMAP files is realized, and accordingly drawing efficiency of users is improved.
Disclosure of Invention
Therefore, the applicant of the present disclosure proposes a technology capable of automatically extracting the walls, doors and windows in the parsed CAD building plan and generating the surface object, considering the case that a plurality of types of walls exist in the same layer, the extraction of the above components is a key technology for extracting the closed surface, and the closed surface is a basic element of the three-dimensional indoor map, and the method can improve the automatic drawing level of the indoor map. According to the method, based on the analyzed CAD plane building diagram, the wall body is automatically extracted by using a space calculation method, and the door and window components are automatically generated on the wall body, so that the labor and time cost can be saved, and the manufacturing efficiency of the indoor map can be improved.
According to one aspect of the present disclosure, there is provided a method of generating a door and window in a CAD wall layer when constructing a map, comprising: acquiring a CAD electronic drawing, and confirming whether the acquired CAD electronic drawing can be analyzed; resolving the resolvable CAD electronic drawing to obtain a plurality of CAD layers; screening wall layers containing wall surface elements from the plurality of CAD layers; identifying wall elements based on features of the wall elements in the wall layer; and identifying a door and window line from parallel line segments between two parallel wall end lines and from parallel line segments between the parallel wall end lines and the wall surface line as door and window lines based on the wall surface pair lines and the wall end lines in the wall surface element, thereby generating a door and window in the constructed map based on the identified door and window lines.
The method for generating a door and window in a CAD wall layer when constructing a map according to the present disclosure, wherein the identifying the door and window line by the parallel line segment between the two parallel wall end lines includes: acquiring and comparing angles between the candidate wall end lines, and determining line elements between any two candidate wall end lines as candidate door and window lines when the angles between any two candidate wall end lines are smaller than a first preset angle and the length is within a first preset length range; acquiring an included angle between the length of the candidate door and window line and the candidate wall end line, and determining the candidate door and window line as a to-be-determined door and window line when the difference between the included angle and 90 degrees is smaller than a second preset angle and the length of the candidate door and window line is within a second preset length range; and selecting the shortest group of undetermined door and window lines from the undetermined door and window lines as the optimal door and window line between the candidate wall end lines.
The method for generating a door and window in a CAD wall layer when constructing a map according to the present disclosure, wherein the identifying the parallel line segment between the wall end line and the wall surface line as the door and window line includes: acquiring and comparing angles between the wall end lines and the wall surface lines, and determining line elements between any wall end line and the wall surface line as candidate door and window lines when the difference between the angle between any wall end line and the wall surface line and the 90 degrees is smaller than a second preset angle and the projection length of the wall end line on the wall surface line is within a first preset length range; acquiring an included angle between the length of the candidate door and window line and the candidate wall end line, and determining the candidate door and window line as a to-be-determined door and window line when the difference between the included angle and 90 degrees is smaller than a second preset angle and the length of the candidate door and window line is within a second preset length range; and selecting the shortest group of undetermined door and window lines from the undetermined door and window lines as the optimal door and window line between the candidate wall end lines.
A method of generating a door and window in a CAD wall layer when constructing a map according to the present disclosure, wherein selecting a wall layer comprising wall surface elements from the plurality of CAD layers comprises: counting points, planes and line elements for each CAD layer; counting the proportion of the point, the plane and the line elements in all the elements; and when the proportion of the line elements is smaller than a second threshold value, identifying the aimed CAD layer as not being a wall layer and eliminating the CAD layer.
The method for generating doors and windows in CAD wall layers when constructing a map according to the present disclosure, wherein the screening wall layers containing wall surface elements from the plurality of CAD wall layers includes: removing point and surface elements in each CAD layer; counting the number of wall surface wires forming a wall; and determining the CAD layer with the ratio of the counted number of the wall surface lines to the number of all the line segments larger than the first threshold value as the wall layer.
A method for generating a door and window in a CAD wall layer when constructing a map according to the present disclosure, wherein the counting the number of wall lines that constitute a wall includes: selecting each line segment in a designated layer one by one, and determining the relative slope and distance between the selected line segment and the adjacent line segment; and determining that the selected line segment is a wall surface paired line when the relative slope between the selected line segment and the adjacent line segment is smaller than the preset slope and the distance between the selected line segment and the adjacent line segment is within the preset range.
The method for generating doors and windows in the CAD wall layer when constructing the map according to the disclosure, wherein the counting the number of the wall surface lines forming the wall further comprises: and (3) counting the line segments which are simultaneously connected with the wall surface paired lines as wall end lines.
According to another aspect of the present disclosure, there is provided a system for generating a door and window in a CAD wall layer when constructing a map, comprising: the drawing acquisition component acquires the CAD electronic drawing and confirms whether the acquired CAD electronic drawing can be analyzed; the layer analysis component is used for analyzing the resolvable CAD electronic drawing to obtain a plurality of CAD layers; a wall layer screening component for screening wall layers containing wall surface elements from the plurality of CAD layers; the wall surface identification component is used for identifying wall surface elements based on the characteristics of the wall surface elements in the wall layer; and a door and window generating component for identifying a door and window line from a parallel line segment between two parallel wall end lines and a parallel line segment between the parallel wall end lines and the wall surface line as a door and window line based on the wall surface paired lines and the wall end lines in the wall surface element, thereby generating a door and window in the constructed map based on the identified door and window line.
A system for generating a door and window in a CAD wall layer when constructing a map according to the present disclosure, wherein the door and window generation assembly identifies a door and window line from a parallel line segment between two parallel wall end lines, comprising: acquiring and comparing angles between the candidate wall end lines, and determining line elements between any two candidate wall end lines as candidate door and window lines when the angles between any two candidate wall end lines are smaller than a first preset angle and the length is within a first preset length range; acquiring an included angle between the length of the candidate door and window line and the candidate wall end line, and determining the candidate door and window line as a to-be-determined door and window line when the difference between the included angle and 90 degrees is smaller than a second preset angle and the length of the candidate door and window line is within a second preset length range; and selecting the shortest group of undetermined door and window lines from the undetermined door and window lines as the optimal door and window line between the candidate wall end lines.
A system for generating a door and window in a CAD wall layer when constructing a map according to the present disclosure, wherein the door and window generation assembly identifies a door and window line from a parallel line segment between two parallel wall end lines, comprising: acquiring and comparing angles between the wall end lines and the wall surface lines, and determining line elements between any wall end line and the wall surface line as candidate door and window lines when the difference between the angle between any wall end line and the wall surface line and the 90 degrees is smaller than a second preset angle and the projection length of the wall end line on the wall surface line is within a first preset length range; acquiring an included angle between the length of the candidate door and window line and the candidate wall end line, and determining the candidate door and window line as a to-be-determined door and window line when the difference between the included angle and 90 degrees is smaller than a second preset angle and the length of the candidate door and window line is within a second preset length range; and selecting the shortest group of undetermined door and window lines from the undetermined door and window lines as the optimal door and window line between the candidate wall end lines.
By adopting the system and the method for generating the doors and windows in the CAD wall layer when the map is constructed, CAD files can be rapidly and accurately identified, secondary drawing of the map by enterprise users is avoided, and drawing efficiency is improved. Specifically, wall-containing layers are automatically recommended to diagrammers, time for manually selecting the layers is saved, walls, doors and windows in DWG/DXF building drawings can be rapidly and accurately identified, space areas in a two-dimensional map form a closed surface, the closed surface represents elements such as shops, rooms, stairways and toilets in a three-dimensional indoor map, labor cost and time of the indoor map can be greatly reduced by automatically and accurately identifying the wall, the door and the window pairs, and gaps and embedding errors between the walls in a CAD building plan can be effectively corrected by automatically extracting the closed surface, so that the walls and the doors and the windows can be rapidly enclosed into the closed surface, the problem that a fault tolerance mechanism is lacking in image identification is solved, and the precision of the closed surface can be adjusted according to specific needs.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
The disclosure will now be described in detail by way of example with reference to the accompanying drawings, in which:
Fig. 1 is a schematic diagram illustrating an example of a system for generating a door and window in a CAD wall layer when constructing a map according to the present disclosure.
Fig. 2 is a general flow diagram illustrating an embodiment of a method of generating a door and window in a CAD wall layer when constructing a map according to the present disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the present disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, one of the two layers may be referred to hereinafter as a first layer or a second layer, and similarly the other of the two layers may be referred to as a second layer or a first layer, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination" depending on the context.
In order that those skilled in the art will better understand the present disclosure, the present disclosure will be described in further detail below with reference to the accompanying drawings and detailed description.
Fig. 1 is a schematic diagram illustrating an example of a system for generating a door and window in a CAD wall layer when constructing a map according to the present disclosure. As shown in fig. 1, a system 100 for generating a door and window in a CAD wall layer when constructing a map includes: a drawing acquisition component 110, a layer parsing component 120, a wall layer screening component 130, a wall surface identification component 140, a door and window generation component 150, and a closing surface extraction component 160.
As shown in fig. 1, the drawing acquisition component 110 acquires a CAD electronic drawing, and confirms whether the acquired CAD electronic drawing can be resolved. Specifically, by inputting a DWG or DXF file of a CAD electronic drawing, then performing DWG judgment, obtaining a version type of the DWG file, and performing oda _file_converter data conversion on the input electronic drawing by using a CAD conversion assistant tool, then the layer parsing component 120 parses DXF data using a kabeja library, which means that the input CAD electronic drawing is resolvable if parsing is successful, otherwise, the input CAD electronic drawing cannot be resolved, and a map corresponding to the CAD electronic drawing cannot be constructed by using the technical means of the present disclosure. The layer parsing component 120 parses the resolvable CAD electronic drawing to obtain multiple CAD layers.
The wall layer screening assembly 130 then screens the wall layer containing the wall surface elements from the plurality of CAD layers. Specifically, the wall layer screening component 130 removes the point and face elements from each CAD layer, counts the number of wall surface lines that make up the wall, and determines the CAD layer for which the ratio of the counted number of wall surface lines to the number of all line segments is greater than the first threshold as the wall layer. Thus, a plurality of useless layers can be automatically filtered. Optionally the wall layer screening component 130 counts points, faces, and line elements for each CAD layer; counting the proportion of the point, the plane and the line elements in all the elements; and when the proportion of the line elements is smaller than a second threshold value, identifying the aimed CAD layer as not being a wall layer and eliminating the CAD layer. In another embodiment, some CAD drawings may use a common layer name or type name convention, by which the wall layer screening component 130 may automatically identify a layer with a fixed name as a wall layer or a surface layer. Alternatively, the wall layer screening component 130 can automatically filter out some layers that are significantly not part of the wall layer by a standard domain name library, such as automatically identifying invalid layers such as annotated line drawing layers, lead drawing layers, etc. This also reduces the amount of computation to perform wall layer screening. Coarse screening may be performed without using a domain name library. For all layers that are coarsely screened, a full map geoJson is generated and a PNG floor is generated. The wall layer screening component 130 then determines for each CAD layer which layer is the wall layer. Thus, a pre-treated geoJson wall layer was obtained.
Subsequently, as shown in FIG. 1, the wall surface identification component 140 identifies wall surface elements based on the characteristics of the wall surface elements in the wall layer. The wall surface elements are very remarkable in characteristics, for example, in a wall layer of CAD, the wall is usually formed by two parallel lines, which may be straight lines or arc lines. The wall section has not only wall face lines but also end face lines, thereby forming a complete wall horizontal cross section. Thus, in CAD electronic drawings, a wall is made up of two segments, the wall line being shown in the lower drawing as a solid line, the length being equal to the length of the wall, the wall end line being shown as a dashed line, the length being generally equal to the thickness of the wall.
In order to identify the wall surface, optionally, the layer may be preprocessed, and line segments in the layer may be extracted. The line segments are divided into arc line segments and non-arc line segments. The non-arc line segments are divided into horizontal groups, vertical groups and inclined groups. The non-arc line segments are subjected to duplication removal and fusion, wherein duplication removal and fusion comprises the steps of dividing the line segments in the layer obtained after analysis into arc line segments and non-arc line segments according to a mode of analyzing a DWG or DXF drawing; and filtering out the line segments with equal starting points and ending points, filtering out the repeated line segments and the line segments with opposite starting points and ending points, and finally fusing the line segments with equal radian or approximately equal radian and connected in the non-arc line group.
When two or more parallel lines overlap each other and the distance is equal to the wall thickness or within a threshold value, then the wall is considered. The combination mode of the wall bodies formed by the line segments can be divided into one-to-one, one-to-many and many-to-many walls. Let a and b be two line segments in the planar coordinate system R 2, a= [ (x 1, y 1), (x 2, y 2) ], b= [ (x 3, y 3), (x 4, y 4) ], an angle a with the x-axis is α, b with the x-axis is β, d is wall thickness, d ab is the distance of a and b, ε is a distance threshold, θ is an angle threshold, the following condition should be satisfied:
a is parallel to b, |alpha-beta| < theta
A overlaps b, max (x 1, x 2) > min (x 3, x 4) and min (x 1, x 2) < max (x 3, x 4) or max (y 1, y 2) > min (y 3, y 4) and min (y 1, y 2) < max (y 3, y 4) and the distance a to b is equal to or approximately equal to the wall thickness, |d ab -d| < epsilon
Specifically, the wall surface recognition component 140 selects each line segment in a designated layer one by one, and determines the relative slope and distance between the selected line segment and its adjacent line segment; and determining that the selected line segment is a wall surface paired line when the relative slope between the selected line segment and the adjacent line segment is smaller than the preset slope and the distance between the selected line segment and the adjacent line segment is within the preset range, and identifying the wall surface paired line as a wall surface element. In addition, the wall surface recognition unit 140 recognizes a line segment connecting the wall surface pair lines at the same time as a wall end line. In summary, for a specified layer and a determined edge width, an existing search algorithm is used to search the entire electronic file, and according to the layer and the height that can be matched, wall elements can be automatically generated.
The wall identification extraction is divided into straight wall extraction and arc wall extraction, and the extraction methods of the two are different. The linear wall is extracted by grouping and preprocessing line segments in advance to increase the calculation speed, and then all the line segments forming a wall are divided into two groups, namely a parallel group and a collinear group according to the intercept. The arc wall is composed of a plurality of short line segments, the short line segments are converted from arcs in source data, whether any two short line segments are decomposed from the same arc line or not can be judged by recording the numbers of the short line segments in geojson layers, if the short line segments are decomposed from the same arc line, the short line segments are divided into the same parallel group or the same line group, and if the short line segments are not converted from the same arc line, the intercept of the short line segments and the line segments can be judged to be grouped.
When multiple types of walls exist in the same layer, there may be multiple overlapping line segments and the same line segment may constitute a wall, and the line segments are preferable by calculating the overlapping rate. The overlap ratio is defined as follows:
Let a and b be two line segments in the plane coordinate system R2, based on a, the overlapping ratio of b on a refers to the projection length of b on a divided by the sum of the lengths of a and b, and the value is less than 1.
The identification and extraction of the wall are divided into arc wall extraction and non-arc wall extraction, and the accuracy and time can be improved by processing the arc wall extraction and the non-arc wall extraction respectively. The non-arc wall extraction is divided into a horizontal group, a vertical group and an inclined group, and the walls are respectively extracted by different algorithms, so that the efficiency can be improved. When different types of walls exist in the same layer, the wall lines are preferred by the overlap ratio.
After identifying all wall surface elements, the door and window generating component 150 identifies a door and window line based on the wall surface paired line and the wall end line, and identifies a parallel line segment between two parallel wall end lines as a door and window line; and identifying the parallel line segments between the parallel wall end lines and the wall surface lines as door and window lines. Specifically, the door and window generation component 150 obtains and compares the angles between the candidate wall end lines, and when the angle between any two candidate wall end lines is smaller than the first predetermined angle and the length is within the first predetermined length range, determines the line element between any two candidate wall end lines as the candidate door and window line; acquiring an included angle between the length of the candidate door and window line and the candidate wall end line, and determining the candidate door and window line as a to-be-determined door and window line when the difference between the included angle and 90 degrees is smaller than a second preset angle and the length of the candidate door and window line is within a second preset length range; and selecting the shortest group of undetermined door and window lines from the undetermined door and window lines as the optimal door and window line between the candidate wall end lines. Alternatively, the door and window generating assembly 150 obtains and compares the angle between the wall end line and the wall surface line, and determines the line element between any wall end line and the wall surface line as the candidate door and window line when the difference between the angle between any wall end line and the wall surface line and the 90 degrees is smaller than the second predetermined angle and the projection length of the wall end line on the wall surface line is within the first predetermined length range; acquiring an included angle between the length of the candidate door and window line and the candidate wall end line, and determining the candidate door and window line as a to-be-determined door and window line when the difference between the included angle and 90 degrees is smaller than a second preset angle and the length of the candidate door and window line is within a second preset length range; and selecting the shortest group of undetermined door and window lines from the undetermined door and window lines as the optimal door and window line between the candidate wall end lines.
Through the process, the door and window are automatically generated according to the wall end line and the wall surface line of the wall, and the door and window surface is formed, so that the information of the door and window in CAD source data does not need to be extracted or input.
Fig. 2 is a general flow diagram illustrating an embodiment of a method of generating a door and window in a CAD wall layer when constructing a map according to the present disclosure. As shown in fig. 2, first, at step S210, a CAD electronic drawing is acquired by the drawing acquisition component 110, and it is confirmed whether the acquired CAD electronic drawing can be parsed. Specifically, the version type of the DWG file is obtained by inputting the DWG or DXF file of the CAD electronic drawing and then performing DWG judgment, and oda _file_converter data conversion is performed on the input electronic drawing by a CAD conversion assistant tool. Then, in step S220, DXF data is parsed by the layer parsing component 120 using the kabeja library, if the parsing is successful, it means that the input CAD electronic drawing is resolvable, otherwise, the input CAD electronic drawing cannot be resolved, and a map corresponding to the CAD electronic drawing cannot be constructed by using the technical means of the present disclosure. The resolvable CAD electronic drawing is resolved by the layer resolution component 120 to obtain a plurality of CAD layers.
Subsequently, at step S230, wall layers containing wall surface elements are screened from the plurality of CAD layers by the wall layer screening component 130. Specifically, the wall layer screening component 130 removes the point and face elements from each CAD layer, counts the number of wall surface lines that make up the wall, and determines the CAD layer for which the ratio of the counted number of wall surface lines to the number of all line segments is greater than the first threshold as the wall layer. Thus, a plurality of useless layers can be automatically filtered. Optionally the wall layer screening component 130 counts points, faces, and line elements for each CAD layer; counting the proportion of the point, the plane and the line elements in all the elements; and when the proportion of the line elements is smaller than a second threshold value, identifying the aimed CAD layer as not being a wall layer and eliminating the CAD layer. In another embodiment, some CAD drawings may use a common layer name or type name convention, by which the wall layer screening component 130 may automatically identify a layer with a fixed name as a wall layer or a surface layer. Alternatively, the wall layer screening component 130 can automatically filter out some layers that are significantly not part of the wall layer by a standard domain name library, such as automatically identifying invalid layers such as annotated line drawing layers, lead drawing layers, etc. This also reduces the amount of computation to perform wall layer screening. Coarse screening may be performed without using a domain name library. For all layers that are coarsely screened, a full map geoJson is generated and a PNG floor is generated. The wall layer screening component 130 then determines for each CAD layer which layer is the wall layer. Thus, a pre-treated geoJson wall layer was obtained.
Subsequently, as shown in fig. 2, at step S240, wall elements are identified by the wall surface identification component 140 based on the characteristics of the wall elements in the wall layer. The wall surface elements are very remarkable in characteristics, for example, in a wall layer of CAD, the wall is usually formed by two parallel lines, which may be straight lines or arc lines. The wall section has not only wall face lines but also end face lines, thereby forming a complete wall horizontal cross section.
When two or more parallel lines overlap each other and the distance is equal to the wall thickness or within a threshold value, then the wall is considered. The combination mode of the wall bodies formed by the line segments can be divided into one-to-one, one-to-many and many-to-many walls. Let a and b be two line segments in the planar coordinate system R 2, a= [ (x 1, y 1), (x 2, y 2) ], b= [ (x 3, y 3), (x 4, y 4) ], an angle a with the x-axis is α, b with the x-axis is β, d is wall thickness, d ab is the distance of a and b, ε is a distance threshold, θ is an angle threshold, the following condition should be satisfied:
a is parallel to b, |alpha-beta| < theta
A overlaps b, max (x 1, x 2) > min (x 3, x 4) and min (x 1, x 2) < max (x 3, x 4) or max (y 1, y 2) > min (y 3, y 4) and min (y 1, y 2) < max (y 3, y 4) and the distance a to b is equal to or approximately equal to the wall thickness, |d ab -d| < epsilon
Specifically, the wall surface recognition component 140 selects each line segment in a designated layer one by one, and determines the relative slope and distance between the selected line segment and its adjacent line segment; and determining that the selected line segment is a wall surface paired line when the relative slope between the selected line segment and the adjacent line segment is smaller than the preset slope and the distance between the selected line segment and the adjacent line segment is within the preset range, and identifying the wall surface paired line as a wall surface element. In addition, the wall surface recognition unit 140 recognizes a line segment connecting the wall surface pair lines at the same time as a wall end line. In summary, for a specified layer and a determined edge width, an existing search algorithm is used to search the entire electronic file, and according to the layer and the height that can be matched, wall elements can be automatically generated.
The wall identification extraction is divided into straight wall extraction and arc wall extraction, and the extraction methods of the two are different. The linear wall is extracted by grouping and preprocessing line segments in advance to increase the calculation speed, and then all the line segments forming a wall are divided into two groups, namely a parallel group and a collinear group according to the intercept. The arc wall is composed of a plurality of short line segments, the short line segments are converted from arcs in source data, whether any two short line segments are decomposed from the same arc line or not can be judged by recording the numbers of the short line segments in geojson layers, if the short line segments are decomposed from the same arc line, the short line segments are divided into the same parallel group or the same line group, and if the short line segments are not converted from the same arc line, the intercept of the short line segments and the line segments can be judged to be grouped.
When multiple types of walls exist in the same layer, there may be multiple overlapping line segments and the same line segment may constitute a wall, and the line segments are preferable by calculating the overlapping rate. The overlap ratio is defined as follows:
Let a and b be two line segments in the plane coordinate system R2, based on a, the overlapping ratio of b on a refers to the projection length of b on a divided by the sum of the lengths of a and b, and the value is less than 1.
The identification and extraction of the wall are divided into arc wall extraction and non-arc wall extraction, and the accuracy and time can be improved by processing the arc wall extraction and the non-arc wall extraction respectively. The non-arc wall extraction is divided into a horizontal group and a vertical combined inclined group, and the walls are extracted respectively by different algorithms, so that the efficiency can be improved. When different types of walls exist in the same layer, the wall lines are preferred by the overlap ratio.
Optionally, at step S250, the door and window line is identified by the door and window generating assembly 150 based on the wall pairing line and the wall end line, and a parallel line segment between two parallel wall end lines is identified as the door and window line; and identifying the parallel line segments between the parallel wall end lines and the wall surface lines as door and window lines. And automatically generating the door and window according to the wall end line and the wall surface line of the wall, and forming the door and window surface without extracting or inputting information of the door and window in the source data.
By adopting the system and the method for generating the doors and windows in the CAD wall layer when the map is constructed, CAD files can be rapidly and accurately identified, secondary drawing of the map by enterprise users is avoided, and drawing efficiency is improved. Specifically, wall-containing layers are automatically recommended to diagrammers, time for manually selecting the layers is saved, walls, doors and windows in DWG/DXF building drawings can be rapidly and accurately identified, space areas in a two-dimensional map form a closed surface, the closed surface represents elements such as shops, rooms, stairways and toilets in a three-dimensional indoor map, labor cost and time of the indoor map can be greatly reduced by automatically and accurately identifying the wall, the door and the window pairs, and gaps and embedding errors between the walls in a CAD building plan can be effectively corrected by automatically extracting the closed surface, so that the walls and the doors and the windows can be rapidly enclosed into the closed surface, the problem that a fault tolerance mechanism is lacking in image identification is solved, and the precision of the closed surface can be adjusted according to specific needs.
While the basic principles of the present disclosure have been described above in connection with specific embodiments, it should be noted that all or any steps or components of the methods and apparatus of the present disclosure can be implemented in hardware, firmware, software, or combinations thereof in any computing device (including processors, storage media, etc.) or network of computing devices, as would be apparent to one of ordinary skill in the art upon reading the present disclosure.
Thus, the objects of the present disclosure may also be achieved by running a program or set of programs on any computing device. The computing device may be a well-known general purpose device. Thus, the objects of the present disclosure may also be achieved by simply providing a program product containing program code for implementing the method or apparatus. That is, such a program product also constitutes the present disclosure, and a storage medium storing such a program product also constitutes the present disclosure. It is apparent that the storage medium may be any known storage medium or any storage medium developed in the future.
It should also be noted that in the apparatus and methods of the present disclosure, it is apparent that the components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered equivalent to the present disclosure. The steps of executing the series of processes may naturally be executed in chronological order in the order described, but are not necessarily executed in chronological order. Some steps may be performed in parallel or independently of each other.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (9)

1. A method of generating a door and window in a CAD wall layer when constructing a map, comprising:
acquiring a CAD electronic drawing, and confirming whether the acquired CAD electronic drawing can be analyzed;
Resolving the resolvable CAD electronic drawing to obtain a plurality of CAD layers;
Screening wall layers containing wall surface elements from the plurality of CAD layers, including: for each CAD layer, removing the points and the surface elements, counting the number of wall surface lines forming the wall, and determining the CAD layer with the ratio of the counted number of the wall surface lines to the number of all line segments being larger than a first threshold value as the wall layer;
identifying wall elements based on features of the wall elements in the wall layer; and
Based on the wall face paired lines and the wall end lines in the wall face elements, the door and window lines are identified by parallel line segments between two parallel wall end lines and the parallel line segments between the parallel wall end lines and the wall face lines are identified as the door and window lines, thereby generating the door and window in the constructed map based on the identified door and window lines.
2. The method of generating a door and window in a CAD wall layer when constructing a map of claim 1, wherein said identifying a door and window line from parallel line segments between two parallel wall end lines comprises:
Acquiring and comparing angles between the candidate wall end lines, and determining line elements between any two candidate wall end lines as candidate door and window lines when the angles between any two candidate wall end lines are smaller than a first preset angle and the length is within a first preset length range;
acquiring an included angle between the length of the candidate door and window line and the candidate wall end line, and determining the candidate door and window line as a to-be-determined door and window line when the difference between the included angle and 90 degrees is smaller than a second preset angle and the length of the candidate door and window line is within a second preset length range; and
And selecting the shortest group of undetermined door and window lines from the undetermined door and window lines as the optimal door and window line between the candidate wall end lines.
3. The method of generating a door and window in a CAD wall layer when constructing a map of claim 1, wherein said identifying parallel line segments between parallel wall end lines and wall face lines as door and window lines comprises:
Acquiring and comparing angles between the wall end lines and the wall surface lines, and determining line elements between any wall end line and the wall surface line as candidate door and window lines when the difference between the angle between any wall end line and the wall surface line and the 90 degrees is smaller than a second preset angle and the projection length of the wall end line on the wall surface line is within a first preset length range;
acquiring an included angle between the length of the candidate door and window line and the candidate wall end line, and determining the candidate door and window line as a to-be-determined door and window line when the difference between the included angle and 90 degrees is smaller than a second preset angle and the length of the candidate door and window line is within a second preset length range; and
And selecting the shortest group of undetermined door and window lines from the undetermined door and window lines as the optimal door and window line between the candidate wall end lines.
4. The method of generating a door and window in a CAD wall layer when constructing a map of claim 1, wherein screening a wall layer comprising wall surface elements from the plurality of CAD layers comprises:
counting points, planes and line elements for each CAD layer;
Counting the proportion of the point, the plane and the line elements in all the elements; and
When the ratio of the line elements is less than the second threshold, the CAD layer is identified as not being a wall layer and is eliminated.
5. The method of generating a door and window in a CAD wall layer when constructing a map of claim 1, wherein said counting the number of wall surface lines that make up a wall comprises:
selecting each line segment in a designated layer one by one, and determining the relative slope and distance between the selected line segment and the adjacent line segment; and
And determining the wall surface paired line between the selected line segment and the adjacent line segment when the relative slope between the selected line segment and the adjacent line segment is smaller than the preset slope and the distance between the selected line segment and the adjacent line segment is within the preset range.
6. The method for generating a door and window in a CAD wall layer when constructing a map of claim 5, wherein said counting the number of wall surface lines that make up a wall further comprises: and (3) counting the line segments which are simultaneously connected with the wall surface paired lines as wall end lines.
7. A system for generating a door and window in a CAD wall layer when constructing a map, comprising:
The drawing acquisition component acquires the CAD electronic drawing and confirms whether the acquired CAD electronic drawing can be analyzed;
The layer analysis component is used for analyzing the resolvable CAD electronic drawing to obtain a plurality of CAD layers;
A wall layer screening assembly for screening wall layers containing wall surface elements from the plurality of CAD layers, comprising: for each CAD layer, removing the points and the surface elements, counting the number of wall surface lines forming the wall, and determining the CAD layer with the ratio of the counted number of the wall surface lines to the number of all line segments being larger than a first threshold value as the wall layer;
The wall surface identification component is used for identifying wall surface elements based on the characteristics of the wall surface elements in the wall layer; and
And a door and window generating component for identifying a door and window line by using parallel line segments between two parallel wall end lines and identifying a parallel line segment between the parallel wall end lines and the wall surface line as a door and window line based on the wall surface paired lines and the wall end lines in the wall surface elements, thereby generating a door and window in the constructed map based on the identified door and window line.
8. The system for generating a door and window in a CAD wall layer when constructing a map of claim 7, wherein the door and window generation assembly identifies a parallel line segment between two parallel wall end lines comprising: acquiring and comparing angles between the candidate wall end lines, and determining line elements between any two candidate wall end lines as candidate door and window lines when the angles between any two candidate wall end lines are smaller than a first preset angle and the length is within a first preset length range; acquiring an included angle between the length of the candidate door and window line and the candidate wall end line, and determining the candidate door and window line as a to-be-determined door and window line when the difference between the included angle and 90 degrees is smaller than a second preset angle and the length of the candidate door and window line is within a second preset length range; and selecting the shortest group of undetermined door and window lines from the undetermined door and window lines as the optimal door and window line between the candidate wall end lines.
9. The system for generating a door and window in a CAD wall layer when constructing a map of claim 7, wherein the door and window generation assembly identifies a parallel line segment between two parallel wall end lines comprising: acquiring and comparing angles between the wall end lines and the wall surface lines, and determining line elements between any wall end line and the wall surface line as candidate door and window lines when the difference between the angle between any wall end line and the wall surface line and the 90 degrees is smaller than a second preset angle and the projection length of the wall end line on the wall surface line is within a first preset length range;
acquiring an included angle between the length of the candidate door and window line and the candidate wall end line, and determining the candidate door and window line as a to-be-determined door and window line when the difference between the included angle and 90 degrees is smaller than a second preset angle and the length of the candidate door and window line is within a second preset length range; and
And selecting the shortest group of undetermined door and window lines from the undetermined door and window lines as the optimal door and window line between the candidate wall end lines.
CN202111364436.5A 2021-11-17 2021-11-17 System and method for generating doors and windows in CAD wall layers during map construction Active CN114048535B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111364436.5A CN114048535B (en) 2021-11-17 2021-11-17 System and method for generating doors and windows in CAD wall layers during map construction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111364436.5A CN114048535B (en) 2021-11-17 2021-11-17 System and method for generating doors and windows in CAD wall layers during map construction

Publications (2)

Publication Number Publication Date
CN114048535A CN114048535A (en) 2022-02-15
CN114048535B true CN114048535B (en) 2024-06-21

Family

ID=80209913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111364436.5A Active CN114048535B (en) 2021-11-17 2021-11-17 System and method for generating doors and windows in CAD wall layers during map construction

Country Status (1)

Country Link
CN (1) CN114048535B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114756928B (en) * 2022-03-23 2024-05-28 福建晨曦信息科技集团股份有限公司 Wall identification method, computer equipment and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012048763A (en) * 2005-09-20 2012-03-08 Fukui Computer Kk Closed area identification method
CN109271704A (en) * 2018-09-12 2019-01-25 深圳市彬讯科技有限公司 CAD house type forms recognition methods and CAD house type forms identification device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103390088A (en) * 2013-07-31 2013-11-13 浙江大学 Full-automatic three-dimensional conversion method aiming at grating architectural plan
JP6090962B1 (en) * 2016-09-20 2017-03-08 株式会社トーアエンジニアリング CAD data automatic analyzer and computer program
US11520948B2 (en) * 2018-09-10 2022-12-06 Mappedin Inc. Systems and methods for creating electronic indoor maps
CN110189412B (en) * 2019-05-13 2023-01-03 武汉大学 Multi-floor indoor structured three-dimensional modeling method and system based on laser point cloud
KR20200059193A (en) * 2020-03-09 2020-05-28 주식회사 케이티 Building information format, system and method for using the building information format
KR102212075B1 (en) * 2020-09-09 2021-02-04 어스앤컴퍼니 주식회사 Method and program for modeling 3-dimensional drawing of walls in 2-dimensional architechural drawing
CN113642065B (en) * 2021-06-28 2024-03-12 中国地质大学(武汉) Indoor semi-automatic drawing and modeling method based on DXF vector plan

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012048763A (en) * 2005-09-20 2012-03-08 Fukui Computer Kk Closed area identification method
CN109271704A (en) * 2018-09-12 2019-01-25 深圳市彬讯科技有限公司 CAD house type forms recognition methods and CAD house type forms identification device

Also Published As

Publication number Publication date
CN114048535A (en) 2022-02-15

Similar Documents

Publication Publication Date Title
Badenko et al. Scan-to-BIM methodology adapted for different application
Jung et al. Automated 3D wireframe modeling of indoor structures from point clouds using constrained least-squares adjustment for as-built BIM
Hong et al. Semi-automated approach to indoor mapping for 3D as-built building information modeling
CN107045526A (en) A kind of pattern recognition method of electronics architectural working drawing
CN114036616B (en) System and method for generating closed surface based on CAD (computer aided design) electronic drawing when constructing map
JP6781432B2 (en) Radio wave propagation simulation model creation method, creation system, creation device and creation program
Tran et al. Building change detection through comparison of a lidar scan with a building information model
Bassier et al. Comparison of 2D and 3D wall reconstruction algorithms from point cloud data for as-built BIM.
Yin et al. Automatic layer classification method-based elevation recognition in architectural drawings for reconstruction of 3D BIM models
CN114048535B (en) System and method for generating doors and windows in CAD wall layers during map construction
Zhang et al. A systematic review of automated BIM modelling for existing buildings from 2D documentation
Wysocki et al. Combining visibility analysis and deep learning for refinement of semantic 3D building models by conflict classification
CN117455905B (en) Intelligent detection method and system for modularized integrated building component
Mirzaei et al. End-to-end point cloud-based segmentation of building members for automating dimensional quality control
CN114065351B (en) System and method for constructing indoor map based on CAD (computer aided design) electronic drawing
Bassier et al. BIM reconstruction: Automated procedural modeling from point cloud data
Li et al. A sliding window method for detecting corners of openings from terrestrial LiDAr data
CN114048534B (en) System and method for screening wall layers in CAD electronic drawing during map construction
Drobnyi et al. Generating geometric digital twins of buildings: a review
Akhoundi Khezrabad et al. A Method for Detection of Doors in Building Indoor Point Cloud through Multi-Layer Thresholding and Histogram Analysis
Ripperda et al. Evaluation of structure recognition using labelled facade images
Kim et al. A Hybrid Semantic-Geometric Approach for Clutter-Resistant Floorplan Generation from Building Point Clouds
Harintaka et al. Automatic point cloud segmentation using RANSAC and DBSCAN algorithm for indoor model
CN117953164B (en) Method and system for improving drawing measurement quality
CN113393450B (en) Data quality inspection method and system for digital line drawing and readable 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
GR01 Patent grant