CN117252869B - CAD drawing wall path information extraction method and system - Google Patents

CAD drawing wall path information extraction method and system Download PDF

Info

Publication number
CN117252869B
CN117252869B CN202311515254.2A CN202311515254A CN117252869B CN 117252869 B CN117252869 B CN 117252869B CN 202311515254 A CN202311515254 A CN 202311515254A CN 117252869 B CN117252869 B CN 117252869B
Authority
CN
China
Prior art keywords
rectangle
side length
certain
wall
polygon
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
CN202311515254.2A
Other languages
Chinese (zh)
Other versions
CN117252869A (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.)
Jiangxi Shaoke Intelligent Construction Technology Co ltd
Original Assignee
Jiangxi Shaoke Intelligent Construction 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 Jiangxi Shaoke Intelligent Construction Technology Co ltd filed Critical Jiangxi Shaoke Intelligent Construction Technology Co ltd
Priority to CN202311515254.2A priority Critical patent/CN117252869B/en
Publication of CN117252869A publication Critical patent/CN117252869A/en
Application granted granted Critical
Publication of CN117252869B publication Critical patent/CN117252869B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a CAD drawing wall path information extraction method and a system, wherein the method comprises the following steps: converting all wall line segments into at least one polygon; judging whether a structure formed by at least one polygon comprises a ring structure or not; if the ring structure is included, dividing at least one polygon based on a preset polygon dividing mode to obtain a plurality of rectangles; judging whether two side lengths of the rectangles are within a preset threshold range or not; if the two rectangles are within the preset threshold range, acquiring another rectangle adjacent to the certain rectangle, and judging whether the central line of the other rectangle is determined; if the central line of the other rectangle is determined, judging whether the side length corresponding to the central line of the other rectangle is equal to any side length of a certain rectangle; if the wall thickness is equal to the wall thickness, the wall thickness of a certain rectangle is taken as the wall thickness of any side length, and the center line of the certain rectangle is taken as the center line of any side length.

Description

