Engineering general drawing model site holing method based on Revit software
By performing Boolean operations and outer contour judgment in Revit software, combined with Revit API and ray method, the difficulty and tedious problems of manual site opening operations are solved, rapid batch opening model generation is achieved, and the efficiency and efficiency of three-dimensional design are improved. Effect.
Patent Information
- Application Number
- CN202410617283.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2024-08-30
AI Technical Summary
Manual opening of site openings in Revit software is difficult and cumbersome, especially due to the complex outline of the structure or building and the slope of the site, which makes it difficult to determine the intersection line, and the split surface operation requires openings one by one, which affects the model display effect.
By selecting the site model and structure/building model, perform Boolean operations to obtain the intersection Solid model, obtain each surface and normal vector, determine the outer contour and split the site model surface, combine auxiliary points and connecting lines to generate a closed Solid model, and use RevitAPI and filters traverse geometric objects, merge them into Solid models, perform Boolean operations and ray methods to determine the outer contour, and realize batch drilling.
It realizes the rapid batch establishment of hole models in Revit, improves the efficiency and effect of three-dimensional design, and avoids the problems of precise alignment and hollowing out in manual operations.
Smart Images

Figure CN118568823A
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the field of Revit three-dimensional design technology, and in particular to a method for opening a hole in a site of an engineering general drawing model based on Revit software. Background Art
[0002] In the 3D design process based on Revit software, master plan design is a very important content. Master plan design is to arrange various structures and buildings on the basis of the site to form a master plan model, presenting the overall model appearance of the project. The structures and buildings of municipal water treatment projects generally include above-ground and underground parts, and there are models on the upper and lower parts of the site. Therefore, it is necessary to open holes in the site model to display the model of the underground part. If the hole operation is not performed, the model of the underground part will be blocked by the site model, thus affecting the display effect of the model.
[0003] However, it is difficult and tedious to manually open holes in the site in Revit. The main reasons are:
[0004] (1) It is difficult to accurately determine the intersection of structures or buildings with the site manually. The outer contour components of some structures and buildings are not vertical, and the site may also have a certain slope, making it difficult to manually determine the intersection of the two parts.
[0005] (2) The openings of the site model need to be precisely aligned with the outer contours of the structure or building, otherwise a hollow opening will appear, affecting the model effect. If the outline of the structure or building is relatively simple, you can use the "Split Surface" function in the Revit site. In the site plan view, pick up the outer contour of the structure or building, modify it to a closed contour, split the site model, and then delete it to achieve the opening effect of the site model. However, in the case of a relatively complex structure or building outline such as a water treatment project, the model above will block the model below, and the view range of the site plan needs to be accurately adjusted to complete the opening of the site model.
[0006] (3) Some structures or buildings contain many independent openings. However, due to the limitations of Revit operations, when splitting the surface, the split boundary drawn must correctly split the surface into two parts. Therefore, the operation can only be performed one opening at a time, which is cumbersome. Summary of the invention
[0007] Technical Problems to be Solved by the Invention
[0008] The present invention provides a method for drilling holes in a general drawing model of an engineering project based on Revit software, so as to solve the problem that it is difficult and tedious to manually drill holes in the site in Revit.
[0009] The technical solution adopted by the present invention to solve the above technical problems
[0010] The site opening method of the engineering general drawing model based on Revit software includes:
[0011] Select the site model and structure / building model, and generate the Solid models of the site model and structure / building;
[0012] Perform Boolean operations on the Solid model of the structure / building model and the Solid model of the site model to obtain the intersection solid model of the Solid model of the structure / building model and the Solid model of the site model;
[0013] Get each surface and normal vector of each surface of the intersection Solid model, take the surface with positive Z-axis coordinate value of the normal vector as the upper surface, and get the contour line of the upper surface;
[0014] Determine the contour lines of the upper surface and obtain all the outer contours that are not within any contour;
[0015] In the site model, the surface of the site model is split according to the generated outer contour to obtain the opening model.
[0016] Furthermore, the Solid model of the generated site model specifically includes:
[0017] Get the surface of the site model, get the coordinate values of all boundary points on the site model surface, compare the Z coordinate values of all boundary points, and record the minimum value as Z min ;
[0018] Create an auxiliary point for the boundary point with the same X-axis and Y-axis coordinates as the boundary point and the Z-axis coordinate as Z min -Δ points are used as auxiliary points of boundary points; Δ is the set value;
[0019] Connect two adjacent boundary points, the auxiliary points corresponding to the boundary points, and the auxiliary points to form a closed side surface with a connecting line; perform the same operation on all adjacent boundary points in the above manner to obtain multiple closed side surfaces.
[0020] Select all the generated closed sides with Z axis coordinates Z min The line generates a closed bottom surface;
[0021] Based on the generated closed side surfaces and closed bottom surfaces, a solid model of a closed site model is generated in combination with the terrain surface.
[0022] Furthermore, the method of obtaining all outer contours that are not within any contour specifically includes: for any contour, selecting a point in the contour, emitting a ray horizontally to the right based on the point, and checking the number of intersections between each of the remaining contours and the ray; if the number of intersections is an odd number, the contour is within the currently checked contour; if the number of intersections is an even number, the contour is outside the currently checked contour; obtaining all contours that are not within any contour as outer contours.
[0023] Furthermore, the generating of the Solid model of the structure / building includes:
[0024] With the help of the interfaces and methods provided by Revit API, based on Revit secondary development tools, use filters to traverse the geometric objects of each component in the structure / building link model;
[0025] Convert geometric objects to Solid objects;
[0026] Merge all Solid objects into one Solid model.
[0027] Beneficial effects of the present invention
[0028] The site opening method for the engineering general drawing model based on Revit software of the present invention establishes Solid with the structure / building and the site model, obtains the intersection between the Solids, obtains the outer contour of the intersection of the structure / building and the site model, splits the surface of the site model according to the generated outer contour, and obtains the opening model. It can realize the rapid batch establishment of the opening model in the site model, thereby improving the efficiency and effect of three-dimensional design. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 The present invention is a flow chart of a method for opening a hole in a site of an engineering general drawing model based on Revit software. DETAILED DESCRIPTION
[0030] like Figure 1 As shown, the method for opening a hole in a site of a general drawing model of an engineering drawing based on Revit software of the present invention comprises the following steps:
[0031] (1) Select the site model and structure / building model. All structures / building units in the master model are linked models. You can select the corresponding structure / building model by selecting the linked model in the master model.
[0032] (2) With the help of the interfaces and methods provided by Revit API, based on the Revit secondary development tool, use the filter to traverse the geometric objects of each component in the structure / building link model; convert all the geometric objects extracted by the filter into Solid objects;
[0033] Use the ExecuteBooleanOperation method in the BooleanOperationUutils class to merge all Solid objects into one Solid to generate a Solid model of the structure / building.
[0034] (3) Obtain the surface of the site model and extract the coordinate values of all boundary points in the site model. Compare the Z coordinate values of all boundary points and record the minimum value as Z. min ;
[0035] Create an auxiliary point for the boundary point with the same X-axis and Y-axis coordinates as the boundary point and the Z-axis coordinate as Z min -Δ is used as the auxiliary point of the boundary point, where Δ is the set value; for example, if the set Δ value is 100, the Z coordinate values of all auxiliary points are uniformly set to Z min -100;
[0036] Connect any two adjacent boundary points, auxiliary points corresponding to boundary points, and auxiliary points to form multiple closed sides with connecting lines;
[0037] Select the Z axis coordinate value of the generated side surface as Z min The line generates a closed surface as the bottom surface;
[0038] Based on the generated closed side surfaces and closed bottom surfaces, a solid model of a closed site model is generated in combination with the terrain surface.
[0039] (4) performing Boolean operations on the solid model of the structure / building model and the solid model of the site model to obtain a solid model of the intersection of the solid model of the structure / building model and the solid model of the site model;
[0040] (5) Obtain each surface of the intersection Solid model, obtain the normal vector of each surface, take the surface with the positive Z-axis coordinate value of the normal vector as the upper surface, and obtain the contour line of the upper surface;
[0041] (6) Use the point ray method to obtain all the outer contours that are not inside any contour; for example, for each contour A, use the point ray method to determine whether contour B is inside it. The specific operation method is: select a point in contour B, send a ray horizontally to the right based on the point, and count the number of intersections between contour A and the ray. If it is an odd number, contour B is inside contour A. If it is an even number, contour B is outside contour A.
[0042] (7) In the site model, the site surface is split one by one according to the outer contour.
[0043] (8) Delete the split outer contour and the Solid model generated in the process.
Claims
1. The site opening method of the engineering general drawing model based on Revit software is characterized by: include: Select the site model and structure / building model to generate the solid models of the site model and structure / building; Perform Boolean operations on the solid model of the structure / building model and the solid model of the site model to obtain the solid model of the intersection of the solid model of the structure / building model and the solid model of the site model; Get each surface of the intersection Solid model, take the surface with the positive Z-axis coordinate value of the normal vector as the upper surface, and get the contour line of the upper surface; Get all the outer contours that are not inside any contour; In the site model, the surface of the site model is split according to the generated outer contour to obtain the opening model.
2. The method for opening a hole in a site of a general engineering drawing model based on Revit software according to claim 1, characterized in that: The Solid model for generating the site model specifically includes: Get the surface of the site model, get the coordinate values of all boundary points in the site model, compare the Z coordinate values of all boundary points, and record the minimum value as Z min ; Establish the auxiliary point of the boundary point with the same X-axis and Y-axis coordinates as the boundary point and the Z-axis coordinate as Z min -Δ points are used as auxiliary points of the boundary points; where Δ is the set value; Connect two adjacent boundary points, the auxiliary points corresponding to the boundary points, and the auxiliary points to form a closed side surface with a connecting line; Select the Z axis coordinate value of the generated side min The line generates a closed bottom surface; Based on the generated closed side surfaces and closed bottom surfaces, a solid model of a closed site model is generated in combination with the terrain surface.
3. The method for opening a hole in a site of a general engineering drawing model based on Revit software according to claim 2, characterized in that: The method of obtaining all outer contours that are not within any contour specifically includes: for any contour, selecting a point in the contour, emitting a ray horizontally to the right based on the point, and checking the number of intersections between each of the remaining contours and the ray; if the number of intersections is an odd number, the contour is within the currently checked contour; if the number of intersections is an even number, the contour is outside the currently checked contour; obtaining all contours that are not within any contour as outer contours.
4. The method for opening a hole in a site of a general engineering drawing model based on Revit software according to claim 3, characterized in that: The generated solid model of the structure / building includes: Use the filter to iterate over the geometric objects of each component in the structure / building link model; Convert geometric objects to Solid objects; Merge all Solid objects into one Solid model.
