Roof surface layer slope finding method based on parameterization means
Through the roof surface slope finding method based on parameterization methods, the roof structure and drainage ditches are automatically created, which solves the problems of frequent errors and large workloads in the existing technology, and achieves more efficient design and modification.
Patent Information
- Application Number
- CN202510670898.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-09-02
AI Technical Summary
In the prior art, when drawing Revit three-dimensional models and CAD detailed drawings of complex roof environments, there are problems such as frequent identification errors, large workloads and difficult to meet construction requirements.
The roof surface slope search method is adopted based on parameterization methods. By obtaining roof geometric information, identifying polygons and elevating points, building a body slope, and automatically creating a body roof structure and drainage ditches shape to output a polyline of a specific cross-section.
It reduces errors in identification of elevated points and distances in complex roof environments, improves the degree of automation of design, reduces the workload of Revit and CAD drawings, and promotes flexible modification of construction drawings.
Smart Images

Figure CN120579249A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent manufacturing, and in particular to a roof surface slope detection method based on parameterization means. Background Art
[0002] Roofing projects can be divided vertically into the following parts: slope layer, leveling layer, insulation layer, protective layer, waterproof layer, surface layer, and drainage ditch. Different levels of design are used in the project to ensure that the structure, insulation, and waterproofing meet regulatory requirements. Horizontally, the roof may contain raised structures such as chimneys, as well as devices such as rooftop solar photovoltaic panels. When raised structures are present, the roof drainage layer needs to be raised to a certain height to ensure drainage performance. At the same time, to ensure proper drainage, the roof is divided into different water-dividing sections by a watershed line. The slope is achieved by the structural slope layer, and water flows from there into the drainage ditches and drainage pipes. The drainage ditch is a concave portion of the roof and needs to be considered in the local design and construction drawings.
[0003] Existing methods typically use floor plans as a basis for drawing Revit 3D roof models and cross-sectional detail CAD drawings. This method has several shortcomings: First, because floor plans are unilateral designs, they do not fully consider construction requirements and project feasibility, resulting in the need for rework or decisions made by the construction site based on experience. Second, both Revit modeling and CAD detailing require a lot of manpower (especially for the design of raised parts, which require CAD construction drawings), and are essentially repetitive work for interpreting the same floor plan in different aspects. Finally, Revit is limited to drawing simple geometric figures, making it difficult to cope with more complex roof environments and prone to identification errors. Summary of the Invention
[0004] The purpose of the present invention is to provide a roof surface slope finding method based on parameterization in order to reduce the recognition errors of elevation points and distances in more complex roof environments.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] A roof surface slope finding method based on parameterization means, the method comprising:
[0007] S1. Obtaining roof geometry information, including the building's outer contour ex, roof watershed div, and drainage ditch w, while defining the slope;
[0008] S2. Merge the house outline and the roof waterline, extract the total edge line and the edge line intersection points from the merged lines, construct a list matrix A whose elements are the connection status between the edge line intersection points and a list matrix B whose elements are the positions of the edge line intersection points, and identify the polygons and their endpoints;
[0009] S3. Determine an elevation point on the roof watershed, perform condition screening, determine the drainage ditch corresponding to the elevation point, obtain the height to be raised corresponding to the elevation point, and move the roof watershed corresponding to the elevation point along the Z vector by the height to be raised based on the height to be raised;
[0010] S4. Constructing a three-dimensional slope surface using the moved roof watershed line and the endpoints of the polygon where the original roof watershed line is located. The three-dimensional slope surface constitutes the roof. Excavating the drainage ditch entity from the roof to obtain a roof geometry.
[0011] S5. Select the section, cut the roof geometry and gutter entities, and output the polyline list of the roof surface layer and gutter details.
[0012] Furthermore, in the list matrix A, if there is an edge connection between two edge intersection points (i, j), it is determined to have a bidirectional connection, and in this case A[i, j] = A[j, i] = 1, otherwise A[i, j] = A[j, i] = 0.
[0013] Furthermore, the elevation points on the roof waterline are:
[0014] Let the set of intersection points of the drainage ditch itself be set1, and the set of intersection points of the edges be set2, then the set of elevation points is set2-set1.
[0015] Furthermore, the specific steps for condition screening and determining the drainage ditch corresponding to the elevation point are as follows:
[0016] For any elevated point H, select all feature points on the drainage ditch and connect them with the elevated point in sequence to obtain multiple lines. If the number of intersections between the line between the feature point Mi and H and the total edge line exceeds 2, it means that the drainage ditch where the feature point Mi is located does not form a polygon with the elevated point H. Conversely, the drainage ditch where the feature point Mi is located does not form a polygon with the elevated point H. The drainage ditch where the feature point Mi is located corresponds to the elevated point H, and the drainage ditch corresponding to the elevated point is one or more.
[0017] Furthermore, the height to be raised is: draw a vertical line through the raising point H to the corresponding drainage ditch, and multiply the average value of the vertical line by the slope to obtain the height to be raised.
[0018] Furthermore, the characteristic point is the midpoint of the drainage ditch.
[0019] Furthermore, the specific steps of identifying the polygon are:
[0020] Randomly select a non-zero element in the list matrix A as a one-way connecting edge R1, and use the one-way connecting edge R1 as the current connecting edge. At the same time, determine the two points P1 and P2 connecting the current connecting edge. Select the edge intersection point P3 from all the edge intersection points connected to P2. The edge intersection point P3 satisfies the minimum angle formed by P1, P2 and P3.
[0021] Take the unidirectional connecting edge R2 between P2 and P3 as the new current connecting edge, repeat the above steps until one of the edge intersections of the searched current connecting edge is P1, record all the traversed current connecting edges, and delete the elements corresponding to the traversed current connecting edges in the list matrix A.
[0022] Furthermore, the gutter entity is constructed based on the gutter parameters.
[0023] Furthermore, the drainage ditch parameters include the drainage ditch depth h, width width and drainage ditch cross-sectional shape Cw.
[0024] Furthermore, the roof also includes a structural layer.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] The present invention uses the roof edge lines, watershed lines, and gutter lines in the plan view as geometric inputs, and reduces the recognition errors of elevation points and distances in more complex roof environments through polygon recognition and recognition of elevation points and elevation distances. It parameterizes the design process of the convex part of the roof, can quickly give the approximate three-dimensional structure of the roof based on the plan view, can automatically generate three-dimensional roof structures and gutter shapes in blocks, and output polylines of specific cross-sections to give an integrated detailed cross-section. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a flow chart of the present invention;
[0028] Figure 2 A schematic diagram of a drainage ditch controlled by finding an elevation point according to the present invention;
[0029] Figure 3 This is the result diagram of the slope leveling of the entire roof according to the present invention. DETAILED DESCRIPTION
[0030] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0031] The present invention proposes a roof surface slope finding method based on parametric means. According to the information in the plan view, a three-dimensional structural slope finding model including drainage ditches is generated, and the cross-sectional information of the convex structure is read and exported, thereby reducing the Revit and CAD drawing workload in the detailed roof design. Figure 2 A schematic diagram of a drainage ditch controlled by finding an elevation point according to the present invention; Figure 3 This is the result diagram of the slope leveling of the entire roof according to the present invention.
[0032] The flow chart of the present invention is as follows Figure 1 As shown, the method includes the following steps:
[0033] Step 1: Enter roof geometry information
[0034] Step 1.1: Use the Geometry Pipeline component to import the model containing layer information from the Revit or CAD roof model. Step 1.2: Read the following information: house outline ex, roof waterline div, drainage ditch w
[0035] Step 1.3: Define the slope (usually 2 degrees)
[0036] Step 2: Read the polygon list. The input format is polyline, which does not contain geometric topology information. To generate the roof in blocks, the polygon range of the roof must be defined in advance, which requires an algorithm to read the polygon list.
[0037] Step 2.1: Combine the outer contour and the roof waterline, and read the intersection of the total edge line and the edge line. The total edge line refers to all the lines after the outer contour and the roof waterline.
[0038] Step 2.2: Store the above information in a Doubly Connected EdgeList (DCEL). Create a list matrix A with the intersection points as rows and columns. If there is an edge connection between two points (i, j), they are defined as having a bidirectional connection (i.e., A[i, j] = A[j, i] = 1). All other entries in the matrix are 0. The location of each intersection point is also stored in another list B.
[0039] Step 2.3: Randomly select a non-zero element in the connectivity matrix A, which is a unidirectional edge R1. Also, find the two points P1 and P2 connecting it. From all points connected to P2, select P3 such that the angle between P1 and P2 is the smallest, and record the new edge P23 as R2. Repeat this process until you return to the origin P1. Record all edges R1-n you have passed and remove this entry from the connectivity matrix. Edge R1-n is a polygon. Repeat this process until you have a list of all polygons. At this point, the connectivity matrix will ultimately contain a single, interconnected, unidirectional edge. This method can easily identify concave and convex polygons.
[0040] Step 3: Raise the intersection of the edge lines. In the slope model, all points on the drainage ditch are the lowest points, while the intersection of the watershed is the highest point. In the present invention, a method of reconstructing polygons based on the intersection points is adopted.
[0041] Step 3.1: Find the points to be raised. The intersection point set of the drainage ditch itself is set1, and the intersection point set of the bus is set2. Then the set of raised points is set2-set1.
[0042] Step 3.2: Determine the drainage ditch that controls the elevation point. The elevation point is usually the intersection of several watershed lines and also the intersection of several slopes. Its elevation height depends on the distance from the drainage ditch (the lowest point). Since different drainage ditches can be pointed in different directions from this point, it is necessary to determine the position of the drainage ditch that controls the elevation point. Assuming that all slope polygons are convex polygons (as is the case in normal engineering), for any elevation point H, select all feature points on the drainage ditch (such as the midpoint M1...Mn) and connect them to the elevation point in sequence. Then perform conditional screening. If the number of intersections between a certain line MiH and the main line exceeds 2, it means that the drainage ditch corresponding to Mi does not form a polygon with H; otherwise, it means that the drainage ditch w corresponding to M can be connected to the elevation point H through the edge line to form a polygon (usually a triangle / quadrilateral, and in a few cases with more sides).
[0043] Step 3.3: Determine the average distance from the elevated point to the drain. Once the midpoint series M of the control drain is determined, extend the corresponding drain w and draw a perpendicular line from H to w to obtain a series of horizontal distances. Since the distance from H to different drains may be different in the actual drawing, to ensure the unique height of H, take the average of these horizontal distances. (In fact, since the drain height is the same, the distance from the same point H to the drain varies, making it impossible to strictly control the slope of each slope surface to a given slope. This is due to the limitations of plan drawing. In actual engineering, since the slope of the structure is not strictly required, slight fluctuations in the slope of different slope surfaces are normal.)
[0044] Step 3.4: Determine the desired height of the elevation point. Multiply the slope by the average distance of the elevation point from the gutter to obtain the desired height. Use the Move module to move the list of points to be elevated by the corresponding height along the Z vector to obtain a new sequence of points.
[0045] Step 4: Generate the roof in blocks. After the points are elevated, their positions in the polygon list are retained, thus creating a three-dimensional slope.
[0046] Step 4.1: Generate the curved roof surface in blocks. Because the elevation point height is calculated based on the average distance, it's not guaranteed that each slope is flat (this is usually handled empirically in engineering, and difficult to resolve in Revit). Use the Brep.CreateSurfaceFromPoints command to generate curved polygons from polygon vertices as the roof slope layer.
[0047] Step 4.2: Generate different structural layers according to the situation, such as insulation layer, waterproof layer, etc. By raising the generated roof surface layer to a certain height h1, h2...hn, different structural layers l1, l2...ln can be obtained.
[0048] Step 5: Define the gutter parameters. The gutter depth h, width width, and geometry can be customized using the Grasshopper module. The gutter cross-sectional shape Cw is obtained.
[0049] Step 6: Subtract the gutter entities from the roof geometry.
[0050] Step 6.1: Create the gutter entity Sw. Given the gutter line w and cross-sectional shape Cw, the GH.Loft module can be used to model the gutter shape.
[0051] Step 6.2: Excavate the gutter area from the roof. On the roof surface, the gutter is a concave area where the roof waterline guides water into it. The roof surface and gutter in Grasshopper are stored in Brep format (BoundaryRepresentation).
[0052] Use the Brep_Difference module in GH to remove the gutters directly from the roof.
[0053] Step 7: Select the cross-sections to generate polylines, which will be exported as the roof construction drawing details. If needed, you can select a plane list perpendicular to the XoY plane to cut through the geometry from step 6 and generate a polyline list for the roof surface and gutter details.
[0054] Step 8: Export the polyline from step 7 to CAD format.
[0055] Step 8.1 Install and connect CAD plug-ins. First, make sure that the corresponding CAD plug-ins have been installed in Grasshopper, such as Rhino.Inside.AutoCAD. These plug-ins allow Grasshopper to interact with CAD software.
[0056] Step 8.2 Open or create a CAD document.
[0057] Step 8.3 Send the polylines in Grasshopper to the CAD document and adjust the properties, position, layer, etc.
[0058] This method uses the roof edges, watersheds, and gutter lines in the plan view as geometric input. With manual input of the structural slope and gutter parameters, it automatically generates the three-dimensional roof structure and gutter shape in blocks, and outputs polylines of specific cross-sections. Compared to existing roof slope processing solutions, this method automates the drawing process, thereby reducing the workload for technicians and facilitating rework and iteration. Furthermore, the method utilizes Grasshopper as a parametric programming tool, making it more flexible to modify construction drawings as needed.
[0059] The above describes in detail the preferred embodiments of the present invention. It should be understood that those skilled in the art can make numerous modifications and variations based on the concepts of the present invention without inventive effort. Therefore, any technical solutions that can be derived by those skilled in the art through logical analysis, reasoning, or limited experimentation based on the concepts of the present invention and the prior art should be within the scope of protection defined by the claims.
Claims
1. A method for roof surface slope finding based on parameterization, characterized in that the method include: S1. Obtaining roof geometry information, including the building's outer contour ex, roof watershed div, and drainage ditch w, while defining the slope; S2. Merge the house outline and the roof waterline, extract the total edge line and the edge line intersection points from the merged lines, construct a list matrix A whose elements are the connection status between the edge line intersection points and a list matrix B whose elements are the positions of the edge line intersection points, and identify the polygons and their endpoints; S3. Determine an elevation point on the roof watershed, perform condition screening, determine the drainage ditch corresponding to the elevation point, obtain the height to be raised corresponding to the elevation point, and move the roof watershed corresponding to the elevation point along the Z vector by the height to be raised based on the height to be raised; S4. Constructing a three-dimensional slope surface using the endpoints of the polygon where the moved roof watershed line and the original roof watershed line are located. The three-dimensional slope surface constitutes the roof. Excavating the drainage ditch entity from the roof to obtain a roof geometry. S5. Select the section, cut the roof geometry and gutter entities, and output the polyline list of the roof surface layer and gutter details.
2. A parameterized roof surface slope finding method according to claim 1, characterized in that: In the list matrix A, if there is an edge connection between two edge intersection points (i, j), it is determined to have a bidirectional connection, and in this case A[i, j] = A[j, i] = 1, otherwise A[i, j] = A[j, i] = 0.
3. The method for roof surface slope detection based on parameterization according to claim 1, characterized in that: The elevated points on the roof waterline are: Let the set of intersection points of the drainage ditch itself be set1, and the set of intersection points of the edges be set2, then the set of elevation points is set2-set1.
4. A parameterized roof surface slope detection method according to claim 3, characterized in that: The specific steps for condition screening and determining the drainage ditch corresponding to the elevation point are as follows: For any elevated point H, select all feature points on the drainage ditch and connect them with the elevated point in sequence to obtain multiple lines. If the number of intersections between the line between the feature point Mi and H and the total edge line exceeds 2, it means that the drainage ditch where the feature point Mi is located does not form a polygon with the elevated point H. Conversely, the drainage ditch where the feature point Mi is located does not form a polygon with the elevated point H. The drainage ditch where the feature point Mi is located corresponds to the elevated point H, and the drainage ditch corresponding to the elevated point is one or more.
5. The method for roof surface slope detection based on parameterization according to claim 4, characterized in that: The height to be raised is: draw a vertical line through the raising point H to the corresponding drainage ditch, multiply the average value of the vertical line and the slope to obtain the height to be raised.
6. A parameterized roof surface slope detection method according to claim 4, characterized in that: The characteristic point is the midpoint of the drainage ditch.
7. The method for roof surface slope detection based on parameterization according to claim 1, characterized in that: The specific steps of identifying polygons are: Randomly select a non-zero element in the list matrix A as a one-way connecting edge R1, and use the one-way connecting edge R1 as the current connecting edge. At the same time, determine the two points P1 and P2 connecting the current connecting edge. Select the edge intersection point P3 from all the edge intersection points connected to P2. The edge intersection point P3 satisfies the minimum angle formed by P1, P2 and P3. Take the unidirectional connecting edge R2 between P2 and P3 as the new current connecting edge, repeat the above steps until one of the edge intersections of the searched current connecting edge is P1, record all the traversed current connecting edges, and delete the elements corresponding to the traversed current connecting edges in the list matrix A.
8. The method for roof surface slope detection based on parameterization according to claim 1, characterized in that: The gutter solid is built based on the gutter parameters.
9. A parameterized roof surface slope detection method according to claim 8, characterized in that: The gutter parameters include gutter depth h, width width and gutter cross-sectional shape Cw.
10. The method for roof surface slope detection based on parameterization according to claim 1, characterized in that: The roof also includes a structural layer.