Method for automatically generating processing drawing based on IFC file for modular assembly type building box body unit
By reading the IFC file and performing coordinate conversion and blanking processing, processing drawings of modular prefabricated building box units are generated, which solves the problem of time-consuming and inconsistent drawings in the existing technology, and realizes rapid automated drawing.
Patent Information
- Application Number
- CN202510036252.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-06-06
AI Technical Summary
The prior art consumes time and effort in generating the processing drawings of modular prefabricated building box units, and manual methods may lead to inconsistent drawing formats, making it difficult to achieve rapid and automated drawing.
By reading IFC files, identifying prefabricated building components, obtaining geometric data, performing coordinate conversion and blanking processing, generating data groups containing drawing information, using the ezdxf toolkit to draw dxf images, and annotating and scaling according to the depth of sight and perspective, generating complete production drawings.
It realizes the rapid and automated generation of modular prefabricated building box unit processing drawings, improving production efficiency and consistency of drawings.
Smart Images

Figure CN120105522A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology and building safety management, and in particular to a method for automatically generating processing drawings based on IFC files for modular assembled building box units. Background Art
[0002] The fabrication of building components plays a vital role in the modern construction process. The geometric inspection and design evaluation of prefabricated components are also crucial to the entire construction process, which relies heavily on the processing drawings of the components. Currently, designers rely heavily on computer-aided design (CAD) tools, previous experience, and trial and error methods to prepare the manufacturing drawings of components. However, this process is very time-consuming and labor-intensive, which requires new drawing generation technologies. In addition, for multiple drawings, manual methods may lead to inconsistent drawing formats.
[0003] BIM, as a concept that uses 3D digital representations of buildings to support building information management, has been increasingly used in the preparation of drawings in architecture, construction, and manufacturing-related fields due to the advanced technology of integrated 3D modeling. Consistent information in digital building models can significantly improve the productivity and quality of construction work in many ways.
[0004] Therefore, there is an urgent need for a method that can automatically generate processing drawings of modular prefabricated building box units. Summary of the invention
[0005] The object of the present invention is to provide a method for automatically generating processing drawings based on IFC files for modular assembled building box units, comprising the following steps:
[0006] 1) Read the IFC file, identify the prefabricated building components for which drawings are to be generated, and obtain the geometric data of the prefabricated building components;
[0007] 2) Processing the geometric data of the prefabricated building components to obtain the corresponding relationship and coordinates of the outer surface, edges, and points of the prefabricated building components;
[0008] 3) Generate a data group containing all drawing information based on the correspondence and coordinates of the outer surface, edges, and points of the prefabricated building components;
[0009] 4) Sort the data groups according to the sight depth of the prefabricated building components, and perform hidden processing on the lines on the outer surface to generate visible line segments of the visible surface;
[0010] 5) Generate an initial dxf image of the prefabricated building component based on the coordinate data of the visible line segments;
[0011] 6) Use the hidden layer elimination algorithm to determine the geometric features that need to be annotated in the initial DXF image, generate annotations, and generate a complete DXF image;
[0012] 7) Scale and position the complete dxf image to generate production drawings of prefabricated building components.
[0013] Further, in step 1), the step of identifying the prefabricated building components for which drawings are to be generated includes:
[0014] 1.1) Search the component model corresponding to the name and code of the prefabricated building component in the read IFC file;
[0015] 1.2) Create the geometry of the component model and extract the geometric information;
[0016] Furthermore, in step 2), the step of processing the geometric data of the prefabricated building components includes:
[0017] 2.1) Read the positional relationship between the component coordinate system and the floor coordinate system, the floor coordinate system and the building coordinate system, and the building coordinate system and the site coordinate system respectively, so as to construct a coordinate transformation matrix from the component coordinate system to the site coordinate system;
[0018] 2.2) Based on the coordinate conversion matrix, the coordinates of the prefabricated building components in the component coordinate system are converted into the component coordinates in the site coordinate system;
[0019] 2.3) Group and number the coordinate information of the component's outer surface and the corresponding edges and points.
[0020] Furthermore, the component coordinates in the site coordinate system are as follows:
[0021] A′=T·R z (α)·R y (β)·R x (γ)·A (1)
[0022] A=[xyz 1] (2)
[0023]
[0024] Among them, A represents the original coordinate matrix of the point, A′ represents the transformed coordinate matrix of the point; Translation.x, Translation.y, Translation.z are the translation distances of the coordinate system in the X, Y and Z axis directions, θ is the rotation angle of the coordinate system, T represents the point coordinate transformation matrix caused by the translation of the coordinate system, R x (θ), R y (θ), R z (θ) represents the point coordinate transformation matrix caused by the rotation of the coordinate system around the X, Y and Z axes.
[0025] Further, in step 3), the step of generating a data group containing all drawing information includes:
[0026] Under a given drawing viewing angle, the normal vector of the component's outer surface and the sight direction vector are multiplied to detect the orientation of each outer surface of the component, and the invisible outer surfaces and corresponding geometric data groups are eliminated to generate a data group containing all drawing information.
[0027] Furthermore, in step 4), when the lines on the outer surface are hidden, the lines on the outer surface are hidden in sequence starting from the outer surface of the component closest to the viewpoint, and each outer surface is added to the masking surface after being hidden to generate visible line segments of the visible surface.
[0028] Furthermore, in step 5), the tool for generating the initial dxf image of the prefabricated building component includes the ezdxf toolkit.
[0029] Further, in step 6), the step of generating a complete dxf image includes:
[0030] 6.1) Set the sight direction vector around the dxf image;
[0031] 6.2) Determine the visibility of the line on one side of the image and extract the visible line;
[0032] 6.3) Sort the visible lines according to the sight depth, and perform hidden removal in order to obtain detailed shape data;
[0033] 6.4) Arrange dimensioning according to processing and drawing requirements and generate a complete dxf image.
[0034] Furthermore, in step 7), the complete dxf image is scaled and positioned according to the relative size ratio and image size of the image at different viewing angles.
[0035] The technical effect of the present invention is unquestionable. The method disclosed in the present invention for automatically generating processing drawings based on IFC files for modular assembled building box units can realize rapid and automatic drawing of component production drawings based on IFC model files. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 The present invention discloses a flow chart of a method for automatically generating processing drawings based on IFC files for modular assembled building box units;
[0037] Figure 2 A data preprocessing flow chart for the present invention;
[0038] Figure 3It is a schematic diagram of the line hiding step of an embodiment of the present invention;
[0039] Figure 4 It is an example diagram of component images of an implementation example of the present invention;
[0040] Figure 5 It is a schematic diagram of the layout of a drawing of an implementation example of the present invention. DETAILED DESCRIPTION
[0041] The present invention is further described below in conjunction with the embodiments, but it should not be understood that the above subject matter of the present invention is limited to the following embodiments. Without departing from the above technical ideas of the present invention, various substitutions and changes are made according to the common technical knowledge and customary means in the art, which should all be included in the protection scope of the present invention.
[0042] Embodiment 1:
[0043] See also Figures 1 to 5 A method for automatically generating processing drawings based on IFC files for modular assembled building box units comprises the following steps:
[0044] 1) Read the IFC file, identify the prefabricated building components for which drawings are to be generated, and obtain the geometric data of the prefabricated building components;
[0045] 2) Processing the geometric data of the prefabricated building components to obtain the corresponding relationship and coordinates of the outer surface, edges, and points of the prefabricated building components;
[0046] 3) Generate a data group containing all drawing information based on the correspondence and coordinates of the outer surface, edges, and points of the prefabricated building components;
[0047] 4) Sort the data groups according to the sight depth of the prefabricated building components, and perform hidden processing on the lines on the outer surface to generate visible line segments of the visible surface;
[0048] 5) Generate an initial dxf image of the prefabricated building component based on the coordinate data of the visible line segments;
[0049] 6) Use the hidden layer elimination algorithm to determine the geometric features that need to be annotated in the initial DXF image, generate annotations, and generate a complete DXF image;
[0050] 7) Scale and position the complete dxf image to generate production drawings of prefabricated building components.
[0051] In step 1), the step of identifying the prefabricated building components for which drawings are to be generated includes:
[0052] 1.1) Search the component model corresponding to the name and code of the prefabricated building component in the read IFC file;
[0053] 1.2) Create the geometry of the component model and extract the geometric information;
[0054] In step 2), the step of processing the geometric data of the prefabricated building components includes:
[0055] 2.1) Read the positional relationship between the component coordinate system and the floor coordinate system, the floor coordinate system and the building coordinate system, and the building coordinate system and the site coordinate system respectively, so as to construct a coordinate transformation matrix from the component coordinate system to the site coordinate system;
[0056] 2.2) Based on the coordinate conversion matrix, the coordinates of the prefabricated building components in the component coordinate system are converted into the component coordinates in the site coordinate system;
[0057] 2.3) Group and number the coordinate information of the component's outer surface and the corresponding edges and points.
[0058] The component coordinates in the site coordinate system are as follows:
[0059] A′=T·R z (α)·R y (β)·R x (γ)·A (1)
[0060] A=[xyz 1] (2)
[0061]
[0062] Among them, A represents the original coordinate matrix of the point, A′ represents the transformed coordinate matrix of the point; Translation.x, Translation.y, Translation.z are the translation distances of the coordinate system in the X, Y and Z axis directions, θ is the rotation angle of the coordinate system, T represents the point coordinate transformation matrix caused by the translation of the coordinate system, R x (θ), R y (θ), R z (θ) represents the point coordinate transformation matrix caused by the rotation of the coordinate system around the X, Y and Z axes.
[0063] In step 3), the step of generating a data group containing all drawing information includes:
[0064] Under a given drawing viewing angle, the normal vector of the component's outer surface and the sight direction vector are multiplied to detect the orientation of each outer surface of the component, and the invisible outer surfaces and corresponding geometric data groups are eliminated to generate a data group containing all drawing information.
[0065] In step 4), when the lines on the outer surface are hidden, the lines on the outer surface are hidden in sequence starting from the outer surface of the component closest to the viewpoint. After hidden, each outer surface is added to the masking surface to generate visible line segments of the visible surface.
[0066] In step 5), the tool for generating the initial dxf image of the prefabricated building component includes the ezdxf toolkit.
[0067] In step 6), the steps of generating a complete dxf image include:
[0068] 6.1) Set the sight direction vector around the dxf image;
[0069] 6.2) Determine the visibility of the line on one side of the image and extract the visible line;
[0070] 6.3) Sort the visible lines according to the sight depth, and perform hidden removal in order to obtain detailed shape data;
[0071] 6.4) Arrange dimensioning according to processing and drawing requirements and generate a complete dxf image.
[0072] In step 7), the complete dxf image is scaled and positioned according to the relative size ratio and image size of the image at different viewing angles.
[0073] Embodiment 2:
[0074] A method for automatically generating processing drawings based on IFC files for modular assembled building box units comprises the following steps:
[0075] 1) Read the IFC file, identify the prefabricated building components for which drawings are to be generated, and obtain the geometric data of the prefabricated building components;
[0076] 2) Processing the geometric data of the prefabricated building components to obtain the corresponding relationship and coordinates of the outer surface, edges, and points of the prefabricated building components;
[0077] 3) Generate a data group containing all drawing information based on the correspondence and coordinates of the outer surface, edges, and points of the prefabricated building components;
[0078] 4) Sort the data groups according to the sight depth of the prefabricated building components, and perform hidden processing on the lines on the outer surface to generate visible line segments of the visible surface;
[0079] 5) Generate an initial dxf image of the prefabricated building component based on the coordinate data of the visible line segments;
[0080] 6) Use the hidden layer elimination algorithm to determine the geometric features that need to be annotated in the initial DXF image, generate annotations, and generate a complete DXF image;
[0081] 7) Scale and position the complete dxf image to generate production drawings of prefabricated building components.
[0082] Embodiment 3:
[0083] A method for automatically generating processing drawings based on IFC files for modular prefabricated building box units, the technical content of which is the same as that of Example 2, further, in step 1), the step of identifying the prefabricated building components for which drawings are to be generated comprises:
[0084] 1.1) Search the component model corresponding to the name and code of the prefabricated building component in the read IFC file;
[0085] 1.2) Create the geometry of the component model and extract the geometric information;
[0086] Embodiment 4:
[0087] A method for automatically generating processing drawings based on IFC files for modular prefabricated building box units, the technical content of which is the same as any one of Embodiments 2-3, further, in step 2), the step of processing the geometric data of the prefabricated building components comprises:
[0088] 2.1) Read the positional relationship between the component coordinate system and the floor coordinate system, the floor coordinate system and the building coordinate system, and the building coordinate system and the site coordinate system respectively, so as to construct a coordinate transformation matrix from the component coordinate system to the site coordinate system;
[0089] 2.2) Based on the coordinate conversion matrix, the coordinates of the prefabricated building components in the component coordinate system are converted into the component coordinates in the site coordinate system;
[0090] 2.3) Group and number the coordinate information of the component's outer surface and the corresponding edges and points.
[0091] Embodiment 5:
[0092] A method for automatically generating processing drawings based on IFC files for modular assembled building box units, the technical content of which is the same as any one of Embodiments 2-4, and further, the component coordinates in the site coordinate system are as follows:
[0093] A′=T·R z (α)·R y (β)·R x (γ)·A (1)
[0094] A=[xyz 1] (2)
[0095]
[0096] Among them, A represents the original coordinate matrix of the point, A′ represents the transformed coordinate matrix of the point; Translation.x, Translation.y, Translation.z are the translation distances of the coordinate system in the X, Y and Z axis directions, θ is the rotation angle of the coordinate system, T represents the point coordinate transformation matrix caused by the translation of the coordinate system, R x (θ), R y (θ), R z (θ) represents the point coordinate transformation matrix caused by the rotation of the coordinate system around the X, Y and Z axes.
[0097] Embodiment 6:
[0098] A method for automatically generating processing drawings based on IFC files for modular assembled building box units, the technical content of which is the same as any one of embodiments 2-5, further, in step 3), the step of generating a data group containing all drawing information includes:
[0099] Under a given drawing viewing angle, the normal vector of the component's outer surface and the sight direction vector are multiplied to detect the orientation of each outer surface of the component, and the invisible outer surfaces and corresponding geometric data groups are eliminated to generate a data group containing all drawing information.
[0100] Embodiment 7:
[0101] A method for automatically generating processing drawings based on IFC files for modular prefabricated building box units, the technical content of which is the same as any one of Examples 2-6, and further, in step 4), when the lines on the outer surface are hidden, starting from the outer surface of the component closest to the viewpoint, the lines on the outer surface are hidden in sequence, and each outer surface is added to the masking surface after being hidden to generate visible line segments of the visible surface.
[0102] Embodiment 8:
[0103] A method for automatically generating processing drawings based on IFC files for modular prefabricated building box units, the technical content of which is the same as any one of embodiments 2-7, and further, in step 5), the tool for generating the initial dxf image of the prefabricated building component includes the ezdxf toolkit.
[0104] Embodiment 9:
[0105] A method for automatically generating processing drawings based on IFC files for modular assembled building box units, the technical content of which is the same as any one of embodiments 2-8, further, in step 6), the step of generating a complete dxf image includes:
[0106] 6.1) Set the sight direction vector around the dxf image;
[0107] 6.2) Determine the visibility of the line on one side of the image and extract the visible line;
[0108] 6.3) Sort the visible lines according to the sight depth, and perform hidden removal in order to obtain detailed shape data;
[0109] 6.4) Arrange dimensioning according to processing and drawing requirements and generate a complete dxf image.
[0110] Embodiment 10:
[0111] A method for automatically generating processing drawings based on IFC files for modular prefabricated building box units, the technical content of which is the same as any one of embodiments 2-9, and further, in step 7), the complete dxf image is scaled and positioned according to the relative size ratio and drawing size of the image under different viewing angles.
[0112] Embodiment 11:
[0113] A method for automatically generating processing drawings based on IFC files for modular assembled building box units comprises the following steps:
[0114] S101, reading the IFC file, identifying the components for which drawings need to be generated, and obtaining their geometric data;
[0115] S102, coordinate conversion and preprocessing are performed on the input component geometry data to obtain the correspondence and coordinates of the component outer surface, edge, and point;
[0116] S103, for the geometric data obtained in step S102, under a given viewing angle for generating a drawing, detecting the orientation of each outer surface of the component to determine its preliminary visibility, and generating a data group containing all drawing information;
[0117] S104, using a hidden layer algorithm to sort the geometric data obtained in step S103 according to the sight depth of the outer surface of the component at a specific viewing angle, and sequentially performing hidden layer processing on the lines of the outer surface to generate visible line segments of the visible surface;
[0118] S105, for the visible line segment obtained in step S104, its coordinate data is drawn using ezdxf to obtain an initial dxf image of the component;
[0119] S106, for the dxf image obtained in step S105, using a hidden layer elimination algorithm to determine the geometric features that need to be annotated and generate annotations to obtain a complete dxf image of the component;
[0120] S107, with respect to the dxf images of the component under multiple viewing angles obtained in step S106, the image blocks are scaled and positioned according to their relative proportions and drawing sizes to generate production drawings of the component.
[0121] Step S101 includes:
[0122] Read the IFC file, search for the corresponding component model in the IFC file according to the component name and code, create its geometry and extract geometric information;
[0123] Step S102 includes:
[0124] By reading the positional relationship between the component and the storey coordinate system, the storey coordinate system and the building coordinate system, and the building coordinate system and the site coordinate system, a coordinate conversion matrix is constructed from the coordinates described in the component coordinate system to the site coordinate system, and the coordinate conversion is completed. The coordinate conversion formula is as follows:
[0125] A′=T·R z (α)·R y (β)·R x (γ)·A
[0126] A=[xyz 1],
[0127]
[0128]
[0129] A represents the original point coordinate matrix, and A′ represents the transformed point coordinate matrix. After the coordinate transformation is completed, the coordinate information of the component outer surface and its corresponding edges and points are grouped and numbered to facilitate further data processing.
[0130] Step S103 includes:
[0131] Under the given viewing angle of the drawing to be generated, the normal vector of the component's outer surface and the sight direction vector are multiplied to detect the orientation of each outer surface of the component to determine its preliminary visibility, and the invisible outer surface and its corresponding geometric data group are eliminated to generate a data group containing all drawing information;
[0132] Step S104 includes:
[0133] Using the hidden surface removal algorithm, the outer surfaces of the components are sorted according to their sight depth at a specific viewing angle, starting from the outer surface of the component closest to the viewpoint, and the lines of the outer surfaces are hidden in sequence. After being hidden, each outer surface is added to the masking surface to generate visible line segments of the visible surface;
[0134] Step S105 includes:
[0135] Use ezdxf to draw the coordinate data of the visible line segment to obtain the initial dxf image of the component;
[0136] Step S106 includes:
[0137] Set the direction vector for the drawn line, set the sight direction vector around the dxf image, and use the hidden algorithm to determine the geometric features that need to be annotated and generate annotations. First, determine the visibility of the line on one side of the image, then sort the visible lines according to the sight depth, and then perform hidden according to the order to obtain the detailed shape data, and finally arrange the dimension annotation according to the processing and drawing requirements to obtain a complete dxf image of the component;
[0138] Step S107 includes:
[0139] With respect to the dxf images of the component under multiple viewing angles obtained in step S106, the image blocks are scaled and positioned according to the relative size ratios and drawing sizes of the images under different viewing angles to generate production drawings of the component.
Claims
1. A method for automatically generating processing drawings based on IFC files for modular assembled building box units, characterized in that: The following steps are involved: 1) Read the IFC file, identify the prefabricated building components for which drawings are to be generated, and obtain the geometric data of the prefabricated building components. 2) Processing the geometric data of the prefabricated building components to obtain the corresponding relationship and coordinates of the outer surface, edges, and points of the prefabricated building components; 3) Generate a data group containing all drawing information based on the correspondence and coordinates of the outer surface, edges, and points of the prefabricated building components; 4) Sort the data groups according to the sight depth of the prefabricated building components, and perform hidden processing on the lines on the outer surface to generate visible line segments of the visible surface; 5) Generate an initial dxf image of the prefabricated building component based on the coordinate data of the visible line segments; 6) Use the hidden layer elimination algorithm to determine the geometric features that need to be annotated in the initial DXF image, generate annotations, and generate a complete DXF image; 7) Scale and position the complete dxf image to generate production drawings of prefabricated building components.
2. A method for automatically generating processing drawings based on IFC files for modular assembled building box units according to claim 1, characterized in that: In step 1), the step of identifying the prefabricated building components for which drawings are to be generated includes: 1.1) Search the component model corresponding to the name and code of the prefabricated building component in the read IFC file; 1.2) Create the geometry of the component model and extract the geometric information.
3. A method for automatically generating processing drawings based on IFC files for modular assembled building box units according to claim 1, characterized in that: In step 2), the step of processing the geometric data of the prefabricated building components includes: 2.1) Read the positional relationship between the component coordinate system and the floor coordinate system, the floor coordinate system and the building coordinate system, and the building coordinate system and the site coordinate system respectively, so as to construct a coordinate transformation matrix from the component coordinate system to the site coordinate system; 2.2) Based on the coordinate conversion matrix, the coordinates of the prefabricated building components in the component coordinate system are converted into the component coordinates in the site coordinate system; 2.3) Group and number the coordinate information of the component's outer surface and the corresponding edges and points.
4. A method for automatically generating processing drawings based on IFC files for modular assembled building box units according to claim 3, characterized in that: The component coordinates in the site coordinate system are as follows: A′=T·R z (a)·R y (b)·R x (c)·A (1) A=[xyz 1] (2) Among them, A represents the original coordinate matrix of the point, A′ represents the transformed coordinate matrix of the point; Translation.x, Translation.y, Translation.z are the translation distances of the coordinate system in the X, Y and Z axis directions, θ is the rotation angle of the coordinate system, T represents the point coordinate transformation matrix caused by the translation of the coordinate system, R x (θ), R y (θ), R z (θ) represents the point coordinate transformation matrix caused by the rotation of the coordinate system around the X, Y and Z axes.
5. The method for automatically generating processing drawings based on IFC files for modular assembled building box units according to claim 1, characterized in that: In step 3), the step of generating a data group containing all drawing information includes: Under a given drawing viewing angle, the normal vector of the component's outer surface and the sight direction vector are multiplied to detect the orientation of each outer surface of the component, and the invisible outer surfaces and corresponding geometric data groups are eliminated to generate a data group containing all drawing information.
6. A method for automatically generating processing drawings based on IFC files for modular assembled building box units according to claim 1, characterized in that: In step 4), when the lines on the outer surface are hidden, the lines on the outer surface are hidden in sequence starting from the outer surface of the component closest to the viewpoint. After hidden, each outer surface is added to the masking surface to generate visible line segments of the visible surface.
7. The method for automatically generating processing drawings based on IFC files for modular assembled building box units according to claim 1, characterized in that: In step 5), the tool for generating the initial dxf image of the prefabricated building component includes the ezdxf toolkit.
8. The method for automatically generating processing drawings based on IFC files for modular assembled building box units according to claim 1, characterized in that: In step 6), the steps of generating a complete dxf image include: 6.1) Set the sight direction vector around the dxf image; 6.2) Determine the visibility of the line on one side of the image and extract the visible line; 6.3) Sort the visible lines according to the sight depth, and perform hidden removal in order to obtain detailed shape data; 6.4) Arrange dimensioning according to processing and drawing requirements and generate a complete dxf image.
9. The method for automatically generating processing drawings based on IFC files for modular assembled building box units according to claim 1, characterized in that: In step 7), the complete dxf image is scaled and positioned according to the relative size ratio and image size of the image at different viewing angles.