Method and system for generating multi-stage slope of building model earthwork
Patent Information
- Application Number
- CN202610573658.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-28
- Publication Date
- 2026-08-28
AI Technical Summary
[0004]本申请实施例提供了一种建筑模型土方多阶放坡的生成方法、系统、电子设备和存储介质,以至少解决相关技术中现有土方放坡建模方法无法支持各边独立设置的多阶放坡参数,且在不同阶梯个数下容易产生面片不连续、自相交等拓扑错误的问题
[0015]Compared to related technologies, the method for generating multi-stage slope excavation in building models provided in this application transforms the traditional complex three-dimensional intersecting modeling into a controllable two-dimensional geometric solution. Through contour expansion, self-intersection elimination, and layered surface cutting, the computational load is significantly reduced. It supports independent multi-stage settings, allowing each edge to be configured with its own slope stage, height, and gradient, meeting the realistic design requirements of complex multi-stage slope excavation in foundation pits. When different edges have inconsistent slope stages, linear interpolation is used to supplement the expansion values of different slope edges at the same height, ensuring continuous connection of each slope surface without gaps or misalignments. This solves the problems of existing earthwork slope modeling methods, which cannot support independently set multi-stage slope parameters for each edge and are prone to topological errors such as surface discontinuities and self-intersections under different numbers of steps.
Smart Images