CAD drawing wall path information extraction method and system
Technical Field
The invention belongs to the technical field of information extraction, and particularly relates to a CAD drawing wall path information extraction method and system.
Background
BIM (Building Information Model) is a short term of building information model, is a multidimensional information model integration technology, and can integrate professional information such as building, structure, heating ventilation, water supply and drainage and the like into a three-dimensional building model, thereby greatly improving design production efficiency. For the building model, after CAD drawing is given, one of the steps is to draw the wall of the building. In the prior art, it is necessary to draw a CAD drawing as a base drawing and to draw the CAD drawing in accordance with the above wall profile.
For high-rise residential buildings, most of layered walls have higher similarity, and certain wall models can be reused, so that the workload is reduced. For a complex large-space building such as a commercial building, as the layout of each layer and the walls are different, the number of layers is low, and the reusability of the walls is greatly reduced, the precision of the final wall model can be ensured only by careful treatment and careful treatment of BIM engineers. Under the large background of the current building design industry of tight time and heavy task, the wall modeling with large area and high precision is more difficult. And releasing this part of the BIM engineer's work, achieving automated modeling to some extent is undoubtedly a developing direction of future BIM.
For drawings with lower quality, the situations of unclosed wall and redundant wall lines may occur, and for complex buildings, the situation of enclosing and nesting of the wall bodies may occur, and large interference is caused to the extraction of high-precision wall body paths, so how to extract the wall body paths in CAD drawings is a difficulty to be solved at present.
Disclosure of Invention
The invention provides a CAD drawing wall path information extraction method and system, which are used for solving the technical problem of how to extract a wall path in a CAD drawing.
In a first aspect, the invention provides a method for extracting path information of a CAD drawing wall, which comprises the following steps: obtaining a wall layer containing a wall line segment in a CAD drawing; extracting all wall line segments in the wall layer, and converting all wall line segments into at least one polygon; judging whether a structure formed by at least one polygon comprises an annular structure or not, wherein the annular structure comprises an inner ring and an outer ring, and the inner ring and the outer ring are closed polygons; if the structure formed by the at least one polygon comprises an annular structure, dividing the at least one polygon based on a preset polygon dividing mode to obtain a plurality of rectangles, wherein the polygon dividing mode is as follows: firstly dividing the annular structure, and then dividing the at least one polygon in the area in the inner ring; judging whether two side lengths of the rectangles are within a preset threshold range or not; if the two side lengths of a certain rectangle are both within a preset threshold range, acquiring another rectangle adjacent to the certain rectangle, and judging whether the central line of the other rectangle is determined, wherein the central line is a perpendicular bisector of the certain side length of the rectangle; if the center line of the other rectangle is determined, judging whether the side length corresponding to the center line of the other rectangle is equal to any side length of the certain rectangle; and if the side length corresponding to the central line of the other rectangle is equal to any side length of the certain rectangle, taking any side length as the wall thickness of the certain rectangle, and taking the perpendicular bisector of any side length as the central line of the certain rectangle.
In a second aspect, the present invention provides a CAD drawing wall path information extraction system, comprising: the acquisition module is configured to acquire a wall layer containing a wall line segment in the CAD drawing; the extraction module is configured to extract all wall line segments in the wall layer and convert the wall line segments into at least one polygon; the first judging module is configured to judge whether a structure formed by at least one polygon comprises an annular structure or not, wherein the annular structure comprises an inner ring and an outer ring, and the inner ring and the outer ring are closed polygons; the division module is configured to divide the at least one polygon based on a preset polygon division mode if the structure formed by the at least one polygon comprises an annular structure, so as to obtain a plurality of rectangles, wherein the polygon division mode is as follows: firstly dividing the annular structure, and then dividing the at least one polygon in the area in the inner ring; the second judging module is configured to judge whether two side lengths of the rectangles are within a preset threshold range or not; the third judging module is configured to acquire another rectangle adjacent to the certain rectangle if the two side lengths of the certain rectangle are within a preset threshold range, and judge whether the central line of the other rectangle is determined, wherein the central line is a perpendicular bisector of the certain side length of the rectangle; a fourth judging module configured to judge whether a side length corresponding to a center line of the other rectangle is equal to any side length of the certain rectangle if the center line of the other rectangle is determined; and the determining module is configured to take any side length as the wall thickness of the certain rectangle and take the perpendicular bisector of any side length as the center line of the certain rectangle if the side length corresponding to the center line of the other rectangle is equal to any side length of the certain rectangle.
In a third aspect, there is provided an electronic device, comprising: the computer-readable storage medium comprises at least one processor and a memory communicatively connected with the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the CAD drawing wall path information extraction method of any embodiment of the present invention.
In a fourth aspect, the present invention also provides a computer readable storage medium having stored thereon a computer program, the program instructions, when executed by a processor, cause the processor to perform the steps of the CAD drawing wall path information extraction method of any of the embodiments of the invention.
The CAD drawing wall body path information extraction method and system have the following beneficial effects: extracting all wall line segments in a wall layer, converting all wall line segments into at least one polygon, judging whether a structure formed by the at least one polygon comprises an annular structure, if so, dividing the at least one polygon based on a preset polygon dividing mode to obtain a plurality of rectangles, judging whether two side lengths of the rectangles are in a preset threshold range, if both side lengths of a certain rectangle are in the preset threshold range, acquiring another rectangle adjacent to the certain rectangle, judging whether the central line of the other rectangle is determined, and if so, judging whether the side length corresponding to the central line of the other rectangle is equal to any side length of the certain rectangle, thereby realizing accurate extraction of wall path information.
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 obvious that the drawings in the following description are 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 flowchart of a CAD drawing wall path information extraction method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of polygon segmentation according to an embodiment of the present invention;
FIG. 3 is a schematic view of rectangular center lines of an embodiment of the present invention;
fig. 4 is a block diagram of a CAD drawing wall path information extraction system according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device 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.
Referring to fig. 1, a flowchart of a CAD drawing wall path information extraction method according to the present application is shown.
As shown in fig. 1, the method for extracting the path information of the CAD drawing wall specifically includes the following steps:
step S101, obtaining a wall layer containing a wall line segment in the CAD drawing.
In the step, the DWG format file is analyzed, and the analyzed CAD drawing is preprocessed to obtain the wall body layer containing the wall body line segments in the CAD drawing.
For example, using the objectARX tool to parse DWG format files, all wall contour primitives in DWG would be decomposed into simple straight lines. Then, a straight line related to the wall is found through the layers of the straight line primitives.
It should be noted that, the wall contour in the CAD drawing may be due to negligence of the drawing staff, and the wall contour is not closed, the wall line is missing, and the wall line is redundant. The straight lines need to be subjected to de-duplication, merging and closing treatment.
Step S102, extracting all wall line segments in the wall layer, and converting all wall line segments into at least one polygon.
In this step, all wall segments in the wall layer are extracted and converted into at least one polygon using the shape's polygon function.
Step S103, judging whether the structure formed by at least one polygon comprises an annular structure or not, wherein the annular structure comprises an inner ring and an outer ring, and the inner ring and the outer ring are closed polygons.
In this step, a rectangle is divided from a polygon until division cannot be continued. If the structure of at least one polygon includes a ring structure, the region in the inner ring needs to be treated as an outer region of the polygon, i.e., the region in the inner ring does not participate in the polygon segmentation. As the segmentation proceeds, the number of ring structures may decrease, i.e. if the sides of a rectangle consist of both outer and inner rings of polygons, then the segmentation of the rectangle will eliminate one inner ring.
In a specific embodiment, if the structure formed by at least one polygon does not include a ring structure, the at least one polygon is directly divided to obtain a plurality of rectangles.
Step S104, if the structure formed by the at least one polygon includes a ring structure, dividing the at least one polygon based on a preset polygon dividing manner to obtain a plurality of rectangles, where the polygon dividing manner is: the ring structure is segmented first and then the at least one polygon in the region within the inner ring.
By way of example, a wall bounding nesting scene that geometrically appears as a nest of polygons, such as region a in FIG. 2, can be better handled using a polygon segmentation method. When a rectangle is cut from the outer wall, the inner wall is exposed and will wait as a new polygon for subsequent division as shown in fig. 2 for region b. Therefore, the polygon segmentation scheme can effectively process the wall body enclosing nested scene.
Step S105, determining whether two side lengths of the rectangles are within a preset threshold range.
By way of example, it is determined whether two sides of the plurality of rectangles are within 50mm-700 mm.
In a specific embodiment, if both side lengths of a certain rectangle are not within a preset threshold value range, directly discarding the certain rectangle; and if the certain side length of the certain rectangle is within the preset threshold range, taking the certain side length as the wall thickness of the certain rectangle, and taking the perpendicular bisector of the certain side length as the central line of the certain rectangle.
Specifically, for a rectangle, if the side length of one side is a wall thickness, and the side length of the adjacent side of the side cannot be the wall thickness, the center line of the wall represented by the rectangle can be uniquely determined. As shown in fig. 3, if l1 can be used as the wall thickness and l2 cannot be used as the wall thickness, the center line k1 can be determined;
and S106, if the two side lengths of a certain rectangle are within the preset threshold range, acquiring another rectangle adjacent to the certain rectangle, and judging whether the central line of the other rectangle is determined, wherein the central line is the perpendicular bisector of the certain side length of the rectangle.
In one embodiment, if the center line of the other rectangle is not determined, determining whether a certain side length of the other rectangle is equal to any side length of the certain rectangle;
if the certain side length of the other rectangle is equal to any side length of the certain rectangle, the certain side length and any side length are respectively used as the wall thickness of the other rectangle and the wall thickness of the certain rectangle, and the perpendicular bisectors of the certain side length and the perpendicular bisectors of any side length are respectively used as the center line of the other rectangle and the center line of the certain rectangle;
if the side length of one rectangle is not equal to the side length of the other rectangle, the side length of the short side of the other rectangle and the side length of the short side of the other rectangle are respectively used as the wall thickness of the other rectangle and the wall thickness of the certain rectangle, and the perpendicular bisector of the side length of the short side is used as the center line of the other rectangle and the certain rectangle.
For example, if both sides of a rectangle are within a preset threshold, a wall thickness selection algorithm needs to be designed to find the optimal wall thickness. The wall thickness selection algorithm designed by the scheme uses building knowledge to restrict the direction of the wall, namely: for a continuous wall, the wall thickness is typically constant. The method comprises the following three conditions:
1) For two adjacent rectangles, if the center line of one rectangle is already determined, the other rectangle is not determined, and the wall thickness of the rectangle with the determined center line is equal to the side length of any side of the other rectangle, the wall thickness is made to be the wall thickness of the rectangle with the undetermined center line, and the propagation to the other rectangle is continued.
2) For two adjacent rectangles, if the center line is not determined and the sides of one rectangle are equal to the length of either side of the other rectangle, then the sides are made to be their wall thickness.
3) The rectangle with the center line still can not be determined by adopting the mode, and the side length of the short side is used as the wall thickness.
Step S107, if the center line of the other rectangle is determined, determining whether the side length corresponding to the center line of the other rectangle is equal to any side length of a certain rectangle.
In this step, if the side length corresponding to the center line of the other rectangle is not equal to any side length of the certain rectangle, the side length of the short side of the other rectangle and the side length of the short side of the certain rectangle are respectively used as the wall thickness of the other rectangle and the wall thickness of the certain rectangle, and the perpendicular bisector of the side length of the short side is used as the center line of the other rectangle and the certain rectangle.
And step S108, if the side length corresponding to the central line of the other rectangle is equal to any side length of the certain rectangle, taking any side length as the wall thickness of the certain rectangle, and taking the perpendicular bisector of any side length as the central line of the certain rectangle.
In a specific embodiment, after taking any side length as the wall thickness of a certain rectangle and taking the perpendicular bisector of any side length as the center line of the certain rectangle, the method further comprises: judging whether any two central lines have overlapping parts or not, and judging whether wall thicknesses corresponding to any two central lines are equal or not; if any two central lines have overlapping parts and the wall thicknesses corresponding to any two central lines are equal, combining the two central lines into one central line; expanding all the central lines into target rectangles according to the wall thickness corresponding to the central lines, and judging whether one target rectangle contains another target rectangle or not; if one target rectangle contains another target rectangle, the center line corresponding to the other target rectangle is removed.
In summary, the method extracts all wall line segments in the wall layer, converts all wall line segments into at least one polygon, judges whether a structure formed by the at least one polygon comprises an annular structure, if so, segments the at least one polygon based on a preset polygon segmentation mode to obtain a plurality of rectangles, judges whether two side lengths of the rectangles are in a preset threshold range, acquires another rectangle adjacent to the certain rectangle if both side lengths of the certain rectangle are in the preset threshold range, judges whether the central line of the other rectangle is determined, and judges whether the side length corresponding to the central line of the other rectangle is equal to any side length of the certain rectangle if the central line of the other rectangle is determined, thereby realizing accurate extraction of wall path information.
Referring to fig. 4, a block diagram of a CAD drawing wall path information extraction system of the present application is shown.
As shown in fig. 4, the CAD drawing wall path information extraction system 200 includes an acquisition module 210, an extraction module 220, a first judgment module 230, a segmentation module 240, a second judgment module 250, a third judgment module 260, a fourth judgment module 270, and a determination module 280.
The obtaining module 210 is configured to obtain a wall layer including a wall line segment in the CAD drawing; an extraction module 220 configured to extract all wall segments in the wall layer and convert all wall segments into at least one polygon; a first judging module 230, configured to judge whether the structure formed by the at least one polygon includes an annular structure, where the annular structure includes an inner ring and an outer ring, and the inner ring and the outer ring are closed polygons; the dividing module 240 is configured to divide the at least one polygon based on a preset polygon dividing manner if the structure formed by the at least one polygon includes a ring structure, so as to obtain a plurality of rectangles, where the polygon dividing manner is as follows: firstly dividing the annular structure, and then dividing the at least one polygon in the area in the inner ring; a second judging module 250 configured to judge whether two side lengths of the plurality of rectangles are within a preset threshold range; a third judging module 260, configured to obtain another rectangle adjacent to a certain rectangle if both sides of the certain rectangle are within a preset threshold range, and judge whether the center line of the other rectangle is determined, where the center line is a perpendicular bisector of a certain side of the rectangle; a fourth determining module 270, configured to determine whether a side length corresponding to a center line of the other rectangle is equal to any side length of the certain rectangle if the center line of the other rectangle is determined; the determining module 280 is configured to set any side length as the wall thickness of the certain rectangle and set the perpendicular bisector of any side length as the center line of the certain rectangle if the side length corresponding to the center line of the certain rectangle is equal to any side length of the certain rectangle.
It should be understood that the modules depicted in fig. 4 correspond to the various steps in the method described with reference to fig. 1. Thus, the operations and features described above for the method and the corresponding technical effects are equally applicable to the modules in fig. 4, and are not described here again.
In other embodiments, the present invention further provides a computer readable storage medium, on which a computer program is stored, where the program instructions, when executed by a processor, cause the processor to perform the method for extracting path information of a CAD drawing wall body in any of the above method embodiments;
as one embodiment, the computer-readable storage medium of the present invention stores computer-executable instructions configured to:
obtaining a wall layer containing a wall line segment in a CAD drawing;
extracting all wall line segments in the wall layer, and converting all wall line segments into at least one polygon;
judging whether a structure formed by at least one polygon comprises an annular structure or not, wherein the annular structure comprises an inner ring and an outer ring, and the inner ring and the outer ring are closed polygons;
if the structure formed by the at least one polygon comprises an annular structure, dividing the at least one polygon based on a preset polygon dividing mode to obtain a plurality of rectangles, wherein the polygon dividing mode is as follows: firstly dividing the annular structure, and then dividing the at least one polygon in the area in the inner ring;
judging whether two side lengths of the rectangles are within a preset threshold range or not;
if the two side lengths of a certain rectangle are both within a preset threshold range, acquiring another rectangle adjacent to the certain rectangle, and judging whether the central line of the other rectangle is determined, wherein the central line is a perpendicular bisector of the certain side length of the rectangle;
if the center line of the other rectangle is determined, judging whether the side length corresponding to the center line of the other rectangle is equal to any side length of the certain rectangle;
and if the side length corresponding to the central line of the other rectangle is equal to any side length of the certain rectangle, taking any side length as the wall thickness of the certain rectangle, and taking the perpendicular bisector of any side length as the central line of the certain rectangle.
The computer readable storage medium may include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the CAD drawing wall path information extraction system, and the like. In addition, the computer-readable storage medium may include high-speed random access memory, and may also include memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer readable storage medium optionally includes memory remotely located with respect to the processor, the remote memory being connectable to the CAD drawing wall path information extraction system via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, as shown in fig. 5, where the device includes: a processor 310 and a memory 320. The electronic device may further include: an input device 330 and an output device 340. The processor 310, memory 320, input device 330, and output device 340 may be connected by a bus or other means, for example in fig. 5. Memory 320 is the computer-readable storage medium described above. The processor 310 executes various functional applications and data processing of the server by running nonvolatile software programs, instructions and modules stored in the memory 320, that is, implements the CAD drawing wall path information extraction method of the above-described method embodiment. The input device 330 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the CAD drawing wall path information extraction system. The output device 340 may include a display device such as a display screen.
The electronic equipment can execute the method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be found in the methods provided in the embodiments of the present invention.
As an implementation manner, the electronic device is applied to a CAD drawing wall path information extraction system, and is used for a client, and includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to:
obtaining a wall layer containing a wall line segment in a CAD drawing;
extracting all wall line segments in the wall layer, and converting all wall line segments into at least one polygon;
judging whether a structure formed by at least one polygon comprises an annular structure or not, wherein the annular structure comprises an inner ring and an outer ring, and the inner ring and the outer ring are closed polygons;
if the structure formed by the at least one polygon comprises an annular structure, dividing the at least one polygon based on a preset polygon dividing mode to obtain a plurality of rectangles, wherein the polygon dividing mode is as follows: firstly dividing the annular structure, and then dividing the at least one polygon in the area in the inner ring;
judging whether two side lengths of the rectangles are within a preset threshold range or not;
if the two side lengths of a certain rectangle are both within a preset threshold range, acquiring another rectangle adjacent to the certain rectangle, and judging whether the central line of the other rectangle is determined, wherein the central line is a perpendicular bisector of the certain side length of the rectangle;
if the center line of the other rectangle is determined, judging whether the side length corresponding to the center line of the other rectangle is equal to any side length of the certain rectangle;
and if the side length corresponding to the central line of the other rectangle is equal to any side length of the certain rectangle, taking any side length as the wall thickness of the certain rectangle, and taking the perpendicular bisector of any side length as the central line of the certain rectangle.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product, which may be stored in a computer-readable storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the various embodiments or methods of some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. The CAD drawing wall body path information extraction method is characterized by comprising the following steps:
obtaining a wall layer containing a wall line segment in a CAD drawing;
extracting all wall line segments in the wall layer, and converting all wall line segments into at least one polygon;
judging whether a structure formed by at least one polygon comprises an annular structure or not, wherein the annular structure comprises an inner ring and an outer ring, and the inner ring and the outer ring are closed polygons;
if the structure formed by the at least one polygon comprises an annular structure, dividing the at least one polygon based on a preset polygon dividing mode to obtain a plurality of rectangles, wherein the polygon dividing mode is as follows: firstly dividing the annular structure, and then dividing the at least one polygon in the area in the inner ring;
judging whether two side lengths of the rectangles are within a preset threshold range or not;
if the two side lengths of a certain rectangle are both within a preset threshold range, acquiring another rectangle adjacent to the certain rectangle, and judging whether the central line of the other rectangle is determined, wherein the central line is a perpendicular bisector of the certain side length of the rectangle;
if the center line of the other rectangle is determined, judging whether the side length corresponding to the center line of the other rectangle is equal to any side length of the certain rectangle;
and if the side length corresponding to the central line of the other rectangle is equal to any side length of the certain rectangle, taking any side length as the wall thickness of the certain rectangle, and taking the perpendicular bisector of any side length as the central line of the certain rectangle.
2. The method for extracting wall path information from a CAD drawing according to claim 1, wherein before obtaining a wall layer including a wall segment in the CAD drawing, the method further comprises:
and analyzing the DWG format file, and preprocessing the analyzed CAD drawing to obtain a wall layer containing the wall line segments in the CAD drawing.
3. The method for extracting path information from a CAD drawing wall according to claim 1, wherein after determining whether the structure formed by the at least one polygon includes a ring structure, the method further comprises:
if the structure formed by the at least one polygon does not comprise an annular structure, the at least one polygon is directly segmented to obtain a plurality of rectangles.
4. The method for extracting path information from a CAD drawing wall according to claim 1, wherein after determining whether two sides of a plurality of rectangles are within a predetermined threshold, the method further comprises:
if the two side lengths of a certain rectangle are not in the preset threshold range, directly discarding the certain rectangle;
and if the certain side length of the certain rectangle is within the preset threshold range, taking the certain side length as the wall thickness of the certain rectangle, and taking the perpendicular bisector of the certain side length as the central line of the certain rectangle.
5. The method for extracting path information from a wall of a CAD drawing according to claim 1, wherein after acquiring another rectangle adjacent to the certain rectangle and determining whether a center line of the another rectangle is determined, the method further comprises:
if the center line of the other rectangle is uncertain, judging whether a certain side length of the other rectangle is equal to any side length of the certain rectangle;
if the certain side length of the other rectangle is equal to any side length of the certain rectangle, taking the certain side length and any side length as the wall thickness of the other rectangle and the wall thickness of the certain rectangle respectively, and taking the perpendicular bisector of the certain side length and the perpendicular bisector of any side length as the center line of the other rectangle and the center line of the certain rectangle respectively;
and if the side length of the other rectangle is not equal to any side length of the certain rectangle, taking the side length of the short side of the other rectangle and the side length of the short side of the certain rectangle as the wall thickness of the other rectangle and the wall thickness of the certain rectangle respectively, and taking the perpendicular bisector of the side length of the short side as the central lines of the other rectangle and the certain rectangle.
6. The method for extracting wall path information from CAD drawing according to claim 1, wherein after determining whether the side length corresponding to the center line of the other rectangle is equal to any side length of the certain rectangle, the method further comprises:
and if the side length corresponding to the central line of the other rectangle is not equal to any side length of the certain rectangle, taking the side length of the short side of the other rectangle and the side length of the short side of the certain rectangle as the wall thickness of the other rectangle and the wall thickness of the certain rectangle respectively, and taking the perpendicular bisector of the side length of the short side as the central lines of the other rectangle and the certain rectangle.
7. The method for extracting path information from a CAD drawing wall according to claim 1, wherein after taking any side length as the wall thickness of the certain rectangle and taking the perpendicular bisector of any side length as the center line of the certain rectangle, the method further comprises:
judging whether any two central lines have overlapping parts or not, and judging whether wall thicknesses corresponding to any two central lines are equal or not;
if any two central lines have overlapping parts and the wall thicknesses corresponding to any two central lines are equal, combining the two central lines into one central line;
expanding all the central lines into target rectangles according to the wall thicknesses corresponding to the central lines, and judging whether one target rectangle contains another target rectangle or not;
if one target rectangle contains another target rectangle, the center line corresponding to the other target rectangle is removed.
8. The CAD drawing wall body path information extraction system is characterized by comprising:
the acquisition module is configured to acquire a wall layer containing a wall line segment in the CAD drawing;
the extraction module is configured to extract all wall line segments in the wall layer and convert the wall line segments into at least one polygon;
the first judging module is configured to judge whether a structure formed by at least one polygon comprises an annular structure or not, wherein the annular structure comprises an inner ring and an outer ring, and the inner ring and the outer ring are closed polygons;
the division module is configured to divide the at least one polygon based on a preset polygon division mode if the structure formed by the at least one polygon comprises an annular structure, so as to obtain a plurality of rectangles, wherein the polygon division mode is as follows: firstly dividing the annular structure, and then dividing the at least one polygon in the area in the inner ring;
the second judging module is configured to judge whether two side lengths of the rectangles are within a preset threshold range or not;
the third judging module is configured to acquire another rectangle adjacent to the certain rectangle if the two side lengths of the certain rectangle are within a preset threshold range, and judge whether the central line of the other rectangle is determined, wherein the central line is a perpendicular bisector of the certain side length of the rectangle;
a fourth judging module configured to judge whether a side length corresponding to a center line of the other rectangle is equal to any side length of the certain rectangle if the center line of the other rectangle is determined;
and the determining module is configured to take any side length as the wall thickness of the certain rectangle and take the perpendicular bisector of any side length as the center line of the certain rectangle if the side length corresponding to the center line of the other rectangle is equal to any side length of the certain rectangle.
9. An electronic device, comprising: at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method of any of claims 1 to 7.
CN202311515254.2A 2023-11-15 2023-11-15 CAD drawing wall path information extraction method and system Active CN117252869B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311515254.2A CN117252869B (en) 2023-11-15 2023-11-15 CAD drawing wall path information extraction method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311515254.2A CN117252869B (en) 2023-11-15 2023-11-15 CAD drawing wall path information extraction method and system

