Model space attribute labeling method and system based on CAD drawing automatic identification
By constructing and locating spatial boxes in the BIM model, and combining the planar outline and elevation data of CAD drawings, the problem of fine-grained room-level division in BIM modeling was solved, enabling accurate attribution and separation labeling of components, and improving the accuracy and efficiency of construction management.
Patent Information
- Application Number
- CN202510957787.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-11-14
AI Technical Summary
Existing BIM modeling technology cannot achieve room-level fine-grained spatial division, resulting in insufficient accuracy of spatial attribute labeling in construction management, which makes it difficult to meet the actual needs of project management.
By inputting CAD drawings into the drawing recognition vertical domain large model, basic spatial framework information is obtained, spatial boxes are constructed and positioned in the BIM model, intersection tests are performed to filter the target component set, the components are assigned and separated according to their location and inclusion relationship, and precise definition is achieved by combining planar contour and elevation data. The positioning and expansion processing is performed using the intersection of reference axes and coordinate transformation matrix.
It enables room-level fine-grained spatial division of the BIM model, ensuring complete coverage of boundary components and accurate labeling, and supporting more refined construction management.
Smart Images

Figure CN120954041A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of digital management technology for building engineering, and in particular to a method and system for annotating model spatial attributes based on automatic recognition of CAD drawings. Background Technology
[0002] With the widespread application of Building Information Modeling (BIM) technology in the engineering construction field, BIM models are playing an increasingly important role in project management. Especially in the construction management process, BIM models can provide intuitive three-dimensional visualization information for all project stakeholders, effectively supporting construction planning, schedule management, and quality control.
[0003] In related technologies, BIM model construction typically involves importing CAD drawings into modeling software, extracting geometric and attribute information from the drawings to create a 3D model. Spatial attribute annotation mainly relies on the spatial division function provided by the modeling software, defining the relationship between components and space by dividing spatial regions within the model.
[0004] However, existing BIM modeling can usually only achieve spatial division granularity down to the floor level, and cannot reach the room level of refinement. This limits the application value of BIM technology in construction management and makes it difficult to meet the actual needs of project management for precise spatial attribute division. Summary of the Invention
[0005] This application provides a method and system for automatically identifying model spatial attributes based on CAD drawings, which can improve the accuracy of BIM modeling.
[0006] Firstly, this application provides a method for model spatial attribute annotation based on automatic recognition of CAD drawings, applied to a model spatial attribute annotation system. The method includes: inputting a target project drawing into a large-scale model for drawing recognition to obtain basic spatial framework information of the target room; the target project drawing contains the target room, and the basic spatial framework information includes planar outline data and elevation data; constructing a spatial box of the target room based on the planar outline data and elevation data; obtaining the coordinates of the intersection points of the reference axes of the CAD drawing and the BIM model; and locating the spatial box to the corresponding position in the BIM model using the reference axis intersection coordinates and a coordinate transformation matrix to obtain the positioned spatial box. The bounding boxes in the BIM model are expanded to obtain expanded spatial boxes. Intersection tests are performed between the bounding boxes of components in the BIM model and the expanded spatial boxes to obtain a set of target components that intersect with the expanded spatial boxes. For each component in the target component set, the positional inclusion relationship between each component and the intersecting expanded spatial boxes is determined. Each component is labeled according to the positional inclusion relationship. When a component is completely contained within a single expanded spatial box, the component is labeled as the component belonging to the target room corresponding to the expanded spatial box. When a component is contained within multiple expanded spatial boxes, the component is labeled as the separating component of the target rooms corresponding to multiple expanded spatial boxes.
[0007] In the above embodiments, the target project drawings are input into the large-scale model of the drawing recognition domain to obtain basic spatial framework information. Space boxes are constructed and located in the BIM model. Intersection tests are performed on the bounding boxes of components and the expanded space boxes to filter the target component set. Based on positional inclusion relationships, components are labeled as belonging to or separating components, achieving room-level refined spatial attribute labeling. The positioning and expansion of space boxes ensure complete coverage of boundary components, while intersection tests and positional inclusion relationship judgments guarantee the accuracy of labeling, enabling the BIM model to have room-level spatial division capabilities.
[0008] In conjunction with some embodiments of the first aspect, in some embodiments, the step of constructing a spatial box of the target room based on planar contour data and elevation data specifically includes: determining a set of coordinate points of the target room on a horizontal plane based on the planar contour data, the set of coordinate points including the vertex coordinates of the target room contour; obtaining floor elevation information related to the target room from the elevation data, the floor elevation information including the upper and lower elevation values of the floor where the target room is located; stretching the set of coordinate points vertically according to the floor elevation information to obtain a set of vertex coordinates of the target room in three-dimensional space; constructing a spatial box based on the set of vertex coordinates, such that the top and bottom surfaces of the spatial box are located at the upper and lower elevation positions of the floor where the target room is located, respectively, and the side boundaries of the spatial box correspond to the planar contour of the target room.
[0009] In the above embodiments, the set of coordinate points of the target room on the horizontal plane is determined based on the planar contour data. The floor elevation information is obtained and vertically stretched to obtain a set of three-dimensional vertex coordinates. A spatial box is constructed so that its top and bottom surfaces are located at the upper and lower elevations of the floor where the target room is located, and its side boundaries correspond to the planar contour. This spatial construction method based on planar contour and elevation data achieves precise definition of the room's spatial range. The spatial box strictly corresponds to the actual room boundary, providing a reliable spatial reference benchmark for subsequent component spatial attribute annotation.
[0010] In conjunction with some embodiments of the first aspect, in some embodiments, the steps of obtaining the coordinates of the intersection points of the reference axes of the CAD drawing and the BIM model, locating the spatial box to the corresponding position in the BIM model using the coordinates of the intersection points of the reference axes and the coordinate transformation matrix to obtain the positioned spatial box, and enlarging the positioned spatial box to obtain the enlarged spatial box, specifically include: selecting three corresponding intersection points of the reference axes in the CAD drawing and the BIM model as positioning points, and obtaining the coordinate values of the positioning points in the coordinate systems of the CAD drawing and the BIM model; calculating the parameters of the coordinate transformation matrix based on the coordinate values of the positioning points, the coordinate transformation matrix including six transformation constants for coordinate transformation; transforming the set of vertex coordinates of the spatial box through the coordinate transformation matrix to obtain the positioned spatial box in the BIM model coordinate system; and proportionally enlarging the size of the positioned spatial box according to a preset enlargement ratio to obtain the enlarged spatial box, so that the enlarged spatial box can completely cover the boundary components of the target room.
[0011] In the above embodiment, three corresponding reference axis intersections are selected as positioning points in the CAD drawings and BIM model. The coordinate transformation matrix is calculated to position the space box in the BIM model, and the space box is enlarged according to a preset enlargement ratio to obtain an enlarged space box. The coordinate transformation based on the axis positioning points ensures the accuracy of spatial positioning, while the design of the enlarged space box ensures complete coverage of boundary components, making the definition of the room space range more precise and reliable, and the spatial attribute labeling results more accurate and complete.
[0012] In conjunction with some embodiments of the first aspect, in some embodiments, after determining the positional inclusion relationship between each component and the intersecting extended space boxes for each component in the target component set, and labeling each component according to the positional inclusion relationship, and labeling the component as the belonging component of the target room corresponding to the extended space box when the component is completely contained within a single extended space box, and labeling the component as the dividing component of the target rooms corresponding to the multiple extended space boxes when the component is contained within multiple extended space boxes, the method further includes: obtaining component type information of the components in the target component set, and determining whether the belonging component or dividing component is a prefabricated component based on the component type information; when it is determined to be a prefabricated component, extracting the spatial attribute labeling information of the prefabricated component, and determining the spatial intersection relationship between the prefabricated component and each target room; calculating the spatial range of the prefabricated component in each target room based on the spatial intersection relationship, and labeling the assembly joint position information at the boundary of adjacent target rooms; dividing the prefabricated component into multiple prefabricated units and numbering them according to the spatial range and assembly joint position information of the prefabricated component; and determining the installation sequence of the prefabricated component based on the spatial distribution of the prefabricated units and the construction sequence of the target rooms.
[0013] In the above embodiments, component type information is obtained to determine whether it is a prefabricated component, spatial attribute annotations of the prefabricated component are extracted to determine spatial intersection relationships, the spatial range of the prefabricated component in each target room is calculated and the assembly joint positions are marked, the prefabricated component is divided into multiple prefabricated units and the installation sequence is determined. The analysis of spatial intersection relationships guides the segmented design of prefabricated components, the precise positioning of assembly joints ensures the rationality of the division of prefabricated units, and the comprehensive consideration of spatial distribution and construction sequence optimizes the installation planning of prefabricated components.
[0014] In conjunction with some embodiments of the first aspect, in some embodiments, the step of calculating the spatial range of the prefabricated component in each target room based on spatial intersection relationships and marking the assembly joint position information at the boundary of adjacent target rooms specifically includes: obtaining the boundary plane information of the target room; performing an intersection operation between the boundary plane information and the three-dimensional model of the prefabricated component to obtain an intersection line; generating an assembly joint positioning plane on the prefabricated component based on the position information of the intersection line; calculating the intersection area between the assembly joint positioning plane and the prefabricated component to determine the spatial range of the prefabricated component in each target room.
[0015] In the above embodiments, the boundary plane information of the target room is obtained and intersected with the 3D model of the prefabricated component to obtain the intersection line. Based on the position of the intersection line, an assembly joint positioning plane is generated, and the spatial range is determined by calculating the intersection area between the assembly joint positioning plane and the prefabricated component. This assembly joint positioning method based on spatial geometry calculations achieves accurate determination of the segmented positions of the prefabricated component, and the calculation of the intersection area ensures the accuracy of the prefabricated unit division, providing a reliable technical basis for the factory production of prefabricated components.
[0016] In conjunction with some embodiments of the first aspect, in some embodiments, after determining the positional inclusion relationship between each component and the intersecting extended space boxes for each component in the target component set, and labeling each component according to the positional inclusion relationship, and labeling the component as the belonging component of the target room corresponding to the extended space box when the component is completely contained within a single extended space box, and labeling the component as the separating component of the target rooms corresponding to the multiple extended space boxes when the component is contained within multiple extended space boxes, the method further includes: extracting the identification information of multiple target rooms corresponding to the separating component, establishing the adjacency relationship between multiple target rooms according to the identification information; and generating a topological relationship graph of the target rooms according to the adjacency relationship.
[0017] In the above embodiments, the identification information of multiple target rooms corresponding to the partition components is extracted to establish adjacency relationships, and a topological relationship diagram of the target rooms is generated based on the adjacency relationships. The establishment of room topological relationships based on the spatial attribute annotations of the partition components clearly expresses the spatial connection characteristics between rooms. The generation of the topological relationship diagram enables a visual presentation of the room spatial layout, providing an intuitive analysis tool for construction management and spatial planning.
[0018] In conjunction with some embodiments of the first aspect, in some embodiments, after determining the positional inclusion relationship between each component and the intersecting extended space boxes for each component in the target component set, and labeling each component according to the positional inclusion relationship, and after the step of labeling the component as the belonging component of the target room corresponding to the extended space box when the component is completely contained within a single extended space box, and labeling the component as the separating component of the target rooms corresponding to the multiple extended space boxes when the component is contained within multiple extended space boxes, the method further includes: obtaining the three-dimensional coordinate information and component size information of the belonging component in the target room; calculating the spatial envelope range of the belonging component according to the three-dimensional coordinate information and component size information; using the boundary points of the spatial envelope range as the positioning reference points of the boundary components of the target room, and establishing the spatial coordinate system of the target room based on the positioning reference points; and updating the spatial range of the target room according to the spatial coordinate system.
[0019] In the above embodiments, the three-dimensional coordinates and dimensions of the components belonging to the target room are obtained to calculate the spatial envelope. The boundary points of the spatial envelope are used as the positioning reference points of the boundary components to establish a spatial coordinate system. The spatial range of the target room is updated according to the spatial coordinate system. A local coordinate system for the room is established based on the spatial distribution of the components belonging to the target room. The selection of boundary points ensures the accuracy of spatial positioning, and the dynamic updating of the spatial range improves the accuracy of room space division, making the room-level spatial attribute labeling results more accurate and reliable.
[0020] Secondly, embodiments of this application provide a model space attribute annotation system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, which includes computer instructions, and the one or more processors call the computer instructions to cause the model space attribute annotation system to perform the method described in the first aspect and any possible implementation thereof.
[0021] Thirdly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on a model space attribute annotation system, cause the model space attribute annotation system to perform the method described in the first aspect and any possible implementation thereof.
[0022] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a model space attribute annotation system, cause the model space attribute annotation system to perform the method described in the first aspect and any possible implementation thereof.
[0023] Understandably, the model space attribute annotation system provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.
[0024] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. This application obtains basic spatial framework information by inputting target project drawings into a large-scale vertical model for drawing recognition, constructs space boxes and positions them in the BIM model, performs intersection tests on component bounding boxes and expanded space boxes to filter target component sets, and labels components as belonging components and separating components based on positional inclusion relationships, achieving room-level refined spatial attribute labeling. The positioning and expansion of space boxes ensure complete coverage of boundary components, and intersection tests and positional inclusion relationship judgments guarantee the accuracy of labeling, enabling the BIM model to have room-level spatial division capabilities.
[0025] 2. This application determines the set of coordinate points of the target room on the horizontal plane based on planar contour data, obtains the floor elevation information, and vertically stretches it to obtain a set of three-dimensional vertex coordinates. A spatial box is then constructed so that its top and bottom surfaces are located at the upper and lower elevations of the floor where the target room is located, and its side boundaries correspond to the planar contour. This spatial construction method based on planar contour and elevation data achieves precise definition of the room's spatial range, and the spatial box strictly corresponds to the actual room boundary, providing a reliable spatial reference benchmark for subsequent component spatial attribute annotation.
[0026] 3. This application selects three corresponding reference axis intersections in the CAD drawings and BIM model as positioning points, calculates the coordinate transformation matrix to position the space box in the BIM model, and enlarges it according to a preset scaling ratio to obtain an enlarged space box. The coordinate transformation based on the grid positioning points ensures the accuracy of spatial positioning, while the design of the enlarged space box guarantees complete coverage of boundary components, making the definition of room space range more precise and reliable, and the spatial attribute annotation results more accurate and complete. Attached Figure Description
[0027] Figure 1 This is a flowchart illustrating a method for automatically identifying model spatial attributes based on CAD drawings in an embodiment of this application. Figure 2 This is another flowchart illustrating a model space attribute annotation method based on automatic recognition of CAD drawings in an embodiment of this application; Figure 3 This is a schematic diagram of the overall process of a model space attribute annotation method based on automatic recognition of CAD drawings in an embodiment of this application; Figure 4 This is a schematic diagram of the physical device structure of a model space attribute annotation system in the embodiments of this application. Detailed Implementation
[0028] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.
[0029] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0030] To facilitate understanding, the application scenarios of the embodiments of this application are described below.
[0031] In large-scale construction projects, construction management teams need to use BIM models for construction planning, schedule management, and quality control. This requires BIM models to provide room-level spatial information to support specific tasks such as zoning construction organization, work sequence arrangement, and material delivery. However, current BIM modeling software generally only achieves floor-level spatial division and cannot directly identify the relationship between components (such as walls, columns, beams, and slabs) and specific room spaces. This coarse-grained spatial division limits the depth of BIM technology application in construction management, especially in stages such as decoration projects where precise division of construction areas is required. The inability to directly obtain room-level construction information from the BIM model affects the level of precision in construction management.
[0032] Existing solutions primarily rely on manual methods, where BIM engineers meticulously check the spatial relationships between components and rooms in the model against CAD construction drawings, manually adding spatial ownership labels. This approach has several problems: First, it's labor-intensive, requiring spatial relationship judgment and labeling for each component individually; second, it's prone to errors, especially when dealing with walls, beams, and slabs spanning multiple rooms, where manual judgment can easily lead to inaccuracies; third, it's difficult to maintain, as manual labeling needs to be redone when construction drawings change, increasing repetitive work. These issues often result in project teams only being able to perform partial labeling of key areas, failing to achieve refined spatial attribute management across the entire model.
[0033] The automated solution provided by this invention first automatically extracts room outlines, elevations, and other information from CAD drawings using a large-scale vertical model to construct a 3D spatial framework. Then, based on grid positioning, it precisely maps the spatial framework to the BIM model, ensuring coverage of boundary components through spatial box expansion. The system employs a two-step judgment strategy: first, it quickly filters components using bounding boxes, and then performs precise Boolean operations to automatically identify the spatial relationships of components. This approach avoids tedious manual operations and enables automatic annotation across the entire model. When drawings change, simply re-importing the modified drawings automatically updates the annotation results, significantly improving work efficiency. This provides project management teams with reliable room-level spatial information, supporting more refined construction management.
[0034] To facilitate understanding, the method provided in this implementation will be described in detail below, using the above scenario as an example. Please refer to [link / reference]. Figure 1 This is a flowchart illustrating a model space attribute annotation method based on automatic identification of CAD drawings in an embodiment of this application.
[0035] S101. Input the target project drawing into the drawing recognition vertical domain large model for recognition, and obtain the basic spatial framework information of the target room. The target project drawing contains the target room, and the basic spatial framework information contains plan outline data and elevation data.
[0036] Among them, the target project drawings refer to the construction drawing files of the engineering project, including but not limited to CAD format engineering drawings such as architectural floor plans, elevations, and sections; the drawing recognition vertical domain large model refers to an artificial intelligence model trained by deep learning specifically for recognizing architectural engineering drawings, which can automatically extract geometric information and text annotation information from the drawings; the basic spatial framework information refers to the data set describing the basic form of the building space; the planar contour data represents the boundary contour lines of the room on the horizontal plane and their coordinate information; and the elevation data refers to the height information of the building components in the vertical direction.
[0037] This step, performed in the initial phase of the project, is used to automatically extract spatial information from CAD drawings. Specifically, the project construction drawings in CAD format are first imported into the system, where a large-scale model of the drawing recognition domain analyzes the content. The model uses deep learning algorithms to identify layer information, line type features, annotation text, and other elements in the drawings, extracting the plan outline and coordinate information of each room, while also identifying floor elevation markings to obtain the upper and lower elevation values of the rooms. This information collectively constitutes the basic framework data describing the spatial form of the target rooms.
[0038] In some embodiments, automatic identification and information extraction of drawings can be achieved in multiple ways: Optionally, a computer vision-based method can be used, first preprocessing the drawing image, including noise reduction, binarization, and layer separation, then using object detection algorithms to identify key elements in the drawing such as room outlines, dimensions, and grid lines, and finally extracting text annotation information using optical character recognition (OCR) technology; Optionally, based on the vector data characteristics of the drawing, the primitive information of the CAD file can be directly parsed to identify the line combination relationships in different layers, determine room boundaries in conjunction with drawing standards and specifications, and simultaneously extract attribute data of the annotated objects to obtain complete spatial information. It is understood that other recognition algorithms or combinations thereof can also be used to achieve automatic extraction of drawing information, and this is not limited here.
[0039] S102. Construct the spatial box of the target room based on the planar contour data and elevation data.
[0040] Among them, the space box represents the geometry that expresses the actual boundary of the room in three-dimensional space and is used to define the spatial range of the room; the planar contour data and elevation data together determine the shape and position of the space box; the construction process refers to the operation process of converting two-dimensional planar information into a three-dimensional spatial entity.
[0041] This step is performed after acquiring the basic spatial framework information, and is used to generate a three-dimensional geometry that represents the actual spatial extent of the room. Specifically, the system constructs a closed polygon of the room on the horizontal plane based on the coordinate point sequence in the planar contour data, and then stretches it in the vertical direction according to the vertical height information provided by the elevation data to form a complete three-dimensional spatial box model, which accurately reflects the actual spatial extent of the target room.
[0042] In some embodiments, the space box can be constructed in several ways: Optionally, the coordinate points in the planar contour data are connected sequentially to form a closed polygon, the geometric center and area of the polygon are calculated, and then the polygon is used as the base and vertically stretched according to the elevation data to generate a three-dimensional space with six faces; Optionally, a parametric modeling method is used, defining the planar contour of the room as a parametric curve, using the elevation value as a control parameter, and automatically generating a three-dimensional geometry that meets the actual spatial requirements through an algorithm. It is understood that other three-dimensional modeling methods can also be used to construct the space box, and this is not limited here.
[0043] In some embodiments, this step may further include the following steps: The set of coordinate points of the target room on the horizontal plane is determined based on the planar contour data. This set of coordinate points includes the vertex coordinates of the target room's contour. The floor elevation information related to the target room is obtained from the elevation data. This floor elevation information includes the upper and lower elevation values of the floor where the target room is located. The set of coordinate points is stretched vertically according to the floor elevation information to obtain the set of vertex coordinates of the target room in three-dimensional space. A spatial box is constructed based on the set of vertex coordinates, such that the top and bottom surfaces of the spatial box are located at the upper and lower elevation positions of the floor where the target room is located, and the side boundaries of the spatial box correspond to the planar contour of the target room.
[0044] Among them, the set of coordinate points represents the sequence of vertices describing the planar shape of the room; the planar contour data refers to the boundary line information of the room projected onto the horizontal plane; the elevation data represents the vertical height value of each floor of the building; the vertex coordinate set refers to the set of three-dimensional points in space that completely describes the boundary of the room; and the space box represents the three-dimensional closed space defined by the vertex coordinates.
[0045] The process of constructing room spatial information includes the following detailed steps: First, the room's planar outline is extracted from the CAD drawings and converted into an ordered sequence of coordinate points. For rectangular rooms, the coordinates of the four corner points are extracted; for irregular rooms, contour feature points are obtained through polygon approximation. Each coordinate point contains x and y planar coordinate values. Then, the elevation information of the floor where the room is located is obtained, including the finished floor elevation and the elevation of the bottom surface of the upper floor slab. For example, a room located on a standard floor has a lower elevation of +3.000 meters (floor elevation) and an upper elevation of +6.000 meters (bottom elevation of the upper floor slab). The set of planar coordinate points is stretched vertically, generating two corresponding spatial points for each planar coordinate point, located at the upper and lower floor elevations respectively. For example, the planar point (4.0, 3.0) will generate spatial points (4.0, 3.0, 3.0) and (4.0, 3.0, 6.0). Finally, a complete spatial box model is constructed based on the set of spatial vertices. The bottom and top surfaces of the spatial box are determined by elevation, while the sides are formed by planes connecting the corresponding top and bottom vertices. This yields a geometric model that fully describes the spatial extent of the room. The construction process must ensure that the spatial box strictly conforms to architectural dimensional standards to facilitate subsequent space management and collision detection.
[0046] This step employs precise geometric calculation methods. Vector data processing transforms two-dimensional planar information into three-dimensional spatial entities, ensuring the accuracy of spatial division. The spatial box model can be used in various application scenarios such as subsequent construction management, equipment layout, and interior design. This parametric spatial construction method provides a standardized expression of room spatial information, effectively supporting the refined management of building information models.
[0047] S103. Obtain the coordinates of the intersection point of the reference axis of the CAD drawing and the BIM model. Use the coordinates of the intersection point of the reference axis and the coordinate transformation matrix to position the space box to the corresponding position in the BIM model to obtain the positioning space box. Then, enlarge the positioning space box to obtain the enlarged space box.
[0048] Among them, the reference axis intersection point represents the intersection point of the central axis of the building plan positioning grid, which is used to determine the spatial position reference of the building; the coordinate transformation matrix refers to the mathematical transformation matrix used to convert the coordinate system of CAD drawings into the coordinate system of BIM models; the positioning space box represents the room space geometry that is accurately positioned in the BIM model after coordinate transformation; the enlarged space box refers to the space geometry that is enlarged according to a preset ratio based on the positioning space box, which is used to ensure complete coverage of the room boundary components.
[0049] This step is performed after the spatial box is constructed to establish spatial coordinate correspondence between the CAD drawings and the BIM model. Specifically, firstly, three corresponding axis intersection points are selected in both the CAD drawings and the BIM model as reference points, and the coordinate values of these points in both coordinate systems are obtained. Then, based on these coordinate values, a coordinate transformation matrix incorporating translation, rotation, and scaling transformations is calculated. The vertex coordinates of the spatial box are transformed using this matrix to accurately position it in the BIM model. Finally, the positioned spatial box is scaled up proportionally to ensure that the enlarged spatial box completely covers the boundary components of the room.
[0050] In some embodiments, spatial positioning and scaling can be achieved in several ways: Optionally, firstly, the intersection points of corresponding axes in the CAD drawing and BIM model are manually selected through a graphical interface, their coordinate values are extracted, and then the six parameters of the coordinate transformation matrix are solved using the least squares method. The coordinates of the spatial box vertices are substituted into the matrix equation for transformation, and finally, the spatial box is uniformly scaled up according to a preset scaling factor. Optionally, an automatic recognition method is used to identify the grid markings in the CAD drawing and BIM model, match the intersection points of axes with the same number, extract the coordinate values, calculate the coordinate transformation matrix through affine transformation, apply the transformation matrix for coordinate transformation, and achieve dynamic scaling of the spatial box through parametric modeling. It is understood that other mathematical methods or geometric algorithms can also be used to achieve spatial positioning and scaling, which are not limited here.
[0051] In some embodiments, coordinate transformation is performed using the following matrices.
[0052] Right now: Where (x) ′ ,y ′ (x, y) represents the coordinates after transformation (model coordinates), (x, y) represents the coordinates before transformation (drawing coordinates), and a1, b1, c1, a2, b2, c2 are transformation constants calculated based on the positioning points.
[0053] In some embodiments, this step may further include the following steps: selecting three corresponding intersection points of reference axes in the CAD drawing and the BIM model as positioning points, and obtaining the coordinate values of the positioning points in the coordinate system of the CAD drawing and the coordinate system of the BIM model; calculating the parameters of the coordinate transformation matrix based on the coordinate values of the positioning points, the coordinate transformation matrix including six transformation constants for coordinate transformation; transforming the vertex coordinate set of the space box through the coordinate transformation matrix to obtain the positioning space box in the BIM model coordinate system; and scaling up the size of the positioning space box proportionally according to a preset scaling ratio to obtain an enlarged space box, so that the enlarged space box can completely cover the boundary components of the target room.
[0054] Among them, the intersection of the reference axis represents the intersection point of the building positioning grid; the positioning point refers to the reference point used to determine the coordinate transformation relationship; the coordinate transformation matrix is a mathematical matrix that describes the mapping relationship between two coordinate systems; the transformation constants include translation, rotation and scaling parameters; the scaling factor refers to the factor by which the size of the space box is enlarged.
[0055] The specific steps of the coordinate system transformation process are as follows: First, select three distinct non-collinear axis intersection points in the CAD drawing and BIM model as positioning points. These points are usually chosen as intersections of major axes, such as "1-A", "1-C", and "3-A". Extract the coordinate values of these points in the two coordinate systems to form corresponding coordinate pairs. For example, the coordinates of point "1-A" are (0, 0) in CAD and (1000, 2000) in BIM. Based on these three pairs of coordinate points, calculate the six parameters of the coordinate transformation matrix: two translations (dx, dy), a rotation angle θ, and three scaling factors (sx, sy, sz). The calculation uses the least squares method, and the optimal transformation parameters are obtained by solving a system of equations. Substitute the coordinates of all vertices of the spatial box into the transformation matrix for calculation to obtain the new coordinates of these points in the BIM coordinate system. The transformed spatial box has thus completed its spatial positioning from CAD to BIM. Finally, the positioning space box is enlarged, usually by 50-200mm, to ensure that the enlarged space box can completely contain the room's walls, beams, columns and other boundary components.
[0056] This coordinate transformation method employs rigorous mathematical calculations to ensure the accuracy of spatial positioning. Through multi-point positioning and least-squares fitting, the effects of drawing distortion and measurement errors are effectively eliminated. The enlargement process provides a margin of error for subsequent spatial relationship determination, improving the accuracy of spatial identification. This spatial positioning method based on mathematical transformation achieves precise spatial correspondence between CAD drawings and BIM models, laying the foundation for determining the spatial ownership of components.
[0057] S104. Perform an intersection test on the bounding boxes of components and the expanded space boxes in the BIM model, and filter out the set of target components that intersect with the expanded space boxes.
[0058] Among them, the component bounding box represents the smallest cubic space containing components in the BIM model, which is used to quickly calculate spatial relationships; the intersection test refers to the calculation process of determining whether two spatial geometries have overlapping parts; the target component set represents the set of all components that have spatial intersection relationships with the enlarged space box.
[0059] This step is performed after obtaining the expanded bounding box and is used for initial screening of components that may be related to the target room. Specifically, the system first calculates the axial bounding box of each component in the BIM model, which is the smallest bounding cube parallel to the coordinate axes. Then, these bounding boxes are subjected to a fast intersection test with the expanded bounding box to determine whether they overlap in 3D space. If overlap exists, the corresponding component is added to the target component set. This quickly eliminates obviously irrelevant components, improving the efficiency of subsequent accurate calculations.
[0060] In some embodiments, intersection testing and component selection can be implemented in several ways: Optionally, a fast intersection test can be performed using the separating axis theorem. First, the projection intervals of the two bounding boxes in the three coordinate axis directions are calculated. Then, it is determined whether these intervals overlap. If they overlap in all three directions, they are considered to intersect. Finally, the intersecting components are added to the target set. Optionally, a spatial octree can be used for spatial partitioning. The expanded spatial boxes and component bounding boxes are mapped to the octree structure. By comparing the space units they occupy, it is determined whether they intersect. An index relationship is established for the intersecting components. It is understood that other spatial calculation methods can also be used to implement bounding box intersection testing, which is not limited here.
[0061] S105. For each component in the target component set, determine the positional inclusion relationship between each component and the intersecting extended space boxes. Mark each component according to the positional inclusion relationship. When a component is completely contained within a single extended space box, mark the component as the belonging component of the target room corresponding to the extended space box. When a component is contained by multiple extended space boxes at the same time, mark the component as the separating component of the target rooms corresponding to the multiple extended space boxes.
[0062] Among them, the positional inclusion relationship represents the relative positional characteristics of a component and an expanded space box in three-dimensional space, used to determine whether a component is completely located inside a space box or spans multiple space boxes; the belonging component refers to a component that is completely contained within a single expanded space box, indicating that the component belongs only to the corresponding target room; the separating component refers to a component that is contained in multiple expanded space boxes, used to indicate that the component plays a separating role between multiple target rooms; and the annotation refers to the process of adding spatial attribute information to a component, used to record the belonging relationship between the component and the room.
[0063] This step is performed after obtaining the target component set and is used to accurately determine the spatial belonging relationship between components and rooms. Specifically, the system performs precise spatial location analysis on each component in the target component set, using Boolean operations to determine the spatial relationship between the component and intersecting extended space boxes. If a component is entirely located inside an extended space box, it is labeled as the component belonging to the corresponding room; if a component intersects with multiple extended space boxes, it is labeled as the separator component for these rooms. The system saves the labeling results as component attribute information in the BIM model for easy subsequent querying and management.
[0064] In some embodiments, spatial relationship determination and attribute labeling can be achieved in several ways: Optionally, firstly, the complete 3D geometric model of the component is obtained, and a Boolean intersection operation is performed between the component and the intersecting enlarged spatial boxes. The ratio of the intersection volume to the component's own volume is calculated. When the ratio is 1, it is determined to be a complete containment relationship and labeled as the belonging component. When there are non-zero intersections with multiple spatial boxes, it is labeled as a separating component. Finally, the labeling information is written into the component's attribute data. Optionally, a ray casting method is used. Multiple points are uniformly sampled from the surface of the component, and rays are emitted in different directions. The number of intersections between the rays and the enlarged spatial boxes is counted. The positional relationship between the component and the spatial boxes is determined based on the intersection pattern, and the spatial attribute labels of the component are updated through database operations. It is understood that other geometric algorithms or spatial analysis methods can also be used to determine the spatial relationship and attribute labeling of components, which are not limited here.
[0065] The following provides a more detailed description of the process of the method provided in this implementation. Please refer to [link / reference]. Figure 2 This is another flowchart illustrating the model space attribute annotation method based on automatic identification of CAD drawings in this application embodiment.
[0066] S201. Obtain the component type information of the components in the target component set, and determine whether the belonging component or the separating component is a prefabricated component based on the component type information.
[0067] Component type information represents the classification attributes of components in the BIM model, including features such as the manufacturing method and installation method of the components; prefabricated components refer to building components that are pre-produced in the factory and directly installed on site, such as prefabricated wall panels, prefabricated beams, and prefabricated floor slabs; belonging components and partition components refer to components that belong entirely to a single room and span multiple rooms, respectively.
[0068] After spatial attribute labeling of components, prefabricated components need to be identified for specialized processing. This is done by reading the component attribute data from the BIM model to obtain the type information for each component, including component family, component category, and manufacturing method. For each belonging or separating component, the manufacturing method attribute in its type information is checked. If the manufacturing method attribute value is "prefabricated," the component is marked as a prefabricated component. Simultaneously, other relevant attributes of the prefabricated component are extracted, such as prefabricated component number, material, and dimensions, to prepare for subsequent specialized processing of prefabricated components.
[0069] S202. When the component is identified as a prefabricated component, extract the spatial attribute annotation information of the prefabricated component and determine the spatial intersection relationship between the prefabricated component and each target room.
[0070] Spatial attribute labeling information indicates the spatial ownership relationship between components and rooms; spatial intersection relationship refers to the specific intersection of prefabricated components with each target room in three-dimensional space, including the intersection position and intersection range.
[0071] For identified prefabricated components, their spatial attribute annotation information is first read to obtain all target rooms related to the component. Then, 3D geometric calculations determine the specific intersection relationships between the prefabricated component and each room. The calculation process includes: obtaining the 3D geometric model of the prefabricated component, performing Boolean operations with the spatial extent of each relevant room to obtain the spatial extent of the prefabricated component within each room. For prefabricated components spanning multiple rooms, their volume proportion in each room is calculated to determine the main spatial distribution of the prefabricated component. This spatial intersection data will be used for subsequent segmentation and installation planning of prefabricated components.
[0072] S203. Obtain the boundary plane information of the target room.
[0073] Boundary plane information represents the geometric features of the spatial boundary surface of the target room, including data such as the location, orientation, and size of the boundary surface.
[0074] After determining the spatial intersection relationships of the prefabricated components, the boundary information of the target room needs to be obtained for segmentation of the prefabricated components. By analyzing the spatial box model of the room, the planes constituting the room boundary are extracted. For each boundary plane, its normal vector direction and plane equation parameters are calculated to determine the plane's precise position in three-dimensional space. Simultaneously, the effective range of the boundary plane, i.e., the actual area of influence of the plane within the room space, is extracted. This boundary plane information will be used to determine the segmentation positions of the prefabricated components and the arrangement of assembly joints.
[0075] S204. Perform an intersection operation between the boundary plane information and the three-dimensional model of the prefabricated component to obtain the intersection line.
[0076] Intersection operation represents the mathematical process of calculating the intersection of two geometric bodies; intersection line refers to the spatial curve formed by the intersection of the boundary plane and the surface of the precast component; three-dimensional model refers to a digital model that describes the geometry of the precast component and contains complete geometric information of the component.
[0077] After obtaining the boundary plane information, spatial intersection calculations are performed between each boundary plane and the 3D model of the precast component. The calculation process first converts the 3D model of the precast component into a boundary representation (B-rep) form, extracting the polygonal patches that constitute the outer surface of the component. Then, for each boundary plane, the intersection with the polygons on the surface of the precast component is calculated. By solving the plane equations and polygon equations, a sequence of intersection points is obtained. These intersection points are then connected according to spatial continuity to form a complete intersection line. For curved surface components, the surface needs to be discretized into a planar polygonal mesh before performing the intersection calculation. The calculation results of the intersection line include the coordinates of the start and end points of the line segment, as well as the normal vector information of the plane in which it lies.
[0078] S205. Based on the position information of the intersecting lines, generate an assembly joint positioning plane on the prefabricated component.
[0079] The assembly joint positioning plane represents the theoretical cutting plane at the segmentation of the precast component; the position information includes the spatial coordinates and direction data of the intersecting lines.
[0080] Based on the calculated intersection line information, assembly joint positioning planes for prefabricated component segmentation are generated. First, the spatial distribution characteristics of the intersection lines are analyzed, including their direction, length, and relative positional relationships. For each intersection line, a family of planes passing through that line is constructed, and the optimal positioning plane position is determined using the least squares method. The positioning plane must meet structural feasibility requirements, including perpendicularity to the main body direction of the prefabricated component and connection requirements with adjacent components. For prefabricated components with complex shapes, the spatial relationships of multiple intersection lines need to be comprehensively considered, and the optimal assembly joint positioning plane is generated using a plane fitting algorithm.
[0081] S206. Calculate the intersection area between the assembly joint positioning plane and the prefabricated component, and determine the spatial range of the prefabricated component in each target room.
[0082] Intersecting area refers to the cutting section of the assembly joint positioning plane on the prefabricated component; spatial range indicates the specific spatial distribution of the prefabricated component in each target room.
[0083] The prefabricated components are divided using the assembly joint positioning plane to determine their spatial extent within each room. First, the intersection area between the assembly joint positioning plane and the prefabricated component is calculated, resulting in a complete cutting section. For each section, its area, perimeter, and other geometric parameters are calculated to verify the rationality of the cutting scheme. Then, based on the cutting sections, the prefabricated component is divided into multiple spatial regions, each corresponding to the portion of the component within a specific target room. By calculating the volume, center of gravity, and other parameters of each region, the spatial distribution characteristics of the prefabricated component in each room are determined. This spatial extent data will guide the production, processing, and on-site installation of the prefabricated components.
[0084] S207. Based on the spatial range and assembly joint location information of the prefabricated components, divide the prefabricated components into multiple prefabricated units and number them.
[0085] Prefabricated unit refers to the independent part after the prefabricated component is divided; spatial range refers to the distribution area of the prefabricated component in each room; assembly joint location information includes the spatial location and direction of the joint plane; number refers to the unique identifier assigned to each prefabricated unit.
[0086] The prefabricated components are segmented based on their spatial distribution in each room and the location of their assembly joints. Using the assembly joint positioning plane as the dividing plane, the prefabricated components are divided into multiple prefabricated units. For each prefabricated unit, its volume, center of gravity, boundary frame, and other geometric parameters are calculated, and a unique number is assigned. The numbering rules include information such as room identification, component type, and spatial location; for example, "PCW-301-A1" represents the first segment of the prefabricated wall panel in room 01 on the 3rd floor. The relationship between each prefabricated unit and the assembly joints is also recorded, including the joint location, connection method, waterproofing requirements, and other technical parameters. This information is written into the attribute data of the prefabricated unit for processing, production, and installation management.
[0087] S208. Based on the spatial distribution of prefabricated units and the construction sequence of the target room, determine the installation sequence of prefabricated components.
[0088] Spatial distribution refers to the positional relationship of prefabricated units in the building space; construction sequence indicates the order in which the target rooms are constructed; installation sequence refers to the on-site installation sequence of prefabricated components.
[0089] The installation sequence of prefabricated components is determined based on spatial distribution characteristics and construction procedure requirements. First, the construction plan for each target room is obtained, including the room's construction procedures and planned duration. Then, the spatial dependencies between prefabricated units are analyzed, including support relationships and connection relationships. For vertical prefabricated components, installation is sequenced from bottom to top; for horizontal prefabricated components, it is necessary to ensure that their supporting components have been installed. Based on spatial constraints and procedural requirements, the construction sequence of all prefabricated units is ordered, generating a detailed installation sequence plan, including the installation time, hoisting path, and temporary support scheme for each prefabricated unit.
[0090] S209. Extract the identification information of multiple target rooms corresponding to the partition components, and establish the adjacency relationship between the multiple target rooms based on the identification information.
[0091] Identification information refers to the code used to uniquely identify the target room; adjacency relationship indicates the spatial adjacency status between rooms; separator refers to the component located between multiple rooms.
[0092] Topological relationships between rooms are established by analyzing the spatial attributes of partition components. Room identifiers associated with each partition component are extracted from its attribute data; for example, "partition 301-302" indicates that the component is located between rooms 301 and 302. Based on this identifier information, a room adjacency matrix is constructed, where each element indicates whether a partition component exists between rooms. For each pair of adjacent rooms, the type and number of partition components connecting them are recorded. By analyzing the adjacency matrix, spatial layout characteristics of the rooms can be obtained, such as the number of adjacent rooms for each room and the types of shared partition components. This topological relationship data will be used for spatial analysis and construction management.
[0093] S210. Generate a topological relationship diagram of the target room based on the adjacency relationship.
[0094] A topological relationship diagram is a graphical representation of the spatial connection relationships between rooms, consisting of nodes and edges; nodes represent target rooms, and edges represent the adjacency relationships between rooms; the adjacency relationship refers to the spatial relationship between rooms connected by partition components.
[0095] A topology graph is constructed based on a room adjacency matrix. Each target room is treated as a node in the graph, containing attributes such as room number, area, and function. For room pairs with a value of 1 in the adjacency matrix, a connecting edge is added between the corresponding nodes. The edge's attributes include the type and quantity of the separating components. The topology graph is generated using a force-directed layout algorithm, which iteratively calculates and determines the optimal layout position of the nodes, maintaining appropriate distances between adjacent nodes and avoiding node overlap. For connecting edges, different display styles are set according to the type of separating components, such as solid lines for walls and dashed lines for doors and windows, to intuitively show the spatial relationship characteristics between rooms.
[0096] S211. Obtain the three-dimensional coordinate information and component size information of the component belonging to the target room.
[0097] Three-dimensional coordinate information refers to the position data of a component in space, including the x, y, and z coordinate values of the component's feature points; component size information represents the geometric dimensions of the component, including length, width, and height; belonging component refers to a component that belongs entirely to a single room.
[0098] Spatial data of the components belonging to the target room are extracted from the BIM model. For each component, the vertex coordinate data in its 3D geometric model are read, including the spatial location information of the component's main feature points. Simultaneously, the component's dimensional parameters are obtained, including its dimensions in the three principal directions, as well as its volume, surface area, and other geometric features. For irregularly shaped components, the vertex coordinate sequence of its boundary polygons is extracted to accurately describe the component's spatial morphology. This spatial data will be used to calculate the spatial distribution range of the components.
[0099] S212. Calculate the spatial envelope range of the component based on the three-dimensional coordinate information and component size information.
[0100] The spatial envelope refers to the smallest spatial volume that completely contains the component; three-dimensional coordinate information and component size information are used to determine the specific location and size of the component in space.
[0101] The spatial envelope of a component is calculated using its spatial data. First, the component's position in space is determined based on its three-dimensional coordinates. Then, the component's extension range in each direction is calculated using its dimensional information. For regularly shaped components, the circumscribed cube is directly used as the spatial envelope; for irregularly shaped components, the minimum convex polyhedron containing all vertices is calculated using the convex hull algorithm. The calculation of the spatial envelope must consider the component's orientation, ensuring that the edges of the envelope are parallel to the spatial coordinate axes. The calculation results include the vertex coordinates, dimensional parameters, and spatial orientation information of the envelope, which will be used to determine the spatial boundaries of the room.
[0102] S213. Use the boundary points of the spatial envelope as the positioning reference points of the boundary components of the target room, and establish the spatial coordinate system of the target room based on the positioning reference points.
[0103] Boundary points represent the vertex coordinates of the spatial envelope; positioning reference points are reference points used to determine the spatial location of a room; boundary components are components that define the spatial scope of a room; and spatial coordinate systems are local coordinate systems that describe the spatial location and orientation of a room.
[0104] A local coordinate system for the room is established based on the spatial envelope of the building's constituent components. First, the coordinates of all vertices within the spatial envelope are extracted; these points represent key locations on the room's spatial boundaries. Feature points of the spatial envelope are selected as the origin of the coordinate system, such as the geometric center of the envelope or a corner point. The principal axes of the coordinate system are determined by analyzing the spatial arrangement characteristics of the boundary components, using the directions of the main walls as the coordinate axes. For example, the direction of the longest wall is taken as the X-axis, the direction perpendicular to the wall as the Y-axis, and the vertical direction as the Z-axis. For each positioning reference point, its relative coordinate value in the newly established coordinate system is calculated. The coordinate system must be consistent with the orientation of the main building structure to facilitate spatial positioning and dimensional measurement.
[0105] S214. Update the spatial extent of the target room according to the spatial coordinate system.
[0106] Spatial range refers to the actual spatial boundaries of the target room; spatial coordinate system is used to describe the relative positional relationships of points within the room.
[0107] After establishing a local coordinate system, the spatial extent of the target room is updated and refined. Based on the newly established spatial coordinate system, the geometric features of the room boundaries are recalculated. The room's planar outline is determined by the positional relationships of boundary components in the local coordinate system. Combined with floor elevation information, the room's spatial height range is calculated. For irregularly shaped rooms, the space is divided into several regular subspaces using a polygon subdivision algorithm, and the area and volume of each part are calculated separately. The updated spatial extent data includes the room's planar coordinates, elevation range, area, volume, and other geometric parameters. This data will be stored in the BIM model as the room's final spatial attributes.
[0108] The following provides a detailed description of the process of the method provided in this implementation. Please refer to [link / reference]. Figure 3 , Figure 3 This is a schematic diagram of the overall process of the model space attribute annotation method based on automatic recognition of CAD drawings in the embodiments of this application.
[0109] The process begins with the "Start" button, where CAD drawings are imported into the system via the "Upload Drawings" step. The system then performs three parallel recognition processes: first, "recognizing the drawing catalog and drawing information"; second, "constructing the basic spatial framework of the project"; and third, "recognizing the coordinates of each space in the architectural floor plan." The results of these three steps are used for subsequent model building and spatial annotation.
[0110] After completing the basic information identification, the system enters the "forming the overall spatial framework of the project" stage and performs "standardization of drawing and model coordinates" processing. Simultaneously, the information for "writing spatial attributes into the model" is passed to the "upload model" stage. The system then performs an "intersection test," which is based on the analysis results of "Boolean operations to determine similarity and space." Finally, after "expanding the spatial box," the "spatial attribute annotation" is completed.
[0111] This process fully embodies the complete technical solution for model spatial attribute annotation based on automatic recognition of CAD drawings described in this application, forming a complete processing link from drawing input, spatial framework construction, coordinate transformation to final spatial attribute annotation.
[0112] The model space attribute annotation system in the embodiments of this invention is described below from the perspective of hardware processing. Please refer to [link / reference]. Figure 4 This is a schematic diagram of the physical device structure of a model space attribute annotation system in this application embodiment.
[0113] It should be noted that, Figure 4 The structure of the model space attribute annotation system shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0114] like Figure 4 As shown, the model space attribute annotation system includes a Central Processing Unit (CPU) 401, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 402 or programs loaded from storage section 408 into Random Access Memory (RAM) 403, such as performing the methods described in the above embodiments. The RAM 403 also stores various programs and data required for system operation. The CPU 401, ROM 402, and RAM 403 are interconnected via a bus 404. An Input / Output (I / O) interface 405 is also connected to the bus 404.
[0115] The following components are connected to I / O interface 405: input section 306 including audio input devices, push-button switches, etc.; output section 407 including a liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 408 including a hard disk, etc.; and communication section 409 including a network interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 409 performs communication processing via a network such as the Internet. Drive 410 is also connected to I / O interface 405 as needed. Removable media 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 410 as needed so that computer programs read from them can be installed into storage section 408 as needed.
[0116] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by central processing unit (CPU) 401, it performs the various functions defined in the present invention.
[0117] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0118] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings.
[0119] Specifically, the model space attribute annotation system of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, it implements the model space attribute annotation method based on CAD drawings for automatic recognition provided in the above embodiment.
[0120] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the model space attribute annotation system described in the above embodiments; or it may exist independently and not assembled into the model space attribute annotation system. The storage medium carries one or more computer programs, which, when executed by a processor of the model space attribute annotation system, cause the model space attribute annotation system to implement the model space attribute annotation method based on automatic CAD drawing recognition provided in the above embodiments.
[0121] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0122] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0123] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for automatically identifying spatial attributes of a model based on CAD drawings, characterized in that, The method, applied to a model space attribute annotation system, includes: The target project drawing is input into the drawing recognition vertical domain large model for recognition, and the basic spatial framework information of the target room is obtained. The target project drawing contains the target room, and the basic spatial framework information includes planar outline data and elevation data. The spatial box of the target room is constructed based on the planar contour data and the elevation data; Obtain the coordinates of the intersection point of the reference axis of the CAD drawing and the BIM model. Use the coordinates of the intersection point of the reference axis and the coordinate transformation matrix to position the space box to the corresponding position in the BIM model to obtain the positioned space box. Then, enlarge the positioned space box to obtain the enlarged space box. An intersection test is performed between the bounding boxes of the components in the BIM model and the expanded space box to obtain a set of target components that intersect with the expanded space box; For each component in the target component set, determine the positional inclusion relationship between each component and the intersecting extended space boxes. Mark each component according to the positional inclusion relationship. When a component is completely contained within a single extended space box, mark the component as the belonging component of the target room corresponding to the extended space box. When a component is contained by multiple extended space boxes at the same time, mark the component as the separating component of the target rooms corresponding to the multiple extended space boxes.
2. The method according to claim 1, characterized in that, The step of constructing the spatial box of the target room based on the planar contour data and the elevation data specifically includes: The set of coordinate points of the target room on the horizontal plane is determined based on the planar contour data, and the set of coordinate points includes the vertex coordinates of the target room contour; Obtain the floor elevation information related to the target room from the elevation data, wherein the floor elevation information includes the upper and lower elevation values of the floor where the target room is located; The set of coordinate points is stretched vertically according to the floor elevation information to obtain the set of vertex coordinates of the target room in three-dimensional space; The space box is constructed based on the set of vertex coordinates, such that the top and bottom surfaces of the space box are located at the upper and lower elevations of the floor where the target room is located, respectively, and the side boundaries of the space box correspond to the planar outline of the target room.
3. The method according to claim 1, characterized in that, The steps of obtaining the coordinates of the intersection point of the reference axis between the CAD drawing and the BIM model, locating the spatial box to the corresponding position in the BIM model using the coordinates of the intersection point and the coordinate transformation matrix to obtain the positioned spatial box, and enlarging the positioned spatial box to obtain the enlarged spatial box, specifically include: In the CAD drawing and the BIM model, three corresponding intersection points of the reference axes are selected as positioning points, and the coordinate values of the positioning points in the coordinate system of the CAD drawing and the coordinate system of the BIM model are obtained. The parameters of the coordinate transformation matrix are calculated based on the coordinate values of the positioning point. The coordinate transformation matrix includes six transformation constants used for coordinate transformation. The set of vertex coordinates of the spatial box is transformed using the coordinate transformation matrix to obtain the positioning spatial box in the BIM model coordinate system; The size of the positioning space box is proportionally enlarged according to a preset enlargement ratio to obtain the enlarged space box, so that the enlarged space box can completely cover the boundary components of the target room.
4. The method according to claim 1, characterized in that, After determining the positional inclusion relationship between each component and intersecting extended space boxes for each component in the target component set, and labeling each component according to the positional inclusion relationship, the method further includes the following steps: when a component is completely contained within a single extended space box, the component is labeled as the belonging component of the target room corresponding to the extended space box; when a component is contained within multiple extended space boxes, the component is labeled as the separating component of the target rooms corresponding to the multiple extended space boxes. Obtain the component type information of the components in the target component set, and determine whether the belonging component or the separating component is a prefabricated component based on the component type information; When a component is identified as a prefabricated component, its spatial attribute annotation information is extracted to determine the spatial intersection relationship between the prefabricated component and each target room. Based on the spatial intersection relationship, the spatial range of the prefabricated component in each target room is calculated, and the assembly joint position information is marked at the boundary of adjacent target rooms; Based on the spatial range of the prefabricated component and the location information of the assembly joint, the prefabricated component is divided into multiple prefabricated units and numbered. Based on the spatial distribution of the prefabricated units and the construction sequence of the target room, the installation sequence of the prefabricated components is determined.
5. The method according to claim 4, characterized in that, The step of calculating the spatial range of the prefabricated component in each target room based on the spatial intersection relationship, and marking the assembly joint location information at the boundary of adjacent target rooms, specifically includes: Obtain the boundary plane information of the target room; The boundary plane information is intersected with the three-dimensional model of the prefabricated component to obtain the intersection line; Based on the position information of the intersecting lines, an assembly joint positioning plane is generated on the prefabricated component; Calculate the intersection area between the assembly joint positioning plane and the prefabricated component to determine the spatial range of the prefabricated component in each target room.
6. The method according to claim 1, characterized in that, After determining the positional inclusion relationship between each component and intersecting extended space boxes for each component in the target component set, and labeling each component according to the positional inclusion relationship, the method further includes the following steps: when a component is completely contained within a single extended space box, the component is labeled as the belonging component of the target room corresponding to the extended space box; when a component is contained within multiple extended space boxes, the component is labeled as the separating component of the target rooms corresponding to the multiple extended space boxes. Extract the identification information of multiple target rooms corresponding to the separating component, and establish the adjacency relationship between the multiple target rooms based on the identification information; A topology diagram of the target room is generated based on the adjacency relationship.
7. The method according to claim 1, characterized in that, After determining the positional inclusion relationship between each component and intersecting extended space boxes for each component in the target component set, and labeling each component according to the positional inclusion relationship, the method further includes the following steps: when a component is completely contained within a single extended space box, the component is labeled as the belonging component of the target room corresponding to the extended space box; when a component is contained within multiple extended space boxes, the component is labeled as the separating component of the target rooms corresponding to the multiple extended space boxes. Obtain the three-dimensional coordinate information and component size information of the belonging component within the target room; Based on the three-dimensional coordinate information and the component size information, calculate the spatial envelope range of the component to which it belongs; The boundary points of the spatial envelope are used as the positioning reference points of the boundary components of the target room, and the spatial coordinate system of the target room is established based on the positioning reference points. Update the spatial extent of the target room according to the spatial coordinate system.
8. A model space attribute annotation system, characterized in that, The model space attribute annotation system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the model space attribute annotation system to perform the method as described in any one of claims 1-7.
9. A computer-readable storage medium comprising instructions, characterized in that, When the instruction is run on the model space attribute annotation system, the model space attribute annotation system performs the method as described in any one of claims 1-7.
10. A computer program product, characterized in that, When the computer program product is run on the model space attribute annotation system, the model space attribute annotation system performs the method as described in any one of claims 1-7.