Figure CN122657408A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer graphics technology, and in particular to a method and system for generating multi-stage slope excavation in building models. Background Technology
[0002] In the fields of building information systems (BIM) and earthwork quantity calculation, slope generation for earthwork excavation models is a core component. Currently, some technical solutions address foundation pit or terrain treatment. For example, Chinese patent CN114297760A discloses a BIM-based method for foundation pit backfilling, but it primarily focuses on the backfilling process and does not address multi-stage slope settings under excavation conditions. Another patent, CN115984502B, discloses a terrain leveling and slope setting method and device, but its technical solution is limited to a single leveling slope scenario and cannot meet the actual needs of complex projects requiring independent multi-stage slope settings on different sides. Existing technologies generally lack effective modeling support when dealing with different numbers of slope steps and independent slope parameters on each side.
[0003] Furthermore, in the 3D modeling of earthwork slopes, when different sides have different numbers of steps or slope parameters, the outward expansion distance of each side at different heights is inconsistent, which can easily lead to problems such as discontinuity, misalignment, or face intersection between adjacent slope surfaces. Existing methods have significant shortcomings in handling smooth connections and self-intersection elimination between surfaces with different numbers of steps, making it difficult to generate earthwork slope shapes that conform to engineering realities and have correct topology. Especially in cases with concave contours, curved slopes, or intersection anomalies of approximately parallel edges, traditional modeling methods are often computationally complex, have poor stability, and may even fail to generate effective models. Summary of the Invention
[0004] This application provides a method, system, electronic device, and storage medium for generating multi-stage slope protection for earthwork in building models, in order to at least solve the problems in existing earthwork slope protection modeling methods in related technologies that cannot support multi-stage slope protection parameters that can be set independently for each side, and that topological errors such as discontinuous patches and self-intersections are easily generated under different numbers of steps.
[0005] In a first aspect, embodiments of this application provide a method for generating multi-stage slope excavation in a building model, the method comprising: Obtain the bottom outline of the earthwork entity and the multi-level slope data corresponding to each side. The multi-level slope data includes the slope level, as well as the height and slope coefficient of each level. Based on the multi-level slope data, the outward expansion distance of each side at different heights is determined. For any target side, if other sides besides the target side have slopes at a certain height, the outward expansion distance of the target side at that height is calculated by linear interpolation. Based on the outward expansion distance corresponding to each height, the bottom contour line is expanded layer by layer to obtain multiple planar contours with different heights; Based on the planar contours of adjacent heights, the slope surfaces corresponding to each side are generated, and the intersecting surfaces in the slope surfaces are cut to obtain a complete earthwork slope model.
[0006] In some embodiments, expanding the bottom contour line layer by layer according to the expansion distance corresponding to each height includes: When the expanded contours intersect with each other, the intersecting regions are clipped, and the correspondence between the clipped edges and the original edges is recorded. The expansion of the next height is based on the clipped outline, and the expansion value corresponding to each outline edge of each height is determined by the recorded correspondence.
[0007] In some embodiments, the method of cropping the intersecting regions includes: Detect and locate all intersection points of boundary elements that exhibit self-intersecting contours, and use each intersection point as a dividing node to split the boundary elements involved in the intersection into several consecutive sub-boundary elements. Based on the split boundary elements, closeable paths are re-traced according to endpoint continuity to form one or more candidate closed regions; When multiple candidate closed regions are obtained through decomposition, the legality correction, direction correction and area calculation are performed on the candidate closed regions respectively, and the candidate closed region with the largest area is selected as the effective region after self-intersection processing.
[0008] In some embodiments, generating the slope surface corresponding to each side based on the planar profile of adjacent heights includes: Iterate through the contour data at each height and connect the current edge with the corresponding edge at the previous height to form a face; If the current edge is an arc edge, then the current edge is discretized into multiple straight lines, and the corresponding points of each discretized straight line are connected in sequence to form the slope surface.
[0009] In some embodiments, discretizing the current edge into multiple straight lines and connecting the corresponding points of each discretized line sequentially to form the slope surface includes: Discretize the arc edge of the previous height with a fixed length, and then uniformly discretize the arc edge of the current height based on the number of line segments after discretization of the previous height. When adjacent sides are parallel after discretization, the corresponding points of each discretized line are connected sequentially to form a surface; If adjacent sides are not parallel after discretization, the surface is further discretized into two triangular surfaces.
[0010] In some embodiments, the cutting process of the intersecting surfaces in the slope surface includes: Obtain all slope surfaces generated by expanding outwards at the current height, and determine the intersection lines between each slope surface; The slope surface is cut using the intersection line, and the self-intersecting surfaces located inside the slope entity are deleted, while the surfaces that constitute the slope outline are retained.
[0011] In some embodiments, the method further includes: When redundant edges are generated during the expansion process due to the abnormal intersection of the extension of approximately parallel edges, the slope angle of the redundant edges is set to zero and they are included in the corresponding relationship table. Connect the redundant edges in the correspondence table to the points on the corresponding original edges stored during the contour trimming process to generate triangular faces.
[0012] Secondly, embodiments of this application provide a system for generating multi-stage slope excavation in building models, the system comprising: The data acquisition module is used to acquire the bottom outline of the earthwork entity and the multi-level slope data corresponding to each side. The multi-level slope data includes the slope level, as well as the height and slope coefficient of each level. The distance calculation module is used to determine the outward expansion distance of each side at different heights based on the multi-level slope data. For any target side, if other sides besides the target side have slopes at a certain height, the outward expansion distance of the target side at that height is calculated by linear interpolation. The expansion module is used to expand the bottom contour line layer by layer according to the expansion distance corresponding to each height, to obtain multiple planar contours of different heights, and to handle contour self-intersection during the expansion process; The model generation module is used to generate the slope surface corresponding to each side based on the planar contour of adjacent heights, and to cut the intersecting surfaces in the slope surface to obtain a complete earthwork slope model.
[0013] Thirdly, embodiments of this application provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method for generating multi-stage slope earthwork for building models as described in the first aspect above.
[0014] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for generating multi-stage slope excavation of building model earthwork as described in the first aspect above.
[0015] Compared to related technologies, the method for generating multi-stage slope excavation in building models provided in this application transforms the traditional complex three-dimensional intersecting modeling into a controllable two-dimensional geometric solution. Through contour expansion, self-intersection elimination, and layered surface cutting, the computational load is significantly reduced. It supports independent multi-stage settings, allowing each edge to be configured with its own slope stage, height, and gradient, meeting the realistic design requirements of complex multi-stage slope excavation in foundation pits. When different edges have inconsistent slope stages, linear interpolation is used to supplement the expansion values of different slope edges at the same height, ensuring continuous connection of each slope surface without gaps or misalignments. This solves the problems of existing earthwork slope modeling methods, which cannot support independently set multi-stage slope parameters for each edge and are prone to topological errors such as surface discontinuities and self-intersections under different numbers of steps. Attached Figure Description
[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of a method for generating multi-stage slope excavation of a building model according to an embodiment of this application. Figure 2 This is a schematic diagram of a slope setting according to an embodiment of this application; Figure 3 This is a schematic diagram of a multi-stage slope model according to an embodiment of this application; Figure 4 This is a schematic diagram of an interpolated edge according to an embodiment of this application; Figure 5 This is a structural block diagram of a system for generating multi-stage slope excavation of building models according to an embodiment of this application; Figure 6 This is a schematic diagram of the internal structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0018] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.
[0019] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0020] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0021] This embodiment provides a method for generating multi-stage slope excavation in building models. Figure 1 This is a flowchart of a method for generating multi-stage slope earthwork in a building model according to an embodiment of this application, such as... Figure 1As shown, the process includes the following steps: Step S101: Obtain the bottom outline of the earthwork entity and the multi-level slope data corresponding to each side. The multi-level slope data includes the slope level, as well as the height and slope coefficient of each level.
[0022] Obtain the bottom outline of the earthwork entity to be generated, as well as the slope value corresponding to each edge. The data is mainly automatically generated according to predefined rules or manually set by the user.
[0023] Figure 2 This is a schematic diagram of a slope setting according to an embodiment of this application, such as... Figure 2 As shown, the slope coefficient is determined by inputting the values of K1, K2, and K3; the step width is determined by inputting the values at the step plane position; and the step height is determined by inputting the values at the step height position.
[0024] Step S102: Based on multi-level slope data, determine the outward expansion distance of each side at different heights. For any target side, if other sides besides the target side have slopes at a certain height, calculate the outward expansion distance of the target side at that height through linear interpolation.
[0025] Obtain the outward expansion value for each edge at different heights. Specifically, the slope data records the slope order (first / second / third order), the height of each order, and the slope (outward expansion distance ÷ height). Iterate through each edge, retrieve the slope data for the current edge, and obtain the outward expansion distance for different heights based on the slope data.
[0026] Each edge can be independently sloped, meaning a slope can occur at any height on the current edge. Each section at any height must have a complete profile; if another edge has a slope at a certain height, the current edge must also have a corresponding outward expansion value. Therefore, it is necessary to iterate through the slope data of other edges and perform linear interpolation on the resulting heights to ensure the generated plane is continuous.
[0027] Figure 3 This is a schematic diagram of a multi-stage slope model according to an embodiment of this application, such as... Figure 4 As shown, edge 1 is a first-order slope, and edge 2 is a second-order slope. When generating edge 1, the outward expansion of edge 2 at the first-order height needs to be considered. The outward expansion value of edge 1 at this height is calculated to ensure the continuity of the generated surface of edge 1. Figure 4 This is a schematic diagram of an interpolated edge according to an embodiment of this application.
[0028] By unifying the outward expansion rules of different sides at the same height through linear interpolation, it is possible to force each side to have an effective outward expansion value at the same height, ensuring that the profile of each height section is completely closed, and avoiding slope breakage, gaps and discontinuities caused by inconsistent slope order.
[0029] It supports independent configuration of multi-level slope parameters for each edge, and uses interpolation to achieve smooth connection of heterogeneous slope edges. It retains the flexibility of single-sided multi-level and differentiated slope in engineering design, and makes the overall slope surface of the model continuous and regular, perfectly adapting to the actual modeling needs of complex earthwork slope in foundation pits.
[0030] Step S103: Based on the outward expansion distance corresponding to each height, the bottom contour line is expanded layer by layer to obtain multiple planar contours with different heights.
[0031] Iterate through the expansion data obtained in the previous step, translate the current cross-section to the height corresponding to the expansion distance of that cross-section, and then expand the contour according to the expansion distance. During the expansion process, it is necessary to maintain the correspondence with the original edges.
[0032] In some embodiments, step S103 includes: Step S1031: When the expanded contours intersect, the intersecting regions are clipped and simplified, and the correspondence between the clipped edges and the original edges is recorded.
[0033] Step S1032: The expansion of the next height is based on the clipped and simplified outline, and the expansion value corresponding to each outline edge of each height is determined by the recorded correspondence.
[0034] If the outline has concave portions, it will self-intersect. During the outward expansion of the outline, if the original outline has concave portions, the expanded outline may intersect with itself, forming overlapping or intersecting areas. During normal outward expansion, the outline expands evenly outward, maintaining a simple polygonal shape. During self-intersecting outward expansion, the concave areas cause the expanded edges to cross each other, forming a "bow" shape or a complex pattern with loops.
[0035] Such self-intersecting contours cannot be directly used to generate effective slope surfaces. They need to be trimmed and simplified first, and the correspondence between the trimmed edges and the original edges needs to be recorded. The next height is then expanded outward based on the removed contours. During the trimming and simplification process, the correspondence between the edges needs to be recorded so that the correspondence between each contour at each height and the original edges can be determined, thereby determining the specific expansion value.
[0036] In some embodiments, step S1031 of cropping the intersecting regions includes: Step S201: Detect and locate all intersection points of the boundary elements that have self-intersecting contours, and use each intersection point as a dividing node to split the boundary elements that participate in the intersection into several continuous sub-boundary elements.
[0037] Step S202: Based on the split boundary elements, re-trace the closable path according to the endpoint continuity to form one or more candidate closed regions.
[0038] Step S203: In the case of obtaining multiple candidate closed regions through decomposition, the candidate closed regions are respectively subjected to legality correction, direction correction and area calculation, and the candidate closed region with the largest area is selected as the effective region after self-intersection processing.
[0039] Validity correction refers to checking and repairing the geometric validity of candidate regions, eliminating those that are physically invalid or unusable for subsequent modeling. Specific operations include, but are not limited to: checking and repairing residual self-intersection problems within candidate regions; eliminating degenerate edges with lengths close to zero; merging duplicate vertices with distances less than the tolerance threshold; ensuring that the first and last vertices of a region are closed; and eliminating invalid regions with zero or negative areas. The purpose of validity correction is to eliminate minor geometric defects caused by floating-point precision errors, intersection anomalies, etc., ensuring that candidate regions have valid geometric shapes.
[0040] Orientation correction refers to adjusting the vertex order of candidate closed regions to satisfy a unified orientation convention (usually counterclockwise is positive and clockwise is negative). The specific operations include: calculating the directed area of the candidate region; determining the current vertex's orientation based on the sign of the directed area; reversing the vertex order if it's clockwise, and leaving it unchanged if it's counterclockwise. The purpose of orientation correction is to ensure the correct sign of subsequent area calculations and the consistent direction of face normal vectors, providing a unified geometric basis for selecting effective regions (such as the region with the largest area) from the candidate regions.
[0041] By using a standardized process of intersection point splitting, path retracing, and area optimization to process self-intersecting contours, abnormal boundaries can be accurately located and dismantled, and legal closed regions can be automatically reconstructed. This completely eliminates the problem of contour self-intersection at the two-dimensional level, ensuring that subsequent patch generation is error-free.
[0042] By using the candidate region with the largest area as the effective region, and combining it with legality correction and direction correction, it can be ensured that the outer contour always fits the actual earthwork range of the engineering design, avoiding the loss of effective regions or model deformation, and improving the accuracy and stability of multi-stage slope modeling.
[0043] Step S104: Based on the planar contours of adjacent heights, generate the slope surfaces corresponding to each side, and cut the intersecting surfaces in the slope surfaces to obtain a complete earthwork slope model.
[0044] In some embodiments, step S104, which generates the slope surface corresponding to each side based on the planar profile of adjacent heights, includes: Step S1041: Traverse the contour data of each height and connect the current edge with the corresponding edge of the previous height to form a surface.
[0045] Iterate through the contour data at each height, connecting the current edge to the corresponding edge of the previous one to generate a face. It's necessary to determine if the edges are reversed; if so, connect them in the opposite direction to avoid intersecting faces.
[0046] Step S1042: If the current edge is an arc edge, then the current edge is discretized into multiple straight lines, and the corresponding points of each discretized straight line are connected in sequence to form a slope surface.
[0047] In some embodiments, step S1042 includes: Step S301: Discretize the arc edge of the previous height by a fixed length, and uniformly discretize the arc edge of the current height according to the number of line segments after discretization of the previous height.
[0048] Step S302: When adjacent sides are parallel after discretization, connect the corresponding points of each discretized line in sequence to form a surface.
[0049] Step S303: If the adjacent sides are not parallel after discretization, the surface is further discretized into two triangular surfaces.
[0050] After expansion, a curved, distorted surface may appear, which is inconvenient for subsequent processing. It is necessary to discretize the arc into multiple straight lines. Specifically, based on a predetermined fixed length, the arc of the first edge is discretized first, and the arc of the next edge is discretized uniformly according to the number of discretized edges of the first edge. After discretization, they are connected to form a surface.
[0051] After discretization, the edges may become non-parallel, resulting in distorted surfaces. In this case, the surface needs to be further discretized into two triangular faces to ensure that it is a plane.
[0052] By employing a dual approach of discretizing curved edges with straight lines and triangulating non-parallel surfaces, the problem of distorted surfaces easily generated by curved outward expansion is solved, ensuring that all slope surfaces are standard planes, thereby improving the geometric regularity of the model and the stability of subsequent operations such as quantity calculation, rendering, and sectioning.
[0053] By adopting an alignment method with a fixed number of leading edges and uniformly discrete current edges, it can ensure that the upper and lower contour edge points are strictly corresponding, and there is no misalignment or intersection when connecting them into surfaces. At the same time, invalid intersection surfaces are avoided by judging the reverse connection, making the surface generation logic more rigorous and the model topology cleaner.
[0054] By splitting the non-parallel twisted surface into two triangular faces, it is ensured that each generated surface is a plane, completely eliminating curved and abnormal surfaces, allowing the multi-level slope model to maintain geometric simplicity and computational efficiency even under complex contours.
[0055] In some embodiments, the cutting process of the intersecting surfaces in the slope surface in step S104 includes: Step S1043: Obtain all slope surfaces generated by expanding outward at the current height, and determine the intersection lines between each slope surface.
[0056] Step S1044: Use the intersection line to cut the slope surface, delete the self-intersecting surfaces located inside the slope entity, and retain the surfaces that constitute the slope outline surface.
[0057] If self-intersections occur during the current height expansion process, the resulting surfaces will appear inside the shape, requiring cutting processing.
[0058] Extract all faces generated from the current face, and find the intersections of each face with other faces to obtain all intersection lines. Use these lines to cut the faces, first using lines that penetrate the face, then attempting to connect the remaining lines to form a penetrating line before cutting again. After cutting, retain the faces that constitute the slope profile surface.
[0059] It should be noted that step S1031 is the first stage of processing, where the 2D trimming simplifies the expanded contour. Theoretically, the simplified contour has no self-intersections, but the faces generated based on it may still have internal intersections. Step S104 is the second stage of processing, where the 3D face cutting targets the already generated faces, including residual internal faces caused by discretization, numerical errors, or complex topology.
[0060] First, the 2D outline is trimmed and simplified (preventative processing), then the 3D surface is cut (remedial processing). To avoid the 2D trimming and simplification not completely eliminating internal surface problems, 3D cutting is used as a supplementary process.
[0061] Through the above steps, the traditional complex 3D volume intersection modeling is transformed into a controllable 2D geometric solution. By using contour expansion, self-intersection elimination, and layered surface cutting, the computational load is significantly reduced. It supports independent setting of first, second, and third-order slopes, allowing each edge to be configured with its own slope order, height, and gradient, meeting the real-world design requirements of complex multi-order slopes in foundation pits. When different edges have inconsistent slope orders, linear interpolation is used to supplement the expansion values of different slope edges at the same height, ensuring continuous connection of slope surfaces without gaps or misalignments. This solves the problem that existing earthwork slope modeling methods cannot support independently set multi-order slope parameters for each edge and are prone to topological errors such as surface discontinuities and self-intersections under different numbers of steps.
[0062] In some embodiments, the method further includes: Step S401: When redundant edges are generated during the expansion process due to the abnormal intersection of the extension of the approximately parallel edges, the slope angle of the redundant edges is set to zero and they are included in the corresponding relationship table. Step S402: Connect the redundant edges in the corresponding relationship table to the points on the corresponding original edges stored in the contour trimming process to generate triangular faces.
[0063] During the contour expansion process, to generate a complete expanded contour, adjacent edges need to be extended and intersected to determine the vertex positions of the new expanded contour. When two edges are approximately parallel, the intersection point of their extensions may be located at a very far position, even impossible to determine precisely in numerical calculations, thus causing anomalies. Intersection anomalies result in an extra edge that was not originally present, generated outside the normal expanded contour.
[0064] The criteria for identifying extra abnormal edges can include: abnormal length, where the length of the edge segment is less than a preset threshold (e.g., 1e-6 times the total length of the contour); no corresponding original edge, where the edge corresponding to the edge cannot be found in the original contour; abnormal position, where the edge is located near the corner or vertex of the normal outward contour; and abnormal direction, where the direction of the edge is inconsistent with the direction of the adjacent edge.
[0065] The slope angle is the angle between the slope and the horizontal plane, or the slope coefficient, which is the ratio of the outward extension distance to the height. Setting the slope angle to zero indicates that the slope surface corresponding to that side is vertical, and the outward extension distance does not change with the height.
[0066] Set the slope angle of the extra edge to zero so that the face corresponding to the edge is vertically downward. This will not produce additional geometric distortion, and the vertical face will not have complex intersections with other faces, which will facilitate subsequent processing.
[0067] During the slope surface generation process, the current outer edge is an extra edge, which needs to be connected with the corresponding point stored in the previous step to form a triangular face.
[0068] It should be noted that step S401 is the preliminary marking and data preparation stage, the purpose of which is to establish the data structure and correspondence of redundant edges in preparation for subsequent generation. Step S402 is the later geometry generation stage, which uses the established correspondence to actually generate the slope surface corresponding to the redundant edges.
[0069] By setting the slope angle to zero and incorporating it into the corresponding relationship table, standardized control of abnormal edges is achieved. This avoids modeling interruptions caused by intersection failures and prevents abnormal edges from generating additional outward expansion and geometric distortion, thus ensuring the stable closure of the overall contour.
[0070] By connecting the redundant edges with the corresponding points of the original edges to generate triangular faces, the gaps in the model are filled with simple geometric structures, so that the slope shape has no broken surfaces or overhanging edges. At the same time, the triangular face calculation is efficient and highly compatible, and it is suitable for subsequent BIM quantity calculation and model rendering.
[0071] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0072] This embodiment also provides a system for generating multi-stage slope excavation for building models. This system is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0073] Figure 5 This is a structural block diagram of a system for generating multi-stage slope excavation of building models according to an embodiment of this application, such as... Figure 5 As shown, the system includes: The data acquisition module 51 is used to acquire the bottom outline of the earthwork entity and the multi-level slope data corresponding to each side. The multi-level slope data includes the slope level, as well as the height and slope coefficient of each level.
[0074] The distance calculation module 52 is used to determine the outward expansion distance of each side at different heights based on multi-level slope data. For any target side, if other sides besides the target side have slopes at a certain height, the outward expansion distance of the target side at the height is calculated by linear interpolation.
[0075] The expansion module 53 is used to expand the bottom contour line layer by layer according to the expansion distance corresponding to each height, so as to obtain multiple planar contours with different heights, and to handle contour self-intersection during the expansion process.
[0076] The model generation module 54 is used to generate the slope surface corresponding to each side based on the planar contour of adjacent heights, and to cut the intersecting surfaces in the slope surface to obtain a complete earthwork slope model.
[0077] In some embodiments, the expansion module 53 includes: The trimming module is used to trim the intersecting regions when the expanded contours intersect, and to record the correspondence between the trimmed edges and the original edges.
[0078] The expansion value determination module is used to determine the expansion value of the next height based on the clipped contour, and determines the expansion value corresponding to each contour edge of each height through the recorded correspondence.
[0079] In some embodiments, the cropping module includes: The intersection point determination module is used to traverse all edges of the self-intersecting region and determine the intersection point of each edge with other edges. The intersection point does not include the shared endpoints of adjacent edges.
[0080] The judgment module is used to cut each edge at the intersection point, divide it into multiple sub-segments, and determine which sub-segments belong to valid contours and which belong to invalid contours generated by self-intersection.
[0081] The first connection module is used to connect the segments that are judged to be valid contours in sequence to form a new contour.
[0082] In some embodiments, the model generation module 54 includes: The second connection module is used to traverse the contour data at each height and connect the current edge with the corresponding edge at the previous height to form a surface.
[0083] The curved edge processing module is used to discretize the current edge into multiple straight lines if the current edge is curved, and then connect the corresponding points of each of the discretized straight lines in sequence to form a slope surface.
[0084] In some embodiments, the curved edge processing module includes: The edge discretization module is used to discretize the arc edge of the previous height by a fixed length, and to uniformly discretize the arc edge of the current height based on the number of line segments after discretization of the previous height.
[0085] The third connection module is used to connect the corresponding points of each discrete straight line in sequence to form a surface when adjacent sides are parallel after discretization.
[0086] The surface discretization module is used to further discretize a surface into two triangular surfaces when adjacent sides are not parallel after discretization.
[0087] In some embodiments, the model generation module 54 includes: The intersection determination module is used to obtain all the slope surfaces generated by expanding outward at the current height and determine the intersection lines between each slope surface.
[0088] The cutting module is used to cut the slope surface using intersection lines, delete self-intersecting surfaces located inside the slope entity, and retain the surfaces that constitute the slope outline surface.
[0089] In some embodiments, the system further includes: The redundant edge setting module is used to set the slope angle of the redundant edge to zero and include it in the corresponding relationship table when redundant edges are generated during the expansion process due to the abnormal intersection of the extension of approximately parallel edges.
[0090] The redundant edge connection module is used to connect the redundant edges in the corresponding relationship table with the points on the corresponding original edges stored in the contour trimming process to generate triangular faces.
[0091] The system transforms traditional, complex 3D volume intersection modeling into controllable 2D geometric solutions. Through contour expansion, self-intersection elimination, and layered surface cutting, it significantly reduces computational load. It supports independent multi-level settings, allowing each edge to be configured with its own slope order, height, and gradient, meeting the real-world design requirements of complex multi-level slopes in foundation pits. When different edges have inconsistent slope orders, linear interpolation is used to supplement the expansion values of different slope edges at the same height, ensuring continuous connection of slope surfaces without gaps or misalignments. This solves the problems of existing earthwork slope modeling methods, which cannot support independently set multi-level slope parameters for each edge and are prone to topological errors such as surface discontinuities and self-intersections under different numbers of steps.
[0092] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0093] This embodiment also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0094] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0095] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program: S1, obtain the bottom outline of the earthwork entity and the multi-level slope data corresponding to each side. The multi-level slope data includes the slope level, as well as the height and slope coefficient of each level.
[0096] S2, based on multi-level slope data, determines the outward expansion distance of each side at different heights. For any target side, if other sides besides the target side have slopes at a certain height, the outward expansion distance of the target side at the height is calculated by linear interpolation.
[0097] S3. Based on the outward expansion distance corresponding to each height, the bottom outline is expanded layer by layer to obtain multiple planar outlines at different heights.
[0098] S4 generates the slope surface corresponding to each side based on the planar profile of adjacent heights, and cuts the intersecting surfaces in the slope surface to obtain the complete earthwork slope model.
[0099] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0100] In one embodiment, Figure 6 This is a schematic diagram of the internal structure of an electronic device according to an embodiment of this application, such as... Figure 6 As shown, an electronic device is provided, which can be a server, and its internal structure diagram can be as follows. Figure 6 As shown, the electronic device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a method for generating multi-stage slope excavation for a building model.
[0101] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0102] 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 computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0103] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0104] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for generating multi-stage slope excavation in a building model, characterized in that, The method includes: Obtain the bottom outline of the earthwork entity and the multi-level slope data corresponding to each side. The multi-level slope data includes the slope level, as well as the height and slope coefficient of each level. Based on the multi-level slope data, the outward expansion distance of each side at different heights is determined. For any target side, if other sides besides the target side have slopes at a certain height, the outward expansion distance of the target side at that height is calculated by linear interpolation. Based on the outward expansion distance corresponding to each height, the bottom contour line is expanded layer by layer to obtain multiple planar contours with different heights; Based on the planar contours of adjacent heights, the slope surfaces corresponding to each side are generated, and the intersecting surfaces in the slope surfaces are cut to obtain a complete earthwork slope model.
2. The method according to claim 1, characterized in that, The step of expanding the bottom contour line layer by layer according to the expansion distance corresponding to each height includes: When the expanded contours intersect with each other, the intersecting regions are clipped, and the correspondence between the clipped edges and the original edges is recorded. The expansion of the next height is based on the clipped outline, and the expansion value corresponding to each outline edge of each height is determined by the recorded correspondence.
3. The method according to claim 2, characterized in that, The method of cropping the intersecting regions includes: Detect and locate all intersection points of boundary elements that exhibit self-intersecting contours, and use each intersection point as a dividing node to split the boundary elements involved in the intersection into several consecutive sub-boundary elements. Based on the split boundary elements, closeable paths are re-traced according to endpoint continuity to form one or more candidate closed regions; When multiple candidate closed regions are obtained through decomposition, the legality correction, direction correction and area calculation are performed on the candidate closed regions respectively, and the candidate closed region with the largest area is selected as the effective region after self-intersection processing.
4. The method according to claim 1, characterized in that, The process of generating the slope surface corresponding to each side based on the planar profile of adjacent heights includes: Iterate through the contour data at each height and connect the current edge with the corresponding edge at the previous height to form a face; If the current edge is an arc edge, then the current edge is discretized into multiple straight lines, and the corresponding points of each discretized straight line are connected in sequence to form the slope surface.
5. The method according to claim 4, characterized in that, The step of discretizing the current edge into multiple straight lines and connecting the corresponding points of each discretized line in sequence to form the slope surface includes: Discretize the arc edge of the previous height with a fixed length, and then uniformly discretize the arc edge of the current height based on the number of line segments after discretization of the previous height. When adjacent sides are parallel after discretization, the corresponding points of each discretized line are connected sequentially to form a surface; If adjacent sides are not parallel after discretization, the surface is further discretized into two triangular surfaces.
6. The method according to claim 1, characterized in that, The cutting process for the intersecting surfaces in the slope surface includes: Obtain all slope surfaces generated by expanding outwards at the current height, and determine the intersection lines between each slope surface; The slope surface is cut using the intersection line, and the self-intersecting surfaces located inside the slope entity are deleted, while the surfaces that constitute the slope outline are retained.
7. The method according to claim 4, characterized in that, The method further includes: When redundant edges are generated during the expansion process due to the abnormal intersection of the extension of approximately parallel edges, the slope angle of the redundant edges is set to zero and they are included in the corresponding relationship table. Connect the redundant edges in the correspondence table to the points on the corresponding original edges stored during the contour trimming process to generate triangular faces.
8. A system for generating multi-stage slope excavation in building models, characterized in that, The system includes: The data acquisition module is used to acquire the bottom outline of the earthwork entity and the multi-level slope data corresponding to each side. The multi-level slope data includes the slope level, as well as the height and slope coefficient of each level. The distance calculation module is used to determine the outward expansion distance of each side at different heights based on the multi-level slope data. For any target side, if other sides besides the target side have slopes at a certain height, the outward expansion distance of the target side at that height is calculated by linear interpolation. The expansion module is used to expand the bottom contour line layer by layer according to the expansion distance corresponding to each height, to obtain multiple planar contours of different heights, and to handle contour self-intersection during the expansion process; The model generation module is used to generate the slope surface corresponding to each side based on the planar contour of adjacent heights, and to cut the intersecting surfaces in the slope surface to obtain a complete earthwork slope model.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for generating multi-stage slope of earthwork in the building model as described in any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the method for generating multi-stage slope of earthwork in the building model as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Foundation pit earthwork backfilling method based on BIM technology
CN114297760A