Publications (2)

Publication Number Publication Date
CN117252869A CN117252869A (en) 2023-12-19
CN117252869B true CN117252869B (en) 2024-03-12

Family

ID=89131635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311515254.2A Active CN117252869B (en) 2023-11-15 2023-11-15 CAD drawing wall path information extraction method and system

Country Status (1)

Country Link
CN (1) CN117252869B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070109887A (en) * 2006-05-09 2007-11-15 배석훈 System and method for identifying original design intents using 3d scan data
CN105224705A (en) * 2014-06-30 2016-01-06 上海神机软件有限公司 The comprehensive editing system of construction project template and method, row's modular system and method
CN108320241A (en) * 2018-01-10 2018-07-24 厦门天海图汇信息科技有限公司 The area of house property point family figure determines method and system
CN109191576A (en) * 2018-09-06 2019-01-11 宁波睿峰信息科技有限公司 A kind of figure layer classification method that architectural drawing is converted to three-dimensional BIM model
CN110532602A (en) * 2019-07-19 2019-12-03 中国地质大学(武汉) A kind of indoor autodraft and modeling method based on plan view image
CN112199751A (en) * 2020-10-30 2021-01-08 久瓴(江苏)数字智能科技有限公司 Wall model generation method and device, electronic equipment and storage medium
CN114170164A (en) * 2021-11-26 2022-03-11 江西源广顺科技协同创新有限公司 Copper bar bending detection method and system
WO2023065570A1 (en) * 2021-10-21 2023-04-27 广东三维家信息科技有限公司 House type coding and matching method and apparatus
CN116071377A (en) * 2021-10-29 2023-05-05 北京搜狗科技发展有限公司 Map labeling method and device and map labeling device
CN116595612A (en) * 2023-05-22 2023-08-15 江西少科智能建造科技有限公司 Drawing intelligent examination method and system based on house design specification
CN116680768A (en) * 2023-01-04 2023-09-01 广东南方通信建设有限公司 Method, equipment and medium for extracting CAD information to generate wall model or door window model

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070109887A (en) * 2006-05-09 2007-11-15 배석훈 System and method for identifying original design intents using 3d scan data
CN105224705A (en) * 2014-06-30 2016-01-06 上海神机软件有限公司 The comprehensive editing system of construction project template and method, row's modular system and method
CN108320241A (en) * 2018-01-10 2018-07-24 厦门天海图汇信息科技有限公司 The area of house property point family figure determines method and system
CN109191576A (en) * 2018-09-06 2019-01-11 宁波睿峰信息科技有限公司 A kind of figure layer classification method that architectural drawing is converted to three-dimensional BIM model
CN110532602A (en) * 2019-07-19 2019-12-03 中国地质大学(武汉) A kind of indoor autodraft and modeling method based on plan view image
CN112199751A (en) * 2020-10-30 2021-01-08 久瓴(江苏)数字智能科技有限公司 Wall model generation method and device, electronic equipment and storage medium
WO2023065570A1 (en) * 2021-10-21 2023-04-27 广东三维家信息科技有限公司 House type coding and matching method and apparatus
CN116071377A (en) * 2021-10-29 2023-05-05 北京搜狗科技发展有限公司 Map labeling method and device and map labeling device
CN114170164A (en) * 2021-11-26 2022-03-11 江西源广顺科技协同创新有限公司 Copper bar bending detection method and system
CN116680768A (en) * 2023-01-04 2023-09-01 广东南方通信建设有限公司 Method, equipment and medium for extracting CAD information to generate wall model or door window model
CN116595612A (en) * 2023-05-22 2023-08-15 江西少科智能建造科技有限公司 Drawing intelligent examination method and system based on house design specification

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
As-built BIM reconstruction of piping systems using PipeNet;Yuan Xie等;Automation in Construction;第1-19页 *
源自建筑平面图的室内地图空间数据自动生成方法;孙卫新;王光霞;张锦明;游天;;测绘学报(第06期);全文 *
立式钢制锥底油罐底板排板方式分析与改进;黄堃;工艺与工程;第1-9页 *
高分辨率影像分类提取建筑物轮廓的优化方法;王双喜;杨元维;常京新;高贤君;;激光与光电子学进展(第02期);全文 *

Also Published As

Publication number Publication date
CN117252869A (en) 2023-12-19

Similar Documents

Publication Publication Date Title
CN110189412B (en) Multi-floor indoor structured three-dimensional modeling method and system based on laser point cloud
Gimenez et al. Automatic reconstruction of 3D building models from scanned 2D floor plans
US20140125663A1 (en) 3d model shape analysis method based on perception information
Jung et al. Automated 3D wireframe modeling of indoor structures from point clouds using constrained least-squares adjustment for as-built BIM
US11275874B2 (en) Method for constructing a 3D digital model from a 2D plan
US11760397B2 (en) Method for extracting and analyzing spatial information of control and protection zone of rail transit with multiple threshold constraints
CN113901550B (en) Method and related equipment for generating BIM (building information modeling) model of assembled building
US9886529B2 (en) Methods and systems for feature recognition
CN113721969B (en) Multi-scale space vector data cascade update method
CN114387417B (en) Three-dimensional building modeling method and device and three-dimensional building group modeling method
Min A new approach of composite surface reconstruction based on reverse engineering
CN116305436A (en) Existing bridge monitoring method based on combination of three-dimensional laser scanning and BIM
CN113936210A (en) Anti-collision method for tower crane
CN109376404A (en) Build outer profile model generating method, system, device and readable storage medium storing program for executing
CN115600307A (en) Method for generating single building from Mesh model of urban scene
CN113902720B (en) Roof pattern recognition method based on deep learning of building profile
CN106651803A (en) House type data identification method and device
CN117252869B (en) CAD drawing wall path information extraction method and system
CN103065306B (en) The disposal route of graph data and device
CN115797601B (en) Automatic extraction method and system for middle plane of Brep three-dimensional model
Bassier et al. BIM reconstruction: Automated procedural modeling from point cloud data
Xue et al. Understanding unstructured 3D point clouds for creating digital twin city: An unsupervised hierarchical clustering approach
Lai et al. Automatic recognition and decomposition of rib features in thin-shell parts for mold flow analysis
de Souza et al. Automatic detection of 3D steel structures in as-built point clouds
WO2017068244A1 (en) Method and system for determining the manufacturing dimensions for a connecting element

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